/* * 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.cloudhsmv2.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 CreateClusterRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* A policy that defines how the service retains backups. *
*/ private BackupRetentionPolicy backupRetentionPolicy; /** *
* The type of HSM to use in the cluster. Currently the only allowed value is hsm1.medium
.
*
* The identifier (ID) of the cluster backup to restore. Use this value to restore the cluster from a backup instead * of creating a new cluster. To find the backup ID, use DescribeBackups. *
*/ private String sourceBackupId; /** ** The identifiers (IDs) of the subnets where you are creating the cluster. You must specify at least one subnet. If * you specify multiple subnets, they must meet the following criteria: *
** All subnets must be in the same virtual private cloud (VPC). *
** You can specify only one subnet per Availability Zone. *
** Tags to apply to the CloudHSM cluster during creation. *
*/ private java.util.List* A policy that defines how the service retains backups. *
* * @param backupRetentionPolicy * A policy that defines how the service retains backups. */ public void setBackupRetentionPolicy(BackupRetentionPolicy backupRetentionPolicy) { this.backupRetentionPolicy = backupRetentionPolicy; } /** ** A policy that defines how the service retains backups. *
* * @return A policy that defines how the service retains backups. */ public BackupRetentionPolicy getBackupRetentionPolicy() { return this.backupRetentionPolicy; } /** ** A policy that defines how the service retains backups. *
* * @param backupRetentionPolicy * A policy that defines how the service retains backups. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateClusterRequest withBackupRetentionPolicy(BackupRetentionPolicy backupRetentionPolicy) { setBackupRetentionPolicy(backupRetentionPolicy); return this; } /** *
* The type of HSM to use in the cluster. Currently the only allowed value is hsm1.medium
.
*
hsm1.medium
.
*/
public void setHsmType(String hsmType) {
this.hsmType = hsmType;
}
/**
*
* The type of HSM to use in the cluster. Currently the only allowed value is hsm1.medium
.
*
hsm1.medium
.
*/
public String getHsmType() {
return this.hsmType;
}
/**
*
* The type of HSM to use in the cluster. Currently the only allowed value is hsm1.medium
.
*
hsm1.medium
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClusterRequest withHsmType(String hsmType) {
setHsmType(hsmType);
return this;
}
/**
* * The identifier (ID) of the cluster backup to restore. Use this value to restore the cluster from a backup instead * of creating a new cluster. To find the backup ID, use DescribeBackups. *
* * @param sourceBackupId * The identifier (ID) of the cluster backup to restore. Use this value to restore the cluster from a backup * instead of creating a new cluster. To find the backup ID, use DescribeBackups. */ public void setSourceBackupId(String sourceBackupId) { this.sourceBackupId = sourceBackupId; } /** ** The identifier (ID) of the cluster backup to restore. Use this value to restore the cluster from a backup instead * of creating a new cluster. To find the backup ID, use DescribeBackups. *
* * @return The identifier (ID) of the cluster backup to restore. Use this value to restore the cluster from a backup * instead of creating a new cluster. To find the backup ID, use DescribeBackups. */ public String getSourceBackupId() { return this.sourceBackupId; } /** ** The identifier (ID) of the cluster backup to restore. Use this value to restore the cluster from a backup instead * of creating a new cluster. To find the backup ID, use DescribeBackups. *
* * @param sourceBackupId * The identifier (ID) of the cluster backup to restore. Use this value to restore the cluster from a backup * instead of creating a new cluster. To find the backup ID, use DescribeBackups. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateClusterRequest withSourceBackupId(String sourceBackupId) { setSourceBackupId(sourceBackupId); return this; } /** ** The identifiers (IDs) of the subnets where you are creating the cluster. You must specify at least one subnet. If * you specify multiple subnets, they must meet the following criteria: *
** All subnets must be in the same virtual private cloud (VPC). *
** You can specify only one subnet per Availability Zone. *
** All subnets must be in the same virtual private cloud (VPC). *
** You can specify only one subnet per Availability Zone. *
** The identifiers (IDs) of the subnets where you are creating the cluster. You must specify at least one subnet. If * you specify multiple subnets, they must meet the following criteria: *
** All subnets must be in the same virtual private cloud (VPC). *
** You can specify only one subnet per Availability Zone. *
** All subnets must be in the same virtual private cloud (VPC). *
** You can specify only one subnet per Availability Zone. *
** The identifiers (IDs) of the subnets where you are creating the cluster. You must specify at least one subnet. If * you specify multiple subnets, they must meet the following criteria: *
** All subnets must be in the same virtual private cloud (VPC). *
** You can specify only one subnet per Availability Zone. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSubnetIds(java.util.Collection)} or {@link #withSubnetIds(java.util.Collection)} if you want to * override the existing values. *
* * @param subnetIds * The identifiers (IDs) of the subnets where you are creating the cluster. You must specify at least one * subnet. If you specify multiple subnets, they must meet the following criteria: ** All subnets must be in the same virtual private cloud (VPC). *
** You can specify only one subnet per Availability Zone. *
** The identifiers (IDs) of the subnets where you are creating the cluster. You must specify at least one subnet. If * you specify multiple subnets, they must meet the following criteria: *
** All subnets must be in the same virtual private cloud (VPC). *
** You can specify only one subnet per Availability Zone. *
** All subnets must be in the same virtual private cloud (VPC). *
** You can specify only one subnet per Availability Zone. *
** Tags to apply to the CloudHSM cluster during creation. *
* * @return Tags to apply to the CloudHSM cluster during creation. */ public java.util.List* Tags to apply to the CloudHSM cluster during creation. *
* * @param tagList * Tags to apply to the CloudHSM cluster during creation. */ public void setTagList(java.util.Collection* Tags to apply to the CloudHSM cluster during creation. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTagList(java.util.Collection)} or {@link #withTagList(java.util.Collection)} if you want to override * the existing values. *
* * @param tagList * Tags to apply to the CloudHSM cluster during creation. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateClusterRequest withTagList(Tag... tagList) { if (this.tagList == null) { setTagList(new java.util.ArrayList* Tags to apply to the CloudHSM cluster during creation. *
* * @param tagList * Tags to apply to the CloudHSM cluster during creation. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateClusterRequest withTagList(java.util.Collection