Documentation
¶
Overview ¶
Package ssm provides a client for Amazon Simple Systems Management Service.
Index ¶
- Constants
- type Association
- type AssociationDescription
- type AssociationFilter
- type AssociationStatus
- type CancelCommandInput
- type CancelCommandOutput
- type Command
- type CommandFilter
- type CommandInvocation
- type CommandPlugin
- type CreateAssociationBatchInput
- type CreateAssociationBatchOutput
- type CreateAssociationBatchRequestEntry
- type CreateAssociationInput
- type CreateAssociationOutput
- type CreateDocumentInput
- type CreateDocumentOutput
- type DeleteAssociationInput
- type DeleteAssociationOutput
- type DeleteDocumentInput
- type DeleteDocumentOutput
- type DescribeAssociationInput
- type DescribeAssociationOutput
- type DescribeDocumentInput
- type DescribeDocumentOutput
- type DescribeInstanceInformationInput
- type DescribeInstanceInformationOutput
- type DocumentDescription
- type DocumentFilter
- type DocumentIdentifier
- type DocumentParameter
- type FailedCreateAssociation
- type GetDocumentInput
- type GetDocumentOutput
- type InstanceInformation
- type InstanceInformationFilter
- type ListAssociationsInput
- type ListAssociationsOutput
- type ListCommandInvocationsInput
- type ListCommandInvocationsOutput
- type ListCommandsInput
- type ListCommandsOutput
- type ListDocumentsInput
- type ListDocumentsOutput
- type SSM
- func (c *SSM) CancelCommand(input *CancelCommandInput) (*CancelCommandOutput, error)
- func (c *SSM) CancelCommandRequest(input *CancelCommandInput) (req *request.Request, output *CancelCommandOutput)
- func (c *SSM) CreateAssociation(input *CreateAssociationInput) (*CreateAssociationOutput, error)
- func (c *SSM) CreateAssociationBatch(input *CreateAssociationBatchInput) (*CreateAssociationBatchOutput, error)
- func (c *SSM) CreateAssociationBatchRequest(input *CreateAssociationBatchInput) (req *request.Request, output *CreateAssociationBatchOutput)
- func (c *SSM) CreateAssociationRequest(input *CreateAssociationInput) (req *request.Request, output *CreateAssociationOutput)
- func (c *SSM) CreateDocument(input *CreateDocumentInput) (*CreateDocumentOutput, error)
- func (c *SSM) CreateDocumentRequest(input *CreateDocumentInput) (req *request.Request, output *CreateDocumentOutput)
- func (c *SSM) DeleteAssociation(input *DeleteAssociationInput) (*DeleteAssociationOutput, error)
- func (c *SSM) DeleteAssociationRequest(input *DeleteAssociationInput) (req *request.Request, output *DeleteAssociationOutput)
- func (c *SSM) DeleteDocument(input *DeleteDocumentInput) (*DeleteDocumentOutput, error)
- func (c *SSM) DeleteDocumentRequest(input *DeleteDocumentInput) (req *request.Request, output *DeleteDocumentOutput)
- func (c *SSM) DescribeAssociation(input *DescribeAssociationInput) (*DescribeAssociationOutput, error)
- func (c *SSM) DescribeAssociationRequest(input *DescribeAssociationInput) (req *request.Request, output *DescribeAssociationOutput)
- func (c *SSM) DescribeDocument(input *DescribeDocumentInput) (*DescribeDocumentOutput, error)
- func (c *SSM) DescribeDocumentRequest(input *DescribeDocumentInput) (req *request.Request, output *DescribeDocumentOutput)
- func (c *SSM) DescribeInstanceInformation(input *DescribeInstanceInformationInput) (*DescribeInstanceInformationOutput, error)
- func (c *SSM) DescribeInstanceInformationRequest(input *DescribeInstanceInformationInput) (req *request.Request, output *DescribeInstanceInformationOutput)
- func (c *SSM) GetDocument(input *GetDocumentInput) (*GetDocumentOutput, error)
- func (c *SSM) GetDocumentRequest(input *GetDocumentInput) (req *request.Request, output *GetDocumentOutput)
- func (c *SSM) ListAssociations(input *ListAssociationsInput) (*ListAssociationsOutput, error)
- func (c *SSM) ListAssociationsPages(input *ListAssociationsInput, ...) error
- func (c *SSM) ListAssociationsRequest(input *ListAssociationsInput) (req *request.Request, output *ListAssociationsOutput)
- func (c *SSM) ListCommandInvocations(input *ListCommandInvocationsInput) (*ListCommandInvocationsOutput, error)
- func (c *SSM) ListCommandInvocationsPages(input *ListCommandInvocationsInput, ...) error
- func (c *SSM) ListCommandInvocationsRequest(input *ListCommandInvocationsInput) (req *request.Request, output *ListCommandInvocationsOutput)
- func (c *SSM) ListCommands(input *ListCommandsInput) (*ListCommandsOutput, error)
- func (c *SSM) ListCommandsPages(input *ListCommandsInput, ...) error
- func (c *SSM) ListCommandsRequest(input *ListCommandsInput) (req *request.Request, output *ListCommandsOutput)
- func (c *SSM) ListDocuments(input *ListDocumentsInput) (*ListDocumentsOutput, error)
- func (c *SSM) ListDocumentsPages(input *ListDocumentsInput, ...) error
- func (c *SSM) ListDocumentsRequest(input *ListDocumentsInput) (req *request.Request, output *ListDocumentsOutput)
- func (c *SSM) SendCommand(input *SendCommandInput) (*SendCommandOutput, error)
- func (c *SSM) SendCommandRequest(input *SendCommandInput) (req *request.Request, output *SendCommandOutput)
- func (c *SSM) UpdateAssociationStatus(input *UpdateAssociationStatusInput) (*UpdateAssociationStatusOutput, error)
- func (c *SSM) UpdateAssociationStatusRequest(input *UpdateAssociationStatusInput) (req *request.Request, output *UpdateAssociationStatusOutput)
- type SendCommandInput
- type SendCommandOutput
- type UpdateAssociationStatusInput
- type UpdateAssociationStatusOutput
Examples ¶
- SSM.CancelCommand
- SSM.CreateAssociation
- SSM.CreateAssociationBatch
- SSM.CreateDocument
- SSM.DeleteAssociation
- SSM.DeleteDocument
- SSM.DescribeAssociation
- SSM.DescribeDocument
- SSM.DescribeInstanceInformation
- SSM.GetDocument
- SSM.ListAssociations
- SSM.ListCommandInvocations
- SSM.ListCommands
- SSM.ListDocuments
- SSM.SendCommand
- SSM.UpdateAssociationStatus
Constants ¶
const (
// @enum AssociationFilterKey
AssociationFilterKeyInstanceId = "InstanceId"
// @enum AssociationFilterKey
AssociationFilterKeyName = "Name"
)
const (
// @enum AssociationStatusName
AssociationStatusNamePending = "Pending"
// @enum AssociationStatusName
AssociationStatusNameSuccess = "Success"
// @enum AssociationStatusName
AssociationStatusNameFailed = "Failed"
)
const (
// @enum CommandFilterKey
CommandFilterKeyInvokedAfter = "InvokedAfter"
// @enum CommandFilterKey
CommandFilterKeyInvokedBefore = "InvokedBefore"
// @enum CommandFilterKey
CommandFilterKeyStatus = "Status"
)
const (
// @enum CommandInvocationStatus
CommandInvocationStatusPending = "Pending"
// @enum CommandInvocationStatus
CommandInvocationStatusInProgress = "InProgress"
// @enum CommandInvocationStatus
CommandInvocationStatusCancelling = "Cancelling"
// @enum CommandInvocationStatus
CommandInvocationStatusSuccess = "Success"
// @enum CommandInvocationStatus
CommandInvocationStatusTimedOut = "TimedOut"
// @enum CommandInvocationStatus
CommandInvocationStatusCancelled = "Cancelled"
// @enum CommandInvocationStatus
CommandInvocationStatusFailed = "Failed"
)
const (
// @enum CommandPluginStatus
CommandPluginStatusPending = "Pending"
// @enum CommandPluginStatus
CommandPluginStatusInProgress = "InProgress"
// @enum CommandPluginStatus
CommandPluginStatusSuccess = "Success"
// @enum CommandPluginStatus
CommandPluginStatusTimedOut = "TimedOut"
// @enum CommandPluginStatus
CommandPluginStatusCancelled = "Cancelled"
// @enum CommandPluginStatus
CommandPluginStatusFailed = "Failed"
)
const (
// @enum CommandStatus
CommandStatusPending = "Pending"
// @enum CommandStatus
CommandStatusInProgress = "InProgress"
// @enum CommandStatus
CommandStatusCancelling = "Cancelling"
// @enum CommandStatus
CommandStatusSuccess = "Success"
// @enum CommandStatus
CommandStatusTimedOut = "TimedOut"
// @enum CommandStatus
CommandStatusCancelled = "Cancelled"
// @enum CommandStatus
CommandStatusFailed = "Failed"
)
const (
// @enum DocumentFilterKey
DocumentFilterKeyName = "Name"
// @enum DocumentFilterKey
DocumentFilterKeyOwner = "Owner"
// @enum DocumentFilterKey
DocumentFilterKeyPlatformTypes = "PlatformTypes"
)
const (
// @enum DocumentParameterType
DocumentParameterTypeString = "String"
// @enum DocumentParameterType
DocumentParameterTypeStringList = "StringList"
)
const (
// @enum DocumentStatus
DocumentStatusCreating = "Creating"
// @enum DocumentStatus
DocumentStatusActive = "Active"
// @enum DocumentStatus
DocumentStatusDeleting = "Deleting"
)
const (
// @enum Fault
FaultClient = "Client"
// @enum Fault
FaultServer = "Server"
// @enum Fault
FaultUnknown = "Unknown"
)
const (
// @enum InstanceInformationFilterKey
InstanceInformationFilterKeyInstanceIds = "InstanceIds"
// @enum InstanceInformationFilterKey
InstanceInformationFilterKeyAgentVersion = "AgentVersion"
// @enum InstanceInformationFilterKey
InstanceInformationFilterKeyPingStatus = "PingStatus"
// @enum InstanceInformationFilterKey
InstanceInformationFilterKeyPlatformTypes = "PlatformTypes"
)
const (
// @enum PingStatus
PingStatusOnline = "Online"
// @enum PingStatus
PingStatusConnectionLost = "ConnectionLost"
// @enum PingStatus
PingStatusInactive = "Inactive"
)
const (
// @enum PlatformType
PlatformTypeWindows = "Windows"
// @enum PlatformType
PlatformTypeLinux = "Linux"
)
const ServiceName = "ssm"
A ServiceName is the name of the service the client will make API calls to.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Association ¶
type Association struct {
// The ID of the instance.
InstanceId *string `type:"string"`
// The name of the SSM document.
Name *string `type:"string"`
// contains filtered or unexported fields
}
Describes an association of an SSM document and an instance.
type AssociationDescription ¶
type AssociationDescription struct {
// The date when the association was made.
Date *time.Time `type:"timestamp" timestampFormat:"unix"`
// The ID of the instance.
InstanceId *string `type:"string"`
// The name of the SSM document.
Name *string `type:"string"`
// A description of the parameters for a document.
Parameters map[string][]*string `type:"map"`
// The association status.
Status *AssociationStatus `type:"structure"`
// contains filtered or unexported fields
}
Describes the parameters for a document.
type AssociationFilter ¶
type AssociationFilter struct {
// The name of the filter.
Key *string `locationName:"key" type:"string" required:"true" enum:"AssociationFilterKey"`
// The filter value.
Value *string `locationName:"value" min:"1" type:"string" required:"true"`
// contains filtered or unexported fields
}
Describes a filter.
type AssociationStatus ¶
type AssociationStatus struct {
// A user-defined string.
AdditionalInfo *string `type:"string"`
// The date when the status changed.
Date *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`
// The reason for the status.
Message *string `type:"string" required:"true"`
// The status.
Name *string `type:"string" required:"true" enum:"AssociationStatusName"`
// contains filtered or unexported fields
}
Describes an association status.
type CancelCommandInput ¶ added in v0.9.17
type CancelCommandInput struct {
// The ID of the command you want to cancel.
CommandId *string `min:"36" type:"string" required:"true"`
// (Optional) A list of instance IDs on which you want to cancel the command.
// If not provided, the command is canceled on every instance on which it was
// requested.
InstanceIds []*string `min:"1" type:"list"`
// contains filtered or unexported fields
}
type CancelCommandOutput ¶ added in v0.9.17
type CancelCommandOutput struct {
// contains filtered or unexported fields
}
Whether or not the command was successfully canceled. There is no guarantee that a request can be canceled.
type Command ¶ added in v0.9.17
type Command struct {
// A unique identifier for this command.
CommandId *string `min:"36" type:"string"`
// User-specified information about the command, such as a brief description
// of what the command should do.
Comment *string `type:"string"`
// The name of the SSM document requested for execution.
DocumentName *string `type:"string"`
// If this time is reached and the command has not already started executing,
// it will not execute. Calculated based on the ExpiresAfter user input provided
// as part of the SendCommand API.
ExpiresAfter *time.Time `type:"timestamp" timestampFormat:"unix"`
// The instance IDs against which this command was requested.
InstanceIds []*string `min:"1" type:"list"`
// The S3 bucket where the responses to the command executions should be stored.
// This was requested when issuing the command.
OutputS3BucketName *string `min:"3" type:"string"`
// The S3 directory path inside the bucket where the responses to the command
// executions should be stored. This was requested when issuing the command.
OutputS3KeyPrefix *string `type:"string"`
// The parameter values to be inserted in the SSM document when executing the
// command.
Parameters map[string][]*string `type:"map"`
// The date and time the command was requested.
RequestedDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
// The status of the command.
Status *string `type:"string" enum:"CommandStatus"`
// contains filtered or unexported fields
}
Describes a command request.
type CommandFilter ¶ added in v0.9.17
type CommandFilter struct {
// The name of the filter. For example, requested date and time.
Key *string `locationName:"key" type:"string" required:"true" enum:"CommandFilterKey"`
// The filter value. For example: June 30, 2015.
Value *string `locationName:"value" min:"1" type:"string" required:"true"`
// contains filtered or unexported fields
}
Describes a command filter.
type CommandInvocation ¶ added in v0.9.17
type CommandInvocation struct {
// The command against which this invocation was requested.
CommandId *string `min:"36" type:"string"`
CommandPlugins []*CommandPlugin `type:"list"`
// User-specified information about the command, such as a brief description
// of what the command should do.
Comment *string `type:"string"`
// The document name that was requested for execution.
DocumentName *string `type:"string"`
// The instance ID in which this invocation was requested.
InstanceId *string `type:"string"`
// The time and date the request was sent to this instance.
RequestedDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
// Whether or not the invocation succeeded, failed, or is pending.
Status *string `type:"string" enum:"CommandInvocationStatus"`
// Gets the trace output sent by the agent.
TraceOutput *string `type:"string"`
// contains filtered or unexported fields
}
An invocation is copy of a command sent to a specific instance. A command can apply to one or more instances. A command invocation applies to one instance. For example, if a user executes SendCommand against three instances, then a command invocation is created for each requested instance ID. A command invocation returns status and detail information about a command you executed.
type CommandPlugin ¶ added in v0.9.17
type CommandPlugin struct {
// The name of the plugin. Must be one of the following: aws:updateAgent, aws:domainjoin,
// aws:applications, aws:runPowerShellScript, aws:psmodule, aws:cloudWatch,
// aws:runShellScript, or aws:updateSSMAgent.
Name *string `min:"4" type:"string"`
// Output of the plugin execution.
Output *string `type:"string"`
// The S3 bucket where the responses to the command executions should be stored.
// This was requested when issuing the command.
OutputS3BucketName *string `min:"3" type:"string"`
// The S3 directory path inside the bucket where the responses to the command
// executions should be stored. This was requested when issuing the command.
OutputS3KeyPrefix *string `type:"string"`
// A numeric response code generated after executing the plugin.
ResponseCode *int64 `type:"integer"`
// The time the plugin stopped executing. Could stop prematurely if, for example,
// a cancel command was sent.
ResponseFinishDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
// The time the plugin started executing.
ResponseStartDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
// The status of this plugin. You can execute a document with multiple plugins.
Status *string `type:"string" enum:"CommandPluginStatus"`
// contains filtered or unexported fields
}
Describes plugin details.
type CreateAssociationBatchInput ¶
type CreateAssociationBatchInput struct {
// One or more associations.
Entries []*CreateAssociationBatchRequestEntry `locationNameList:"entries" type:"list" required:"true"`
// contains filtered or unexported fields
}
type CreateAssociationBatchOutput ¶
type CreateAssociationBatchOutput struct {
// Information about the associations that failed.
Failed []*FailedCreateAssociation `locationNameList:"FailedCreateAssociationEntry" type:"list"`
// Information about the associations that succeeded.
Successful []*AssociationDescription `locationNameList:"AssociationDescription" type:"list"`
// contains filtered or unexported fields
}
type CreateAssociationBatchRequestEntry ¶
type CreateAssociationBatchRequestEntry struct {
// The ID of the instance.
InstanceId *string `type:"string"`
// The name of the configuration document.
Name *string `type:"string"`
// A description of the parameters for a document.
Parameters map[string][]*string `type:"map"`
// contains filtered or unexported fields
}
Describes the association of an SSM document and an instance.
type CreateAssociationInput ¶
type CreateAssociationInput struct {
// The Windows Server instance ID.
InstanceId *string `type:"string" required:"true"`
// The name of the SSM document.
Name *string `type:"string" required:"true"`
// The parameters for the documents runtime configuration.
Parameters map[string][]*string `type:"map"`
// contains filtered or unexported fields
}
type CreateAssociationOutput ¶
type CreateAssociationOutput struct {
// Information about the association.
AssociationDescription *AssociationDescription `type:"structure"`
// contains filtered or unexported fields
}
type CreateDocumentInput ¶
type CreateDocumentInput struct {
// A valid JSON string. For more information about the contents of this string,
// see SSM Document (http://docs.aws.amazon.com/ssm/latest/APIReference/aws-ssm-document.html).
Content *string `min:"1" type:"string" required:"true"`
// A name for the SSM document.
Name *string `type:"string" required:"true"`
// contains filtered or unexported fields
}
type CreateDocumentOutput ¶
type CreateDocumentOutput struct {
// Information about the SSM document.
DocumentDescription *DocumentDescription `type:"structure"`
// contains filtered or unexported fields
}
type DeleteAssociationInput ¶
type DeleteAssociationInput struct {
// The ID of the instance.
InstanceId *string `type:"string" required:"true"`
// The name of the SSM document.
Name *string `type:"string" required:"true"`
// contains filtered or unexported fields
}
type DeleteAssociationOutput ¶
type DeleteAssociationOutput struct {
// contains filtered or unexported fields
}
type DeleteDocumentInput ¶
type DeleteDocumentInput struct {
// The name of the SSM document.
Name *string `type:"string" required:"true"`
// contains filtered or unexported fields
}
type DeleteDocumentOutput ¶
type DeleteDocumentOutput struct {
// contains filtered or unexported fields
}
type DescribeAssociationInput ¶
type DescribeAssociationInput struct {
// The Windows Server instance ID.
InstanceId *string `type:"string" required:"true"`
// The name of the SSM document.
Name *string `type:"string" required:"true"`
// contains filtered or unexported fields
}
type DescribeAssociationOutput ¶
type DescribeAssociationOutput struct {
// Information about the association.
AssociationDescription *AssociationDescription `type:"structure"`
// contains filtered or unexported fields
}
type DescribeDocumentInput ¶
type DescribeDocumentInput struct {
// The name of the SSM document.
Name *string `type:"string" required:"true"`
// contains filtered or unexported fields
}
type DescribeDocumentOutput ¶
type DescribeDocumentOutput struct {
// Information about the SSM document.
Document *DocumentDescription `type:"structure"`
// contains filtered or unexported fields
}
type DescribeInstanceInformationInput ¶ added in v0.9.17
type DescribeInstanceInformationInput struct {
// One or more filters. Use a filter to return a more specific list of instances.
InstanceInformationFilterList []*InstanceInformationFilter `locationNameList:"InstanceInformationFilter" min:"1" type:"list"`
// The maximum number of items to return for this call. The call also returns
// a token that you can specify in a subsequent call to get the next set of
// results.
MaxResults *int64 `min:"5" type:"integer"`
// The token for the next set of items to return. (You received this token from
// a previous call.)
NextToken *string `type:"string"`
// contains filtered or unexported fields
}
type DescribeInstanceInformationOutput ¶ added in v0.9.17
type DescribeInstanceInformationOutput struct {
// The instance information list.
InstanceInformationList []*InstanceInformation `locationNameList:"InstanceInformation" type:"list"`
// The token to use when requesting the next set of items. If there are no additional
// items to return, the string is empty.
NextToken *string `type:"string"`
// contains filtered or unexported fields
}
type DocumentDescription ¶
type DocumentDescription struct {
// The date when the SSM document was created.
CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"`
// A description of the document.
Description *string `type:"string"`
// The name of the SSM document.
Name *string `type:"string"`
// A description of the parameters for a document.
Parameters []*DocumentParameter `locationNameList:"DocumentParameter" type:"list"`
// The list of OS platforms compatible with this SSM document.
PlatformTypes []*string `locationNameList:"PlatformType" type:"list"`
// The SHA1 hash of the document, which you can use for verification purposes.
Sha1 *string `type:"string"`
// The status of the SSM document.
Status *string `type:"string" enum:"DocumentStatus"`
// contains filtered or unexported fields
}
Describes an SSM document.
type DocumentFilter ¶
type DocumentFilter struct {
// The name of the filter.
Key *string `locationName:"key" type:"string" required:"true" enum:"DocumentFilterKey"`
// The value of the filter.
Value *string `locationName:"value" min:"1" type:"string" required:"true"`
// contains filtered or unexported fields
}
Describes a filter.
type DocumentIdentifier ¶
type DocumentIdentifier struct {
// The name of the SSM document.
Name *string `type:"string"`
// The operating system platform.
PlatformTypes []*string `locationNameList:"PlatformType" type:"list"`
// contains filtered or unexported fields
}
Describes the name of an SSM document.
type DocumentParameter ¶ added in v0.9.17
type DocumentParameter struct {
// If specified, the default values for the parameters. Parameters without a
// default value are required. Parameters with a default value are optional.
DefaultValue *string `type:"string"`
// A description of what the parameter does, how to use it, the default value,
// and whether or not the parameter is optional.
Description *string `type:"string"`
// The name of the parameter.
Name *string `type:"string"`
// The type of parameter. The type can be either “String” or “StringList”.
Type *string `type:"string" enum:"DocumentParameterType"`
// contains filtered or unexported fields
}
type FailedCreateAssociation ¶
type FailedCreateAssociation struct {
// The association.
Entry *CreateAssociationBatchRequestEntry `type:"structure"`
// The source of the failure.
Fault *string `type:"string" enum:"Fault"`
// A description of the failure.
Message *string `type:"string"`
// contains filtered or unexported fields
}
Describes a failed association.
type GetDocumentInput ¶
type GetDocumentInput struct {
// The name of the SSM document.
Name *string `type:"string" required:"true"`
// contains filtered or unexported fields
}
type GetDocumentOutput ¶
type GetDocumentOutput struct {
// The contents of the SSM document.
Content *string `min:"1" type:"string"`
// The name of the SSM document.
Name *string `type:"string"`
// contains filtered or unexported fields
}
type InstanceInformation ¶ added in v0.9.17
type InstanceInformation struct {
// The version of the SSM agent running on your instance.
AgentVersion *string `type:"string"`
// The instance ID.
InstanceId *string `type:"string"`
// Indicates whether latest version of the SSM agent is running on your instance.
IsLatestVersion *bool `type:"boolean"`
// The date and time when agent last pinged SSM service.
LastPingDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
// Connection status of the SSM agent.
PingStatus *string `type:"string" enum:"PingStatus"`
// The name of the operating system platform running on your instance.
PlatformName *string `type:"string"`
// The operating system platform type.
PlatformType *string `type:"string" enum:"PlatformType"`
// The version of the OS platform running on your instance.
PlatformVersion *string `type:"string"`
// contains filtered or unexported fields
}
Describes a filter for a specific list of instances.
type InstanceInformationFilter ¶ added in v0.9.17
type InstanceInformationFilter struct {
// The name of the filter.
Key *string `locationName:"key" type:"string" required:"true" enum:"InstanceInformationFilterKey"`
// The filter values.
ValueSet []*string `locationName:"valueSet" locationNameList:"InstanceInformationFilterValue" min:"1" type:"list" required:"true"`
// contains filtered or unexported fields
}
Describes a filter for a specific list of instances.
type ListAssociationsInput ¶
type ListAssociationsInput struct {
// One or more filters. Use a filter to return a more specific list of results.
AssociationFilterList []*AssociationFilter `locationNameList:"AssociationFilter" min:"1" type:"list" required:"true"`
// The maximum number of items to return for this call. The call also returns
// a token that you can specify in a subsequent call to get the next set of
// results.
MaxResults *int64 `min:"1" type:"integer"`
// The token for the next set of items to return. (You received this token from
// a previous call.)
NextToken *string `type:"string"`
// contains filtered or unexported fields
}
type ListAssociationsOutput ¶
type ListAssociationsOutput struct {
// The associations.
Associations []*Association `locationNameList:"Association" type:"list"`
// The token to use when requesting the next set of items. If there are no additional
// items to return, the string is empty.
NextToken *string `type:"string"`
// contains filtered or unexported fields
}
type ListCommandInvocationsInput ¶ added in v0.9.17
type ListCommandInvocationsInput struct {
// (Optional) The invocations for a specific command ID.
CommandId *string `min:"36" type:"string"`
// (Optional) If set this returns the response of the command executions and
// any command output. By default this is set to False.
Details *bool `type:"boolean"`
// (Optional) One or more filters. Use a filter to return a more specific list
// of results.
Filters []*CommandFilter `min:"1" type:"list"`
// (Optional) The command execution details for a specific instance ID.
InstanceId *string `type:"string"`
// (Optional) The maximum number of items to return for this call. The call
// also returns a token that you can specify in a subsequent call to get the
// next set of results.
MaxResults *int64 `min:"1" type:"integer"`
// (Optional) The token for the next set of items to return. (You received this
// token from a previous call.)
NextToken *string `type:"string"`
// contains filtered or unexported fields
}
type ListCommandInvocationsOutput ¶ added in v0.9.17
type ListCommandInvocationsOutput struct {
// (Optional) A list of all invocations.
CommandInvocations []*CommandInvocation `type:"list"`
// (Optional) The token for the next set of items to return. (You received this
// token from a previous call.)
NextToken *string `type:"string"`
// contains filtered or unexported fields
}
type ListCommandsInput ¶ added in v0.9.17
type ListCommandsInput struct {
// (Optional) If provided, lists only the specified command.
CommandId *string `min:"36" type:"string"`
// (Optional) One or more filters. Use a filter to return a more specific list
// of results.
Filters []*CommandFilter `min:"1" type:"list"`
// (Optional) Lists commands issued against this instance ID.
InstanceId *string `type:"string"`
// (Optional) The maximum number of items to return for this call. The call
// also returns a token that you can specify in a subsequent call to get the
// next set of results.
MaxResults *int64 `min:"1" type:"integer"`
// (Optional) The token for the next set of items to return. (You received this
// token from a previous call.)
NextToken *string `type:"string"`
// contains filtered or unexported fields
}
type ListCommandsOutput ¶ added in v0.9.17
type ListCommandsOutput struct {
// (Optional) The list of commands requested by the user.
Commands []*Command `type:"list"`
// (Optional) The token for the next set of items to return. (You received this
// token from a previous call.)
NextToken *string `type:"string"`
// contains filtered or unexported fields
}
type ListDocumentsInput ¶
type ListDocumentsInput struct {
// One or more filters. Use a filter to return a more specific list of results.
DocumentFilterList []*DocumentFilter `locationNameList:"DocumentFilter" min:"1" type:"list"`
// The maximum number of items to return for this call. The call also returns
// a token that you can specify in a subsequent call to get the next set of
// results.
MaxResults *int64 `min:"1" type:"integer"`
// The token for the next set of items to return. (You received this token from
// a previous call.)
NextToken *string `type:"string"`
// contains filtered or unexported fields
}
type ListDocumentsOutput ¶
type ListDocumentsOutput struct {
// The names of the SSM documents.
DocumentIdentifiers []*DocumentIdentifier `locationNameList:"DocumentIdentifier" type:"list"`
// The token to use when requesting the next set of items. If there are no additional
// items to return, the string is empty.
NextToken *string `type:"string"`
// contains filtered or unexported fields
}
type SSM ¶
type SSM struct {
*client.Client
}
Simple Systems Manager (SSM) enables you to remotely manage the configuration of your Amazon EC2 instance. Using SSM, you can run scripts or commands using either EC2 Run Command or SSM Config. (SSM Config is currently available only for Windows instances.)
Run Command Run Command provides an on-demand experience for executing
commands. You can use pre-defined Amazon SSM documents to perform the actions listed later in this section, or you can create your own documents. With these documents, you can remotely configure your instances by sending commands using the Commands page in the Amazon EC2 console (http://console.aws.amazon.com/ec2/), AWS Tools for Windows PowerShell (http://docs.aws.amazon.com/powershell/latest/reference/items/Amazon_Simple_Systems_Management_cmdlets.html), or the AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/ssm/index.html).
Run Command reports the status of the command execution for each instance targeted by a command. You can also audit the command execution to understand who executed commands, when, and what changes were made. By switching between different SSM documents, you can quickly configure your instances with different types of commands. To get started with Run Command, verify that your environment meets the prerequisites for remotely running commands on EC2 instances (Linux (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/remote-commands-prereq.html) or Windows (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/remote-commands-prereq.html)).
SSM Config SSM Config is a lightweight instance configuration solution.
SSM Config is currently only available for Windows instances. With SSM Config, you can specify a setup configuration for your instances. SSM Config is similar to EC2 User Data, which is another way of running one-time scripts or applying settings during instance launch. SSM Config is an extension of this capability. Using SSM documents, you can specify which actions the system should perform on your instances, including which applications to install, which AWS Directory Service directory to join, which Microsoft PowerShell modules to install, etc. If an instance is missing one or more of these configurations, the system makes those changes. By default, the system checks every five minutes to see if there is a new configuration to apply as defined in a new SSM document. If so, the system updates the instances accordingly. In this way, you can remotely maintain a consistent configuration baseline on your instances. SSM Config is available using the AWS CLI or the AWS Tools for Windows PowerShell. For more information, see Managing Windows Instance Configuration (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-configuration-manage.html).
SSM Config and Run Command include the following pre-defined documents.
Amazon Pre-defined SSM Documents Name Description Platform AWS-RunShellScript
Run shell scripts
Linux
AWS-UpdateSSMAgent
Update the Amazon SSM agent
Linux
AWS-JoinDirectoryServiceDomain
Join an AWS Directory
Windows
AWS-RunPowerShellScript
Run PowerShell commands or scripts
Windows
AWS-UpdateEC2Config
Update the EC2Config service
Windows
AWS-ConfigureWindowsUpdate
Configure Windows Update settings
Windows
AWS-InstallApplication
Install, repair, or uninstall software using an MSI package
Windows
AWS-InstallPowerShellModule
Install PowerShell modules
Windows
AWS-ConfigureCloudWatch
Configure Amazon CloudWatch Logs to monitor applications and systems
Windows
The commands or scripts specified in SSM documents run with administrative
privilege on your instances because the Amazon SSM agent runs as root on Linux and the EC2Config service runs in the Local System account on Windows. If a user has permission to execute any of the pre-defined SSM documents (any document that begins with AWS-*) then that user also has administrator access to the instance. Delegate access to SSM and Run Command judiciously. This becomes extremely important if you create your own SSM documents. Amazon Web Services does not provide guidance about how to create secure SSM documents. You create SSM documents and delegate access to Run Command at your own risk. As a security best practice, we recommend that you assign access to "AWS-*" documents, especially the AWS-RunShellScript document on Linux and the AWS-RunPowerShellScript document on Windows, to trusted administrators only. You can create SSM documents for specific tasks and delegate access to non-administrators. The service client's operations are safe to be used concurrently. It is not safe to mutate any of the client's properties though.
func New ¶
func New(p client.ConfigProvider, cfgs ...*aws.Config) *SSM
New creates a new instance of the SSM client with a session. If additional configuration is needed for the client instance use the optional aws.Config parameter to add your extra config.
Example:
// Create a SSM client from just a session.
svc := ssm.New(mySession)
// Create a SSM client with additional configuration
svc := ssm.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func (*SSM) CancelCommand ¶ added in v0.9.17
func (c *SSM) CancelCommand(input *CancelCommandInput) (*CancelCommandOutput, error)
Attempts to cancel the command specified by the Command ID. There is no guarantee that the command will be terminated and the underlying process stopped.
func (*SSM) CancelCommandRequest ¶ added in v0.9.17
func (c *SSM) CancelCommandRequest(input *CancelCommandInput) (req *request.Request, output *CancelCommandOutput)
CancelCommandRequest generates a request for the CancelCommand operation.
func (*SSM) CreateAssociation ¶
func (c *SSM) CreateAssociation(input *CreateAssociationInput) (*CreateAssociationOutput, error)
Associates the specified SSM document with the specified instance.
When you associate an SSM document with an instance, the configuration agent on the instance processes the document and configures the instance as specified.
If you associate a document with an instance that already has an associated document, the system throws the AssociationAlreadyExists exception.
func (*SSM) CreateAssociationBatch ¶
func (c *SSM) CreateAssociationBatch(input *CreateAssociationBatchInput) (*CreateAssociationBatchOutput, error)
Associates the specified SSM document with the specified instances.
When you associate an SSM document with an instance, the configuration agent on the instance processes the document and configures the instance as specified.
If you associate a document with an instance that already has an associated document, the system throws the AssociationAlreadyExists exception.
func (*SSM) CreateAssociationBatchRequest ¶
func (c *SSM) CreateAssociationBatchRequest(input *CreateAssociationBatchInput) (req *request.Request, output *CreateAssociationBatchOutput)
CreateAssociationBatchRequest generates a request for the CreateAssociationBatch operation.
func (*SSM) CreateAssociationRequest ¶
func (c *SSM) CreateAssociationRequest(input *CreateAssociationInput) (req *request.Request, output *CreateAssociationOutput)
CreateAssociationRequest generates a request for the CreateAssociation operation.
func (*SSM) CreateDocument ¶
func (c *SSM) CreateDocument(input *CreateDocumentInput) (*CreateDocumentOutput, error)
Creates an SSM document.
After you create an SSM document, you can use CreateAssociation to associate it with one or more running instances.
func (*SSM) CreateDocumentRequest ¶
func (c *SSM) CreateDocumentRequest(input *CreateDocumentInput) (req *request.Request, output *CreateDocumentOutput)
CreateDocumentRequest generates a request for the CreateDocument operation.
func (*SSM) DeleteAssociation ¶
func (c *SSM) DeleteAssociation(input *DeleteAssociationInput) (*DeleteAssociationOutput, error)
Disassociates the specified SSM document from the specified instance.
When you disassociate an SSM document from an instance, it does not change the configuration of the instance. To change the configuration state of an instance after you disassociate a document, you must create a new document with the desired configuration and associate it with the instance.
func (*SSM) DeleteAssociationRequest ¶
func (c *SSM) DeleteAssociationRequest(input *DeleteAssociationInput) (req *request.Request, output *DeleteAssociationOutput)
DeleteAssociationRequest generates a request for the DeleteAssociation operation.
func (*SSM) DeleteDocument ¶
func (c *SSM) DeleteDocument(input *DeleteDocumentInput) (*DeleteDocumentOutput, error)
Deletes the SSM document and all instance associations to the document.
Before you delete the SSM document, we recommend that you use DeleteAssociation to disassociate all instances that are associated with the document.
func (*SSM) DeleteDocumentRequest ¶
func (c *SSM) DeleteDocumentRequest(input *DeleteDocumentInput) (req *request.Request, output *DeleteDocumentOutput)
DeleteDocumentRequest generates a request for the DeleteDocument operation.
func (*SSM) DescribeAssociation ¶
func (c *SSM) DescribeAssociation(input *DescribeAssociationInput) (*DescribeAssociationOutput, error)
Describes the associations for the specified SSM document or instance.
func (*SSM) DescribeAssociationRequest ¶
func (c *SSM) DescribeAssociationRequest(input *DescribeAssociationInput) (req *request.Request, output *DescribeAssociationOutput)
DescribeAssociationRequest generates a request for the DescribeAssociation operation.
func (*SSM) DescribeDocument ¶
func (c *SSM) DescribeDocument(input *DescribeDocumentInput) (*DescribeDocumentOutput, error)
Describes the specified SSM document.
func (*SSM) DescribeDocumentRequest ¶
func (c *SSM) DescribeDocumentRequest(input *DescribeDocumentInput) (req *request.Request, output *DescribeDocumentOutput)
DescribeDocumentRequest generates a request for the DescribeDocument operation.
func (*SSM) DescribeInstanceInformation ¶ added in v0.9.17
func (c *SSM) DescribeInstanceInformation(input *DescribeInstanceInformationInput) (*DescribeInstanceInformationOutput, error)
Describes one or more of your instances. You can use this to get information about instances like the operating system platform, the SSM agent version, status etc. If you specify one or more instance IDs, it returns information for those instances. If you do not specify instance IDs, it returns information for all your instances. If you specify an instance ID that is not valid or an instance that you do not own, you receive an error.
func (*SSM) DescribeInstanceInformationRequest ¶ added in v0.9.17
func (c *SSM) DescribeInstanceInformationRequest(input *DescribeInstanceInformationInput) (req *request.Request, output *DescribeInstanceInformationOutput)
DescribeInstanceInformationRequest generates a request for the DescribeInstanceInformation operation.
func (*SSM) GetDocument ¶
func (c *SSM) GetDocument(input *GetDocumentInput) (*GetDocumentOutput, error)
Gets the contents of the specified SSM document.
func (*SSM) GetDocumentRequest ¶
func (c *SSM) GetDocumentRequest(input *GetDocumentInput) (req *request.Request, output *GetDocumentOutput)
GetDocumentRequest generates a request for the GetDocument operation.
func (*SSM) ListAssociations ¶
func (c *SSM) ListAssociations(input *ListAssociationsInput) (*ListAssociationsOutput, error)
Lists the associations for the specified SSM document or instance.
func (*SSM) ListAssociationsPages ¶ added in v1.1.0
func (c *SSM) ListAssociationsPages(input *ListAssociationsInput, fn func(p *ListAssociationsOutput, lastPage bool) (shouldContinue bool)) error
func (*SSM) ListAssociationsRequest ¶
func (c *SSM) ListAssociationsRequest(input *ListAssociationsInput) (req *request.Request, output *ListAssociationsOutput)
ListAssociationsRequest generates a request for the ListAssociations operation.
func (*SSM) ListCommandInvocations ¶ added in v0.9.17
func (c *SSM) ListCommandInvocations(input *ListCommandInvocationsInput) (*ListCommandInvocationsOutput, error)
An invocation is copy of a command sent to a specific instance. A command can apply to one or more instances. A command invocation applies to one instance. For example, if a user executes SendCommand against three instances, then a command invocation is created for each requested instance ID. ListCommandInvocations provide status about command execution.
func (*SSM) ListCommandInvocationsPages ¶ added in v1.1.0
func (c *SSM) ListCommandInvocationsPages(input *ListCommandInvocationsInput, fn func(p *ListCommandInvocationsOutput, lastPage bool) (shouldContinue bool)) error
func (*SSM) ListCommandInvocationsRequest ¶ added in v0.9.17
func (c *SSM) ListCommandInvocationsRequest(input *ListCommandInvocationsInput) (req *request.Request, output *ListCommandInvocationsOutput)
ListCommandInvocationsRequest generates a request for the ListCommandInvocations operation.
func (*SSM) ListCommands ¶ added in v0.9.17
func (c *SSM) ListCommands(input *ListCommandsInput) (*ListCommandsOutput, error)
Lists the commands requested by users of the AWS account.
func (*SSM) ListCommandsPages ¶ added in v1.1.0
func (c *SSM) ListCommandsPages(input *ListCommandsInput, fn func(p *ListCommandsOutput, lastPage bool) (shouldContinue bool)) error
func (*SSM) ListCommandsRequest ¶ added in v0.9.17
func (c *SSM) ListCommandsRequest(input *ListCommandsInput) (req *request.Request, output *ListCommandsOutput)
ListCommandsRequest generates a request for the ListCommands operation.
func (*SSM) ListDocuments ¶
func (c *SSM) ListDocuments(input *ListDocumentsInput) (*ListDocumentsOutput, error)
Describes one or more of your SSM documents.
func (*SSM) ListDocumentsPages ¶ added in v1.1.0
func (c *SSM) ListDocumentsPages(input *ListDocumentsInput, fn func(p *ListDocumentsOutput, lastPage bool) (shouldContinue bool)) error
func (*SSM) ListDocumentsRequest ¶
func (c *SSM) ListDocumentsRequest(input *ListDocumentsInput) (req *request.Request, output *ListDocumentsOutput)
ListDocumentsRequest generates a request for the ListDocuments operation.
func (*SSM) SendCommand ¶ added in v0.9.17
func (c *SSM) SendCommand(input *SendCommandInput) (*SendCommandOutput, error)
Executes commands on one or more remote instances.
func (*SSM) SendCommandRequest ¶ added in v0.9.17
func (c *SSM) SendCommandRequest(input *SendCommandInput) (req *request.Request, output *SendCommandOutput)
SendCommandRequest generates a request for the SendCommand operation.
func (*SSM) UpdateAssociationStatus ¶
func (c *SSM) UpdateAssociationStatus(input *UpdateAssociationStatusInput) (*UpdateAssociationStatusOutput, error)
Updates the status of the SSM document associated with the specified instance.
func (*SSM) UpdateAssociationStatusRequest ¶
func (c *SSM) UpdateAssociationStatusRequest(input *UpdateAssociationStatusInput) (req *request.Request, output *UpdateAssociationStatusOutput)
UpdateAssociationStatusRequest generates a request for the UpdateAssociationStatus operation.
type SendCommandInput ¶ added in v0.9.17
type SendCommandInput struct {
// User-specified information about the command, such as a brief description
// of what the command should do.
Comment *string `type:"string"`
// Required. The name of the SSM document to execute. This can be an SSM public
// document or a custom document.
DocumentName *string `type:"string" required:"true"`
// Required. The instance IDs where the command should execute.
InstanceIds []*string `min:"1" type:"list" required:"true"`
// The name of the S3 bucket where command execution responses should be stored.
OutputS3BucketName *string `min:"3" type:"string"`
// The directory structure within the S3 bucket where the responses should be
// stored.
OutputS3KeyPrefix *string `type:"string"`
// The required and optional parameters specified in the SSM document being
// executed.
Parameters map[string][]*string `type:"map"`
// If this time is reached and the command has not already started executing,
// it will not execute.
TimeoutSeconds *int64 `min:"30" type:"integer"`
// contains filtered or unexported fields
}
type SendCommandOutput ¶ added in v0.9.17
type SendCommandOutput struct {
// The request as it was received by SSM. Also provides the command ID which
// can be used future references to this request.
Command *Command `type:"structure"`
// contains filtered or unexported fields
}
type UpdateAssociationStatusInput ¶
type UpdateAssociationStatusInput struct {
// The association status.
AssociationStatus *AssociationStatus `type:"structure" required:"true"`
// The ID of the instance.
InstanceId *string `type:"string" required:"true"`
// The name of the SSM document.
Name *string `type:"string" required:"true"`
// contains filtered or unexported fields
}
type UpdateAssociationStatusOutput ¶
type UpdateAssociationStatusOutput struct {
// Information about the association.
AssociationDescription *AssociationDescription `type:"structure"`
// contains filtered or unexported fields
}