Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client defines the client for interacting with the Amazon EC2 service
func NewFromAPI ¶
NewFromAPI returns a new client from the provided EC2 API implementation
func (*Client) ToggleInstanceMetadataTags ¶
func (c *Client) ToggleInstanceMetadataTags(ctx context.Context, id string, toggle InstanceMetadataToggle) error
ToggleInstanceMetadataTags will modify the parameters of a running EC2 instance, by toggling the availability of EC2 instance tags within the Instance Metadata Service.
The equivalent operation can be achieved through the CLI using:
aws ec2 modify-instance-metadata-options --instance-id <INSTANCE_ID> --instance-metadata-tags enabled
type ClientAPI ¶
type ClientAPI interface { // ModifyInstanceMetadataOptions modifies the parameters of a running EC2 instance, // by toggling the availability of EC2 instances tags within the Instance Metadata // Service (IMDS) ModifyInstanceMetadataOptions(ctx context.Context, params *awsec2.ModifyInstanceMetadataOptionsInput, optFns ...func(*awsec2.Options)) (*awsec2.ModifyInstanceMetadataOptionsOutput, error) }
ClientAPI defines the API for interacting with the Amazon EC2 service
type InstanceMetadataToggle ¶
type InstanceMetadataToggle string
InstanceMetadataToggle allows the enabling and disabling of EC2 instance tags within IMDS
const ( InstanceMetadataToggleEnabled InstanceMetadataToggle = "enabled" InstanceMetadataToggleDisabled InstanceMetadataToggle = "disabled" )
Click to show internal directories.
Click to hide internal directories.