Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   /*
    * Copyright 2010-2015 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;
  
  
Container for the parameters to the RestoreFromClusterSnapshot operation.

Creates a new cluster from a snapshot. Amazon Redshift creates the resulting cluster with the same configuration as the original cluster from which the snapshot was created, except that the new cluster is created with the default cluster security and parameter group. After Amazon Redshift creates the cluster you can use the ModifyCluster API to associate a different security group and different parameter group with the restored cluster.

If you restore a cluster into a VPC, you must provide a cluster subnet group where you want the cluster restored.

For more information about working with snapshots, go to Amazon Redshift Snapshots in the Amazon Redshift Cluster Management Guide .

  
  public class RestoreFromClusterSnapshotRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The identifier of the cluster that will be created from restoring the snapshot.

Constraints:

  • Must contain from 1 to 63 alphanumeric characters or hyphens.
  • Alphabetic characters must be lowercase.
  • First character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.
  • Must be unique for all clusters within an AWS account.
  
      private String clusterIdentifier;

    
The name of the snapshot from which to create the new cluster. This parameter isn't case sensitive.

Example: my-snapshot-id

  
      private String snapshotIdentifier;

    
The name of the cluster the source snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.
  
      private String snapshotClusterIdentifier;

    
The port number on which the cluster accepts connections.

Default: The same port as the original cluster.

Constraints: Must be between 1115 and 65535.

  
      private Integer port;

    
The Amazon EC2 Availability Zone in which to restore the cluster.

Default: A random, system-chosen Availability Zone.

Example: us-east-1a

  
      private String availabilityZone;

    
If true, major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.

Default: true

  
      private Boolean allowVersionUpgrade;

    
The name of the subnet group where you want to cluster restored.

A snapshot of cluster in VPC can be restored only in VPC. Therefore, you must provide subnet group name where you want the cluster restored.

  
      private String clusterSubnetGroupName;

    
If true, the cluster can be accessed from a public network.
 
     private Boolean publiclyAccessible;

    
The AWS customer account used to create or copy the snapshot. Required if you are restoring a snapshot you do not own, optional if you own the snapshot.
 
     private String ownerAccount;

    
Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM.
 
     private String hsmClientCertificateIdentifier;

    
Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.
 
     private String hsmConfigurationIdentifier;

    
The elastic IP (EIP) address for the cluster.
 
     private String elasticIp;

    
The name of the parameter group to be associated with this cluster.

Default: The default Amazon Redshift cluster parameter group. For information about the default parameter group, go to Working with Amazon Redshift Parameter Groups.

Constraints:

  • Must be 1 to 255 alphanumeric characters or hyphens.
  • First character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.
 
     private String clusterParameterGroupName;

    
A list of security groups to be associated with this cluster.

Default: The default cluster security group for Amazon Redshift.

Cluster security groups only apply to clusters outside of VPCs.

 
A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster.

Default: The default VPC security group is associated with the cluster.

VPC security groups only apply to clusters in VPCs.

 
The weekly time range (in UTC) during which automated cluster maintenance can occur.

Format: ddd:hh24:mi-ddd:hh24:mi

Default: The value selected for the cluster from which the snapshot was taken. For more information about the time blocks for each region, see Maintenance Windows in Amazon Redshift Cluster Management Guide.

Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun

Constraints: Minimum 30-minute window.

 
     private String preferredMaintenanceWindow;

    
The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with CreateClusterSnapshot.

Default: The value selected for the cluster from which the snapshot was taken.

Constraints: Must be a value from 0 to 35.

 
     private Integer automatedSnapshotRetentionPeriod;

    
The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster that you restore from a shared snapshot.
 
     private String kmsKeyId;

    
The identifier of the cluster that will be created from restoring the snapshot.

Constraints:

  • Must contain from 1 to 63 alphanumeric characters or hyphens.
  • Alphabetic characters must be lowercase.
  • First character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.
  • Must be unique for all clusters within an AWS account.

Returns:
The identifier of the cluster that will be created from restoring the snapshot.

Constraints:

  • Must contain from 1 to 63 alphanumeric characters or hyphens.
  • Alphabetic characters must be lowercase.
  • First character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.
  • Must be unique for all clusters within an AWS account.
 
     public String getClusterIdentifier() {
         return ;
     }
    
    
The identifier of the cluster that will be created from restoring the snapshot.

Constraints:

  • Must contain from 1 to 63 alphanumeric characters or hyphens.
  • Alphabetic characters must be lowercase.
  • First character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.
  • Must be unique for all clusters within an AWS account.

Parameters:
clusterIdentifier The identifier of the cluster that will be created from restoring the snapshot.

Constraints:

  • Must contain from 1 to 63 alphanumeric characters or hyphens.
  • Alphabetic characters must be lowercase.
  • First character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.
  • Must be unique for all clusters within an AWS account.
 
     public void setClusterIdentifier(String clusterIdentifier) {
         this. = clusterIdentifier;
     }
    
    
The identifier of the cluster that will be created from restoring the snapshot.

Constraints:

  • Must contain from 1 to 63 alphanumeric characters or hyphens.
  • Alphabetic characters must be lowercase.
  • First character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.
  • Must be unique for all clusters within an AWS account.

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

Parameters:
clusterIdentifier The identifier of the cluster that will be created from restoring the snapshot.

Constraints:

  • Must contain from 1 to 63 alphanumeric characters or hyphens.
  • Alphabetic characters must be lowercase.
  • First character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.
  • Must be unique for all clusters within an AWS account.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public RestoreFromClusterSnapshotRequest withClusterIdentifier(String clusterIdentifier) {
         this. = clusterIdentifier;
         return this;
     }

    
The name of the snapshot from which to create the new cluster. This parameter isn't case sensitive.

Example: my-snapshot-id

Returns:
The name of the snapshot from which to create the new cluster. This parameter isn't case sensitive.

Example: my-snapshot-id

 
     public String getSnapshotIdentifier() {
         return ;
     }
    
    
The name of the snapshot from which to create the new cluster. This parameter isn't case sensitive.

Example: my-snapshot-id

Parameters:
snapshotIdentifier The name of the snapshot from which to create the new cluster. This parameter isn't case sensitive.

Example: my-snapshot-id

 
     public void setSnapshotIdentifier(String snapshotIdentifier) {
         this. = snapshotIdentifier;
     }
    
    
The name of the snapshot from which to create the new cluster. This parameter isn't case sensitive.

Example: my-snapshot-id

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

Parameters:
snapshotIdentifier The name of the snapshot from which to create the new cluster. This parameter isn't case sensitive.

Example: my-snapshot-id

Returns:
A reference to this updated object so that method calls can be chained together.
 
     public RestoreFromClusterSnapshotRequest withSnapshotIdentifier(String snapshotIdentifier) {
         this. = snapshotIdentifier;
         return this;
     }

    
The name of the cluster the source snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.

Returns:
The name of the cluster the source snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.
 
     public String getSnapshotClusterIdentifier() {
         return ;
     }
    
    
The name of the cluster the source snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.

Parameters:
snapshotClusterIdentifier The name of the cluster the source snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.
 
     public void setSnapshotClusterIdentifier(String snapshotClusterIdentifier) {
         this. = snapshotClusterIdentifier;
     }
    
    
The name of the cluster the source snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.

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

Parameters:
snapshotClusterIdentifier The name of the cluster the source snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public RestoreFromClusterSnapshotRequest withSnapshotClusterIdentifier(String snapshotClusterIdentifier) {
         this. = snapshotClusterIdentifier;
         return this;
     }

    
The port number on which the cluster accepts connections.

Default: The same port as the original cluster.

Constraints: Must be between 1115 and 65535.

Returns:
The port number on which the cluster accepts connections.

Default: The same port as the original cluster.

Constraints: Must be between 1115 and 65535.

 
     public Integer getPort() {
         return ;
     }
    
    
The port number on which the cluster accepts connections.

Default: The same port as the original cluster.

Constraints: Must be between 1115 and 65535.

Parameters:
port The port number on which the cluster accepts connections.

Default: The same port as the original cluster.

Constraints: Must be between 1115 and 65535.

 
     public void setPort(Integer port) {
         this. = port;
     }
    
    
The port number on which the cluster accepts connections.

Default: The same port as the original cluster.

Constraints: Must be between 1115 and 65535.

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

Parameters:
port The port number on which the cluster accepts connections.

Default: The same port as the original cluster.

Constraints: Must be between 1115 and 65535.

Returns:
A reference to this updated object so that method calls can be chained together.
 
         this. = port;
         return this;
     }

    
The Amazon EC2 Availability Zone in which to restore the cluster.

Default: A random, system-chosen Availability Zone.

Example: us-east-1a

Returns:
The Amazon EC2 Availability Zone in which to restore the cluster.

Default: A random, system-chosen Availability Zone.

Example: us-east-1a

 
     public String getAvailabilityZone() {
         return ;
     }
    
    
The Amazon EC2 Availability Zone in which to restore the cluster.

Default: A random, system-chosen Availability Zone.

Example: us-east-1a

Parameters:
availabilityZone The Amazon EC2 Availability Zone in which to restore the cluster.

Default: A random, system-chosen Availability Zone.

Example: us-east-1a

 
     public void setAvailabilityZone(String availabilityZone) {
         this. = availabilityZone;
     }
    
    
The Amazon EC2 Availability Zone in which to restore the cluster.

Default: A random, system-chosen Availability Zone.

Example: us-east-1a

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

Parameters:
availabilityZone The Amazon EC2 Availability Zone in which to restore the cluster.

Default: A random, system-chosen Availability Zone.

Example: us-east-1a

Returns:
A reference to this updated object so that method calls can be chained together.
 
     public RestoreFromClusterSnapshotRequest withAvailabilityZone(String availabilityZone) {
         this. = availabilityZone;
         return this;
     }

    
If true, major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.

Default: true

Returns:
If true, major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.

Default: true

 
     public Boolean isAllowVersionUpgrade() {
         return ;
     }
    
    
If true, major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.

Default: true

Parameters:
allowVersionUpgrade If true, major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.

Default: true

 
     public void setAllowVersionUpgrade(Boolean allowVersionUpgrade) {
         this. = allowVersionUpgrade;
     }
    
    
If true, major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.

Default: true

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

Parameters:
allowVersionUpgrade If true, major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.

Default: true

Returns:
A reference to this updated object so that method calls can be chained together.
 
     public RestoreFromClusterSnapshotRequest withAllowVersionUpgrade(Boolean allowVersionUpgrade) {
         this. = allowVersionUpgrade;
         return this;
     }

    
If true, major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.

Default: true

Returns:
If true, major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.

Default: true

 
     public Boolean getAllowVersionUpgrade() {
         return ;
     }

    
The name of the subnet group where you want to cluster restored.

A snapshot of cluster in VPC can be restored only in VPC. Therefore, you must provide subnet group name where you want the cluster restored.

Returns:
The name of the subnet group where you want to cluster restored.

A snapshot of cluster in VPC can be restored only in VPC. Therefore, you must provide subnet group name where you want the cluster restored.

 
     public String getClusterSubnetGroupName() {
         return ;
     }
    
    
The name of the subnet group where you want to cluster restored.

A snapshot of cluster in VPC can be restored only in VPC. Therefore, you must provide subnet group name where you want the cluster restored.

Parameters:
clusterSubnetGroupName The name of the subnet group where you want to cluster restored.

A snapshot of cluster in VPC can be restored only in VPC. Therefore, you must provide subnet group name where you want the cluster restored.

 
     public void setClusterSubnetGroupName(String clusterSubnetGroupName) {
         this. = clusterSubnetGroupName;
     }
    
    
The name of the subnet group where you want to cluster restored.

A snapshot of cluster in VPC can be restored only in VPC. Therefore, you must provide subnet group name where you want the cluster restored.

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

Parameters:
clusterSubnetGroupName The name of the subnet group where you want to cluster restored.

A snapshot of cluster in VPC can be restored only in VPC. Therefore, you must provide subnet group name where you want the cluster restored.

Returns:
A reference to this updated object so that method calls can be chained together.
 
     public RestoreFromClusterSnapshotRequest withClusterSubnetGroupName(String clusterSubnetGroupName) {
         this. = clusterSubnetGroupName;
         return this;
     }

    
If true, the cluster can be accessed from a public network.

Returns:
If true, the cluster can be accessed from a public network.
 
     public Boolean isPubliclyAccessible() {
         return ;
     }
    
    
If true, the cluster can be accessed from a public network.

Parameters:
publiclyAccessible If true, the cluster can be accessed from a public network.
 
     public void setPubliclyAccessible(Boolean publiclyAccessible) {
         this. = publiclyAccessible;
     }
    
    
If true, the cluster can be accessed from a public network.

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

Parameters:
publiclyAccessible If true, the cluster can be accessed from a public network.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public RestoreFromClusterSnapshotRequest withPubliclyAccessible(Boolean publiclyAccessible) {
         this. = publiclyAccessible;
         return this;
     }

    
If true, the cluster can be accessed from a public network.

Returns:
If true, the cluster can be accessed from a public network.
 
     public Boolean getPubliclyAccessible() {
         return ;
     }

    
The AWS customer account used to create or copy the snapshot. Required if you are restoring a snapshot you do not own, optional if you own the snapshot.

Returns:
The AWS customer account used to create or copy the snapshot. Required if you are restoring a snapshot you do not own, optional if you own the snapshot.
 
     public String getOwnerAccount() {
         return ;
     }
    
    
The AWS customer account used to create or copy the snapshot. Required if you are restoring a snapshot you do not own, optional if you own the snapshot.

Parameters:
ownerAccount The AWS customer account used to create or copy the snapshot. Required if you are restoring a snapshot you do not own, optional if you own the snapshot.
 
     public void setOwnerAccount(String ownerAccount) {
         this. = ownerAccount;
     }
    
    
The AWS customer account used to create or copy the snapshot. Required if you are restoring a snapshot you do not own, optional if you own the snapshot.

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

Parameters:
ownerAccount The AWS customer account used to create or copy the snapshot. Required if you are restoring a snapshot you do not own, optional if you own the snapshot.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public RestoreFromClusterSnapshotRequest withOwnerAccount(String ownerAccount) {
         this. = ownerAccount;
         return this;
     }

    
Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM.

Returns:
Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM.
 
         return ;
     }
    
    
Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM.

Parameters:
hsmClientCertificateIdentifier Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM.
 
     public void setHsmClientCertificateIdentifier(String hsmClientCertificateIdentifier) {
         this. = hsmClientCertificateIdentifier;
     }
    
    
Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM.

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

Parameters:
hsmClientCertificateIdentifier Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public RestoreFromClusterSnapshotRequest withHsmClientCertificateIdentifier(String hsmClientCertificateIdentifier) {
         this. = hsmClientCertificateIdentifier;
         return this;
     }

    
Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.

Returns:
Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.
 
         return ;
     }
    
    
Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.

Parameters:
hsmConfigurationIdentifier Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.
 
     public void setHsmConfigurationIdentifier(String hsmConfigurationIdentifier) {
         this. = hsmConfigurationIdentifier;
     }
    
    
Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.

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

Parameters:
hsmConfigurationIdentifier Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public RestoreFromClusterSnapshotRequest withHsmConfigurationIdentifier(String hsmConfigurationIdentifier) {
         this. = hsmConfigurationIdentifier;
         return this;
     }

    
The elastic IP (EIP) address for the cluster.

Returns:
The elastic IP (EIP) address for the cluster.
 
     public String getElasticIp() {
         return ;
     }
    
    
The elastic IP (EIP) address for the cluster.

Parameters:
elasticIp The elastic IP (EIP) address for the cluster.
 
     public void setElasticIp(String elasticIp) {
         this. = elasticIp;
     }
    
    
The elastic IP (EIP) address for the cluster.

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

Parameters:
elasticIp The elastic IP (EIP) address for the cluster.
Returns:
A reference to this updated object so that method calls can be chained together.
 
         this. = elasticIp;
         return this;
     }

    
The name of the parameter group to be associated with this cluster.

Default: The default Amazon Redshift cluster parameter group. For information about the default parameter group, go to Working with Amazon Redshift Parameter Groups.

Constraints:

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

Returns:
The name of the parameter group to be associated with this cluster.

Default: The default Amazon Redshift cluster parameter group. For information about the default parameter group, go to Working with Amazon Redshift Parameter Groups.

Constraints:

  • Must be 1 to 255 alphanumeric characters or hyphens.
  • First character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.
 
     public String getClusterParameterGroupName() {
         return ;
     }
    
    
The name of the parameter group to be associated with this cluster.

Default: The default Amazon Redshift cluster parameter group. For information about the default parameter group, go to Working with Amazon Redshift Parameter Groups.

Constraints:

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

Parameters:
clusterParameterGroupName The name of the parameter group to be associated with this cluster.

Default: The default Amazon Redshift cluster parameter group. For information about the default parameter group, go to Working with Amazon Redshift Parameter Groups.

Constraints:

  • Must be 1 to 255 alphanumeric characters or hyphens.
  • First character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.
 
     public void setClusterParameterGroupName(String clusterParameterGroupName) {
         this. = clusterParameterGroupName;
     }
    
    
The name of the parameter group to be associated with this cluster.

Default: The default Amazon Redshift cluster parameter group. For information about the default parameter group, go to Working with Amazon Redshift Parameter Groups.

Constraints:

  • Must be 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 object so that method calls can be chained together.

Parameters:
clusterParameterGroupName The name of the parameter group to be associated with this cluster.

Default: The default Amazon Redshift cluster parameter group. For information about the default parameter group, go to Working with Amazon Redshift Parameter Groups.

Constraints:

  • Must be 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.
 
     public RestoreFromClusterSnapshotRequest withClusterParameterGroupName(String clusterParameterGroupName) {
         this. = clusterParameterGroupName;
         return this;
     }

    
A list of security groups to be associated with this cluster.

Default: The default cluster security group for Amazon Redshift.

Cluster security groups only apply to clusters outside of VPCs.

Returns:
A list of security groups to be associated with this cluster.

Default: The default cluster security group for Amazon Redshift.

Cluster security groups only apply to clusters outside of VPCs.

 
         if ( == null) {
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
A list of security groups to be associated with this cluster.

Default: The default cluster security group for Amazon Redshift.

Cluster security groups only apply to clusters outside of VPCs.

Parameters:
clusterSecurityGroups A list of security groups to be associated with this cluster.

Default: The default cluster security group for Amazon Redshift.

Cluster security groups only apply to clusters outside of VPCs.

 
     public void setClusterSecurityGroups(java.util.Collection<StringclusterSecurityGroups) {
         if (clusterSecurityGroups == null) {
             this. = null;
             return;
         }
         com.amazonaws.internal.ListWithAutoConstructFlag<StringclusterSecurityGroupsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(clusterSecurityGroups.size());
         clusterSecurityGroupsCopy.addAll(clusterSecurityGroups);
         this. = clusterSecurityGroupsCopy;
     }
    
    
A list of security groups to be associated with this cluster.

Default: The default cluster security group for Amazon Redshift.

Cluster security groups only apply to clusters outside of VPCs.

NOTE: This method appends the values to the existing list (if any). Use setClusterSecurityGroups(java.util.Collection) or withClusterSecurityGroups(java.util.Collection) if you want to override the existing values.

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

Parameters:
clusterSecurityGroups A list of security groups to be associated with this cluster.

Default: The default cluster security group for Amazon Redshift.

Cluster security groups only apply to clusters outside of VPCs.

Returns:
A reference to this updated object so that method calls can be chained together.
 
     public RestoreFromClusterSnapshotRequest withClusterSecurityGroups(String... clusterSecurityGroups) {
         if (getClusterSecurityGroups() == nullsetClusterSecurityGroups(new java.util.ArrayList<String>(clusterSecurityGroups.length));
         for (String value : clusterSecurityGroups) {
             getClusterSecurityGroups().add(value);
         }
         return this;
     }
    
    
A list of security groups to be associated with this cluster.

Default: The default cluster security group for Amazon Redshift.

Cluster security groups only apply to clusters outside of VPCs.

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

Parameters:
clusterSecurityGroups A list of security groups to be associated with this cluster.

Default: The default cluster security group for Amazon Redshift.

Cluster security groups only apply to clusters outside of VPCs.

Returns:
A reference to this updated object so that method calls can be chained together.
 
         if (clusterSecurityGroups == null) {
             this. = null;
         } else {
             com.amazonaws.internal.ListWithAutoConstructFlag<StringclusterSecurityGroupsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(clusterSecurityGroups.size());
             clusterSecurityGroupsCopy.addAll(clusterSecurityGroups);
             this. = clusterSecurityGroupsCopy;
         }
 
         return this;
     }

    
A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster.

Default: The default VPC security group is associated with the cluster.

VPC security groups only apply to clusters in VPCs.

Returns:
A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster.

Default: The default VPC security group is associated with the cluster.

VPC security groups only apply to clusters in VPCs.

 
     public java.util.List<StringgetVpcSecurityGroupIds() {
         if ( == null) {
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster.

Default: The default VPC security group is associated with the cluster.

VPC security groups only apply to clusters in VPCs.

Parameters:
vpcSecurityGroupIds A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster.

Default: The default VPC security group is associated with the cluster.

VPC security groups only apply to clusters in VPCs.

 
     public void setVpcSecurityGroupIds(java.util.Collection<StringvpcSecurityGroupIds) {
         if (vpcSecurityGroupIds == null) {
             this. = null;
             return;
         }
         com.amazonaws.internal.ListWithAutoConstructFlag<StringvpcSecurityGroupIdsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(vpcSecurityGroupIds.size());
         vpcSecurityGroupIdsCopy.addAll(vpcSecurityGroupIds);
         this. = vpcSecurityGroupIdsCopy;
     }
    
    
A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster.

Default: The default VPC security group is associated with the cluster.

VPC security groups only apply to clusters in VPCs.

NOTE: This method appends the values to the existing list (if any). Use setVpcSecurityGroupIds(java.util.Collection) or withVpcSecurityGroupIds(java.util.Collection) if you want to override the existing values.

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

Parameters:
vpcSecurityGroupIds A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster.

Default: The default VPC security group is associated with the cluster.

VPC security groups only apply to clusters in VPCs.

Returns:
A reference to this updated object so that method calls can be chained together.
 
     public RestoreFromClusterSnapshotRequest withVpcSecurityGroupIds(String... vpcSecurityGroupIds) {
         if (getVpcSecurityGroupIds() == nullsetVpcSecurityGroupIds(new java.util.ArrayList<String>(vpcSecurityGroupIds.length));
         for (String value : vpcSecurityGroupIds) {
             getVpcSecurityGroupIds().add(value);
         }
         return this;
     }
    
    
A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster.

Default: The default VPC security group is associated with the cluster.

VPC security groups only apply to clusters in VPCs.

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

Parameters:
vpcSecurityGroupIds A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster.

Default: The default VPC security group is associated with the cluster.

VPC security groups only apply to clusters in VPCs.

Returns:
A reference to this updated object so that method calls can be chained together.
 
        if (vpcSecurityGroupIds == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringvpcSecurityGroupIdsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(vpcSecurityGroupIds.size());
            vpcSecurityGroupIdsCopy.addAll(vpcSecurityGroupIds);
            this. = vpcSecurityGroupIdsCopy;
        }
        return this;
    }

    
The weekly time range (in UTC) during which automated cluster maintenance can occur.

Format: ddd:hh24:mi-ddd:hh24:mi

Default: The value selected for the cluster from which the snapshot was taken. For more information about the time blocks for each region, see Maintenance Windows in Amazon Redshift Cluster Management Guide.

Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun

Constraints: Minimum 30-minute window.

Returns:
The weekly time range (in UTC) during which automated cluster maintenance can occur.

Format: ddd:hh24:mi-ddd:hh24:mi

Default: The value selected for the cluster from which the snapshot was taken. For more information about the time blocks for each region, see Maintenance Windows in Amazon Redshift Cluster Management Guide.

Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun

Constraints: Minimum 30-minute window.

        return ;
    }
    
    
The weekly time range (in UTC) during which automated cluster maintenance can occur.

Format: ddd:hh24:mi-ddd:hh24:mi

Default: The value selected for the cluster from which the snapshot was taken. For more information about the time blocks for each region, see Maintenance Windows in Amazon Redshift Cluster Management Guide.

Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun

Constraints: Minimum 30-minute window.

Parameters:
preferredMaintenanceWindow The weekly time range (in UTC) during which automated cluster maintenance can occur.

Format: ddd:hh24:mi-ddd:hh24:mi

Default: The value selected for the cluster from which the snapshot was taken. For more information about the time blocks for each region, see Maintenance Windows in Amazon Redshift Cluster Management Guide.

Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun

Constraints: Minimum 30-minute window.

    public void setPreferredMaintenanceWindow(String preferredMaintenanceWindow) {
        this. = preferredMaintenanceWindow;
    }
    
    
The weekly time range (in UTC) during which automated cluster maintenance can occur.

Format: ddd:hh24:mi-ddd:hh24:mi

Default: The value selected for the cluster from which the snapshot was taken. For more information about the time blocks for each region, see Maintenance Windows in Amazon Redshift Cluster Management Guide.

Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun

Constraints: Minimum 30-minute window.

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

Parameters:
preferredMaintenanceWindow The weekly time range (in UTC) during which automated cluster maintenance can occur.

Format: ddd:hh24:mi-ddd:hh24:mi

Default: The value selected for the cluster from which the snapshot was taken. For more information about the time blocks for each region, see Maintenance Windows in Amazon Redshift Cluster Management Guide.

Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun

Constraints: Minimum 30-minute window.

Returns:
A reference to this updated object so that method calls can be chained together.
    public RestoreFromClusterSnapshotRequest withPreferredMaintenanceWindow(String preferredMaintenanceWindow) {
        this. = preferredMaintenanceWindow;
        return this;
    }

    
The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with CreateClusterSnapshot.

Default: The value selected for the cluster from which the snapshot was taken.

Constraints: Must be a value from 0 to 35.

Returns:
The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with CreateClusterSnapshot.

Default: The value selected for the cluster from which the snapshot was taken.

Constraints: Must be a value from 0 to 35.

        return ;
    }
    
    
The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with CreateClusterSnapshot.

Default: The value selected for the cluster from which the snapshot was taken.

Constraints: Must be a value from 0 to 35.

Parameters:
automatedSnapshotRetentionPeriod The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with CreateClusterSnapshot.

Default: The value selected for the cluster from which the snapshot was taken.

Constraints: Must be a value from 0 to 35.

    public void setAutomatedSnapshotRetentionPeriod(Integer automatedSnapshotRetentionPeriod) {
        this. = automatedSnapshotRetentionPeriod;
    }
    
    
The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with CreateClusterSnapshot.

Default: The value selected for the cluster from which the snapshot was taken.

Constraints: Must be a value from 0 to 35.

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

Parameters:
automatedSnapshotRetentionPeriod The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with CreateClusterSnapshot.

Default: The value selected for the cluster from which the snapshot was taken.

Constraints: Must be a value from 0 to 35.

Returns:
A reference to this updated object so that method calls can be chained together.
    public RestoreFromClusterSnapshotRequest withAutomatedSnapshotRetentionPeriod(Integer automatedSnapshotRetentionPeriod) {
        this. = automatedSnapshotRetentionPeriod;
        return this;
    }

    
The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster that you restore from a shared snapshot.

Returns:
The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster that you restore from a shared snapshot.
    public String getKmsKeyId() {
        return ;
    }
    
    
The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster that you restore from a shared snapshot.

Parameters:
kmsKeyId The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster that you restore from a shared snapshot.
    public void setKmsKeyId(String kmsKeyId) {
        this. = kmsKeyId;
    }
    
    
The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster that you restore from a shared snapshot.

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

Parameters:
kmsKeyId The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster that you restore from a shared snapshot.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = kmsKeyId;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getClusterIdentifier() != nullsb.append("ClusterIdentifier: " + getClusterIdentifier() + ",");
        if (getSnapshotIdentifier() != nullsb.append("SnapshotIdentifier: " + getSnapshotIdentifier() + ",");
        if (getSnapshotClusterIdentifier() != nullsb.append("SnapshotClusterIdentifier: " + getSnapshotClusterIdentifier() + ",");
        if (getPort() != nullsb.append("Port: " + getPort() + ",");
        if (getAvailabilityZone() != nullsb.append("AvailabilityZone: " + getAvailabilityZone() + ",");
        if (isAllowVersionUpgrade() != nullsb.append("AllowVersionUpgrade: " + isAllowVersionUpgrade() + ",");
        if (getClusterSubnetGroupName() != nullsb.append("ClusterSubnetGroupName: " + getClusterSubnetGroupName() + ",");
        if (isPubliclyAccessible() != nullsb.append("PubliclyAccessible: " + isPubliclyAccessible() + ",");
        if (getOwnerAccount() != nullsb.append("OwnerAccount: " + getOwnerAccount() + ",");
        if (getHsmClientCertificateIdentifier() != nullsb.append("HsmClientCertificateIdentifier: " + getHsmClientCertificateIdentifier() + ",");
        if (getHsmConfigurationIdentifier() != nullsb.append("HsmConfigurationIdentifier: " + getHsmConfigurationIdentifier() + ",");
        if (getElasticIp() != nullsb.append("ElasticIp: " + getElasticIp() + ",");
        if (getClusterParameterGroupName() != nullsb.append("ClusterParameterGroupName: " + getClusterParameterGroupName() + ",");
        if (getClusterSecurityGroups() != nullsb.append("ClusterSecurityGroups: " + getClusterSecurityGroups() + ",");
        if (getVpcSecurityGroupIds() != nullsb.append("VpcSecurityGroupIds: " + getVpcSecurityGroupIds() + ",");
        if (getPreferredMaintenanceWindow() != nullsb.append("PreferredMaintenanceWindow: " + getPreferredMaintenanceWindow() + ",");
        if (getAutomatedSnapshotRetentionPeriod() != nullsb.append("AutomatedSnapshotRetentionPeriod: " + getAutomatedSnapshotRetentionPeriod() + ",");
        if (getKmsKeyId() != nullsb.append("KmsKeyId: " + getKmsKeyId() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getClusterIdentifier() == null) ? 0 : getClusterIdentifier().hashCode()); 
        hashCode = prime * hashCode + ((getSnapshotIdentifier() == null) ? 0 : getSnapshotIdentifier().hashCode()); 
        hashCode = prime * hashCode + ((getSnapshotClusterIdentifier() == null) ? 0 : getSnapshotClusterIdentifier().hashCode()); 
        hashCode = prime * hashCode + ((getPort() == null) ? 0 : getPort().hashCode()); 
        hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode()); 
        hashCode = prime * hashCode + ((isAllowVersionUpgrade() == null) ? 0 : isAllowVersionUpgrade().hashCode()); 
        hashCode = prime * hashCode + ((getClusterSubnetGroupName() == null) ? 0 : getClusterSubnetGroupName().hashCode()); 
        hashCode = prime * hashCode + ((isPubliclyAccessible() == null) ? 0 : isPubliclyAccessible().hashCode()); 
        hashCode = prime * hashCode + ((getOwnerAccount() == null) ? 0 : getOwnerAccount().hashCode()); 
        hashCode = prime * hashCode + ((getHsmClientCertificateIdentifier() == null) ? 0 : getHsmClientCertificateIdentifier().hashCode()); 
        hashCode = prime * hashCode + ((getHsmConfigurationIdentifier() == null) ? 0 : getHsmConfigurationIdentifier().hashCode()); 
        hashCode = prime * hashCode + ((getElasticIp() == null) ? 0 : getElasticIp().hashCode()); 
        hashCode = prime * hashCode + ((getClusterParameterGroupName() == null) ? 0 : getClusterParameterGroupName().hashCode()); 
        hashCode = prime * hashCode + ((getClusterSecurityGroups() == null) ? 0 : getClusterSecurityGroups().hashCode()); 
        hashCode = prime * hashCode + ((getVpcSecurityGroupIds() == null) ? 0 : getVpcSecurityGroupIds().hashCode()); 
        hashCode = prime * hashCode + ((getPreferredMaintenanceWindow() == null) ? 0 : getPreferredMaintenanceWindow().hashCode()); 
        hashCode = prime * hashCode + ((getAutomatedSnapshotRetentionPeriod() == null) ? 0 : getAutomatedSnapshotRetentionPeriod().hashCode()); 
        hashCode = prime * hashCode + ((getKmsKeyId() == null) ? 0 : getKmsKeyId().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof RestoreFromClusterSnapshotRequest == falsereturn false;
        
        if (other.getClusterIdentifier() == null ^ this.getClusterIdentifier() == nullreturn false;
        if (other.getClusterIdentifier() != null && other.getClusterIdentifier().equals(this.getClusterIdentifier()) == falsereturn false
        if (other.getSnapshotIdentifier() == null ^ this.getSnapshotIdentifier() == nullreturn false;
        if (other.getSnapshotIdentifier() != null && other.getSnapshotIdentifier().equals(this.getSnapshotIdentifier()) == falsereturn false
        if (other.getSnapshotClusterIdentifier() == null ^ this.getSnapshotClusterIdentifier() == nullreturn false;
        if (other.getSnapshotClusterIdentifier() != null && other.getSnapshotClusterIdentifier().equals(this.getSnapshotClusterIdentifier()) == falsereturn false
        if (other.getPort() == null ^ this.getPort() == nullreturn false;
        if (other.getPort() != null && other.getPort().equals(this.getPort()) == falsereturn false
        if (other.getAvailabilityZone() == null ^ this.getAvailabilityZone() == nullreturn false;
        if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals(this.getAvailabilityZone()) == falsereturn false
        if (other.isAllowVersionUpgrade() == null ^ this.isAllowVersionUpgrade() == nullreturn false;
        if (other.isAllowVersionUpgrade() != null && other.isAllowVersionUpgrade().equals(this.isAllowVersionUpgrade()) == falsereturn false
        if (other.getClusterSubnetGroupName() == null ^ this.getClusterSubnetGroupName() == nullreturn false;
        if (other.getClusterSubnetGroupName() != null && other.getClusterSubnetGroupName().equals(this.getClusterSubnetGroupName()) == falsereturn false
        if (other.isPubliclyAccessible() == null ^ this.isPubliclyAccessible() == nullreturn false;
        if (other.isPubliclyAccessible() != null && other.isPubliclyAccessible().equals(this.isPubliclyAccessible()) == falsereturn false
        if (other.getOwnerAccount() == null ^ this.getOwnerAccount() == nullreturn false;
        if (other.getOwnerAccount() != null && other.getOwnerAccount().equals(this.getOwnerAccount()) == falsereturn false
        if (other.getHsmClientCertificateIdentifier() == null ^ this.getHsmClientCertificateIdentifier() == nullreturn false;
        if (other.getHsmClientCertificateIdentifier() != null && other.getHsmClientCertificateIdentifier().equals(this.getHsmClientCertificateIdentifier()) == falsereturn false
        if (other.getHsmConfigurationIdentifier() == null ^ this.getHsmConfigurationIdentifier() == nullreturn false;
        if (other.getHsmConfigurationIdentifier() != null && other.getHsmConfigurationIdentifier().equals(this.getHsmConfigurationIdentifier()) == falsereturn false
        if (other.getElasticIp() == null ^ this.getElasticIp() == nullreturn false;
        if (other.getElasticIp() != null && other.getElasticIp().equals(this.getElasticIp()) == falsereturn false
        if (other.getClusterParameterGroupName() == null ^ this.getClusterParameterGroupName() == nullreturn false;
        if (other.getClusterParameterGroupName() != null && other.getClusterParameterGroupName().equals(this.getClusterParameterGroupName()) == falsereturn false
        if (other.getClusterSecurityGroups() == null ^ this.getClusterSecurityGroups() == nullreturn false;
        if (other.getClusterSecurityGroups() != null && other.getClusterSecurityGroups().equals(this.getClusterSecurityGroups()) == falsereturn false
        if (other.getVpcSecurityGroupIds() == null ^ this.getVpcSecurityGroupIds() == nullreturn false;
        if (other.getVpcSecurityGroupIds() != null && other.getVpcSecurityGroupIds().equals(this.getVpcSecurityGroupIds()) == falsereturn false
        if (other.getPreferredMaintenanceWindow() == null ^ this.getPreferredMaintenanceWindow() == nullreturn false;
        if (other.getPreferredMaintenanceWindow() != null && other.getPreferredMaintenanceWindow().equals(this.getPreferredMaintenanceWindow()) == falsereturn false
        if (other.getAutomatedSnapshotRetentionPeriod() == null ^ this.getAutomatedSnapshotRetentionPeriod() == nullreturn false;
        if (other.getAutomatedSnapshotRetentionPeriod() != null && other.getAutomatedSnapshotRetentionPeriod().equals(this.getAutomatedSnapshotRetentionPeriod()) == falsereturn false
        if (other.getKmsKeyId() == null ^ this.getKmsKeyId() == nullreturn false;
        if (other.getKmsKeyId() != null && other.getKmsKeyId().equals(this.getKmsKeyId()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (RestoreFromClusterSnapshotRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X