All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.ec2.model.CopyImageRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon EC2 module holds the client classes that are used for communicating with Amazon EC2 Service

There is a newer version: 1.12.778
Show newest version
/*
 * Copyright 2019-2024 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.CopyImageRequestMarshaller;

/**
 * 

* Contains the parameters for CopyImage. *

*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CopyImageRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest { /** *

* Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see Ensuring * idempotency in the Amazon EC2 API Reference. *

*/ private String clientToken; /** *

* A description for the new AMI in the destination Region. *

*/ private String description; /** *

* Specifies whether the destination snapshots of the copied image should be encrypted. You can encrypt a copy of an * unencrypted snapshot, but you cannot create an unencrypted copy of an encrypted snapshot. The default KMS key for * Amazon EBS is used unless you specify a non-default Key Management Service (KMS) KMS key using * KmsKeyId. For more information, see Amazon EBS encryption in the * Amazon EBS User Guide. *

*/ private Boolean encrypted; /** *

* The identifier of the symmetric Key Management Service (KMS) KMS key to use when creating encrypted volumes. If * this parameter is not specified, your Amazon Web Services managed KMS key for Amazon EBS is used. If you specify * a KMS key, you must also set the encrypted state to true. *

*

* You can specify a KMS key using any of the following: *

*
    *
  • *

    * Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  • *
  • *

    * Key alias. For example, alias/ExampleAlias. *

    *
  • *
  • *

    * Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  • *
  • *

    * Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. *

    *
  • *
*

* Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an identifier that is not * valid, the action can appear to complete, but eventually fails. *

*

* The specified KMS key must exist in the destination Region. *

*

* Amazon EBS does not support asymmetric KMS keys. *

*/ private String kmsKeyId; /** *

* The name of the new AMI in the destination Region. *

*/ private String name; /** *

* The ID of the AMI to copy. *

*/ private String sourceImageId; /** *

* The name of the Region that contains the AMI to copy. *

*/ private String sourceRegion; /** *

* The Amazon Resource Name (ARN) of the Outpost to which to copy the AMI. Only specify this parameter when copying * an AMI from an Amazon Web Services Region to an Outpost. The AMI must be in the Region of the destination * Outpost. You cannot copy an AMI from an Outpost to a Region, from one Outpost to another, or within the same * Outpost. *

*

* For more information, see Copy AMIs from an * Amazon Web Services Region to an Outpost in the Amazon EBS User Guide. *

*/ private String destinationOutpostArn; /** *

* Indicates whether to include your user-defined AMI tags when copying the AMI. *

*

* The following tags will not be copied: *

*
    *
  • *

    * System tags (prefixed with aws:) *

    *
  • *
  • *

    * For public and shared AMIs, user-defined tags that are attached by other Amazon Web Services accounts *

    *
  • *
*

* Default: Your user-defined AMI tags are not copied. *

*/ private Boolean copyImageTags; /** *

* The tags to apply to the new AMI and new snapshots. You can tag the AMI, the snapshots, or both. *

*
    *
  • *

    * To tag the new AMI, the value for ResourceType must be image. *

    *
  • *
  • *

    * To tag the new snapshots, the value for ResourceType must be snapshot. The same tag is * applied to all the new snapshots. *

    *
  • *
*

* If you specify other values for ResourceType, the request fails. *

*

* To tag an AMI or snapshot after it has been created, see CreateTags. *

*/ private com.amazonaws.internal.SdkInternalList tagSpecifications; /** *

* Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see Ensuring * idempotency in the Amazon EC2 API Reference. *

* * @param clientToken * Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, * see Ensuring * idempotency in the Amazon EC2 API Reference. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** *

* Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see Ensuring * idempotency in the Amazon EC2 API Reference. *

* * @return Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, * see Ensuring * idempotency in the Amazon EC2 API Reference. */ public String getClientToken() { return this.clientToken; } /** *

* Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see Ensuring * idempotency in the Amazon EC2 API Reference. *

* * @param clientToken * Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, * see Ensuring * idempotency in the Amazon EC2 API Reference. * @return Returns a reference to this object so that method calls can be chained together. */ public CopyImageRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** *

* A description for the new AMI in the destination Region. *

* * @param description * A description for the new AMI in the destination Region. */ public void setDescription(String description) { this.description = description; } /** *

* A description for the new AMI in the destination Region. *

* * @return A description for the new AMI in the destination Region. */ public String getDescription() { return this.description; } /** *

* A description for the new AMI in the destination Region. *

* * @param description * A description for the new AMI in the destination Region. * @return Returns a reference to this object so that method calls can be chained together. */ public CopyImageRequest withDescription(String description) { setDescription(description); return this; } /** *

* Specifies whether the destination snapshots of the copied image should be encrypted. You can encrypt a copy of an * unencrypted snapshot, but you cannot create an unencrypted copy of an encrypted snapshot. The default KMS key for * Amazon EBS is used unless you specify a non-default Key Management Service (KMS) KMS key using * KmsKeyId. For more information, see Amazon EBS encryption in the * Amazon EBS User Guide. *

* * @param encrypted * Specifies whether the destination snapshots of the copied image should be encrypted. You can encrypt a * copy of an unencrypted snapshot, but you cannot create an unencrypted copy of an encrypted snapshot. The * default KMS key for Amazon EBS is used unless you specify a non-default Key Management Service (KMS) KMS * key using KmsKeyId. For more information, see Amazon EBS encryption in * the Amazon EBS User Guide. */ public void setEncrypted(Boolean encrypted) { this.encrypted = encrypted; } /** *

* Specifies whether the destination snapshots of the copied image should be encrypted. You can encrypt a copy of an * unencrypted snapshot, but you cannot create an unencrypted copy of an encrypted snapshot. The default KMS key for * Amazon EBS is used unless you specify a non-default Key Management Service (KMS) KMS key using * KmsKeyId. For more information, see Amazon EBS encryption in the * Amazon EBS User Guide. *

* * @return Specifies whether the destination snapshots of the copied image should be encrypted. You can encrypt a * copy of an unencrypted snapshot, but you cannot create an unencrypted copy of an encrypted snapshot. The * default KMS key for Amazon EBS is used unless you specify a non-default Key Management Service (KMS) KMS * key using KmsKeyId. For more information, see Amazon EBS encryption in * the Amazon EBS User Guide. */ public Boolean getEncrypted() { return this.encrypted; } /** *

* Specifies whether the destination snapshots of the copied image should be encrypted. You can encrypt a copy of an * unencrypted snapshot, but you cannot create an unencrypted copy of an encrypted snapshot. The default KMS key for * Amazon EBS is used unless you specify a non-default Key Management Service (KMS) KMS key using * KmsKeyId. For more information, see Amazon EBS encryption in the * Amazon EBS User Guide. *

* * @param encrypted * Specifies whether the destination snapshots of the copied image should be encrypted. You can encrypt a * copy of an unencrypted snapshot, but you cannot create an unencrypted copy of an encrypted snapshot. The * default KMS key for Amazon EBS is used unless you specify a non-default Key Management Service (KMS) KMS * key using KmsKeyId. For more information, see Amazon EBS encryption in * the Amazon EBS User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public CopyImageRequest withEncrypted(Boolean encrypted) { setEncrypted(encrypted); return this; } /** *

* Specifies whether the destination snapshots of the copied image should be encrypted. You can encrypt a copy of an * unencrypted snapshot, but you cannot create an unencrypted copy of an encrypted snapshot. The default KMS key for * Amazon EBS is used unless you specify a non-default Key Management Service (KMS) KMS key using * KmsKeyId. For more information, see Amazon EBS encryption in the * Amazon EBS User Guide. *

* * @return Specifies whether the destination snapshots of the copied image should be encrypted. You can encrypt a * copy of an unencrypted snapshot, but you cannot create an unencrypted copy of an encrypted snapshot. The * default KMS key for Amazon EBS is used unless you specify a non-default Key Management Service (KMS) KMS * key using KmsKeyId. For more information, see Amazon EBS encryption in * the Amazon EBS User Guide. */ public Boolean isEncrypted() { return this.encrypted; } /** *

* The identifier of the symmetric Key Management Service (KMS) KMS key to use when creating encrypted volumes. If * this parameter is not specified, your Amazon Web Services managed KMS key for Amazon EBS is used. If you specify * a KMS key, you must also set the encrypted state to true. *

*

* You can specify a KMS key using any of the following: *

*
    *
  • *

    * Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  • *
  • *

    * Key alias. For example, alias/ExampleAlias. *

    *
  • *
  • *

    * Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  • *
  • *

    * Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. *

    *
  • *
*

* Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an identifier that is not * valid, the action can appear to complete, but eventually fails. *

*

* The specified KMS key must exist in the destination Region. *

*

* Amazon EBS does not support asymmetric KMS keys. *

* * @param kmsKeyId * The identifier of the symmetric Key Management Service (KMS) KMS key to use when creating encrypted * volumes. If this parameter is not specified, your Amazon Web Services managed KMS key for Amazon EBS is * used. If you specify a KMS key, you must also set the encrypted state to true.

*

* You can specify a KMS key using any of the following: *

*
    *
  • *

    * Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  • *
  • *

    * Key alias. For example, alias/ExampleAlias. *

    *
  • *
  • *

    * Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  • *
  • *

    * Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. *

    *
  • *
*

* Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an identifier that * is not valid, the action can appear to complete, but eventually fails. *

*

* The specified KMS key must exist in the destination Region. *

*

* Amazon EBS does not support asymmetric KMS keys. */ public void setKmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; } /** *

* The identifier of the symmetric Key Management Service (KMS) KMS key to use when creating encrypted volumes. If * this parameter is not specified, your Amazon Web Services managed KMS key for Amazon EBS is used. If you specify * a KMS key, you must also set the encrypted state to true. *

*

* You can specify a KMS key using any of the following: *

*
    *
  • *

    * Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  • *
  • *

    * Key alias. For example, alias/ExampleAlias. *

    *
  • *
  • *

    * Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  • *
  • *

    * Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. *

    *
  • *
*

* Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an identifier that is not * valid, the action can appear to complete, but eventually fails. *

*

* The specified KMS key must exist in the destination Region. *

*

* Amazon EBS does not support asymmetric KMS keys. *

* * @return The identifier of the symmetric Key Management Service (KMS) KMS key to use when creating encrypted * volumes. If this parameter is not specified, your Amazon Web Services managed KMS key for Amazon EBS is * used. If you specify a KMS key, you must also set the encrypted state to true.

*

* You can specify a KMS key using any of the following: *

*
    *
  • *

    * Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  • *
  • *

    * Key alias. For example, alias/ExampleAlias. *

    *
  • *
  • *

    * Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  • *
  • *

    * Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. *

    *
  • *
*

* Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an identifier * that is not valid, the action can appear to complete, but eventually fails. *

*

* The specified KMS key must exist in the destination Region. *

*

* Amazon EBS does not support asymmetric KMS keys. */ public String getKmsKeyId() { return this.kmsKeyId; } /** *

* The identifier of the symmetric Key Management Service (KMS) KMS key to use when creating encrypted volumes. If * this parameter is not specified, your Amazon Web Services managed KMS key for Amazon EBS is used. If you specify * a KMS key, you must also set the encrypted state to true. *

*

* You can specify a KMS key using any of the following: *

*
    *
  • *

    * Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  • *
  • *

    * Key alias. For example, alias/ExampleAlias. *

    *
  • *
  • *

    * Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  • *
  • *

    * Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. *

    *
  • *
*

* Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an identifier that is not * valid, the action can appear to complete, but eventually fails. *

*

* The specified KMS key must exist in the destination Region. *

*

* Amazon EBS does not support asymmetric KMS keys. *

* * @param kmsKeyId * The identifier of the symmetric Key Management Service (KMS) KMS key to use when creating encrypted * volumes. If this parameter is not specified, your Amazon Web Services managed KMS key for Amazon EBS is * used. If you specify a KMS key, you must also set the encrypted state to true.

*

* You can specify a KMS key using any of the following: *

*
    *
  • *

    * Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  • *
  • *

    * Key alias. For example, alias/ExampleAlias. *

    *
  • *
  • *

    * Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  • *
  • *

    * Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. *

    *
  • *
*

* Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an identifier that * is not valid, the action can appear to complete, but eventually fails. *

*

* The specified KMS key must exist in the destination Region. *

*

* Amazon EBS does not support asymmetric KMS keys. * @return Returns a reference to this object so that method calls can be chained together. */ public CopyImageRequest withKmsKeyId(String kmsKeyId) { setKmsKeyId(kmsKeyId); return this; } /** *

* The name of the new AMI in the destination Region. *

* * @param name * The name of the new AMI in the destination Region. */ public void setName(String name) { this.name = name; } /** *

* The name of the new AMI in the destination Region. *

* * @return The name of the new AMI in the destination Region. */ public String getName() { return this.name; } /** *

* The name of the new AMI in the destination Region. *

* * @param name * The name of the new AMI in the destination Region. * @return Returns a reference to this object so that method calls can be chained together. */ public CopyImageRequest withName(String name) { setName(name); return this; } /** *

* The ID of the AMI to copy. *

* * @param sourceImageId * The ID of the AMI to copy. */ public void setSourceImageId(String sourceImageId) { this.sourceImageId = sourceImageId; } /** *

* The ID of the AMI to copy. *

* * @return The ID of the AMI to copy. */ public String getSourceImageId() { return this.sourceImageId; } /** *

* The ID of the AMI to copy. *

* * @param sourceImageId * The ID of the AMI to copy. * @return Returns a reference to this object so that method calls can be chained together. */ public CopyImageRequest withSourceImageId(String sourceImageId) { setSourceImageId(sourceImageId); return this; } /** *

* The name of the Region that contains the AMI to copy. *

* * @param sourceRegion * The name of the Region that contains the AMI to copy. */ public void setSourceRegion(String sourceRegion) { this.sourceRegion = sourceRegion; } /** *

* The name of the Region that contains the AMI to copy. *

* * @return The name of the Region that contains the AMI to copy. */ public String getSourceRegion() { return this.sourceRegion; } /** *

* The name of the Region that contains the AMI to copy. *

* * @param sourceRegion * The name of the Region that contains the AMI to copy. * @return Returns a reference to this object so that method calls can be chained together. */ public CopyImageRequest withSourceRegion(String sourceRegion) { setSourceRegion(sourceRegion); return this; } /** *

* The Amazon Resource Name (ARN) of the Outpost to which to copy the AMI. Only specify this parameter when copying * an AMI from an Amazon Web Services Region to an Outpost. The AMI must be in the Region of the destination * Outpost. You cannot copy an AMI from an Outpost to a Region, from one Outpost to another, or within the same * Outpost. *

*

* For more information, see Copy AMIs from an * Amazon Web Services Region to an Outpost in the Amazon EBS User Guide. *

* * @param destinationOutpostArn * The Amazon Resource Name (ARN) of the Outpost to which to copy the AMI. Only specify this parameter when * copying an AMI from an Amazon Web Services Region to an Outpost. The AMI must be in the Region of the * destination Outpost. You cannot copy an AMI from an Outpost to a Region, from one Outpost to another, or * within the same Outpost.

*

* For more information, see Copy AMIs from * an Amazon Web Services Region to an Outpost in the Amazon EBS User Guide. */ public void setDestinationOutpostArn(String destinationOutpostArn) { this.destinationOutpostArn = destinationOutpostArn; } /** *

* The Amazon Resource Name (ARN) of the Outpost to which to copy the AMI. Only specify this parameter when copying * an AMI from an Amazon Web Services Region to an Outpost. The AMI must be in the Region of the destination * Outpost. You cannot copy an AMI from an Outpost to a Region, from one Outpost to another, or within the same * Outpost. *

*

* For more information, see Copy AMIs from an * Amazon Web Services Region to an Outpost in the Amazon EBS User Guide. *

* * @return The Amazon Resource Name (ARN) of the Outpost to which to copy the AMI. Only specify this parameter when * copying an AMI from an Amazon Web Services Region to an Outpost. The AMI must be in the Region of the * destination Outpost. You cannot copy an AMI from an Outpost to a Region, from one Outpost to another, or * within the same Outpost.

*

* For more information, see Copy AMIs from * an Amazon Web Services Region to an Outpost in the Amazon EBS User Guide. */ public String getDestinationOutpostArn() { return this.destinationOutpostArn; } /** *

* The Amazon Resource Name (ARN) of the Outpost to which to copy the AMI. Only specify this parameter when copying * an AMI from an Amazon Web Services Region to an Outpost. The AMI must be in the Region of the destination * Outpost. You cannot copy an AMI from an Outpost to a Region, from one Outpost to another, or within the same * Outpost. *

*

* For more information, see Copy AMIs from an * Amazon Web Services Region to an Outpost in the Amazon EBS User Guide. *

* * @param destinationOutpostArn * The Amazon Resource Name (ARN) of the Outpost to which to copy the AMI. Only specify this parameter when * copying an AMI from an Amazon Web Services Region to an Outpost. The AMI must be in the Region of the * destination Outpost. You cannot copy an AMI from an Outpost to a Region, from one Outpost to another, or * within the same Outpost.

*

* For more information, see Copy AMIs from * an Amazon Web Services Region to an Outpost in the Amazon EBS User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public CopyImageRequest withDestinationOutpostArn(String destinationOutpostArn) { setDestinationOutpostArn(destinationOutpostArn); return this; } /** *

* Indicates whether to include your user-defined AMI tags when copying the AMI. *

*

* The following tags will not be copied: *

*
    *
  • *

    * System tags (prefixed with aws:) *

    *
  • *
  • *

    * For public and shared AMIs, user-defined tags that are attached by other Amazon Web Services accounts *

    *
  • *
*

* Default: Your user-defined AMI tags are not copied. *

* * @param copyImageTags * Indicates whether to include your user-defined AMI tags when copying the AMI.

*

* The following tags will not be copied: *

*
    *
  • *

    * System tags (prefixed with aws:) *

    *
  • *
  • *

    * For public and shared AMIs, user-defined tags that are attached by other Amazon Web Services accounts *

    *
  • *
*

* Default: Your user-defined AMI tags are not copied. */ public void setCopyImageTags(Boolean copyImageTags) { this.copyImageTags = copyImageTags; } /** *

* Indicates whether to include your user-defined AMI tags when copying the AMI. *

*

* The following tags will not be copied: *

*
    *
  • *

    * System tags (prefixed with aws:) *

    *
  • *
  • *

    * For public and shared AMIs, user-defined tags that are attached by other Amazon Web Services accounts *

    *
  • *
*

* Default: Your user-defined AMI tags are not copied. *

* * @return Indicates whether to include your user-defined AMI tags when copying the AMI.

*

* The following tags will not be copied: *

*
    *
  • *

    * System tags (prefixed with aws:) *

    *
  • *
  • *

    * For public and shared AMIs, user-defined tags that are attached by other Amazon Web Services accounts *

    *
  • *
*

* Default: Your user-defined AMI tags are not copied. */ public Boolean getCopyImageTags() { return this.copyImageTags; } /** *

* Indicates whether to include your user-defined AMI tags when copying the AMI. *

*

* The following tags will not be copied: *

*
    *
  • *

    * System tags (prefixed with aws:) *

    *
  • *
  • *

    * For public and shared AMIs, user-defined tags that are attached by other Amazon Web Services accounts *

    *
  • *
*

* Default: Your user-defined AMI tags are not copied. *

* * @param copyImageTags * Indicates whether to include your user-defined AMI tags when copying the AMI.

*

* The following tags will not be copied: *

*
    *
  • *

    * System tags (prefixed with aws:) *

    *
  • *
  • *

    * For public and shared AMIs, user-defined tags that are attached by other Amazon Web Services accounts *

    *
  • *
*

* Default: Your user-defined AMI tags are not copied. * @return Returns a reference to this object so that method calls can be chained together. */ public CopyImageRequest withCopyImageTags(Boolean copyImageTags) { setCopyImageTags(copyImageTags); return this; } /** *

* Indicates whether to include your user-defined AMI tags when copying the AMI. *

*

* The following tags will not be copied: *

*
    *
  • *

    * System tags (prefixed with aws:) *

    *
  • *
  • *

    * For public and shared AMIs, user-defined tags that are attached by other Amazon Web Services accounts *

    *
  • *
*

* Default: Your user-defined AMI tags are not copied. *

* * @return Indicates whether to include your user-defined AMI tags when copying the AMI.

*

* The following tags will not be copied: *

*
    *
  • *

    * System tags (prefixed with aws:) *

    *
  • *
  • *

    * For public and shared AMIs, user-defined tags that are attached by other Amazon Web Services accounts *

    *
  • *
*

* Default: Your user-defined AMI tags are not copied. */ public Boolean isCopyImageTags() { return this.copyImageTags; } /** *

* The tags to apply to the new AMI and new snapshots. You can tag the AMI, the snapshots, or both. *

*
    *
  • *

    * To tag the new AMI, the value for ResourceType must be image. *

    *
  • *
  • *

    * To tag the new snapshots, the value for ResourceType must be snapshot. The same tag is * applied to all the new snapshots. *

    *
  • *
*

* If you specify other values for ResourceType, the request fails. *

*

* To tag an AMI or snapshot after it has been created, see CreateTags. *

* * @return The tags to apply to the new AMI and new snapshots. You can tag the AMI, the snapshots, or both.

*
    *
  • *

    * To tag the new AMI, the value for ResourceType must be image. *

    *
  • *
  • *

    * To tag the new snapshots, the value for ResourceType must be snapshot. The same * tag is applied to all the new snapshots. *

    *
  • *
*

* If you specify other values for ResourceType, the request fails. *

*

* To tag an AMI or snapshot after it has been created, see CreateTags. */ public java.util.List getTagSpecifications() { if (tagSpecifications == null) { tagSpecifications = new com.amazonaws.internal.SdkInternalList(); } return tagSpecifications; } /** *

* The tags to apply to the new AMI and new snapshots. You can tag the AMI, the snapshots, or both. *

*
    *
  • *

    * To tag the new AMI, the value for ResourceType must be image. *

    *
  • *
  • *

    * To tag the new snapshots, the value for ResourceType must be snapshot. The same tag is * applied to all the new snapshots. *

    *
  • *
*

* If you specify other values for ResourceType, the request fails. *

*

* To tag an AMI or snapshot after it has been created, see CreateTags. *

* * @param tagSpecifications * The tags to apply to the new AMI and new snapshots. You can tag the AMI, the snapshots, or both.

*
    *
  • *

    * To tag the new AMI, the value for ResourceType must be image. *

    *
  • *
  • *

    * To tag the new snapshots, the value for ResourceType must be snapshot. The same * tag is applied to all the new snapshots. *

    *
  • *
*

* If you specify other values for ResourceType, the request fails. *

*

* To tag an AMI or snapshot after it has been created, see CreateTags. */ public void setTagSpecifications(java.util.Collection tagSpecifications) { if (tagSpecifications == null) { this.tagSpecifications = null; return; } this.tagSpecifications = new com.amazonaws.internal.SdkInternalList(tagSpecifications); } /** *

* The tags to apply to the new AMI and new snapshots. You can tag the AMI, the snapshots, or both. *

*
    *
  • *

    * To tag the new AMI, the value for ResourceType must be image. *

    *
  • *
  • *

    * To tag the new snapshots, the value for ResourceType must be snapshot. The same tag is * applied to all the new snapshots. *

    *
  • *
*

* If you specify other values for ResourceType, the request fails. *

*

* To tag an AMI or snapshot after it has been created, see CreateTags. *

*

* 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 new AMI and new snapshots. You can tag the AMI, the snapshots, or both.

*
    *
  • *

    * To tag the new AMI, the value for ResourceType must be image. *

    *
  • *
  • *

    * To tag the new snapshots, the value for ResourceType must be snapshot. The same * tag is applied to all the new snapshots. *

    *
  • *
*

* If you specify other values for ResourceType, the request fails. *

*

* To tag an AMI or snapshot after it has been created, see CreateTags. * @return Returns a reference to this object so that method calls can be chained together. */ public CopyImageRequest withTagSpecifications(TagSpecification... tagSpecifications) { if (this.tagSpecifications == null) { setTagSpecifications(new com.amazonaws.internal.SdkInternalList(tagSpecifications.length)); } for (TagSpecification ele : tagSpecifications) { this.tagSpecifications.add(ele); } return this; } /** *

* The tags to apply to the new AMI and new snapshots. You can tag the AMI, the snapshots, or both. *

*
    *
  • *

    * To tag the new AMI, the value for ResourceType must be image. *

    *
  • *
  • *

    * To tag the new snapshots, the value for ResourceType must be snapshot. The same tag is * applied to all the new snapshots. *

    *
  • *
*

* If you specify other values for ResourceType, the request fails. *

*

* To tag an AMI or snapshot after it has been created, see CreateTags. *

* * @param tagSpecifications * The tags to apply to the new AMI and new snapshots. You can tag the AMI, the snapshots, or both.

*
    *
  • *

    * To tag the new AMI, the value for ResourceType must be image. *

    *
  • *
  • *

    * To tag the new snapshots, the value for ResourceType must be snapshot. The same * tag is applied to all the new snapshots. *

    *
  • *
*

* If you specify other values for ResourceType, the request fails. *

*

* To tag an AMI or snapshot after it has been created, see CreateTags. * @return Returns a reference to this object so that method calls can be chained together. */ public CopyImageRequest withTagSpecifications(java.util.Collection tagSpecifications) { setTagSpecifications(tagSpecifications); return this; } /** * This method is intended for internal use only. Returns the marshaled request configured with additional * parameters to enable operation dry-run. */ @Override public Request getDryRunRequest() { Request request = new CopyImageRequestMarshaller().marshall(this); request.addParameter("DryRun", Boolean.toString(true)); return request; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getClientToken() != null) sb.append("ClientToken: ").append(getClientToken()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getEncrypted() != null) sb.append("Encrypted: ").append(getEncrypted()).append(","); if (getKmsKeyId() != null) sb.append("KmsKeyId: ").append(getKmsKeyId()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getSourceImageId() != null) sb.append("SourceImageId: ").append(getSourceImageId()).append(","); if (getSourceRegion() != null) sb.append("SourceRegion: ").append(getSourceRegion()).append(","); if (getDestinationOutpostArn() != null) sb.append("DestinationOutpostArn: ").append(getDestinationOutpostArn()).append(","); if (getCopyImageTags() != null) sb.append("CopyImageTags: ").append(getCopyImageTags()).append(","); if (getTagSpecifications() != null) sb.append("TagSpecifications: ").append(getTagSpecifications()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CopyImageRequest == false) return false; CopyImageRequest other = (CopyImageRequest) obj; if (other.getClientToken() == null ^ this.getClientToken() == null) return false; if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getEncrypted() == null ^ this.getEncrypted() == null) return false; if (other.getEncrypted() != null && other.getEncrypted().equals(this.getEncrypted()) == false) return false; if (other.getKmsKeyId() == null ^ this.getKmsKeyId() == null) return false; if (other.getKmsKeyId() != null && other.getKmsKeyId().equals(this.getKmsKeyId()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getSourceImageId() == null ^ this.getSourceImageId() == null) return false; if (other.getSourceImageId() != null && other.getSourceImageId().equals(this.getSourceImageId()) == false) return false; if (other.getSourceRegion() == null ^ this.getSourceRegion() == null) return false; if (other.getSourceRegion() != null && other.getSourceRegion().equals(this.getSourceRegion()) == false) return false; if (other.getDestinationOutpostArn() == null ^ this.getDestinationOutpostArn() == null) return false; if (other.getDestinationOutpostArn() != null && other.getDestinationOutpostArn().equals(this.getDestinationOutpostArn()) == false) return false; if (other.getCopyImageTags() == null ^ this.getCopyImageTags() == null) return false; if (other.getCopyImageTags() != null && other.getCopyImageTags().equals(this.getCopyImageTags()) == false) return false; if (other.getTagSpecifications() == null ^ this.getTagSpecifications() == null) return false; if (other.getTagSpecifications() != null && other.getTagSpecifications().equals(this.getTagSpecifications()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getEncrypted() == null) ? 0 : getEncrypted().hashCode()); hashCode = prime * hashCode + ((getKmsKeyId() == null) ? 0 : getKmsKeyId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getSourceImageId() == null) ? 0 : getSourceImageId().hashCode()); hashCode = prime * hashCode + ((getSourceRegion() == null) ? 0 : getSourceRegion().hashCode()); hashCode = prime * hashCode + ((getDestinationOutpostArn() == null) ? 0 : getDestinationOutpostArn().hashCode()); hashCode = prime * hashCode + ((getCopyImageTags() == null) ? 0 : getCopyImageTags().hashCode()); hashCode = prime * hashCode + ((getTagSpecifications() == null) ? 0 : getTagSpecifications().hashCode()); return hashCode; } @Override public CopyImageRequest clone() { return (CopyImageRequest) super.clone(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy