/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.redshift.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateEventSubscriptionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** ** 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. *
** 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. *
*/ private String snsTopicArn; /** ** 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 Amazon Web Services account. You must specify a source type in * order to specify source IDs. *
** Valid values: cluster, cluster-parameter-group, cluster-security-group, cluster-snapshot, and scheduled-action. *
*/ private String sourceType; /** ** 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 *
*/ private com.amazonaws.internal.SdkInternalList* Specifies the Amazon Redshift event categories to be published by the event notification subscription. *
** Values: configuration, management, monitoring, security, pending *
*/ private com.amazonaws.internal.SdkInternalList* Specifies the Amazon Redshift event severity to be published by the event notification subscription. *
** Values: ERROR, INFO *
*/ private String severity; /** *
* A boolean value; set to true
to activate the subscription, and set to false
to create
* the subscription but not activate it.
*
* A list of tag instances. *
*/ private com.amazonaws.internal.SdkInternalList* 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. *
** 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. *
** 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. *
** 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. *
** 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. *
** 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. *
** 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. *
* * @param 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 void setSnsTopicArn(String snsTopicArn) { this.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. *
* * @return 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 getSnsTopicArn() { return this.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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateEventSubscriptionRequest withSnsTopicArn(String snsTopicArn) { setSnsTopicArn(snsTopicArn); return this; } /** ** 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 Amazon Web Services account. You must specify a source type in * order to specify source IDs. *
** Valid values: cluster, cluster-parameter-group, cluster-security-group, cluster-snapshot, and scheduled-action. *
* * @param 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 Amazon Web Services account. You must specify a * source type in order to specify source IDs. ** Valid values: cluster, cluster-parameter-group, cluster-security-group, cluster-snapshot, and * scheduled-action. */ public void setSourceType(String sourceType) { this.sourceType = 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 Amazon Web Services account. You must specify a source type in * order to specify source IDs. *
** Valid values: cluster, cluster-parameter-group, cluster-security-group, cluster-snapshot, and scheduled-action. *
* * @return 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 Amazon Web Services account. You must specify a * source type in order to specify source IDs. ** Valid values: cluster, cluster-parameter-group, cluster-security-group, cluster-snapshot, and * scheduled-action. */ public String getSourceType() { return this.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 Amazon Web Services account. You must specify a source type in * order to specify source IDs. *
** Valid values: cluster, cluster-parameter-group, cluster-security-group, cluster-snapshot, and scheduled-action. *
* * @param 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 Amazon Web Services account. You must specify a * source type in order to specify source IDs. ** Valid values: cluster, cluster-parameter-group, cluster-security-group, cluster-snapshot, and * scheduled-action. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateEventSubscriptionRequest withSourceType(String sourceType) { setSourceType(sourceType); return this; } /** *
* 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 *
* * @return 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 java.util.List
* 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
*
* Example: my-cluster-1, my-cluster-2 *
*
* Example: my-snapshot-20131010
*/
public void setSourceIds(java.util.Collection
* 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
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSourceIds(java.util.Collection)} or {@link #withSourceIds(java.util.Collection)} if you want to
* override the existing values.
*
* Example: my-cluster-1, my-cluster-2 *
*
* Example: my-snapshot-20131010
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEventSubscriptionRequest withSourceIds(String... sourceIds) {
if (this.sourceIds == null) {
setSourceIds(new com.amazonaws.internal.SdkInternalList
* 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
*
* Example: my-cluster-1, my-cluster-2 *
*
* Example: my-snapshot-20131010
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEventSubscriptionRequest withSourceIds(java.util.Collection
* Specifies the Amazon Redshift event categories to be published by the event notification subscription.
*
* Values: configuration, management, monitoring, security, pending
*
* Values: configuration, management, monitoring, security, pending
*/
public java.util.List
* Specifies the Amazon Redshift event categories to be published by the event notification subscription.
*
* Values: configuration, management, monitoring, security, pending
*
* Values: configuration, management, monitoring, security, pending
*/
public void setEventCategories(java.util.Collection
* Specifies the Amazon Redshift event categories to be published by the event notification subscription.
*
* Values: configuration, management, monitoring, security, pending
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setEventCategories(java.util.Collection)} or {@link #withEventCategories(java.util.Collection)} if you
* want to override the existing values.
*
* Values: configuration, management, monitoring, security, pending
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEventSubscriptionRequest withEventCategories(String... eventCategories) {
if (this.eventCategories == null) {
setEventCategories(new com.amazonaws.internal.SdkInternalList
* Specifies the Amazon Redshift event categories to be published by the event notification subscription.
*
* Values: configuration, management, monitoring, security, pending
*
* Values: configuration, management, monitoring, security, pending
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEventSubscriptionRequest withEventCategories(java.util.Collection
* Specifies the Amazon Redshift event severity to be published by the event notification subscription.
*
* Values: ERROR, INFO
*
* Values: ERROR, INFO */ public void setSeverity(String severity) { this.severity = severity; } /** *
* Specifies the Amazon Redshift event severity to be published by the event notification subscription. *
** Values: ERROR, INFO *
* * @return Specifies the Amazon Redshift event severity to be published by the event notification subscription. ** Values: ERROR, INFO */ public String getSeverity() { return this.severity; } /** *
* Specifies the Amazon Redshift event severity to be published by the event notification subscription. *
** Values: ERROR, INFO *
* * @param severity * Specifies the Amazon Redshift event severity to be published by the event notification subscription. ** Values: ERROR, INFO * @return Returns a reference to this object so that method calls can be chained together. */ public CreateEventSubscriptionRequest withSeverity(String severity) { setSeverity(severity); return this; } /** *
* A boolean value; set to true
to activate the subscription, and set to false
to create
* the subscription but not activate it.
*
true
to activate the subscription, and set to false
to
* create the subscription but not activate it.
*/
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
/**
*
* A boolean value; set to true
to activate the subscription, and set to false
to create
* the subscription but not activate it.
*
true
to activate the subscription, and set to false
to
* create the subscription but not activate it.
*/
public Boolean getEnabled() {
return this.enabled;
}
/**
*
* A boolean value; set to true
to activate the subscription, and set to false
to create
* the subscription but not activate it.
*
true
to activate the subscription, and set to false
to
* create the subscription but not activate it.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEventSubscriptionRequest withEnabled(Boolean enabled) {
setEnabled(enabled);
return this;
}
/**
*
* A boolean value; set to true
to activate the subscription, and set to false
to create
* the subscription but not activate it.
*
true
to activate the subscription, and set to false
to
* create the subscription but not activate it.
*/
public Boolean isEnabled() {
return this.enabled;
}
/**
* * A list of tag instances. *
* * @return A list of tag instances. */ public java.util.List* A list of tag instances. *
* * @param tags * A list of tag instances. */ public void setTags(java.util.Collection* A list of tag instances. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * A list of tag instances. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateEventSubscriptionRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList* A list of tag instances. *
* * @param tags * A list of tag instances. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateEventSubscriptionRequest withTags(java.util.Collection