com.amazonaws.services.redshift.model
Class CreateEventSubscriptionRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.redshift.model.CreateEventSubscriptionRequest
All Implemented Interfaces:
Serializable

public class CreateEventSubscriptionRequest
extends AmazonWebServiceRequest
implements Serializable

Container for the parameters to the CreateEventSubscription operation.

Creates an Amazon Redshift event notification subscription. This action requires an ARN (Amazon Resource Name) of an Amazon SNS topic created by either the Amazon Redshift console, the Amazon SNS console, or the Amazon SNS API. To obtain an ARN with Amazon SNS, you must create a topic in Amazon SNS and subscribe to the topic. The ARN is displayed in the SNS console.

You can specify the source type, and lists of Amazon Redshift source IDs, event categories, and event severities. Notifications will be sent for all events you want that match those criteria. For example, you can specify source type = cluster, source ID = my-cluster-1 and mycluster2, event categories = Availability, Backup, and severity = ERROR. The subscription will only send notifications for those ERROR events in the Availability and Backup categories for the specified clusters.

If you specify both the source type and source IDs, such as source type = cluster and source identifier = my-cluster-1, notifications will be sent for all the cluster events for my-cluster-1. If you specify a source type but do not specify a source identifier, you will receive notice of the events for the objects of that type in your AWS account. If you do not specify either the SourceType nor the SourceIdentifier, you will be notified of events generated from all Amazon Redshift sources belonging to your AWS account. You must specify a source type if you specify a source ID.

See Also:
AmazonRedshift.createEventSubscription(CreateEventSubscriptionRequest), Serialized Form

Constructor Summary
CreateEventSubscriptionRequest()
           
 
Method Summary
 boolean equals(Object obj)
           
 Boolean getEnabled()
          A Boolean value; set to true to activate the subscription, set to false to create the subscription but not active it.
 List<String> getEventCategories()
          Specifies the Amazon Redshift event categories to be published by the event notification subscription.
 String getSeverity()
          Specifies the Amazon Redshift event severity to be published by the event notification subscription.
 String getSnsTopicArn()
          The Amazon Resource Name (ARN) of the Amazon SNS topic used to transmit the event notifications.
 List<String> getSourceIds()
          A list of one or more identifiers of Amazon Redshift source objects.
 String getSourceType()
          The type of source that will be generating the events.
 String getSubscriptionName()
          The name of the event subscription to be created.
 int hashCode()
           
 Boolean isEnabled()
          A Boolean value; set to true to activate the subscription, set to false to create the subscription but not active it.
 void setEnabled(Boolean enabled)
          A Boolean value; set to true to activate the subscription, set to false to create the subscription but not active it.
 void setEventCategories(Collection<String> eventCategories)
          Specifies the Amazon Redshift event categories to be published by the event notification subscription.
 void setSeverity(String severity)
          Specifies the Amazon Redshift event severity to be published by the event notification subscription.
 void setSnsTopicArn(String snsTopicArn)
          The Amazon Resource Name (ARN) of the Amazon SNS topic used to transmit the event notifications.
 void setSourceIds(Collection<String> sourceIds)
          A list of one or more identifiers of Amazon Redshift source objects.
 void setSourceType(String sourceType)
          The type of source that will be generating the events.
 void setSubscriptionName(String subscriptionName)
          The name of the event subscription to be created.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 CreateEventSubscriptionRequest withEnabled(Boolean enabled)
          A Boolean value; set to true to activate the subscription, set to false to create the subscription but not active it.
 CreateEventSubscriptionRequest withEventCategories(Collection<String> eventCategories)
          Specifies the Amazon Redshift event categories to be published by the event notification subscription.
 CreateEventSubscriptionRequest withEventCategories(String... eventCategories)
          Specifies the Amazon Redshift event categories to be published by the event notification subscription.
 CreateEventSubscriptionRequest withSeverity(String severity)
          Specifies the Amazon Redshift event severity to be published by the event notification subscription.
 CreateEventSubscriptionRequest withSnsTopicArn(String snsTopicArn)
          The Amazon Resource Name (ARN) of the Amazon SNS topic used to transmit the event notifications.
 CreateEventSubscriptionRequest withSourceIds(Collection<String> sourceIds)
          A list of one or more identifiers of Amazon Redshift source objects.
 CreateEventSubscriptionRequest withSourceIds(String... sourceIds)
          A list of one or more identifiers of Amazon Redshift source objects.
 CreateEventSubscriptionRequest withSourceType(String sourceType)
          The type of source that will be generating the events.
 CreateEventSubscriptionRequest withSubscriptionName(String subscriptionName)
          The name of the event subscription to be created.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CreateEventSubscriptionRequest

public CreateEventSubscriptionRequest()
Method Detail

getSubscriptionName

public String getSubscriptionName()
The name of the event subscription to be created.

Constraints:

Returns:
The name of the event subscription to be created.

Constraints:

  • Cannot be null, empty, or blank.
  • Must contain from 1 to 255 alphanumeric characters or hyphens.
  • First character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.

setSubscriptionName

public void setSubscriptionName(String subscriptionName)
The name of the event subscription to be created.

Constraints:

Parameters:
subscriptionName - The name of the event subscription to be created.

Constraints:

  • Cannot be null, empty, or blank.
  • Must contain from 1 to 255 alphanumeric characters or hyphens.
  • First character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.

withSubscriptionName

public CreateEventSubscriptionRequest withSubscriptionName(String subscriptionName)
The name of the event subscription to be created.

Constraints:

Returns a reference to this object so that method calls can be chained together.

Parameters:
subscriptionName - The name of the event subscription to be created.

Constraints:

  • Cannot be null, empty, or blank.
  • Must contain from 1 to 255 alphanumeric characters or hyphens.
  • First character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.
Returns:
A reference to this updated object so that method calls can be chained together.

getSnsTopicArn

public String getSnsTopicArn()
The Amazon Resource Name (ARN) of the Amazon SNS topic used to transmit the event notifications. The ARN is created by Amazon SNS when you create a topic and subscribe to it.

Returns:
The Amazon Resource Name (ARN) of the Amazon SNS topic used to transmit the event notifications. The ARN is created by Amazon SNS when you create a topic and subscribe to it.

setSnsTopicArn

public void setSnsTopicArn(String snsTopicArn)
The Amazon Resource Name (ARN) of the Amazon SNS topic used to transmit the event notifications. The ARN is created by Amazon SNS when you create a topic and subscribe to it.

Parameters:
snsTopicArn - The Amazon Resource Name (ARN) of the Amazon SNS topic used to transmit the event notifications. The ARN is created by Amazon SNS when you create a topic and subscribe to it.

withSnsTopicArn

public CreateEventSubscriptionRequest withSnsTopicArn(String snsTopicArn)
The Amazon Resource Name (ARN) of the Amazon SNS topic used to transmit the event notifications. The ARN is created by Amazon SNS when you create a topic and subscribe to it.

Returns a reference to this object so that method calls can be chained together.

Parameters:
snsTopicArn - The Amazon Resource Name (ARN) of the Amazon SNS topic used to transmit the event notifications. The ARN is created by Amazon SNS when you create a topic and subscribe to it.
Returns:
A reference to this updated object so that method calls can be chained together.

getSourceType

public String getSourceType()
The type of source that will be generating the events. For example, if you want to be notified of events generated by a cluster, you would set this parameter to cluster. If this value is not specified, events are returned for all Amazon Redshift objects in your AWS account. You must specify a source type in order to specify source IDs.

Valid values: cluster, cluster-parameter-group, cluster-security-group, and cluster-snapshot.

Returns:
The type of source that will be generating the events. For example, if you want to be notified of events generated by a cluster, you would set this parameter to cluster. If this value is not specified, events are returned for all Amazon Redshift objects in your AWS account. You must specify a source type in order to specify source IDs.

Valid values: cluster, cluster-parameter-group, cluster-security-group, and cluster-snapshot.


setSourceType

public void setSourceType(String sourceType)
The type of source that will be generating the events. For example, if you want to be notified of events generated by a cluster, you would set this parameter to cluster. If this value is not specified, events are returned for all Amazon Redshift objects in your AWS account. You must specify a source type in order to specify source IDs.

Valid values: cluster, cluster-parameter-group, cluster-security-group, and cluster-snapshot.

Parameters:
sourceType - The type of source that will be generating the events. For example, if you want to be notified of events generated by a cluster, you would set this parameter to cluster. If this value is not specified, events are returned for all Amazon Redshift objects in your AWS account. You must specify a source type in order to specify source IDs.

Valid values: cluster, cluster-parameter-group, cluster-security-group, and cluster-snapshot.


withSourceType

public CreateEventSubscriptionRequest withSourceType(String sourceType)
The type of source that will be generating the events. For example, if you want to be notified of events generated by a cluster, you would set this parameter to cluster. If this value is not specified, events are returned for all Amazon Redshift objects in your AWS account. You must specify a source type in order to specify source IDs.

Valid values: cluster, cluster-parameter-group, cluster-security-group, and cluster-snapshot.

Returns a reference to this object so that method calls can be chained together.

Parameters:
sourceType - The type of source that will be generating the events. For example, if you want to be notified of events generated by a cluster, you would set this parameter to cluster. If this value is not specified, events are returned for all Amazon Redshift objects in your AWS account. You must specify a source type in order to specify source IDs.

Valid values: cluster, cluster-parameter-group, cluster-security-group, and cluster-snapshot.

Returns:
A reference to this updated object so that method calls can be chained together.

getSourceIds

public List<String> getSourceIds()
A list of one or more identifiers of Amazon Redshift source objects. All of the objects must be of the same type as was specified in the source type parameter. The event subscription will return only events generated by the specified objects. If not specified, then events are returned for all objects within the source type specified.

Example: my-cluster-1, my-cluster-2

Example: my-snapshot-20131010

Returns:
A list of one or more identifiers of Amazon Redshift source objects. All of the objects must be of the same type as was specified in the source type parameter. The event subscription will return only events generated by the specified objects. If not specified, then events are returned for all objects within the source type specified.

Example: my-cluster-1, my-cluster-2

Example: my-snapshot-20131010


setSourceIds

public void setSourceIds(Collection<String> sourceIds)
A list of one or more identifiers of Amazon Redshift source objects. All of the objects must be of the same type as was specified in the source type parameter. The event subscription will return only events generated by the specified objects. If not specified, then events are returned for all objects within the source type specified.

Example: my-cluster-1, my-cluster-2

Example: my-snapshot-20131010

Parameters:
sourceIds - A list of one or more identifiers of Amazon Redshift source objects. All of the objects must be of the same type as was specified in the source type parameter. The event subscription will return only events generated by the specified objects. If not specified, then events are returned for all objects within the source type specified.

Example: my-cluster-1, my-cluster-2

Example: my-snapshot-20131010


withSourceIds

public CreateEventSubscriptionRequest withSourceIds(String... sourceIds)
A list of one or more identifiers of Amazon Redshift source objects. All of the objects must be of the same type as was specified in the source type parameter. The event subscription will return only events generated by the specified objects. If not specified, then events are returned for all objects within the source type specified.

Example: my-cluster-1, my-cluster-2

Example: my-snapshot-20131010

Returns a reference to this object so that method calls can be chained together.

Parameters:
sourceIds - A list of one or more identifiers of Amazon Redshift source objects. All of the objects must be of the same type as was specified in the source type parameter. The event subscription will return only events generated by the specified objects. If not specified, then events are returned for all objects within the source type specified.

Example: my-cluster-1, my-cluster-2

Example: my-snapshot-20131010

Returns:
A reference to this updated object so that method calls can be chained together.

withSourceIds

public CreateEventSubscriptionRequest withSourceIds(Collection<String> sourceIds)
A list of one or more identifiers of Amazon Redshift source objects. All of the objects must be of the same type as was specified in the source type parameter. The event subscription will return only events generated by the specified objects. If not specified, then events are returned for all objects within the source type specified.

Example: my-cluster-1, my-cluster-2

Example: my-snapshot-20131010

Returns a reference to this object so that method calls can be chained together.

Parameters:
sourceIds - A list of one or more identifiers of Amazon Redshift source objects. All of the objects must be of the same type as was specified in the source type parameter. The event subscription will return only events generated by the specified objects. If not specified, then events are returned for all objects within the source type specified.

Example: my-cluster-1, my-cluster-2

Example: my-snapshot-20131010

Returns:
A reference to this updated object so that method calls can be chained together.

getEventCategories

public List<String> getEventCategories()
Specifies the Amazon Redshift event categories to be published by the event notification subscription.

Values: Configuration, Management, Monitoring, Security

Returns:
Specifies the Amazon Redshift event categories to be published by the event notification subscription.

Values: Configuration, Management, Monitoring, Security


setEventCategories

public void setEventCategories(Collection<String> eventCategories)
Specifies the Amazon Redshift event categories to be published by the event notification subscription.

Values: Configuration, Management, Monitoring, Security

Parameters:
eventCategories - Specifies the Amazon Redshift event categories to be published by the event notification subscription.

Values: Configuration, Management, Monitoring, Security


withEventCategories

public CreateEventSubscriptionRequest withEventCategories(String... eventCategories)
Specifies the Amazon Redshift event categories to be published by the event notification subscription.

Values: Configuration, Management, Monitoring, Security

Returns a reference to this object so that method calls can be chained together.

Parameters:
eventCategories - Specifies the Amazon Redshift event categories to be published by the event notification subscription.

Values: Configuration, Management, Monitoring, Security

Returns:
A reference to this updated object so that method calls can be chained together.

withEventCategories

public CreateEventSubscriptionRequest withEventCategories(Collection<String> eventCategories)
Specifies the Amazon Redshift event categories to be published by the event notification subscription.

Values: Configuration, Management, Monitoring, Security

Returns a reference to this object so that method calls can be chained together.

Parameters:
eventCategories - Specifies the Amazon Redshift event categories to be published by the event notification subscription.

Values: Configuration, Management, Monitoring, Security

Returns:
A reference to this updated object so that method calls can be chained together.

getSeverity

public String getSeverity()
Specifies the Amazon Redshift event severity to be published by the event notification subscription.

Values: ERROR, INFO

Returns:
Specifies the Amazon Redshift event severity to be published by the event notification subscription.

Values: ERROR, INFO


setSeverity

public void setSeverity(String severity)
Specifies the Amazon Redshift event severity to be published by the event notification subscription.

Values: ERROR, INFO

Parameters:
severity - Specifies the Amazon Redshift event severity to be published by the event notification subscription.

Values: ERROR, INFO


withSeverity

public CreateEventSubscriptionRequest withSeverity(String severity)
Specifies the Amazon Redshift event severity to be published by the event notification subscription.

Values: ERROR, INFO

Returns a reference to this object so that method calls can be chained together.

Parameters:
severity - Specifies the Amazon Redshift event severity to be published by the event notification subscription.

Values: ERROR, INFO

Returns:
A reference to this updated object so that method calls can be chained together.

isEnabled

public Boolean isEnabled()
A Boolean value; set to true to activate the subscription, set to false to create the subscription but not active it.

Returns:
A Boolean value; set to true to activate the subscription, set to false to create the subscription but not active it.

setEnabled

public void setEnabled(Boolean enabled)
A Boolean value; set to true to activate the subscription, set to false to create the subscription but not active it.

Parameters:
enabled - A Boolean value; set to true to activate the subscription, set to false to create the subscription but not active it.

withEnabled

public CreateEventSubscriptionRequest withEnabled(Boolean enabled)
A Boolean value; set to true to activate the subscription, set to false to create the subscription but not active it.

Returns a reference to this object so that method calls can be chained together.

Parameters:
enabled - A Boolean value; set to true to activate the subscription, set to false to create the subscription but not active it.
Returns:
A reference to this updated object so that method calls can be chained together.

getEnabled

public Boolean getEnabled()
A Boolean value; set to true to activate the subscription, set to false to create the subscription but not active it.

Returns:
A Boolean value; set to true to activate the subscription, set to false to create the subscription but not active it.

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 © 2016. All rights reserved.