paws.compute (version 0.1.0)

ec2_modify_image_attribute: Modifies the specified attribute of the specified AMI

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, LaunchPermission, or ProductCode.

Usage

ec2_modify_image_attribute(Attribute, Description, ImageId,
  LaunchPermission, OperationType, ProductCodes, UserGroups, UserIds,
  Value, DryRun)

Arguments

Attribute

The name of the attribute to modify. The valid values are description, launchPermission, and productCodes.

Description

A new description for the AMI.

ImageId

[required] The ID of the AMI.

LaunchPermission

A new launch permission for the AMI.

OperationType

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

ProductCodes

One or more DevPay product codes. After you add a product code to an AMI, it can't be removed.

UserGroups

One or more user groups. This parameter can be used only when the Attribute parameter is launchPermission.

UserIds

One or more AWS account IDs. This parameter can be used only when the Attribute parameter is launchPermission.

Value

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

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.

Request syntax

svc$modify_image_attribute(
  Attribute = "string",
  Description = list(
    Value = "string"
  ),
  ImageId = "string",
  LaunchPermission = list(
    Add = list(
      list(
        Group = "all",
        UserId = "string"
      )
    ),
    Remove = list(
      list(
        Group = "all",
        UserId = "string"
      )
    )
  ),
  OperationType = "add"|"remove",
  ProductCodes = list(
    "string"
  ),
  UserGroups = list(
    "string"
  ),
  UserIds = list(
    "string"
  ),
  Value = "string",
  DryRun = TRUE|FALSE
)

Details

AWS Marketplace product codes cannot be modified. Images with an AWS 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.

Examples

Run this code
# NOT RUN {
# This example makes the specified AMI public.
# }
# NOT RUN {
svc$modify_image_attribute(
  ImageId = "ami-5731123e",
  LaunchPermission = list(
    Add = list(
      list(
        Group = "all"
      )
    )
  )
)
# }
# NOT RUN {
# This example grants launch permissions for the specified AMI to the
# specified AWS account.
# }
# NOT RUN {
svc$modify_image_attribute(
  ImageId = "ami-5731123e",
  LaunchPermission = list(
    Add = list(
      list(
        UserId = "123456789012"
      )
    )
  )
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab