com.amazonaws.services.sns.model
Class SubscribeRequest
java.lang.Object
com.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.sns.model.SubscribeRequest
public class SubscribeRequest
- extends AmazonWebServiceRequest
Container for the parameters to the Subscribe operation
.
The Subscribe action 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.
- See Also:
AmazonSNS.subscribe(SubscribeRequest)
SubscribeRequest
public SubscribeRequest()
- Default constructor for a new SubscribeRequest object. Callers should use the
setter or fluent setter (with...) methods to initialize this object after creating it.
SubscribeRequest
public SubscribeRequest(String topicArn,
String protocol,
String endpoint)
- Constructs a new SubscribeRequest object.
Callers should use the setter or fluent setter (with...) methods to
initialize any additional object members.
- Parameters:
topicArn
- The ARN of 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
- sqs -- delivery of JSON-encoded message to an Amazon SQS
queue
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 e-mail address
- For the
email-json protocol, the endpoint is an e-mail address
- For
the sqs protocol, the endpoint is the ARN of an Amazon SQS queue
getTopicArn
public String getTopicArn()
- The ARN of topic you want to subscribe to.
- Returns:
- The ARN of topic you want to subscribe to.
setTopicArn
public void setTopicArn(String topicArn)
- The ARN of topic you want to subscribe to.
- Parameters:
topicArn
- The ARN of topic you want to subscribe to.
withTopicArn
public SubscribeRequest withTopicArn(String topicArn)
- The ARN of topic you want to subscribe to.
Returns a reference to this object so that method calls can be chained together.
- Parameters:
topicArn
- The ARN of topic you want to subscribe to.
- Returns:
- A reference to this updated object so that method calls can be chained
together.
getProtocol
public 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
- sqs -- delivery of
JSON-encoded message to an Amazon SQS queue
- Returns:
- 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
- sqs -- delivery of
JSON-encoded message to an Amazon SQS queue
setProtocol
public void setProtocol(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
- sqs -- delivery of
JSON-encoded message to an Amazon SQS queue
- Parameters:
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
- sqs -- delivery of
JSON-encoded message to an Amazon SQS queue
withProtocol
public SubscribeRequest withProtocol(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
- sqs -- delivery of
JSON-encoded message to an Amazon SQS queue
Returns a reference to this object so that method calls can be chained together.
- Parameters:
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
- sqs -- delivery of
JSON-encoded message to an Amazon SQS queue
- Returns:
- A reference to this updated object so that method calls can be chained
together.
getEndpoint
public 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 e-mail address
- For the email-json
protocol, the endpoint is an e-mail address
- For the sqs
protocol, the endpoint is the ARN of an Amazon SQS queue
- Returns:
- 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 e-mail address
- For the email-json
protocol, the endpoint is an e-mail address
- For the sqs
protocol, the endpoint is the ARN of an Amazon SQS queue
setEndpoint
public void setEndpoint(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 e-mail address
- For the email-json
protocol, the endpoint is an e-mail address
- For the sqs
protocol, the endpoint is the ARN of an Amazon SQS queue
- Parameters:
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 e-mail address
- For the email-json
protocol, the endpoint is an e-mail address
- For the sqs
protocol, the endpoint is the ARN of an Amazon SQS queue
withEndpoint
public SubscribeRequest withEndpoint(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 e-mail address
- For the email-json
protocol, the endpoint is an e-mail address
- For the sqs
protocol, the endpoint is the ARN of an Amazon SQS queue
Returns a reference to this object so that method calls can be chained together.
- Parameters:
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 e-mail address
- For the email-json
protocol, the endpoint is an e-mail address
- For the sqs
protocol, the endpoint is the ARN of an Amazon SQS queue
- Returns:
- A reference to this updated object so that method calls can be chained
together.
toString
public String toString()
- Returns a string representation of this object; useful for testing and
debugging.
- Overrides:
toString
in class Object
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.