public class CreateEventSubscriptionRequest extends AmazonWebServiceRequest implements Serializable
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.
NOOP
Constructor and Description |
---|
CreateEventSubscriptionRequest() |
Modifier and Type | Method and Description |
---|---|
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.
|
copyPrivateRequestParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public String getSubscriptionName()
Constraints:
Constraints:
public void setSubscriptionName(String subscriptionName)
Constraints:
subscriptionName
- The name of the event subscription to be created. Constraints:
public CreateEventSubscriptionRequest withSubscriptionName(String subscriptionName)
Constraints:
Returns a reference to this object so that method calls can be chained together.
subscriptionName
- The name of the event subscription to be created. Constraints:
public String getSnsTopicArn()
public void setSnsTopicArn(String snsTopicArn)
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.public CreateEventSubscriptionRequest withSnsTopicArn(String snsTopicArn)
Returns a reference to this object so that method calls can be chained together.
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.public String getSourceType()
Valid values: cluster, cluster-parameter-group, cluster-security-group, and cluster-snapshot.
Valid values: cluster, cluster-parameter-group, cluster-security-group, and cluster-snapshot.
public void setSourceType(String sourceType)
Valid values: cluster, cluster-parameter-group, cluster-security-group, and cluster-snapshot.
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.
public CreateEventSubscriptionRequest withSourceType(String sourceType)
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.
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.
public List<String> getSourceIds()
Example: my-cluster-1, my-cluster-2
Example: my-snapshot-20131010
Example: my-cluster-1, my-cluster-2
Example: my-snapshot-20131010
public void setSourceIds(Collection<String> sourceIds)
Example: my-cluster-1, my-cluster-2
Example: my-snapshot-20131010
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
public CreateEventSubscriptionRequest withSourceIds(String... sourceIds)
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.
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
public CreateEventSubscriptionRequest withSourceIds(Collection<String> sourceIds)
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.
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
public List<String> getEventCategories()
Values: Configuration, Management, Monitoring, Security
Values: Configuration, Management, Monitoring, Security
public void setEventCategories(Collection<String> eventCategories)
Values: Configuration, Management, Monitoring, Security
eventCategories
- Specifies the Amazon Redshift event categories to be published by the
event notification subscription. Values: Configuration, Management, Monitoring, Security
public CreateEventSubscriptionRequest withEventCategories(String... eventCategories)
Values: Configuration, Management, Monitoring, Security
Returns a reference to this object so that method calls can be chained together.
eventCategories
- Specifies the Amazon Redshift event categories to be published by the
event notification subscription. Values: Configuration, Management, Monitoring, Security
public CreateEventSubscriptionRequest withEventCategories(Collection<String> eventCategories)
Values: Configuration, Management, Monitoring, Security
Returns a reference to this object so that method calls can be chained together.
eventCategories
- Specifies the Amazon Redshift event categories to be published by the
event notification subscription. Values: Configuration, Management, Monitoring, Security
public String getSeverity()
Values: ERROR, INFO
Values: ERROR, INFO
public void setSeverity(String severity)
Values: ERROR, INFO
severity
- Specifies the Amazon Redshift event severity to be published by the
event notification subscription. Values: ERROR, INFO
public CreateEventSubscriptionRequest withSeverity(String severity)
Values: ERROR, INFO
Returns a reference to this object so that method calls can be chained together.
severity
- Specifies the Amazon Redshift event severity to be published by the
event notification subscription. Values: ERROR, INFO
public Boolean isEnabled()
true
to activate the
subscription, set to false
to create the subscription but
not active it.true
to activate the
subscription, set to false
to create the subscription but
not active it.public void setEnabled(Boolean enabled)
true
to activate the
subscription, set to false
to create the subscription but
not active it.enabled
- A Boolean value; set to true
to activate the
subscription, set to false
to create the subscription but
not active it.public CreateEventSubscriptionRequest withEnabled(Boolean enabled)
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.
enabled
- A Boolean value; set to true
to activate the
subscription, set to false
to create the subscription but
not active it.public Boolean getEnabled()
true
to activate the
subscription, set to false
to create the subscription but
not active it.true
to activate the
subscription, set to false
to create the subscription but
not active it.public String toString()
toString
in class Object
Object.toString()
Copyright © 2015. All rights reserved.