Skip to content

Describe Image References

ec2_describe_image_references R Documentation

Describes your Amazon Web Services resources that are referencing the specified images

Description

Describes your Amazon Web Services resources that are referencing the specified images.

For more information, see Identify your resources referencing specified AMIs in the Amazon EC2 User Guide.

Usage

ec2_describe_image_references(ImageIds, IncludeAllResourceTypes,
  ResourceTypes, NextToken, DryRun, MaxResults)

Arguments

ImageIds

[required] The IDs of the images to check for resource references.

IncludeAllResourceTypes

Specifies whether to check all supported Amazon Web Services resource types for image references. When specified, default values are applied for ResourceTypeOptions. For the default values, see How AMI reference checks work in the Amazon EC2 User Guide. If you also specify ResourceTypes with ResourceTypeOptions, your specified values override the default values.

Supported resource types: ec2:Instance | ec2:LaunchTemplate | ssm:Parameter | imagebuilder:ImageRecipe | imagebuilder:ContainerRecipe

Either IncludeAllResourceTypes or ResourceTypes must be specified.

ResourceTypes

The Amazon Web Services resource types to check for image references.

Either IncludeAllResourceTypes or ResourceTypes must be specified.

NextToken

The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

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.

MaxResults

The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.

Value

A list with the following syntax:

list(
  NextToken = "string",
  ImageReferences = list(
    list(
      ImageId = "string",
      ResourceType = "ec2:Instance"|"ec2:LaunchTemplate"|"ssm:Parameter"|"imagebuilder:ImageRecipe"|"imagebuilder:ContainerRecipe",
      Arn = "string"
    )
  )
)

Request syntax

svc$describe_image_references(
  ImageIds = list(
    "string"
  ),
  IncludeAllResourceTypes = TRUE|FALSE,
  ResourceTypes = list(
    list(
      ResourceType = "ec2:Instance"|"ec2:LaunchTemplate"|"ssm:Parameter"|"imagebuilder:ImageRecipe"|"imagebuilder:ContainerRecipe",
      ResourceTypeOptions = list(
        list(
          OptionName = "state-name"|"version-depth",
          OptionValues = list(
            "string"
          )
        )
      )
    )
  ),
  NextToken = "string",
  DryRun = TRUE|FALSE,
  MaxResults = 123
)