Overview | Package | Class | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 twenty-four hours.

See Also:
  `AmazonSNS.subscribe(SubscribeRequest)`

Constructor Summary
`SubscribeRequest()` Default constructor for a new SubscribeRequest object.
`SubscribeRequest(String topicArn, String protocol, String endpoint)` Constructs a new SubscribeRequest object.

Method Summary
`String` | `getEndpoint()` The endpoint that you want to receive notifications.
`String` | `getProtocol()` The protocol you want to use.
`String` | `getTopicArn()` The ARN of topic you want to subscribe to.
`void` | `setEndpoint(String endpoint)` The endpoint that you want to receive notifications.
`void` | `setProtocol(String protocol)` The protocol you want to use.
`void` | `setTopicArn(String topicArn)` The ARN of topic you want to subscribe to.
`String` | `toString()` Returns a string representation of this object; useful for testing and debugging.
`SubscribeRequest` | `withEndpoint(String endpoint)` The endpoint that you want to receive notifications.
`SubscribeRequest` | `withProtocol(String protocol)` The protocol you want to use.
`SubscribeRequest` | `withTopicArn(String topicArn)` The ARN of topic you want to subscribe to.

Methods inherited from class com.amazonaws.AmazonWebServiceRequest
`copyPrivateRequestParameters`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### 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

Method Detail

### 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()`

Overview | Package | Class | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.