public class SubscribeRequest extends AmazonWebServiceRequest implements java.io.Serializable
Prepares to subscribe an endpoint by sending the endpoint a confirmation
message. To actually create a subscription, the endpoint owner must call the
ConfirmSubscription
action with the token from the confirmation
message. Confirmation tokens are valid for three days.
Constructor and Description |
---|
SubscribeRequest()
Default constructor for SubscribeRequest object.
|
SubscribeRequest(java.lang.String topicArn,
java.lang.String protocol,
java.lang.String endpoint)
Constructs a new SubscribeRequest object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getEndpoint()
The endpoint that you want to receive notifications.
|
java.lang.String |
getProtocol()
The protocol you want to use.
|
java.lang.String |
getTopicArn()
The ARN of the topic you want to subscribe to.
|
int |
hashCode() |
void |
setEndpoint(java.lang.String endpoint)
The endpoint that you want to receive notifications.
|
void |
setProtocol(java.lang.String protocol)
The protocol you want to use.
|
void |
setTopicArn(java.lang.String topicArn)
The ARN of the topic you want to subscribe to.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
SubscribeRequest |
withEndpoint(java.lang.String endpoint)
The endpoint that you want to receive notifications.
|
SubscribeRequest |
withProtocol(java.lang.String protocol)
The protocol you want to use.
|
SubscribeRequest |
withTopicArn(java.lang.String topicArn)
The ARN of the topic you want to subscribe to.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public SubscribeRequest()
public SubscribeRequest(java.lang.String topicArn, java.lang.String protocol, java.lang.String endpoint)
topicArn
- The ARN of the topic you want to subscribe to.
protocol
- The protocol you want to use. Supported protocols include:
http
-- delivery of JSON-encoded message via HTTP
POST
https
-- delivery of JSON-encoded message via
HTTPS POST
email
-- delivery of message via SMTP
email-json
-- delivery of JSON-encoded message
via SMTP
sms
-- delivery of message via SMS
sqs
-- delivery of JSON-encoded message to an
Amazon SQS queue
application
-- delivery of JSON-encoded message
to an EndpointArn for a mobile app and device.
lambda
-- delivery of JSON-encoded message to an
AWS Lambda function.
endpoint
- The endpoint that you want to receive notifications. Endpoints vary by protocol:
For the http
protocol, the endpoint is an URL
beginning with "http://"
For the https
protocol, the endpoint is a URL
beginning with "https://"
For the email
protocol, the endpoint is an email
address
For the email-json
protocol, the endpoint is an
email address
For the sms
protocol, the endpoint is a phone
number of an SMS-enabled device
For the sqs
protocol, the endpoint is the ARN of
an Amazon SQS queue
For the application
protocol, the endpoint is the
EndpointArn of a mobile app and device.
For the lambda
protocol, the endpoint is the ARN
of an AWS Lambda function.
public java.lang.String getTopicArn()
The ARN of the topic you want to subscribe to.
The ARN of the topic you want to subscribe to.
public void setTopicArn(java.lang.String topicArn)
The ARN of the topic you want to subscribe to.
topicArn
- The ARN of the topic you want to subscribe to.
public SubscribeRequest withTopicArn(java.lang.String topicArn)
The ARN of the topic you want to subscribe to.
Returns a reference to this object so that method calls can be chained together.
topicArn
- The ARN of the topic you want to subscribe to.
public java.lang.String getProtocol()
The protocol you want to use. Supported protocols include:
http
-- delivery of JSON-encoded message via HTTP POST
https
-- delivery of JSON-encoded message via HTTPS POST
email
-- delivery of message via SMTP
email-json
-- delivery of JSON-encoded message via SMTP
sms
-- delivery of message via SMS
sqs
-- delivery of JSON-encoded message to an Amazon SQS
queue
application
-- delivery of JSON-encoded message to an
EndpointArn for a mobile app and device.
lambda
-- delivery of JSON-encoded message to an AWS Lambda
function.
The protocol you want to use. Supported protocols include:
http
-- delivery of JSON-encoded message via HTTP
POST
https
-- delivery of JSON-encoded message via HTTPS
POST
email
-- delivery of message via SMTP
email-json
-- delivery of JSON-encoded message via
SMTP
sms
-- delivery of message via SMS
sqs
-- delivery of JSON-encoded message to an Amazon
SQS queue
application
-- delivery of JSON-encoded message to
an EndpointArn for a mobile app and device.
lambda
-- delivery of JSON-encoded message to an AWS
Lambda function.
public void setProtocol(java.lang.String protocol)
The protocol you want to use. Supported protocols include:
http
-- delivery of JSON-encoded message via HTTP POST
https
-- delivery of JSON-encoded message via HTTPS POST
email
-- delivery of message via SMTP
email-json
-- delivery of JSON-encoded message via SMTP
sms
-- delivery of message via SMS
sqs
-- delivery of JSON-encoded message to an Amazon SQS
queue
application
-- delivery of JSON-encoded message to an
EndpointArn for a mobile app and device.
lambda
-- delivery of JSON-encoded message to an AWS Lambda
function.
protocol
- The protocol you want to use. Supported protocols include:
http
-- delivery of JSON-encoded message via HTTP
POST
https
-- delivery of JSON-encoded message via
HTTPS POST
email
-- delivery of message via SMTP
email-json
-- delivery of JSON-encoded message
via SMTP
sms
-- delivery of message via SMS
sqs
-- delivery of JSON-encoded message to an
Amazon SQS queue
application
-- delivery of JSON-encoded message
to an EndpointArn for a mobile app and device.
lambda
-- delivery of JSON-encoded message to an
AWS Lambda function.
public SubscribeRequest withProtocol(java.lang.String protocol)
The protocol you want to use. Supported protocols include:
http
-- delivery of JSON-encoded message via HTTP POST
https
-- delivery of JSON-encoded message via HTTPS POST
email
-- delivery of message via SMTP
email-json
-- delivery of JSON-encoded message via SMTP
sms
-- delivery of message via SMS
sqs
-- delivery of JSON-encoded message to an Amazon SQS
queue
application
-- delivery of JSON-encoded message to an
EndpointArn for a mobile app and device.
lambda
-- delivery of JSON-encoded message to an AWS Lambda
function.
Returns a reference to this object so that method calls can be chained together.
protocol
- The protocol you want to use. Supported protocols include:
http
-- delivery of JSON-encoded message via HTTP
POST
https
-- delivery of JSON-encoded message via
HTTPS POST
email
-- delivery of message via SMTP
email-json
-- delivery of JSON-encoded message
via SMTP
sms
-- delivery of message via SMS
sqs
-- delivery of JSON-encoded message to an
Amazon SQS queue
application
-- delivery of JSON-encoded message
to an EndpointArn for a mobile app and device.
lambda
-- delivery of JSON-encoded message to an
AWS Lambda function.
public java.lang.String getEndpoint()
The endpoint that you want to receive notifications. Endpoints vary by protocol:
For the http
protocol, the endpoint is an URL beginning with
"http://"
For the https
protocol, the endpoint is a URL beginning with
"https://"
For the email
protocol, the endpoint is an email address
For the email-json
protocol, the endpoint is an email
address
For the sms
protocol, the endpoint is a phone number of an
SMS-enabled device
For the sqs
protocol, the endpoint is the ARN of an Amazon
SQS queue
For the application
protocol, the endpoint is the
EndpointArn of a mobile app and device.
For the lambda
protocol, the endpoint is the ARN of an AWS
Lambda function.
The endpoint that you want to receive notifications. Endpoints vary by protocol:
For the http
protocol, the endpoint is an URL
beginning with "http://"
For the https
protocol, the endpoint is a URL
beginning with "https://"
For the email
protocol, the endpoint is an email
address
For the email-json
protocol, the endpoint is an
email address
For the sms
protocol, the endpoint is a phone number
of an SMS-enabled device
For the sqs
protocol, the endpoint is the ARN of an
Amazon SQS queue
For the application
protocol, the endpoint is the
EndpointArn of a mobile app and device.
For the lambda
protocol, the endpoint is the ARN of
an AWS Lambda function.
public void setEndpoint(java.lang.String endpoint)
The endpoint that you want to receive notifications. Endpoints vary by protocol:
For the http
protocol, the endpoint is an URL beginning with
"http://"
For the https
protocol, the endpoint is a URL beginning with
"https://"
For the email
protocol, the endpoint is an email address
For the email-json
protocol, the endpoint is an email
address
For the sms
protocol, the endpoint is a phone number of an
SMS-enabled device
For the sqs
protocol, the endpoint is the ARN of an Amazon
SQS queue
For the application
protocol, the endpoint is the
EndpointArn of a mobile app and device.
For the lambda
protocol, the endpoint is the ARN of an AWS
Lambda function.
endpoint
- The endpoint that you want to receive notifications. Endpoints vary by protocol:
For the http
protocol, the endpoint is an URL
beginning with "http://"
For the https
protocol, the endpoint is a URL
beginning with "https://"
For the email
protocol, the endpoint is an email
address
For the email-json
protocol, the endpoint is an
email address
For the sms
protocol, the endpoint is a phone
number of an SMS-enabled device
For the sqs
protocol, the endpoint is the ARN of
an Amazon SQS queue
For the application
protocol, the endpoint is the
EndpointArn of a mobile app and device.
For the lambda
protocol, the endpoint is the ARN
of an AWS Lambda function.
public SubscribeRequest withEndpoint(java.lang.String endpoint)
The endpoint that you want to receive notifications. Endpoints vary by protocol:
For the http
protocol, the endpoint is an URL beginning with
"http://"
For the https
protocol, the endpoint is a URL beginning with
"https://"
For the email
protocol, the endpoint is an email address
For the email-json
protocol, the endpoint is an email
address
For the sms
protocol, the endpoint is a phone number of an
SMS-enabled device
For the sqs
protocol, the endpoint is the ARN of an Amazon
SQS queue
For the application
protocol, the endpoint is the
EndpointArn of a mobile app and device.
For the lambda
protocol, the endpoint is the ARN of an AWS
Lambda function.
Returns a reference to this object so that method calls can be chained together.
endpoint
- The endpoint that you want to receive notifications. Endpoints vary by protocol:
For the http
protocol, the endpoint is an URL
beginning with "http://"
For the https
protocol, the endpoint is a URL
beginning with "https://"
For the email
protocol, the endpoint is an email
address
For the email-json
protocol, the endpoint is an
email address
For the sms
protocol, the endpoint is a phone
number of an SMS-enabled device
For the sqs
protocol, the endpoint is the ARN of
an Amazon SQS queue
For the application
protocol, the endpoint is the
EndpointArn of a mobile app and device.
For the lambda
protocol, the endpoint is the ARN
of an AWS Lambda function.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.