/*
* 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.ec2.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.Request;
import com.amazonaws.services.ec2.model.transform.ImportSnapshotRequestMarshaller;
/**
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ImportSnapshotRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest
* The client-specific data.
*
* Token to enable idempotency for VM import requests.
*
* The description string for the import snapshot task.
*
* Information about the disk container.
*
* Specifies whether the destination snapshot of the imported image should be encrypted. The default KMS key for EBS
* is used unless you specify a non-default KMS key using
* An identifier for the symmetric KMS key to use when creating the encrypted snapshot. This parameter is only
* required if you want to use a non-default KMS key; if this parameter is not specified, the default KMS key for
* EBS is used. If a
* The KMS key identifier may be provided in any of the following formats:
*
* Key ID
*
* Key alias
*
* ARN using key ID. The ID ARN contains the
* ARN using key alias. The alias ARN contains the
* Amazon Web Services parses
* The specified KMS key must exist in the Region that the snapshot is being copied to.
*
* Amazon EBS does not support asymmetric KMS keys.
*
* The name of the role to use when not using the default role, 'vmimport'.
*
* The tags to apply to the import snapshot task during creation.
*
* The client-specific data.
*
* The client-specific data.
*
* The client-specific data.
*
* Token to enable idempotency for VM import requests.
*
* Token to enable idempotency for VM import requests.
*
* Token to enable idempotency for VM import requests.
*
* The description string for the import snapshot task.
*
* The description string for the import snapshot task.
*
* The description string for the import snapshot task.
*
* Information about the disk container.
*
* Information about the disk container.
*
* Information about the disk container.
*
* Specifies whether the destination snapshot of the imported image should be encrypted. The default KMS key for EBS
* is used unless you specify a non-default KMS key using
* Specifies whether the destination snapshot of the imported image should be encrypted. The default KMS key for EBS
* is used unless you specify a non-default KMS key using
* Specifies whether the destination snapshot of the imported image should be encrypted. The default KMS key for EBS
* is used unless you specify a non-default KMS key using
* Specifies whether the destination snapshot of the imported image should be encrypted. The default KMS key for EBS
* is used unless you specify a non-default KMS key using
* An identifier for the symmetric KMS key to use when creating the encrypted snapshot. This parameter is only
* required if you want to use a non-default KMS key; if this parameter is not specified, the default KMS key for
* EBS is used. If a
* The KMS key identifier may be provided in any of the following formats:
*
* Key ID
*
* Key alias
*
* ARN using key ID. The ID ARN contains the
* ARN using key alias. The alias ARN contains the
* Amazon Web Services parses
* The specified KMS key must exist in the Region that the snapshot is being copied to.
*
* Amazon EBS does not support asymmetric KMS keys.
* KmsKeyId
. For more information, see Amazon EBS Encryption in the
* Amazon Elastic Compute Cloud User Guide.
* KmsKeyId
is specified, the Encrypted
flag must also be set.
*
*
* arn:aws:kms
namespace, followed by the Region of the key,
* the Amazon Web Services account ID of the key owner, the key
namespace, and then the key ID. For
* example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.
* arn:aws:kms
namespace, followed by the Region of the
* key, the Amazon Web Services account ID of the key owner, the alias
namespace, and then the key
* alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
* KmsKeyId
asynchronously, meaning that the action you call may appear to
* complete even though you provided an invalid identifier. This action will eventually report failure.
* KmsKeyId
. For more information, see Amazon EBS Encryption in the
* Amazon Elastic Compute Cloud User Guide.
* KmsKeyId
. For more
* information, see Amazon
* EBS Encryption in the Amazon Elastic Compute Cloud User Guide.
*/
public void setEncrypted(Boolean encrypted) {
this.encrypted = encrypted;
}
/**
* KmsKeyId
. For more information, see Amazon EBS Encryption in the
* Amazon Elastic Compute Cloud User Guide.
* KmsKeyId
. For more
* information, see Amazon
* EBS Encryption in the Amazon Elastic Compute Cloud User Guide.
*/
public Boolean getEncrypted() {
return this.encrypted;
}
/**
* KmsKeyId
. For more information, see Amazon EBS Encryption in the
* Amazon Elastic Compute Cloud User Guide.
* KmsKeyId
. For more
* information, see Amazon
* EBS Encryption in the Amazon Elastic Compute Cloud User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImportSnapshotRequest withEncrypted(Boolean encrypted) {
setEncrypted(encrypted);
return this;
}
/**
* KmsKeyId
. For more information, see Amazon EBS Encryption in the
* Amazon Elastic Compute Cloud User Guide.
* KmsKeyId
. For more
* information, see Amazon
* EBS Encryption in the Amazon Elastic Compute Cloud User Guide.
*/
public Boolean isEncrypted() {
return this.encrypted;
}
/**
* KmsKeyId
is specified, the Encrypted
flag must also be set.
*
*
* arn:aws:kms
namespace, followed by the Region of the key,
* the Amazon Web Services account ID of the key owner, the key
namespace, and then the key ID. For
* example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.
* arn:aws:kms
namespace, followed by the Region of the
* key, the Amazon Web Services account ID of the key owner, the alias
namespace, and then the key
* alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
* KmsKeyId
asynchronously, meaning that the action you call may appear to
* complete even though you provided an invalid identifier. This action will eventually report failure.
* KmsKeyId
is specified, the Encrypted
flag must
* also be set.
* The KMS key identifier may be provided in any of the following formats: *
** Key ID *
** Key alias *
*
* ARN using key ID. The ID ARN contains the arn:aws:kms
namespace, followed by the Region of
* the key, the Amazon Web Services account ID of the key owner, the key
namespace, and then the
* key ID. For example,
* arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.
*
* ARN using key alias. The alias ARN contains the arn:aws:kms
namespace, followed by the Region
* of the key, the Amazon Web Services account ID of the key owner, the alias
namespace, and
* then the key alias. For example,
* arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
*
* Amazon Web Services parses KmsKeyId
asynchronously, meaning that the action you call may
* appear to complete even though you provided an invalid identifier. This action will eventually report
* failure.
*
* The specified KMS key must exist in the Region that the snapshot is being copied to. *
** Amazon EBS does not support asymmetric KMS keys. */ public void setKmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; } /** *
* An identifier for the symmetric KMS key to use when creating the encrypted snapshot. This parameter is only
* required if you want to use a non-default KMS key; if this parameter is not specified, the default KMS key for
* EBS is used. If a KmsKeyId
is specified, the Encrypted
flag must also be set.
*
* The KMS key identifier may be provided in any of the following formats: *
** Key ID *
** Key alias *
*
* ARN using key ID. The ID ARN contains the arn:aws:kms
namespace, followed by the Region of the key,
* the Amazon Web Services account ID of the key owner, the key
namespace, and then the key ID. For
* example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.
*
* ARN using key alias. The alias ARN contains the arn:aws:kms
namespace, followed by the Region of the
* key, the Amazon Web Services account ID of the key owner, the alias
namespace, and then the key
* alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
*
* Amazon Web Services parses KmsKeyId
asynchronously, meaning that the action you call may appear to
* complete even though you provided an invalid identifier. This action will eventually report failure.
*
* The specified KMS key must exist in the Region that the snapshot is being copied to. *
** Amazon EBS does not support asymmetric KMS keys. *
* * @return An identifier for the symmetric KMS key to use when creating the encrypted snapshot. This parameter is * only required if you want to use a non-default KMS key; if this parameter is not specified, the default * KMS key for EBS is used. If aKmsKeyId
is specified, the Encrypted
flag must
* also be set.
* * The KMS key identifier may be provided in any of the following formats: *
** Key ID *
** Key alias *
*
* ARN using key ID. The ID ARN contains the arn:aws:kms
namespace, followed by the Region of
* the key, the Amazon Web Services account ID of the key owner, the key
namespace, and then
* the key ID. For example,
* arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.
*
* ARN using key alias. The alias ARN contains the arn:aws:kms
namespace, followed by the
* Region of the key, the Amazon Web Services account ID of the key owner, the alias
namespace,
* and then the key alias. For example,
* arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
*
* Amazon Web Services parses KmsKeyId
asynchronously, meaning that the action you call may
* appear to complete even though you provided an invalid identifier. This action will eventually report
* failure.
*
* The specified KMS key must exist in the Region that the snapshot is being copied to. *
** Amazon EBS does not support asymmetric KMS keys. */ public String getKmsKeyId() { return this.kmsKeyId; } /** *
* An identifier for the symmetric KMS key to use when creating the encrypted snapshot. This parameter is only
* required if you want to use a non-default KMS key; if this parameter is not specified, the default KMS key for
* EBS is used. If a KmsKeyId
is specified, the Encrypted
flag must also be set.
*
* The KMS key identifier may be provided in any of the following formats: *
** Key ID *
** Key alias *
*
* ARN using key ID. The ID ARN contains the arn:aws:kms
namespace, followed by the Region of the key,
* the Amazon Web Services account ID of the key owner, the key
namespace, and then the key ID. For
* example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.
*
* ARN using key alias. The alias ARN contains the arn:aws:kms
namespace, followed by the Region of the
* key, the Amazon Web Services account ID of the key owner, the alias
namespace, and then the key
* alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
*
* Amazon Web Services parses KmsKeyId
asynchronously, meaning that the action you call may appear to
* complete even though you provided an invalid identifier. This action will eventually report failure.
*
* The specified KMS key must exist in the Region that the snapshot is being copied to. *
** Amazon EBS does not support asymmetric KMS keys. *
* * @param kmsKeyId * An identifier for the symmetric KMS key to use when creating the encrypted snapshot. This parameter is * only required if you want to use a non-default KMS key; if this parameter is not specified, the default * KMS key for EBS is used. If aKmsKeyId
is specified, the Encrypted
flag must
* also be set.
* * The KMS key identifier may be provided in any of the following formats: *
** Key ID *
** Key alias *
*
* ARN using key ID. The ID ARN contains the arn:aws:kms
namespace, followed by the Region of
* the key, the Amazon Web Services account ID of the key owner, the key
namespace, and then the
* key ID. For example,
* arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.
*
* ARN using key alias. The alias ARN contains the arn:aws:kms
namespace, followed by the Region
* of the key, the Amazon Web Services account ID of the key owner, the alias
namespace, and
* then the key alias. For example,
* arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
*
* Amazon Web Services parses KmsKeyId
asynchronously, meaning that the action you call may
* appear to complete even though you provided an invalid identifier. This action will eventually report
* failure.
*
* The specified KMS key must exist in the Region that the snapshot is being copied to. *
** Amazon EBS does not support asymmetric KMS keys. * @return Returns a reference to this object so that method calls can be chained together. */ public ImportSnapshotRequest withKmsKeyId(String kmsKeyId) { setKmsKeyId(kmsKeyId); return this; } /** *
* The name of the role to use when not using the default role, 'vmimport'. *
* * @param roleName * The name of the role to use when not using the default role, 'vmimport'. */ public void setRoleName(String roleName) { this.roleName = roleName; } /** ** The name of the role to use when not using the default role, 'vmimport'. *
* * @return The name of the role to use when not using the default role, 'vmimport'. */ public String getRoleName() { return this.roleName; } /** ** The name of the role to use when not using the default role, 'vmimport'. *
* * @param roleName * The name of the role to use when not using the default role, 'vmimport'. * @return Returns a reference to this object so that method calls can be chained together. */ public ImportSnapshotRequest withRoleName(String roleName) { setRoleName(roleName); return this; } /** ** The tags to apply to the import snapshot task during creation. *
* * @return The tags to apply to the import snapshot task during creation. */ public java.util.List* The tags to apply to the import snapshot task during creation. *
* * @param tagSpecifications * The tags to apply to the import snapshot task during creation. */ public void setTagSpecifications(java.util.Collection* The tags to apply to the import snapshot task during creation. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTagSpecifications(java.util.Collection)} or {@link #withTagSpecifications(java.util.Collection)} if * you want to override the existing values. *
* * @param tagSpecifications * The tags to apply to the import snapshot task during creation. * @return Returns a reference to this object so that method calls can be chained together. */ public ImportSnapshotRequest withTagSpecifications(TagSpecification... tagSpecifications) { if (this.tagSpecifications == null) { setTagSpecifications(new com.amazonaws.internal.SdkInternalList* The tags to apply to the import snapshot task during creation. *
* * @param tagSpecifications * The tags to apply to the import snapshot task during creation. * @return Returns a reference to this object so that method calls can be chained together. */ public ImportSnapshotRequest withTagSpecifications(java.util.Collection