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) ListAssociationsRequest(input *ListAssociationsInput) (req *request.Request, output *ListAssociationsOutput)
- func (c *SSM) ListCommandInvocations(input *ListCommandInvocationsInput) (*ListCommandInvocationsOutput, error)
- func (c *SSM) ListCommandInvocationsRequest(input *ListCommandInvocationsInput) (req *request.Request, output *ListCommandInvocationsOutput)
- func (c *SSM) ListCommands(input *ListCommandsInput) (*ListCommandsOutput, error)
- func (c *SSM) ListCommandsRequest(input *ListCommandsInput) (req *request.Request, output *ListCommandsOutput)
- func (c *SSM) ListDocuments(input *ListDocumentsInput) (*ListDocumentsOutput, 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 `min:"10" 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.
func (Association) GoString ¶
func (s Association) GoString() string
GoString returns the string representation
func (Association) String ¶
func (s Association) String() string
String returns the string representation
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 `min:"10" 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.
func (AssociationDescription) GoString ¶
func (s AssociationDescription) GoString() string
GoString returns the string representation
func (AssociationDescription) String ¶
func (s AssociationDescription) String() string
String returns the string representation
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.
func (AssociationFilter) GoString ¶
func (s AssociationFilter) GoString() string
GoString returns the string representation
func (AssociationFilter) String ¶
func (s AssociationFilter) String() string
String returns the string representation
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.
func (AssociationStatus) GoString ¶
func (s AssociationStatus) GoString() string
GoString returns the string representation
func (AssociationStatus) String ¶
func (s AssociationStatus) String() string
String returns the string representation
type CancelCommandInput ¶
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 }
func (CancelCommandInput) GoString ¶
func (s CancelCommandInput) GoString() string
GoString returns the string representation
func (CancelCommandInput) String ¶
func (s CancelCommandInput) String() string
String returns the string representation
type CancelCommandOutput ¶
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.
func (CancelCommandOutput) GoString ¶
func (s CancelCommandOutput) GoString() string
GoString returns the string representation
func (CancelCommandOutput) String ¶
func (s CancelCommandOutput) String() string
String returns the string representation
type Command ¶
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 ¶
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.
func (CommandFilter) GoString ¶
func (s CommandFilter) GoString() string
GoString returns the string representation
func (CommandFilter) String ¶
func (s CommandFilter) String() string
String returns the string representation
type CommandInvocation ¶
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 `min:"10" 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.
func (CommandInvocation) GoString ¶
func (s CommandInvocation) GoString() string
GoString returns the string representation
func (CommandInvocation) String ¶
func (s CommandInvocation) String() string
String returns the string representation
type CommandPlugin ¶
type CommandPlugin struct { // The name of the plugin. Must be one of the following: AWS-JoinDirectoryServiceDomain, // AWS-InstallApplication, AWS-RunPowerShellScript, AWS-InstallPowerShellModule, // AWS-ConfigureCloudWatch. 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.
func (CommandPlugin) GoString ¶
func (s CommandPlugin) GoString() string
GoString returns the string representation
func (CommandPlugin) String ¶
func (s CommandPlugin) String() string
String returns the string representation
type CreateAssociationBatchInput ¶
type CreateAssociationBatchInput struct { // One or more associations. Entries []*CreateAssociationBatchRequestEntry `locationNameList:"entries" type:"list" required:"true"` // contains filtered or unexported fields }
func (CreateAssociationBatchInput) GoString ¶
func (s CreateAssociationBatchInput) GoString() string
GoString returns the string representation
func (CreateAssociationBatchInput) String ¶
func (s CreateAssociationBatchInput) String() string
String returns the string representation
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 }
func (CreateAssociationBatchOutput) GoString ¶
func (s CreateAssociationBatchOutput) GoString() string
GoString returns the string representation
func (CreateAssociationBatchOutput) String ¶
func (s CreateAssociationBatchOutput) String() string
String returns the string representation
type CreateAssociationBatchRequestEntry ¶
type CreateAssociationBatchRequestEntry struct { // The ID of the instance. InstanceId *string `min:"10" 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.
func (CreateAssociationBatchRequestEntry) GoString ¶
func (s CreateAssociationBatchRequestEntry) GoString() string
GoString returns the string representation
func (CreateAssociationBatchRequestEntry) String ¶
func (s CreateAssociationBatchRequestEntry) String() string
String returns the string representation
type CreateAssociationInput ¶
type CreateAssociationInput struct { // The instance ID. InstanceId *string `min:"10" type:"string" required:"true"` // The name of the SSM document. Name *string `type:"string" required:"true"` // The parameters for the document’s runtime configuration. Parameters map[string][]*string `type:"map"` // contains filtered or unexported fields }
func (CreateAssociationInput) GoString ¶
func (s CreateAssociationInput) GoString() string
GoString returns the string representation
func (CreateAssociationInput) String ¶
func (s CreateAssociationInput) String() string
String returns the string representation
type CreateAssociationOutput ¶
type CreateAssociationOutput struct { // Information about the association. AssociationDescription *AssociationDescription `type:"structure"` // contains filtered or unexported fields }
func (CreateAssociationOutput) GoString ¶
func (s CreateAssociationOutput) GoString() string
GoString returns the string representation
func (CreateAssociationOutput) String ¶
func (s CreateAssociationOutput) String() string
String returns the string representation
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 }
func (CreateDocumentInput) GoString ¶
func (s CreateDocumentInput) GoString() string
GoString returns the string representation
func (CreateDocumentInput) String ¶
func (s CreateDocumentInput) String() string
String returns the string representation
type CreateDocumentOutput ¶
type CreateDocumentOutput struct { // Information about the SSM document. DocumentDescription *DocumentDescription `type:"structure"` // contains filtered or unexported fields }
func (CreateDocumentOutput) GoString ¶
func (s CreateDocumentOutput) GoString() string
GoString returns the string representation
func (CreateDocumentOutput) String ¶
func (s CreateDocumentOutput) String() string
String returns the string representation
type DeleteAssociationInput ¶
type DeleteAssociationInput struct { // The ID of the instance. InstanceId *string `min:"10" type:"string" required:"true"` // The name of the SSM document. Name *string `type:"string" required:"true"` // contains filtered or unexported fields }
func (DeleteAssociationInput) GoString ¶
func (s DeleteAssociationInput) GoString() string
GoString returns the string representation
func (DeleteAssociationInput) String ¶
func (s DeleteAssociationInput) String() string
String returns the string representation
type DeleteAssociationOutput ¶
type DeleteAssociationOutput struct {
// contains filtered or unexported fields
}
func (DeleteAssociationOutput) GoString ¶
func (s DeleteAssociationOutput) GoString() string
GoString returns the string representation
func (DeleteAssociationOutput) String ¶
func (s DeleteAssociationOutput) String() string
String returns the string representation
type DeleteDocumentInput ¶
type DeleteDocumentInput struct { // The name of the SSM document. Name *string `type:"string" required:"true"` // contains filtered or unexported fields }
func (DeleteDocumentInput) GoString ¶
func (s DeleteDocumentInput) GoString() string
GoString returns the string representation
func (DeleteDocumentInput) String ¶
func (s DeleteDocumentInput) String() string
String returns the string representation
type DeleteDocumentOutput ¶
type DeleteDocumentOutput struct {
// contains filtered or unexported fields
}
func (DeleteDocumentOutput) GoString ¶
func (s DeleteDocumentOutput) GoString() string
GoString returns the string representation
func (DeleteDocumentOutput) String ¶
func (s DeleteDocumentOutput) String() string
String returns the string representation
type DescribeAssociationInput ¶
type DescribeAssociationInput struct { // The ID of the instance. InstanceId *string `min:"10" type:"string" required:"true"` // The name of the SSM document. Name *string `type:"string" required:"true"` // contains filtered or unexported fields }
func (DescribeAssociationInput) GoString ¶
func (s DescribeAssociationInput) GoString() string
GoString returns the string representation
func (DescribeAssociationInput) String ¶
func (s DescribeAssociationInput) String() string
String returns the string representation
type DescribeAssociationOutput ¶
type DescribeAssociationOutput struct { // Information about the association. AssociationDescription *AssociationDescription `type:"structure"` // contains filtered or unexported fields }
func (DescribeAssociationOutput) GoString ¶
func (s DescribeAssociationOutput) GoString() string
GoString returns the string representation
func (DescribeAssociationOutput) String ¶
func (s DescribeAssociationOutput) String() string
String returns the string representation
type DescribeDocumentInput ¶
type DescribeDocumentInput struct { // The name of the SSM document. Name *string `type:"string" required:"true"` // contains filtered or unexported fields }
func (DescribeDocumentInput) GoString ¶
func (s DescribeDocumentInput) GoString() string
GoString returns the string representation
func (DescribeDocumentInput) String ¶
func (s DescribeDocumentInput) String() string
String returns the string representation
type DescribeDocumentOutput ¶
type DescribeDocumentOutput struct { // Information about the SSM document. Document *DocumentDescription `type:"structure"` // contains filtered or unexported fields }
func (DescribeDocumentOutput) GoString ¶
func (s DescribeDocumentOutput) GoString() string
GoString returns the string representation
func (DescribeDocumentOutput) String ¶
func (s DescribeDocumentOutput) String() string
String returns the string representation
type DescribeInstanceInformationInput ¶
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 }
func (DescribeInstanceInformationInput) GoString ¶
func (s DescribeInstanceInformationInput) GoString() string
GoString returns the string representation
func (DescribeInstanceInformationInput) String ¶
func (s DescribeInstanceInformationInput) String() string
String returns the string representation
type DescribeInstanceInformationOutput ¶
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 }
func (DescribeInstanceInformationOutput) GoString ¶
func (s DescribeInstanceInformationOutput) GoString() string
GoString returns the string representation
func (DescribeInstanceInformationOutput) String ¶
func (s DescribeInstanceInformationOutput) String() string
String returns the string representation
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.
func (DocumentDescription) GoString ¶
func (s DocumentDescription) GoString() string
GoString returns the string representation
func (DocumentDescription) String ¶
func (s DocumentDescription) String() string
String returns the string representation
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.
func (DocumentFilter) GoString ¶
func (s DocumentFilter) GoString() string
GoString returns the string representation
func (DocumentFilter) String ¶
func (s DocumentFilter) String() string
String returns the string representation
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.
func (DocumentIdentifier) GoString ¶
func (s DocumentIdentifier) GoString() string
GoString returns the string representation
func (DocumentIdentifier) String ¶
func (s DocumentIdentifier) String() string
String returns the string representation
type DocumentParameter ¶
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 }
func (DocumentParameter) GoString ¶
func (s DocumentParameter) GoString() string
GoString returns the string representation
func (DocumentParameter) String ¶
func (s DocumentParameter) String() string
String returns the string representation
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.
func (FailedCreateAssociation) GoString ¶
func (s FailedCreateAssociation) GoString() string
GoString returns the string representation
func (FailedCreateAssociation) String ¶
func (s FailedCreateAssociation) String() string
String returns the string representation
type GetDocumentInput ¶
type GetDocumentInput struct { // The name of the SSM document. Name *string `type:"string" required:"true"` // contains filtered or unexported fields }
func (GetDocumentInput) GoString ¶
func (s GetDocumentInput) GoString() string
GoString returns the string representation
func (GetDocumentInput) String ¶
func (s GetDocumentInput) String() string
String returns the string representation
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 }
func (GetDocumentOutput) GoString ¶
func (s GetDocumentOutput) GoString() string
GoString returns the string representation
func (GetDocumentOutput) String ¶
func (s GetDocumentOutput) String() string
String returns the string representation
type InstanceInformation ¶
type InstanceInformation struct { // The version of the SSM agent running on your instance. AgentVersion *string `type:"string"` // The instance ID. InstanceId *string `min:"10" 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.
func (InstanceInformation) GoString ¶
func (s InstanceInformation) GoString() string
GoString returns the string representation
func (InstanceInformation) String ¶
func (s InstanceInformation) String() string
String returns the string representation
type InstanceInformationFilter ¶
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.
func (InstanceInformationFilter) GoString ¶
func (s InstanceInformationFilter) GoString() string
GoString returns the string representation
func (InstanceInformationFilter) String ¶
func (s InstanceInformationFilter) String() string
String returns the string representation
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 }
func (ListAssociationsInput) GoString ¶
func (s ListAssociationsInput) GoString() string
GoString returns the string representation
func (ListAssociationsInput) String ¶
func (s ListAssociationsInput) String() string
String returns the string representation
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 }
func (ListAssociationsOutput) GoString ¶
func (s ListAssociationsOutput) GoString() string
GoString returns the string representation
func (ListAssociationsOutput) String ¶
func (s ListAssociationsOutput) String() string
String returns the string representation
type ListCommandInvocationsInput ¶
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. 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 `min:"10" 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 }
func (ListCommandInvocationsInput) GoString ¶
func (s ListCommandInvocationsInput) GoString() string
GoString returns the string representation
func (ListCommandInvocationsInput) String ¶
func (s ListCommandInvocationsInput) String() string
String returns the string representation
type ListCommandInvocationsOutput ¶
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 }
func (ListCommandInvocationsOutput) GoString ¶
func (s ListCommandInvocationsOutput) GoString() string
GoString returns the string representation
func (ListCommandInvocationsOutput) String ¶
func (s ListCommandInvocationsOutput) String() string
String returns the string representation
type ListCommandsInput ¶
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 `min:"10" 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 }
func (ListCommandsInput) GoString ¶
func (s ListCommandsInput) GoString() string
GoString returns the string representation
func (ListCommandsInput) String ¶
func (s ListCommandsInput) String() string
String returns the string representation
type ListCommandsOutput ¶
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 }
func (ListCommandsOutput) GoString ¶
func (s ListCommandsOutput) GoString() string
GoString returns the string representation
func (ListCommandsOutput) String ¶
func (s ListCommandsOutput) String() string
String returns the string representation
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 }
func (ListDocumentsInput) GoString ¶
func (s ListDocumentsInput) GoString() string
GoString returns the string representation
func (ListDocumentsInput) String ¶
func (s ListDocumentsInput) String() string
String returns the string representation
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 }
func (ListDocumentsOutput) GoString ¶
func (s ListDocumentsOutput) GoString() string
GoString returns the string representation
func (ListDocumentsOutput) String ¶
func (s ListDocumentsOutput) String() string
String returns the string representation
type SSM ¶
Simple Systems Manager (SSM) is a set of capabilities that can help you manage your Amazon EC2 instances running on Windows. SSM enables you to run scripts or other common administrative tasks on your instances using either SSM Run Command or SSM Config.
Run Command extends the server administration capabilities of SSM by offering an on-demand experience for executing commands. You can use pre-defined Amazon SSM documents (formerly called configuration documents) to perform the actions listed later in this section, or you can create your own documents. With these document, you can then remotely configure your instances by sending commands using the AWS command line interface (CLI), AWS Tools for Windows PowerShell, or the Commands page in the Amazon EC2 console. Additionally, because Run Command enables you to execute PowerShell commands or scripts, you can administer your instances remotely using PowerShell as though you were logged on locally to the instance. 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.
SSM Config is a lightweight instance configuration solution. 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.
SSM is currently not supported on Linux instances. You can use Run Command and SSM Config to do the following: Join an AWS Directory Service directory (SSM Config and Run Command) Install, repair, or uninstall software using an MSI package (SSM Config
and Run Command)
Install PowerShell modules (SSM Config and Run Command) Configure CloudWatch Logs to monitor applications and systems (SSM Config
and Run Command)
Run PowerShell commands or scripts (Run Command only) Update the EC2Config service (Run Command only) Configure Windows Update settings (Run Command only) SSM documents run with administrative privilege on Windows instances
because the EC2Config service runs in the Local System account. 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 Config 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 actions at your own risk. As a security best practice, we recommend that you assign access to "AWS-*" documents, especially the AWS-RunPowerShellScript document, to trusted administrators only. You can create low-level SSM documents for low security 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 ¶
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.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ssm" ) func main() { svc := ssm.New(session.New()) params := &ssm.CancelCommandInput{ CommandId: aws.String("CommandId"), // Required InstanceIds: []*string{ aws.String("InstanceId"), // Required // More values... }, } resp, err := svc.CancelCommand(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
Output:
func (*SSM) CancelCommandRequest ¶
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.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ssm" ) func main() { svc := ssm.New(session.New()) params := &ssm.CreateAssociationInput{ InstanceId: aws.String("InstanceId"), // Required Name: aws.String("DocumentName"), // Required Parameters: map[string][]*string{ "Key": { // Required aws.String("ParameterValue"), // Required // More values... }, // More values... }, } resp, err := svc.CreateAssociation(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
Output:
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.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ssm" ) func main() { svc := ssm.New(session.New()) params := &ssm.CreateAssociationBatchInput{ Entries: []*ssm.CreateAssociationBatchRequestEntry{ // Required { // Required InstanceId: aws.String("InstanceId"), Name: aws.String("DocumentName"), Parameters: map[string][]*string{ "Key": { // Required aws.String("ParameterValue"), // Required // More values... }, // More values... }, }, // More values... }, } resp, err := svc.CreateAssociationBatch(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
Output:
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.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ssm" ) func main() { svc := ssm.New(session.New()) params := &ssm.CreateDocumentInput{ Content: aws.String("DocumentContent"), // Required Name: aws.String("DocumentName"), // Required } resp, err := svc.CreateDocument(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
Output:
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.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ssm" ) func main() { svc := ssm.New(session.New()) params := &ssm.DeleteAssociationInput{ InstanceId: aws.String("InstanceId"), // Required Name: aws.String("DocumentName"), // Required } resp, err := svc.DeleteAssociation(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
Output:
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.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ssm" ) func main() { svc := ssm.New(session.New()) params := &ssm.DeleteDocumentInput{ Name: aws.String("DocumentName"), // Required } resp, err := svc.DeleteDocument(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
Output:
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.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ssm" ) func main() { svc := ssm.New(session.New()) params := &ssm.DescribeAssociationInput{ InstanceId: aws.String("InstanceId"), // Required Name: aws.String("DocumentName"), // Required } resp, err := svc.DescribeAssociation(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
Output:
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.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ssm" ) func main() { svc := ssm.New(session.New()) params := &ssm.DescribeDocumentInput{ Name: aws.String("DocumentName"), // Required } resp, err := svc.DescribeDocument(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
Output:
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 ¶
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.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ssm" ) func main() { svc := ssm.New(session.New()) params := &ssm.DescribeInstanceInformationInput{ InstanceInformationFilterList: []*ssm.InstanceInformationFilter{ { // Required Key: aws.String("InstanceInformationFilterKey"), // Required ValueSet: []*string{ // Required aws.String("InstanceInformationFilterValue"), // Required // More values... }, }, // More values... }, MaxResults: aws.Int64(1), NextToken: aws.String("NextToken"), } resp, err := svc.DescribeInstanceInformation(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
Output:
func (*SSM) DescribeInstanceInformationRequest ¶
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.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ssm" ) func main() { svc := ssm.New(session.New()) params := &ssm.GetDocumentInput{ Name: aws.String("DocumentName"), // Required } resp, err := svc.GetDocument(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
Output:
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.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ssm" ) func main() { svc := ssm.New(session.New()) params := &ssm.ListAssociationsInput{ AssociationFilterList: []*ssm.AssociationFilter{ // Required { // Required Key: aws.String("AssociationFilterKey"), // Required Value: aws.String("AssociationFilterValue"), // Required }, // More values... }, MaxResults: aws.Int64(1), NextToken: aws.String("NextToken"), } resp, err := svc.ListAssociations(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
Output:
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 ¶
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.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ssm" ) func main() { svc := ssm.New(session.New()) params := &ssm.ListCommandInvocationsInput{ CommandId: aws.String("CommandId"), Details: aws.Bool(true), Filters: []*ssm.CommandFilter{ { // Required Key: aws.String("CommandFilterKey"), // Required Value: aws.String("CommandFilterValue"), // Required }, // More values... }, InstanceId: aws.String("InstanceId"), MaxResults: aws.Int64(1), NextToken: aws.String("NextToken"), } resp, err := svc.ListCommandInvocations(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
Output:
func (*SSM) ListCommandInvocationsRequest ¶
func (c *SSM) ListCommandInvocationsRequest(input *ListCommandInvocationsInput) (req *request.Request, output *ListCommandInvocationsOutput)
ListCommandInvocationsRequest generates a request for the ListCommandInvocations operation.
func (*SSM) ListCommands ¶
func (c *SSM) ListCommands(input *ListCommandsInput) (*ListCommandsOutput, error)
Lists the commands requested by users of the AWS account.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ssm" ) func main() { svc := ssm.New(session.New()) params := &ssm.ListCommandsInput{ CommandId: aws.String("CommandId"), Filters: []*ssm.CommandFilter{ { // Required Key: aws.String("CommandFilterKey"), // Required Value: aws.String("CommandFilterValue"), // Required }, // More values... }, InstanceId: aws.String("InstanceId"), MaxResults: aws.Int64(1), NextToken: aws.String("NextToken"), } resp, err := svc.ListCommands(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
Output:
func (*SSM) ListCommandsRequest ¶
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.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ssm" ) func main() { svc := ssm.New(session.New()) params := &ssm.ListDocumentsInput{ DocumentFilterList: []*ssm.DocumentFilter{ { // Required Key: aws.String("DocumentFilterKey"), // Required Value: aws.String("DocumentFilterValue"), // Required }, // More values... }, MaxResults: aws.Int64(1), NextToken: aws.String("NextToken"), } resp, err := svc.ListDocuments(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
Output:
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 ¶
func (c *SSM) SendCommand(input *SendCommandInput) (*SendCommandOutput, error)
Executes commands on one or more remote instances.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ssm" ) func main() { svc := ssm.New(session.New()) params := &ssm.SendCommandInput{ DocumentName: aws.String("DocumentName"), // Required InstanceIds: []*string{ // Required aws.String("InstanceId"), // Required // More values... }, Comment: aws.String("Comment"), OutputS3BucketName: aws.String("S3BucketName"), OutputS3KeyPrefix: aws.String("S3KeyPrefix"), Parameters: map[string][]*string{ "Key": { // Required aws.String("ParameterValue"), // Required // More values... }, // More values... }, TimeoutSeconds: aws.Int64(1), } resp, err := svc.SendCommand(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
Output:
func (*SSM) SendCommandRequest ¶
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.
Example ¶
package main import ( "fmt" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ssm" ) func main() { svc := ssm.New(session.New()) params := &ssm.UpdateAssociationStatusInput{ AssociationStatus: &ssm.AssociationStatus{ // Required Date: aws.Time(time.Now()), // Required Message: aws.String("StatusMessage"), // Required Name: aws.String("AssociationStatusName"), // Required AdditionalInfo: aws.String("StatusAdditionalInfo"), }, InstanceId: aws.String("InstanceId"), // Required Name: aws.String("DocumentName"), // Required } resp, err := svc.UpdateAssociationStatus(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
Output:
func (*SSM) UpdateAssociationStatusRequest ¶
func (c *SSM) UpdateAssociationStatusRequest(input *UpdateAssociationStatusInput) (req *request.Request, output *UpdateAssociationStatusOutput)
UpdateAssociationStatusRequest generates a request for the UpdateAssociationStatus operation.
type SendCommandInput ¶
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 }
func (SendCommandInput) GoString ¶
func (s SendCommandInput) GoString() string
GoString returns the string representation
func (SendCommandInput) String ¶
func (s SendCommandInput) String() string
String returns the string representation
type SendCommandOutput ¶
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 }
func (SendCommandOutput) GoString ¶
func (s SendCommandOutput) GoString() string
GoString returns the string representation
func (SendCommandOutput) String ¶
func (s SendCommandOutput) String() string
String returns the string representation
type UpdateAssociationStatusInput ¶
type UpdateAssociationStatusInput struct { // The association status. AssociationStatus *AssociationStatus `type:"structure" required:"true"` // The ID of the instance. InstanceId *string `min:"10" type:"string" required:"true"` // The name of the SSM document. Name *string `type:"string" required:"true"` // contains filtered or unexported fields }
func (UpdateAssociationStatusInput) GoString ¶
func (s UpdateAssociationStatusInput) GoString() string
GoString returns the string representation
func (UpdateAssociationStatusInput) String ¶
func (s UpdateAssociationStatusInput) String() string
String returns the string representation
type UpdateAssociationStatusOutput ¶
type UpdateAssociationStatusOutput struct { // Information about the association. AssociationDescription *AssociationDescription `type:"structure"` // contains filtered or unexported fields }
func (UpdateAssociationStatusOutput) GoString ¶
func (s UpdateAssociationStatusOutput) GoString() string
GoString returns the string representation
func (UpdateAssociationStatusOutput) String ¶
func (s UpdateAssociationStatusOutput) String() string
String returns the string representation