amazonka-ec2-2.0: Amazon Elastic Compute Cloud SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.EC2.ModifyImageAttribute

Description

Modifies the specified attribute of the specified AMI. You can specify only one attribute at a time. You can use the Attribute parameter to specify the attribute or one of the following parameters: Description or LaunchPermission.

Images with an Amazon Web Services Marketplace product code cannot be made public.

To enable the SriovNetSupport enhanced networking attribute of an image, enable SriovNetSupport on an instance and create an AMI from the instance.

Synopsis

Creating a Request

data ModifyImageAttribute Source #

Contains the parameters for ModifyImageAttribute.

See: newModifyImageAttribute smart constructor.

Constructors

ModifyImageAttribute' 

Fields

  • attribute :: Maybe Text

    The name of the attribute to modify.

    Valid values: description | launchPermission

  • description :: Maybe AttributeValue

    A new description for the AMI.

  • dryRun :: Maybe Bool

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • launchPermission :: Maybe LaunchPermissionModifications

    A new launch permission for the AMI.

  • operationType :: Maybe OperationType

    The operation type. This parameter can be used only when the Attribute parameter is launchPermission.

  • organizationArns :: Maybe [Text]

    The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the Attribute parameter is launchPermission.

  • organizationalUnitArns :: Maybe [Text]

    The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the Attribute parameter is launchPermission.

  • productCodes :: Maybe [Text]

    Not supported.

  • userGroups :: Maybe [Text]

    The user groups. This parameter can be used only when the Attribute parameter is launchPermission.

  • userIds :: Maybe [Text]

    The Amazon Web Services account IDs. This parameter can be used only when the Attribute parameter is launchPermission.

  • value :: Maybe Text

    The value of the attribute being modified. This parameter can be used only when the Attribute parameter is description.

  • imageId :: Text

    The ID of the AMI.

Instances

Instances details
ToHeaders ModifyImageAttribute Source # 
Instance details

Defined in Amazonka.EC2.ModifyImageAttribute

ToPath ModifyImageAttribute Source # 
Instance details

Defined in Amazonka.EC2.ModifyImageAttribute

ToQuery ModifyImageAttribute Source # 
Instance details

Defined in Amazonka.EC2.ModifyImageAttribute

AWSRequest ModifyImageAttribute Source # 
Instance details

Defined in Amazonka.EC2.ModifyImageAttribute

Associated Types

type AWSResponse ModifyImageAttribute #

Generic ModifyImageAttribute Source # 
Instance details

Defined in Amazonka.EC2.ModifyImageAttribute

Associated Types

type Rep ModifyImageAttribute :: Type -> Type #

Read ModifyImageAttribute Source # 
Instance details

Defined in Amazonka.EC2.ModifyImageAttribute

Show ModifyImageAttribute Source # 
Instance details

Defined in Amazonka.EC2.ModifyImageAttribute

NFData ModifyImageAttribute Source # 
Instance details

Defined in Amazonka.EC2.ModifyImageAttribute

Methods

rnf :: ModifyImageAttribute -> () #

Eq ModifyImageAttribute Source # 
Instance details

Defined in Amazonka.EC2.ModifyImageAttribute

Hashable ModifyImageAttribute Source # 
Instance details

Defined in Amazonka.EC2.ModifyImageAttribute

type AWSResponse ModifyImageAttribute Source # 
Instance details

Defined in Amazonka.EC2.ModifyImageAttribute

type Rep ModifyImageAttribute Source # 
Instance details

Defined in Amazonka.EC2.ModifyImageAttribute

type Rep ModifyImageAttribute = D1 ('MetaData "ModifyImageAttribute" "Amazonka.EC2.ModifyImageAttribute" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "ModifyImageAttribute'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "attribute") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe AttributeValue)) :*: S1 ('MetaSel ('Just "dryRun") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)))) :*: (S1 ('MetaSel ('Just "launchPermission") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe LaunchPermissionModifications)) :*: (S1 ('MetaSel ('Just "operationType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe OperationType)) :*: S1 ('MetaSel ('Just "organizationArns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text]))))) :*: ((S1 ('MetaSel ('Just "organizationalUnitArns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: (S1 ('MetaSel ('Just "productCodes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: S1 ('MetaSel ('Just "userGroups") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])))) :*: (S1 ('MetaSel ('Just "userIds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: (S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "imageId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))))

newModifyImageAttribute Source #

Create a value of ModifyImageAttribute with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:attribute:ModifyImageAttribute', modifyImageAttribute_attribute - The name of the attribute to modify.

Valid values: description | launchPermission

ModifyImageAttribute, modifyImageAttribute_description - A new description for the AMI.

$sel:dryRun:ModifyImageAttribute', modifyImageAttribute_dryRun - Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

$sel:launchPermission:ModifyImageAttribute', modifyImageAttribute_launchPermission - A new launch permission for the AMI.

$sel:operationType:ModifyImageAttribute', modifyImageAttribute_operationType - The operation type. This parameter can be used only when the Attribute parameter is launchPermission.

$sel:organizationArns:ModifyImageAttribute', modifyImageAttribute_organizationArns - The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the Attribute parameter is launchPermission.

$sel:organizationalUnitArns:ModifyImageAttribute', modifyImageAttribute_organizationalUnitArns - The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the Attribute parameter is launchPermission.

ModifyImageAttribute, modifyImageAttribute_productCodes - Not supported.

$sel:userGroups:ModifyImageAttribute', modifyImageAttribute_userGroups - The user groups. This parameter can be used only when the Attribute parameter is launchPermission.

$sel:userIds:ModifyImageAttribute', modifyImageAttribute_userIds - The Amazon Web Services account IDs. This parameter can be used only when the Attribute parameter is launchPermission.

ModifyImageAttribute, modifyImageAttribute_value - The value of the attribute being modified. This parameter can be used only when the Attribute parameter is description.

ModifyImageAttribute, modifyImageAttribute_imageId - The ID of the AMI.

Request Lenses

modifyImageAttribute_attribute :: Lens' ModifyImageAttribute (Maybe Text) Source #

The name of the attribute to modify.

Valid values: description | launchPermission

modifyImageAttribute_dryRun :: Lens' ModifyImageAttribute (Maybe Bool) Source #

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

modifyImageAttribute_operationType :: Lens' ModifyImageAttribute (Maybe OperationType) Source #

The operation type. This parameter can be used only when the Attribute parameter is launchPermission.

modifyImageAttribute_organizationArns :: Lens' ModifyImageAttribute (Maybe [Text]) Source #

The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the Attribute parameter is launchPermission.

modifyImageAttribute_organizationalUnitArns :: Lens' ModifyImageAttribute (Maybe [Text]) Source #

The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the Attribute parameter is launchPermission.

modifyImageAttribute_userGroups :: Lens' ModifyImageAttribute (Maybe [Text]) Source #

The user groups. This parameter can be used only when the Attribute parameter is launchPermission.

modifyImageAttribute_userIds :: Lens' ModifyImageAttribute (Maybe [Text]) Source #

The Amazon Web Services account IDs. This parameter can be used only when the Attribute parameter is launchPermission.

modifyImageAttribute_value :: Lens' ModifyImageAttribute (Maybe Text) Source #

The value of the attribute being modified. This parameter can be used only when the Attribute parameter is description.

Destructuring the Response

data ModifyImageAttributeResponse Source #

See: newModifyImageAttributeResponse smart constructor.

Instances

Instances details
Generic ModifyImageAttributeResponse Source # 
Instance details

Defined in Amazonka.EC2.ModifyImageAttribute

Associated Types

type Rep ModifyImageAttributeResponse :: Type -> Type #

Read ModifyImageAttributeResponse Source # 
Instance details

Defined in Amazonka.EC2.ModifyImageAttribute

Show ModifyImageAttributeResponse Source # 
Instance details

Defined in Amazonka.EC2.ModifyImageAttribute

NFData ModifyImageAttributeResponse Source # 
Instance details

Defined in Amazonka.EC2.ModifyImageAttribute

Eq ModifyImageAttributeResponse Source # 
Instance details

Defined in Amazonka.EC2.ModifyImageAttribute

type Rep ModifyImageAttributeResponse Source # 
Instance details

Defined in Amazonka.EC2.ModifyImageAttribute

type Rep ModifyImageAttributeResponse = D1 ('MetaData "ModifyImageAttributeResponse" "Amazonka.EC2.ModifyImageAttribute" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "ModifyImageAttributeResponse'" 'PrefixI 'False) (U1 :: Type -> Type))

newModifyImageAttributeResponse :: ModifyImageAttributeResponse Source #

Create a value of ModifyImageAttributeResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.