AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

CreateImageInput

import "github.com/aws/aws-sdk-go/service/ec2"

type CreateImageInput struct { BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` Description *string `locationName:"description" type:"string"` DryRun *bool `locationName:"dryRun" type:"boolean"` InstanceId *string `locationName:"instanceId" type:"string" required:"true"` Name *string `locationName:"name" type:"string" required:"true"` NoReboot *bool `locationName:"noReboot" type:"boolean"` }

Contains the parameters for CreateImage.

BlockDeviceMappings

Describes a block device mapping.

Description

Type: *string

A description for the new image.

DryRun

Type: *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.

InstanceId

Type: *string

The ID of the instance.

InstanceId is a required field

Name

Type: *string

A name for the new image.

Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)

Name is a required field

NoReboot

Type: *bool

By default, Amazon EC2 attempts to shut down and reboot the instance before creating the image. If the 'No Reboot' option is set, Amazon EC2 doesn't shut down the instance before creating the image. When this option is used, file system integrity on the created image can't be guaranteed.

Method

GoString

func (s CreateImageInput) GoString() string

GoString returns the string representation

SetBlockDeviceMappings

func (s *CreateImageInput) SetBlockDeviceMappings(v []*BlockDeviceMapping) *CreateImageInput

SetBlockDeviceMappings sets the BlockDeviceMappings field's value.

SetDescription

func (s *CreateImageInput) SetDescription(v string) *CreateImageInput

SetDescription sets the Description field's value.

SetDryRun

func (s *CreateImageInput) SetDryRun(v bool) *CreateImageInput

SetDryRun sets the DryRun field's value.

SetInstanceId

func (s *CreateImageInput) SetInstanceId(v string) *CreateImageInput

SetInstanceId sets the InstanceId field's value.

SetName

func (s *CreateImageInput) SetName(v string) *CreateImageInput

SetName sets the Name field's value.

SetNoReboot

func (s *CreateImageInput) SetNoReboot(v bool) *CreateImageInput

SetNoReboot sets the NoReboot field's value.

String

func (s CreateImageInput) String() string

String returns the string representation

Validate

func (s *CreateImageInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: