You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::SSM::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(*args) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

    a customizable set of options



152
153
154
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 152

def initialize(*args)
  super
end

Instance Method Details

#add_tags_to_resource(params = {}) ⇒ Struct

Adds or overwrites one or more tags for the specified resource. Tags are metadata that you can assign to your documents, managed instances, Maintenance Windows, Parameter Store parameters, and patch baselines. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. Each tag consists of a key and an optional value, both of which you define. For example, you could define a set of tags for your account's managed instances that helps you track each instance's owner and stack level. For example: Key=Owner and Value=DbAdmin, SysAdmin, or Dev. Or Key=Stack and Value=Production, Pre-Production, or Test.

Each resource can have a maximum of 10 tags.

We recommend that you devise a set of tag keys that meets your needs for each resource type. Using a consistent set of tag keys makes it easier for you to manage your resources. You can search and filter the resources based on the tags you add. Tags don't have any semantic meaning to Amazon EC2 and are interpreted strictly as a string of characters.

For more information about tags, see Tagging Your Amazon EC2 Resources in the Amazon EC2 User Guide.

Examples:

Request syntax with placeholder values


resp = client.add_tags_to_resource({
  resource_type: "Document", # required, accepts Document, ManagedInstance, MaintenanceWindow, Parameter, PatchBaseline
  resource_id: "ResourceId", # required
  tags: [ # required
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_type (required, String)

    Specifies the type of resource you are tagging.

  • :resource_id (required, String)

    The resource ID you want to tag.

  • :tags (required, Array<Types::Tag>)

    One or more tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



215
216
217
218
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 215

def add_tags_to_resource(params = {}, options = {})
  req = build_request(:add_tags_to_resource, params)
  req.send_request(options)
end

#cancel_command(params = {}) ⇒ Struct

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.

Examples:

Request syntax with placeholder values


resp = client.cancel_command({
  command_id: "CommandId", # required
  instance_ids: ["InstanceId"],
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :command_id (required, String)

    The ID of the command you want to cancel.

  • :instance_ids (Array<String>) — default: 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.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



245
246
247
248
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 245

def cancel_command(params = {}, options = {})
  req = build_request(:cancel_command, params)
  req.send_request(options)
end

#create_activation(params = {}) ⇒ Types::CreateActivationResult

Registers your on-premises server or virtual machine with Amazon EC2 so that you can manage these resources using Run Command. An on-premises server or virtual machine that has been registered with EC2 is called a managed instance. For more information about activations, see Setting Up Systems Manager in Hybrid Environments.

Examples:

Request syntax with placeholder values


resp = client.create_activation({
  description: "ActivationDescription",
  default_instance_name: "DefaultInstanceName",
  iam_role: "IamRole", # required
  registration_limit: 1,
  expiration_date: Time.now,
})

Response structure


resp.activation_id #=> String
resp.activation_code #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :description (String)

    A userdefined description of the resource that you want to register with Amazon EC2.

  • :default_instance_name (String)

    The name of the registered, managed instance as it will appear in the Amazon EC2 console or when you use the AWS command line tools to list EC2 resources.

  • :iam_role (required, String)

    The Amazon Identity and Access Management (IAM) role that you want to assign to the managed instance.

  • :registration_limit (Integer)

    Specify the maximum number of managed instances you want to register. The default value is 1 instance.

  • :expiration_date (Time, DateTime, Date, Integer, String)

    The date by which this activation request should expire. The default value is 24 hours.

Returns:

See Also:



306
307
308
309
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 306

def create_activation(params = {}, options = {})
  req = build_request(:create_activation, params)
  req.send_request(options)
end

#create_association(params = {}) ⇒ Types::CreateAssociationResult

Associates the specified Systems Manager document with the specified instances or targets.

When you associate a document with one or more instances using instance IDs or tags, the SSM Agent running 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.

Examples:

Request syntax with placeholder values


resp = client.create_association({
  name: "DocumentName", # required
  document_version: "DocumentVersion",
  instance_id: "InstanceId",
  parameters: {
    "ParameterName" => ["ParameterValue"],
  },
  targets: [
    {
      key: "TargetKey",
      values: ["TargetValue"],
    },
  ],
  schedule_expression: "ScheduleExpression",
  output_location: {
    s3_location: {
      output_s3_region: "S3Region",
      output_s3_bucket_name: "S3BucketName",
      output_s3_key_prefix: "S3KeyPrefix",
    },
  },
  association_name: "AssociationName",
})

Response structure


resp.association_description.name #=> String
resp.association_description.instance_id #=> String
resp.association_description.association_version #=> String
resp.association_description.date #=> Time
resp.association_description.last_update_association_date #=> Time
resp.association_description.status.date #=> Time
resp.association_description.status.name #=> String, one of "Pending", "Success", "Failed"
resp.association_description.status.message #=> String
resp.association_description.status.additional_info #=> String
resp.association_description.overview.status #=> String
resp.association_description.overview.detailed_status #=> String
resp.association_description.overview.association_status_aggregated_count #=> Hash
resp.association_description.overview.association_status_aggregated_count["StatusName"] #=> Integer
resp.association_description.document_version #=> String
resp.association_description.parameters #=> Hash
resp.association_description.parameters["ParameterName"] #=> Array
resp.association_description.parameters["ParameterName"][0] #=> String
resp.association_description.association_id #=> String
resp.association_description.targets #=> Array
resp.association_description.targets[0].key #=> String
resp.association_description.targets[0].values #=> Array
resp.association_description.targets[0].values[0] #=> String
resp.association_description.schedule_expression #=> String
resp.association_description.output_location.s3_location.output_s3_region #=> String
resp.association_description.output_location.s3_location.output_s3_bucket_name #=> String
resp.association_description.output_location.s3_location.output_s3_key_prefix #=> String
resp.association_description.last_execution_date #=> Time
resp.association_description.last_successful_execution_date #=> Time
resp.association_description.association_name #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the Systems Manager document.

  • :document_version (String)

    The document version you want to associate with the target(s). Can be a specific version or the default version.

  • :instance_id (String)

    The instance ID.

  • :parameters (Hash<String,Array>)

    The parameters for the documents runtime configuration.

  • :targets (Array<Types::Target>)

    The targets (either instances or tags) for the association.

  • :schedule_expression (String)

    A cron expression when the association will be applied to the target(s).

  • :output_location (Types::InstanceAssociationOutputLocation)

    An Amazon S3 bucket where you want to store the output details of the request.

  • :association_name (String)

    Specify a descriptive name for the association.

Returns:

See Also:



415
416
417
418
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 415

def create_association(params = {}, options = {})
  req = build_request(:create_association, params)
  req.send_request(options)
end

#create_association_batch(params = {}) ⇒ Types::CreateAssociationBatchResult

Associates the specified Systems Manager document with the specified instances or targets.

When you associate a document with one or more instances using instance IDs or tags, the SSM Agent running 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.

Examples:

Request syntax with placeholder values


resp = client.create_association_batch({
  entries: [ # required
    {
      name: "DocumentName", # required
      instance_id: "InstanceId",
      parameters: {
        "ParameterName" => ["ParameterValue"],
      },
      document_version: "DocumentVersion",
      targets: [
        {
          key: "TargetKey",
          values: ["TargetValue"],
        },
      ],
      schedule_expression: "ScheduleExpression",
      output_location: {
        s3_location: {
          output_s3_region: "S3Region",
          output_s3_bucket_name: "S3BucketName",
          output_s3_key_prefix: "S3KeyPrefix",
        },
      },
      association_name: "AssociationName",
    },
  ],
})

Response structure


resp.successful #=> Array
resp.successful[0].name #=> String
resp.successful[0].instance_id #=> String
resp.successful[0].association_version #=> String
resp.successful[0].date #=> Time
resp.successful[0].last_update_association_date #=> Time
resp.successful[0].status.date #=> Time
resp.successful[0].status.name #=> String, one of "Pending", "Success", "Failed"
resp.successful[0].status.message #=> String
resp.successful[0].status.additional_info #=> String
resp.successful[0].overview.status #=> String
resp.successful[0].overview.detailed_status #=> String
resp.successful[0].overview.association_status_aggregated_count #=> Hash
resp.successful[0].overview.association_status_aggregated_count["StatusName"] #=> Integer
resp.successful[0].document_version #=> String
resp.successful[0].parameters #=> Hash
resp.successful[0].parameters["ParameterName"] #=> Array
resp.successful[0].parameters["ParameterName"][0] #=> String
resp.successful[0].association_id #=> String
resp.successful[0].targets #=> Array
resp.successful[0].targets[0].key #=> String
resp.successful[0].targets[0].values #=> Array
resp.successful[0].targets[0].values[0] #=> String
resp.successful[0].schedule_expression #=> String
resp.successful[0].output_location.s3_location.output_s3_region #=> String
resp.successful[0].output_location.s3_location.output_s3_bucket_name #=> String
resp.successful[0].output_location.s3_location.output_s3_key_prefix #=> String
resp.successful[0].last_execution_date #=> Time
resp.successful[0].last_successful_execution_date #=> Time
resp.successful[0].association_name #=> String
resp.failed #=> Array
resp.failed[0].entry.name #=> String
resp.failed[0].entry.instance_id #=> String
resp.failed[0].entry.parameters #=> Hash
resp.failed[0].entry.parameters["ParameterName"] #=> Array
resp.failed[0].entry.parameters["ParameterName"][0] #=> String
resp.failed[0].entry.document_version #=> String
resp.failed[0].entry.targets #=> Array
resp.failed[0].entry.targets[0].key #=> String
resp.failed[0].entry.targets[0].values #=> Array
resp.failed[0].entry.targets[0].values[0] #=> String
resp.failed[0].entry.schedule_expression #=> String
resp.failed[0].entry.output_location.s3_location.output_s3_region #=> String
resp.failed[0].entry.output_location.s3_location.output_s3_bucket_name #=> String
resp.failed[0].entry.output_location.s3_location.output_s3_key_prefix #=> String
resp.failed[0].entry.association_name #=> String
resp.failed[0].message #=> String
resp.failed[0].fault #=> String, one of "Client", "Server", "Unknown"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

Returns:

See Also:



524
525
526
527
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 524

def create_association_batch(params = {}, options = {})
  req = build_request(:create_association_batch, params)
  req.send_request(options)
end

#create_document(params = {}) ⇒ Types::CreateDocumentResult

Creates a Systems Manager document.

After you create a document, you can use CreateAssociation to associate it with one or more running instances.

Examples:

Request syntax with placeholder values


resp = client.create_document({
  content: "DocumentContent", # required
  name: "DocumentName", # required
  document_type: "Command", # accepts Command, Policy, Automation
})

Response structure


resp.document_description.sha_1 #=> String
resp.document_description.hash #=> String
resp.document_description.hash_type #=> String, one of "Sha256", "Sha1"
resp.document_description.name #=> String
resp.document_description.owner #=> String
resp.document_description.created_date #=> Time
resp.document_description.status #=> String, one of "Creating", "Active", "Updating", "Deleting"
resp.document_description.document_version #=> String
resp.document_description.description #=> String
resp.document_description.parameters #=> Array
resp.document_description.parameters[0].name #=> String
resp.document_description.parameters[0].type #=> String, one of "String", "StringList"
resp.document_description.parameters[0].description #=> String
resp.document_description.parameters[0].default_value #=> String
resp.document_description.platform_types #=> Array
resp.document_description.platform_types[0] #=> String, one of "Windows", "Linux"
resp.document_description.document_type #=> String, one of "Command", "Policy", "Automation"
resp.document_description.schema_version #=> String
resp.document_description.latest_version #=> String
resp.document_description.default_version #=> String
resp.document_description.tags #=> Array
resp.document_description.tags[0].key #=> String
resp.document_description.tags[0].value #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :content (required, String)

    A valid JSON string.

  • :name (required, String)

    A name for the Systems Manager document.

  • :document_type (String)

    The type of document to create. Valid document types include: Policy, Automation, and Command.

Returns:

See Also:



586
587
588
589
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 586

def create_document(params = {}, options = {})
  req = build_request(:create_document, params)
  req.send_request(options)
end

#create_maintenance_window(params = {}) ⇒ Types::CreateMaintenanceWindowResult

Creates a new Maintenance Window.

Examples:

Request syntax with placeholder values


resp = client.create_maintenance_window({
  name: "MaintenanceWindowName", # required
  description: "MaintenanceWindowDescription",
  schedule: "MaintenanceWindowSchedule", # required
  duration: 1, # required
  cutoff: 1, # required
  allow_unassociated_targets: false, # required
  client_token: "ClientToken",
})

Response structure


resp.window_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the Maintenance Window.

  • :description (String)

    An optional description for the Maintenance Window. We recommend specifying a description to help you organize your Maintenance Windows.

  • :schedule (required, String)

    The schedule of the Maintenance Window in the form of a cron or rate expression.

  • :duration (required, Integer)

    The duration of the Maintenance Window in hours.

  • :cutoff (required, Integer)

    The number of hours before the end of the Maintenance Window that Systems Manager stops scheduling new tasks for execution.

  • :allow_unassociated_targets (required, Boolean)

    Enables a Maintenance Window task to execute on managed instances, even if you have not registered those instances as targets. If enabled, then you must specify the unregistered instances (by instance ID) when you register a task with the Maintenance Window

    If you don't enable this option, then you must specify previously-registered targets when you register a task with the Maintenance Window.

  • :client_token (String)

    User-provided idempotency token.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

See Also:



652
653
654
655
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 652

def create_maintenance_window(params = {}, options = {})
  req = build_request(:create_maintenance_window, params)
  req.send_request(options)
end

#create_patch_baseline(params = {}) ⇒ Types::CreatePatchBaselineResult

Creates a patch baseline.

Examples:

Request syntax with placeholder values


resp = client.create_patch_baseline({
  operating_system: "WINDOWS", # accepts WINDOWS, AMAZON_LINUX, UBUNTU, REDHAT_ENTERPRISE_LINUX
  name: "BaselineName", # required
  global_filters: {
    patch_filters: [ # required
      {
        key: "PRODUCT", # required, accepts PRODUCT, CLASSIFICATION, MSRC_SEVERITY, PATCH_ID, SECTION, PRIORITY, SEVERITY
        values: ["PatchFilterValue"], # required
      },
    ],
  },
  approval_rules: {
    patch_rules: [ # required
      {
        patch_filter_group: { # required
          patch_filters: [ # required
            {
              key: "PRODUCT", # required, accepts PRODUCT, CLASSIFICATION, MSRC_SEVERITY, PATCH_ID, SECTION, PRIORITY, SEVERITY
              values: ["PatchFilterValue"], # required
            },
          ],
        },
        compliance_level: "CRITICAL", # accepts CRITICAL, HIGH, MEDIUM, LOW, INFORMATIONAL, UNSPECIFIED
        approve_after_days: 1, # required
      },
    ],
  },
  approved_patches: ["PatchId"],
  approved_patches_compliance_level: "CRITICAL", # accepts CRITICAL, HIGH, MEDIUM, LOW, INFORMATIONAL, UNSPECIFIED
  rejected_patches: ["PatchId"],
  description: "BaselineDescription",
  client_token: "ClientToken",
})

Response structure


resp.baseline_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :operating_system (String)

    Defines the operating system the patch baseline applies to. Supported operating systems include WINDOWS, AMAZON_LINUX, UBUNTU and REDHAT_ENTERPRISE_LINUX. The Default value is WINDOWS.

  • :name (required, String)

    The name of the patch baseline.

  • :global_filters (Types::PatchFilterGroup)

    A set of global filters used to exclude patches from the baseline.

  • :approval_rules (Types::PatchRuleGroup)

    A set of rules used to include patches in the baseline.

  • :approved_patches (Array<String>)

    A list of explicitly approved patches for the baseline.

  • :approved_patches_compliance_level (String)

    Defines the compliance level for approved patches. This means that if an approved patch is reported as missing, this is the severity of the compliance violation. Valid compliance severity levels include the following: CRITICAL, HIGH, MEDIUM, LOW, INFORMATIONAL, UNSPECIFIED. The default value is UNSPECIFIED.

  • :rejected_patches (Array<String>)

    A list of explicitly rejected patches for the baseline.

  • :description (String)

    A description of the patch baseline.

  • :client_token (String)

    User-provided idempotency token.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

See Also:



743
744
745
746
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 743

def create_patch_baseline(params = {}, options = {})
  req = build_request(:create_patch_baseline, params)
  req.send_request(options)
end

#create_resource_data_sync(params = {}) ⇒ Struct

Creates a resource data sync configuration to a single bucket in Amazon S3. This is an asynchronous operation that returns immediately. After a successful initial sync is completed, the system continuously syncs data to the Amazon S3 bucket. To check the status of the sync, use the ListResourceDataSync operation.

By default, data is not encrypted in Amazon S3. We strongly recommend that you enable encryption in Amazon S3 to ensure secure data storage. We also recommend that you secure access to the Amazon S3 bucket by creating a restrictive bucket policy. To view an example of a restrictive Amazon S3 bucket policy for Resource Data Sync, see Configuring Resource Data Sync for Inventory.

Examples:

Request syntax with placeholder values


resp = client.create_resource_data_sync({
  sync_name: "ResourceDataSyncName", # required
  s3_destination: { # required
    bucket_name: "ResourceDataSyncS3BucketName", # required
    prefix: "ResourceDataSyncS3Prefix",
    sync_format: "JsonSerDe", # required, accepts JsonSerDe
    region: "ResourceDataSyncS3Region", # required
    awskms_key_arn: "ResourceDataSyncAWSKMSKeyARN",
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :sync_name (required, String)

    A name for the configuration.

  • :s3_destination (required, Types::ResourceDataSyncS3Destination)

    Amazon S3 configuration details for the sync.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



791
792
793
794
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 791

def create_resource_data_sync(params = {}, options = {})
  req = build_request(:create_resource_data_sync, params)
  req.send_request(options)
end

#delete_activation(params = {}) ⇒ Struct

Deletes an activation. You are not required to delete an activation. If you delete an activation, you can no longer use it to register additional managed instances. Deleting an activation does not de-register managed instances. You must manually de-register managed instances.

Examples:

Request syntax with placeholder values


resp = client.delete_activation({
  activation_id: "ActivationId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :activation_id (required, String)

    The ID of the activation that you want to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



817
818
819
820
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 817

def delete_activation(params = {}, options = {})
  req = build_request(:delete_activation, params)
  req.send_request(options)
end

#delete_association(params = {}) ⇒ Struct

Disassociates the specified Systems Manager document from the specified instance.

When you disassociate a 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.

Examples:

Request syntax with placeholder values


resp = client.delete_association({
  name: "DocumentName",
  instance_id: "InstanceId",
  association_id: "AssociationId",
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (String)

    The name of the Systems Manager document.

  • :instance_id (String)

    The ID of the instance.

  • :association_id (String)

    The association ID that you want to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



854
855
856
857
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 854

def delete_association(params = {}, options = {})
  req = build_request(:delete_association, params)
  req.send_request(options)
end

#delete_document(params = {}) ⇒ Struct

Deletes the Systems Manager document and all instance associations to the document.

Before you delete the document, we recommend that you use DeleteAssociation to disassociate all instances that are associated with the document.

Examples:

Request syntax with placeholder values


resp = client.delete_document({
  name: "DocumentName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the document.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



881
882
883
884
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 881

def delete_document(params = {}, options = {})
  req = build_request(:delete_document, params)
  req.send_request(options)
end

#delete_maintenance_window(params = {}) ⇒ Types::DeleteMaintenanceWindowResult

Deletes a Maintenance Window.

Examples:

Request syntax with placeholder values


resp = client.delete_maintenance_window({
  window_id: "MaintenanceWindowId", # required
})

Response structure


resp.window_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :window_id (required, String)

    The ID of the Maintenance Window to delete.

Returns:

See Also:



909
910
911
912
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 909

def delete_maintenance_window(params = {}, options = {})
  req = build_request(:delete_maintenance_window, params)
  req.send_request(options)
end

#delete_parameter(params = {}) ⇒ Struct

Delete a parameter from the system.

Examples:

Request syntax with placeholder values


resp = client.delete_parameter({
  name: "PSParameterName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the parameter to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



931
932
933
934
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 931

def delete_parameter(params = {}, options = {})
  req = build_request(:delete_parameter, params)
  req.send_request(options)
end

#delete_parameters(params = {}) ⇒ Types::DeleteParametersResult

Delete a list of parameters. This API is used to delete parameters by using the Amazon EC2 console.

Examples:

Request syntax with placeholder values


resp = client.delete_parameters({
  names: ["PSParameterName"], # required
})

Response structure


resp.deleted_parameters #=> Array
resp.deleted_parameters[0] #=> String
resp.invalid_parameters #=> Array
resp.invalid_parameters[0] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :names (required, Array<String>)

    The names of the parameters to delete.

Returns:

See Also:



964
965
966
967
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 964

def delete_parameters(params = {}, options = {})
  req = build_request(:delete_parameters, params)
  req.send_request(options)
end

#delete_patch_baseline(params = {}) ⇒ Types::DeletePatchBaselineResult

Deletes a patch baseline.

Examples:

Request syntax with placeholder values


resp = client.delete_patch_baseline({
  baseline_id: "BaselineId", # required
})

Response structure


resp.baseline_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :baseline_id (required, String)

    The ID of the patch baseline to delete.

Returns:

See Also:



992
993
994
995
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 992

def delete_patch_baseline(params = {}, options = {})
  req = build_request(:delete_patch_baseline, params)
  req.send_request(options)
end

#delete_resource_data_sync(params = {}) ⇒ Struct

Deletes a Resource Data Sync configuration. After the configuration is deleted, changes to inventory data on managed instances are no longer synced with the target Amazon S3 bucket. Deleting a sync configuration does not delete data in the target Amazon S3 bucket.

Examples:

Request syntax with placeholder values


resp = client.delete_resource_data_sync({
  sync_name: "ResourceDataSyncName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :sync_name (required, String)

    The name of the configuration to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1017
1018
1019
1020
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 1017

def delete_resource_data_sync(params = {}, options = {})
  req = build_request(:delete_resource_data_sync, params)
  req.send_request(options)
end

#deregister_managed_instance(params = {}) ⇒ Struct

Removes the server or virtual machine from the list of registered servers. You can reregister the instance again at any time. If you don't plan to use Run Command on the server, we suggest uninstalling the SSM Agent first.

Examples:

Request syntax with placeholder values


resp = client.deregister_managed_instance({
  instance_id: "ManagedInstanceId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The ID assigned to the managed instance when you registered it using the activation process.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1043
1044
1045
1046
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 1043

def deregister_managed_instance(params = {}, options = {})
  req = build_request(:deregister_managed_instance, params)
  req.send_request(options)
end

#deregister_patch_baseline_for_patch_group(params = {}) ⇒ Types::DeregisterPatchBaselineForPatchGroupResult

Removes a patch group from a patch baseline.

Examples:

Request syntax with placeholder values


resp = client.deregister_patch_baseline_for_patch_group({
  baseline_id: "BaselineId", # required
  patch_group: "PatchGroup", # required
})

Response structure


resp.baseline_id #=> String
resp.patch_group #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :baseline_id (required, String)

    The ID of the patch baseline to deregister the patch group from.

  • :patch_group (required, String)

    The name of the patch group that should be deregistered from the patch baseline.

Returns:

See Also:



1078
1079
1080
1081
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 1078

def deregister_patch_baseline_for_patch_group(params = {}, options = {})
  req = build_request(:deregister_patch_baseline_for_patch_group, params)
  req.send_request(options)
end

#deregister_target_from_maintenance_window(params = {}) ⇒ Types::DeregisterTargetFromMaintenanceWindowResult

Removes a target from a Maintenance Window.

Examples:

Request syntax with placeholder values


resp = client.deregister_target_from_maintenance_window({
  window_id: "MaintenanceWindowId", # required
  window_target_id: "MaintenanceWindowTargetId", # required
  safe: false,
})

Response structure


resp.window_id #=> String
resp.window_target_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :window_id (required, String)

    The ID of the Maintenance Window the target should be removed from.

  • :window_target_id (required, String)

    The ID of the target definition to remove.

  • :safe (Boolean)

    The system checks if the target is being referenced by a task. If the target is being referenced, the system returns an error and does not deregister the target from the Maintenance Window.

Returns:

See Also:



1118
1119
1120
1121
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 1118

def deregister_target_from_maintenance_window(params = {}, options = {})
  req = build_request(:deregister_target_from_maintenance_window, params)
  req.send_request(options)
end

#deregister_task_from_maintenance_window(params = {}) ⇒ Types::DeregisterTaskFromMaintenanceWindowResult

Removes a task from a Maintenance Window.

Examples:

Request syntax with placeholder values


resp = client.deregister_task_from_maintenance_window({
  window_id: "MaintenanceWindowId", # required
  window_task_id: "MaintenanceWindowTaskId", # required
})

Response structure


resp.window_id #=> String
resp.window_task_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :window_id (required, String)

    The ID of the Maintenance Window the task should be removed from.

  • :window_task_id (required, String)

    The ID of the task to remove from the Maintenance Window.

Returns:

See Also:



1152
1153
1154
1155
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 1152

def deregister_task_from_maintenance_window(params = {}, options = {})
  req = build_request(:deregister_task_from_maintenance_window, params)
  req.send_request(options)
end

#describe_activations(params = {}) ⇒ Types::DescribeActivationsResult

Details about the activation, including: the date and time the activation was created, the expiration date, the IAM role assigned to the instances in the activation, and the number of instances activated by this registration.

Examples:

Request syntax with placeholder values


resp = client.describe_activations({
  filters: [
    {
      filter_key: "ActivationIds", # accepts ActivationIds, DefaultInstanceName, IamRole
      filter_values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.activation_list #=> Array
resp.activation_list[0].activation_id #=> String
resp.activation_list[0].description #=> String
resp.activation_list[0].default_instance_name #=> String
resp.activation_list[0].iam_role #=> String
resp.activation_list[0].registration_limit #=> Integer
resp.activation_list[0].registrations_count #=> Integer
resp.activation_list[0].expiration_date #=> Time
resp.activation_list[0].expired #=> Boolean
resp.activation_list[0].created_date #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :filters (Array<Types::DescribeActivationsFilter>)

    A filter to view information about your activations.

  • :max_results (Integer)

    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.

  • :next_token (String)

    A token to start the list. Use this token to get the next set of results.

Returns:

See Also:



1210
1211
1212
1213
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 1210

def describe_activations(params = {}, options = {})
  req = build_request(:describe_activations, params)
  req.send_request(options)
end

#describe_association(params = {}) ⇒ Types::DescribeAssociationResult

Describes the associations for the specified Systems Manager document or instance.

Examples:

Request syntax with placeholder values


resp = client.describe_association({
  name: "DocumentName",
  instance_id: "InstanceId",
  association_id: "AssociationId",
  association_version: "AssociationVersion",
})

Response structure


resp.association_description.name #=> String
resp.association_description.instance_id #=> String
resp.association_description.association_version #=> String
resp.association_description.date #=> Time
resp.association_description.last_update_association_date #=> Time
resp.association_description.status.date #=> Time
resp.association_description.status.name #=> String, one of "Pending", "Success", "Failed"
resp.association_description.status.message #=> String
resp.association_description.status.additional_info #=> String
resp.association_description.overview.status #=> String
resp.association_description.overview.detailed_status #=> String
resp.association_description.overview.association_status_aggregated_count #=> Hash
resp.association_description.overview.association_status_aggregated_count["StatusName"] #=> Integer
resp.association_description.document_version #=> String
resp.association_description.parameters #=> Hash
resp.association_description.parameters["ParameterName"] #=> Array
resp.association_description.parameters["ParameterName"][0] #=> String
resp.association_description.association_id #=> String
resp.association_description.targets #=> Array
resp.association_description.targets[0].key #=> String
resp.association_description.targets[0].values #=> Array
resp.association_description.targets[0].values[0] #=> String
resp.association_description.schedule_expression #=> String
resp.association_description.output_location.s3_location.output_s3_region #=> String
resp.association_description.output_location.s3_location.output_s3_bucket_name #=> String
resp.association_description.output_location.s3_location.output_s3_key_prefix #=> String
resp.association_description.last_execution_date #=> Time
resp.association_description.last_successful_execution_date #=> Time
resp.association_description.association_name #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (String)

    The name of the Systems Manager document.

  • :instance_id (String)

    The instance ID.

  • :association_id (String)

    The association ID for which you want information.

  • :association_version (String)

    Specify the association version to retrieve. To view the latest version, either specify $LATEST for this parameter, or omit this parameter. To view a list of all associations for an instance, use ListInstanceAssociations. To get a list of versions for a specific association, use ListAssociationVersions.

Returns:

See Also:



1283
1284
1285
1286
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 1283

def describe_association(params = {}, options = {})
  req = build_request(:describe_association, params)
  req.send_request(options)
end

#describe_automation_executions(params = {}) ⇒ Types::DescribeAutomationExecutionsResult

Provides details about all active and terminated Automation executions.

Examples:

Request syntax with placeholder values


resp = client.describe_automation_executions({
  filters: [
    {
      key: "DocumentNamePrefix", # required, accepts DocumentNamePrefix, ExecutionStatus
      values: ["AutomationExecutionFilterValue"], # required
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp. #=> Array
resp.[0].automation_execution_id #=> String
resp.[0].document_name #=> String
resp.[0].document_version #=> String
resp.[0].automation_execution_status #=> String, one of "Pending", "InProgress", "Waiting", "Success", "TimedOut", "Cancelled", "Failed"
resp.[0].execution_start_time #=> Time
resp.[0].execution_end_time #=> Time
resp.[0].executed_by #=> String
resp.[0].log_file #=> String
resp.[0].outputs #=> Hash
resp.[0].outputs["AutomationParameterKey"] #=> Array
resp.[0].outputs["AutomationParameterKey"][0] #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :filters (Array<Types::AutomationExecutionFilter>)

    Filters used to limit the scope of executions that are requested.

  • :max_results (Integer)

    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.

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

Returns:

See Also:



1341
1342
1343
1344
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 1341

def describe_automation_executions(params = {}, options = {})
  req = build_request(:describe_automation_executions, params)
  req.send_request(options)
end

#describe_available_patches(params = {}) ⇒ Types::DescribeAvailablePatchesResult

Lists all patches that could possibly be included in a patch baseline.

Examples:

Request syntax with placeholder values


resp = client.describe_available_patches({
  filters: [
    {
      key: "PatchOrchestratorFilterKey",
      values: ["PatchOrchestratorFilterValue"],
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.patches #=> Array
resp.patches[0].id #=> String
resp.patches[0].release_date #=> Time
resp.patches[0].title #=> String
resp.patches[0].description #=> String
resp.patches[0].content_url #=> String
resp.patches[0].vendor #=> String
resp.patches[0].product_family #=> String
resp.patches[0].product #=> String
resp.patches[0].classification #=> String
resp.patches[0].msrc_severity #=> String
resp.patches[0].kb_number #=> String
resp.patches[0].msrc_number #=> String
resp.patches[0].language #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :filters (Array<Types::PatchOrchestratorFilter>)

    Filters used to scope down the returned patches.

  • :max_results (Integer)

    The maximum number of patches to return (per page).

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

Returns:

See Also:



1398
1399
1400
1401
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 1398

def describe_available_patches(params = {}, options = {})
  req = build_request(:describe_available_patches, params)
  req.send_request(options)
end

#describe_document(params = {}) ⇒ Types::DescribeDocumentResult

Describes the specified Systems Manager document.

Examples:

Request syntax with placeholder values


resp = client.describe_document({
  name: "DocumentARN", # required
  document_version: "DocumentVersion",
})

Response structure


resp.document.sha_1 #=> String
resp.document.hash #=> String
resp.document.hash_type #=> String, one of "Sha256", "Sha1"
resp.document.name #=> String
resp.document.owner #=> String
resp.document.created_date #=> Time
resp.document.status #=> String, one of "Creating", "Active", "Updating", "Deleting"
resp.document.document_version #=> String
resp.document.description #=> String
resp.document.parameters #=> Array
resp.document.parameters[0].name #=> String
resp.document.parameters[0].type #=> String, one of "String", "StringList"
resp.document.parameters[0].description #=> String
resp.document.parameters[0].default_value #=> String
resp.document.platform_types #=> Array
resp.document.platform_types[0] #=> String, one of "Windows", "Linux"
resp.document.document_type #=> String, one of "Command", "Policy", "Automation"
resp.document.schema_version #=> String
resp.document.latest_version #=> String
resp.document.default_version #=> String
resp.document.tags #=> Array
resp.document.tags[0].key #=> String
resp.document.tags[0].value #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the Systems Manager document.

  • :document_version (String)

    The document version for which you want information. Can be a specific version or the default version.

Returns:

See Also:



1453
1454
1455
1456
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 1453

def describe_document(params = {}, options = {})
  req = build_request(:describe_document, params)
  req.send_request(options)
end

#describe_document_permission(params = {}) ⇒ Types::DescribeDocumentPermissionResponse

Describes the permissions for a Systems Manager document. If you created the document, you are the owner. If a document is shared, it can either be shared privately (by specifying a user's AWS account ID) or publicly (All).

Examples:

Request syntax with placeholder values


resp = client.describe_document_permission({
  name: "DocumentName", # required
  permission_type: "Share", # required, accepts Share
})

Response structure


resp. #=> Array
resp.[0] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the document for which you are the owner.

  • :permission_type (required, String)

    The permission type for the document. The permission type can be Share.

Returns:

See Also:



1490
1491
1492
1493
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 1490

def describe_document_permission(params = {}, options = {})
  req = build_request(:describe_document_permission, params)
  req.send_request(options)
end

#describe_effective_instance_associations(params = {}) ⇒ Types::DescribeEffectiveInstanceAssociationsResult

All associations for the instance(s).

Examples:

Request syntax with placeholder values


resp = client.describe_effective_instance_associations({
  instance_id: "InstanceId", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.associations #=> Array
resp.associations[0].association_id #=> String
resp.associations[0].instance_id #=> String
resp.associations[0].content #=> String
resp.associations[0].association_version #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The instance ID for which you want to view all associations.

  • :max_results (Integer)

    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.

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

Returns:

See Also:



1535
1536
1537
1538
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 1535

def describe_effective_instance_associations(params = {}, options = {})
  req = build_request(:describe_effective_instance_associations, params)
  req.send_request(options)
end

#describe_effective_patches_for_patch_baseline(params = {}) ⇒ Types::DescribeEffectivePatchesForPatchBaselineResult

Retrieves the current effective patches (the patch and the approval state) for the specified patch baseline. Note that this API applies only to Windows patch baselines.

Examples:

Request syntax with placeholder values


resp = client.describe_effective_patches_for_patch_baseline({
  baseline_id: "BaselineId", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.effective_patches #=> Array
resp.effective_patches[0].patch.id #=> String
resp.effective_patches[0].patch.release_date #=> Time
resp.effective_patches[0].patch.title #=> String
resp.effective_patches[0].patch.description #=> String
resp.effective_patches[0].patch.content_url #=> String
resp.effective_patches[0].patch.vendor #=> String
resp.effective_patches[0].patch.product_family #=> String
resp.effective_patches[0].patch.product #=> String
resp.effective_patches[0].patch.classification #=> String
resp.effective_patches[0].patch.msrc_severity #=> String
resp.effective_patches[0].patch.kb_number #=> String
resp.effective_patches[0].patch.msrc_number #=> String
resp.effective_patches[0].patch.language #=> String
resp.effective_patches[0].patch_status.deployment_status #=> String, one of "APPROVED", "PENDING_APPROVAL", "EXPLICIT_APPROVED", "EXPLICIT_REJECTED"
resp.effective_patches[0].patch_status.compliance_level #=> String, one of "CRITICAL", "HIGH", "MEDIUM", "LOW", "INFORMATIONAL", "UNSPECIFIED"
resp.effective_patches[0].patch_status.approval_date #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :baseline_id (required, String)

    The ID of the patch baseline to retrieve the effective patches for.

  • :max_results (Integer)

    The maximum number of patches to return (per page).

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

Returns:

See Also:



1592
1593
1594
1595
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 1592

def describe_effective_patches_for_patch_baseline(params = {}, options = {})
  req = build_request(:describe_effective_patches_for_patch_baseline, params)
  req.send_request(options)
end

#describe_instance_associations_status(params = {}) ⇒ Types::DescribeInstanceAssociationsStatusResult

The status of the associations for the instance(s).

Examples:

Request syntax with placeholder values


resp = client.describe_instance_associations_status({
  instance_id: "InstanceId", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.instance_association_status_infos #=> Array
resp.instance_association_status_infos[0].association_id #=> String
resp.instance_association_status_infos[0].name #=> String
resp.instance_association_status_infos[0].document_version #=> String
resp.instance_association_status_infos[0].association_version #=> String
resp.instance_association_status_infos[0].instance_id #=> String
resp.instance_association_status_infos[0].execution_date #=> Time
resp.instance_association_status_infos[0].status #=> String
resp.instance_association_status_infos[0].detailed_status #=> String
resp.instance_association_status_infos[0].execution_summary #=> String
resp.instance_association_status_infos[0].error_code #=> String
resp.instance_association_status_infos[0].output_url.s3_output_url.output_url #=> String
resp.instance_association_status_infos[0].association_name #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The instance IDs for which you want association status information.

  • :max_results (Integer)

    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.

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

Returns:

See Also:



1645
1646
1647
1648
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 1645

def describe_instance_associations_status(params = {}, options = {})
  req = build_request(:describe_instance_associations_status, params)
  req.send_request(options)
end

#describe_instance_information(params = {}) ⇒ Types::DescribeInstanceInformationResult

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 (Linux), 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.

Examples:

Request syntax with placeholder values


resp = client.describe_instance_information({
  instance_information_filter_list: [
    {
      key: "InstanceIds", # required, accepts InstanceIds, AgentVersion, PingStatus, PlatformTypes, ActivationIds, IamRole, ResourceType, AssociationStatus
      value_set: ["InstanceInformationFilterValue"], # required
    },
  ],
  filters: [
    {
      key: "InstanceInformationStringFilterKey", # required
      values: ["InstanceInformationFilterValue"], # required
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.instance_information_list #=> Array
resp.instance_information_list[0].instance_id #=> String
resp.instance_information_list[0].ping_status #=> String, one of "Online", "ConnectionLost", "Inactive"
resp.instance_information_list[0].last_ping_date_time #=> Time
resp.instance_information_list[0].agent_version #=> String
resp.instance_information_list[0].is_latest_version #=> Boolean
resp.instance_information_list[0].platform_type #=> String, one of "Windows", "Linux"
resp.instance_information_list[0].platform_name #=> String
resp.instance_information_list[0].platform_version #=> String
resp.instance_information_list[0].activation_id #=> String
resp.instance_information_list[0].iam_role #=> String
resp.instance_information_list[0].registration_date #=> Time
resp.instance_information_list[0].resource_type #=> String, one of "ManagedInstance", "Document", "EC2Instance"
resp.instance_information_list[0].name #=> String
resp.instance_information_list[0].ip_address #=> String
resp.instance_information_list[0].computer_name #=> String
resp.instance_information_list[0].association_status #=> String
resp.instance_information_list[0].last_association_execution_date #=> Time
resp.instance_information_list[0].last_successful_association_execution_date #=> Time
resp.instance_information_list[0].association_overview.detailed_status #=> String
resp.instance_information_list[0].association_overview.instance_association_status_aggregated_count #=> Hash
resp.instance_information_list[0].association_overview.instance_association_status_aggregated_count["StatusName"] #=> Integer
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_information_filter_list (Array<Types::InstanceInformationFilter>)

    One or more filters. Use a filter to return a more specific list of instances.

  • :filters (Array<Types::InstanceInformationStringFilter>)

    One or more filters. Use a filter to return a more specific list of instances.

  • :max_results (Integer)

    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.

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

Returns:

See Also:



1729
1730
1731
1732
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 1729

def describe_instance_information(params = {}, options = {})
  req = build_request(:describe_instance_information, params)
  req.send_request(options)
end

#describe_instance_patch_states(params = {}) ⇒ Types::DescribeInstancePatchStatesResult

Retrieves the high-level patch state of one or more instances.

Examples:

Request syntax with placeholder values


resp = client.describe_instance_patch_states({
  instance_ids: ["InstanceId"], # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.instance_patch_states #=> Array
resp.instance_patch_states[0].instance_id #=> String
resp.instance_patch_states[0].patch_group #=> String
resp.instance_patch_states[0].baseline_id #=> String
resp.instance_patch_states[0].snapshot_id #=> String
resp.instance_patch_states[0].owner_information #=> String
resp.instance_patch_states[0].installed_count #=> Integer
resp.instance_patch_states[0].installed_other_count #=> Integer
resp.instance_patch_states[0].missing_count #=> Integer
resp.instance_patch_states[0].failed_count #=> Integer
resp.instance_patch_states[0].not_applicable_count #=> Integer
resp.instance_patch_states[0].operation_start_time #=> Time
resp.instance_patch_states[0].operation_end_time #=> Time
resp.instance_patch_states[0].operation #=> String, one of "Scan", "Install"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_ids (required, Array<String>)

    The ID of the instance whose patch state information should be retrieved.

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

  • :max_results (Integer)

    The maximum number of instances to return (per page).

Returns:

See Also:



1782
1783
1784
1785
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 1782

def describe_instance_patch_states(params = {}, options = {})
  req = build_request(:describe_instance_patch_states, params)
  req.send_request(options)
end

#describe_instance_patch_states_for_patch_group(params = {}) ⇒ Types::DescribeInstancePatchStatesForPatchGroupResult

Retrieves the high-level patch state for the instances in the specified patch group.

Examples:

Request syntax with placeholder values


resp = client.describe_instance_patch_states_for_patch_group({
  patch_group: "PatchGroup", # required
  filters: [
    {
      key: "InstancePatchStateFilterKey", # required
      values: ["InstancePatchStateFilterValue"], # required
      type: "Equal", # required, accepts Equal, NotEqual, LessThan, GreaterThan
    },
  ],
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.instance_patch_states #=> Array
resp.instance_patch_states[0].instance_id #=> String
resp.instance_patch_states[0].patch_group #=> String
resp.instance_patch_states[0].baseline_id #=> String
resp.instance_patch_states[0].snapshot_id #=> String
resp.instance_patch_states[0].owner_information #=> String
resp.instance_patch_states[0].installed_count #=> Integer
resp.instance_patch_states[0].installed_other_count #=> Integer
resp.instance_patch_states[0].missing_count #=> Integer
resp.instance_patch_states[0].failed_count #=> Integer
resp.instance_patch_states[0].not_applicable_count #=> Integer
resp.instance_patch_states[0].operation_start_time #=> Time
resp.instance_patch_states[0].operation_end_time #=> Time
resp.instance_patch_states[0].operation #=> String, one of "Scan", "Install"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :patch_group (required, String)

    The name of the patch group for which the patch state information should be retrieved.

  • :filters (Array<Types::InstancePatchStateFilter>)

    Each entry in the array is a structure containing:

    Key (string between 1 and 200 characters)

    Values (array containing a single string)

    Type (string "Equal", "NotEqual", "LessThan", "GreaterThan")

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

  • :max_results (Integer)

    The maximum number of patches to return (per page).

Returns:

See Also:



1852
1853
1854
1855
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 1852

def describe_instance_patch_states_for_patch_group(params = {}, options = {})
  req = build_request(:describe_instance_patch_states_for_patch_group, params)
  req.send_request(options)
end

#describe_instance_patches(params = {}) ⇒ Types::DescribeInstancePatchesResult

Retrieves information about the patches on the specified instance and their state relative to the patch baseline being used for the instance.

Examples:

Request syntax with placeholder values


resp = client.describe_instance_patches({
  instance_id: "InstanceId", # required
  filters: [
    {
      key: "PatchOrchestratorFilterKey",
      values: ["PatchOrchestratorFilterValue"],
    },
  ],
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.patches #=> Array
resp.patches[0].title #=> String
resp.patches[0].kb_id #=> String
resp.patches[0].classification #=> String
resp.patches[0].severity #=> String
resp.patches[0].state #=> String, one of "INSTALLED", "INSTALLED_OTHER", "MISSING", "NOT_APPLICABLE", "FAILED"
resp.patches[0].installed_time #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The ID of the instance whose patch state information should be retrieved.

  • :filters (Array<Types::PatchOrchestratorFilter>)

    Each entry in the array is a structure containing:

    Key (string, between 1 and 128 characters)

    Values (array of strings, each string between 1 and 256 characters)

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

  • :max_results (Integer)

    The maximum number of patches to return (per page).

Returns:

See Also:



1913
1914
1915
1916
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 1913

def describe_instance_patches(params = {}, options = {})
  req = build_request(:describe_instance_patches, params)
  req.send_request(options)
end

#describe_maintenance_window_execution_task_invocations(params = {}) ⇒ Types::DescribeMaintenanceWindowExecutionTaskInvocationsResult

Retrieves the individual task executions (one per target) for a particular task executed as part of a Maintenance Window execution.

Examples:

Request syntax with placeholder values


resp = client.describe_maintenance_window_execution_task_invocations({
  window_execution_id: "MaintenanceWindowExecutionId", # required
  task_id: "MaintenanceWindowExecutionTaskId", # required
  filters: [
    {
      key: "MaintenanceWindowFilterKey",
      values: ["MaintenanceWindowFilterValue"],
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.window_execution_task_invocation_identities #=> Array
resp.window_execution_task_invocation_identities[0].window_execution_id #=> String
resp.window_execution_task_invocation_identities[0].task_execution_id #=> String
resp.window_execution_task_invocation_identities[0].invocation_id #=> String
resp.window_execution_task_invocation_identities[0].execution_id #=> String
resp.window_execution_task_invocation_identities[0].task_type #=> String, one of "RUN_COMMAND", "AUTOMATION", "STEP_FUNCTIONS", "LAMBDA"
resp.window_execution_task_invocation_identities[0].parameters #=> String
resp.window_execution_task_invocation_identities[0].status #=> String, one of "PENDING", "IN_PROGRESS", "SUCCESS", "FAILED", "TIMED_OUT", "CANCELLING", "CANCELLED", "SKIPPED_OVERLAPPING"
resp.window_execution_task_invocation_identities[0].status_details #=> String
resp.window_execution_task_invocation_identities[0].start_time #=> Time
resp.window_execution_task_invocation_identities[0].end_time #=> Time
resp.window_execution_task_invocation_identities[0].owner_information #=> String
resp.window_execution_task_invocation_identities[0].window_target_id #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :window_execution_id (required, String)

    The ID of the Maintenance Window execution the task is part of.

  • :task_id (required, String)

    The ID of the specific task in the Maintenance Window task that should be retrieved.

  • :filters (Array<Types::MaintenanceWindowFilter>)

    Optional filters used to scope down the returned task invocations. The supported filter key is STATUS with the corresponding values PENDING, IN_PROGRESS, SUCCESS, FAILED, TIMED_OUT, CANCELLING, and CANCELLED.

  • :max_results (Integer)

    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.

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

Returns:

See Also:



1983
1984
1985
1986
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 1983

def describe_maintenance_window_execution_task_invocations(params = {}, options = {})
  req = build_request(:describe_maintenance_window_execution_task_invocations, params)
  req.send_request(options)
end

#describe_maintenance_window_execution_tasks(params = {}) ⇒ Types::DescribeMaintenanceWindowExecutionTasksResult

For a given Maintenance Window execution, lists the tasks that were executed.

Examples:

Request syntax with placeholder values


resp = client.describe_maintenance_window_execution_tasks({
  window_execution_id: "MaintenanceWindowExecutionId", # required
  filters: [
    {
      key: "MaintenanceWindowFilterKey",
      values: ["MaintenanceWindowFilterValue"],
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.window_execution_task_identities #=> Array
resp.window_execution_task_identities[0].window_execution_id #=> String
resp.window_execution_task_identities[0].task_execution_id #=> String
resp.window_execution_task_identities[0].status #=> String, one of "PENDING", "IN_PROGRESS", "SUCCESS", "FAILED", "TIMED_OUT", "CANCELLING", "CANCELLED", "SKIPPED_OVERLAPPING"
resp.window_execution_task_identities[0].status_details #=> String
resp.window_execution_task_identities[0].start_time #=> Time
resp.window_execution_task_identities[0].end_time #=> Time
resp.window_execution_task_identities[0].task_arn #=> String
resp.window_execution_task_identities[0].task_type #=> String, one of "RUN_COMMAND", "AUTOMATION", "STEP_FUNCTIONS", "LAMBDA"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :window_execution_id (required, String)

    The ID of the Maintenance Window execution whose task executions should be retrieved.

  • :filters (Array<Types::MaintenanceWindowFilter>)

    Optional filters used to scope down the returned tasks. The supported filter key is STATUS with the corresponding values PENDING, IN_PROGRESS, SUCCESS, FAILED, TIMED_OUT, CANCELLING, and CANCELLED.

  • :max_results (Integer)

    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.

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

Returns:

See Also:



2045
2046
2047
2048
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2045

def describe_maintenance_window_execution_tasks(params = {}, options = {})
  req = build_request(:describe_maintenance_window_execution_tasks, params)
  req.send_request(options)
end

#describe_maintenance_window_executions(params = {}) ⇒ Types::DescribeMaintenanceWindowExecutionsResult

Lists the executions of a Maintenance Window. This includes information about when the Maintenance Window was scheduled to be active, and information about tasks registered and run with the Maintenance Window.

Examples:

Request syntax with placeholder values


resp = client.describe_maintenance_window_executions({
  window_id: "MaintenanceWindowId", # required
  filters: [
    {
      key: "MaintenanceWindowFilterKey",
      values: ["MaintenanceWindowFilterValue"],
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.window_executions #=> Array
resp.window_executions[0].window_id #=> String
resp.window_executions[0].window_execution_id #=> String
resp.window_executions[0].status #=> String, one of "PENDING", "IN_PROGRESS", "SUCCESS", "FAILED", "TIMED_OUT", "CANCELLING", "CANCELLED", "SKIPPED_OVERLAPPING"
resp.window_executions[0].status_details #=> String
resp.window_executions[0].start_time #=> Time
resp.window_executions[0].end_time #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :window_id (required, String)

    The ID of the Maintenance Window whose executions should be retrieved.

  • :filters (Array<Types::MaintenanceWindowFilter>)

    Each entry in the array is a structure containing:

    Key (string, between 1 and 128 characters)

    Values (array of strings, each string is between 1 and 256 characters)

    The supported Keys are ExecutedBefore and ExecutedAfter with the value being a date/time string such as 2016-11-04T05:00:00Z.

  • :max_results (Integer)

    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.

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

Returns:

See Also:



2111
2112
2113
2114
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2111

def describe_maintenance_window_executions(params = {}, options = {})
  req = build_request(:describe_maintenance_window_executions, params)
  req.send_request(options)
end

#describe_maintenance_window_targets(params = {}) ⇒ Types::DescribeMaintenanceWindowTargetsResult

Lists the targets registered with the Maintenance Window.

Examples:

Request syntax with placeholder values


resp = client.describe_maintenance_window_targets({
  window_id: "MaintenanceWindowId", # required
  filters: [
    {
      key: "MaintenanceWindowFilterKey",
      values: ["MaintenanceWindowFilterValue"],
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.targets #=> Array
resp.targets[0].window_id #=> String
resp.targets[0].window_target_id #=> String
resp.targets[0].resource_type #=> String, one of "INSTANCE"
resp.targets[0].targets #=> Array
resp.targets[0].targets[0].key #=> String
resp.targets[0].targets[0].values #=> Array
resp.targets[0].targets[0].values[0] #=> String
resp.targets[0].owner_information #=> String
resp.targets[0].name #=> String
resp.targets[0].description #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :window_id (required, String)

    The ID of the Maintenance Window whose targets should be retrieved.

  • :filters (Array<Types::MaintenanceWindowFilter>)

    Optional filters that can be used to narrow down the scope of the returned window targets. The supported filter keys are Type, WindowTargetId and OwnerInformation.

  • :max_results (Integer)

    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.

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

Returns:

See Also:



2173
2174
2175
2176
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2173

def describe_maintenance_window_targets(params = {}, options = {})
  req = build_request(:describe_maintenance_window_targets, params)
  req.send_request(options)
end

#describe_maintenance_window_tasks(params = {}) ⇒ Types::DescribeMaintenanceWindowTasksResult

Lists the tasks in a Maintenance Window.

Examples:

Request syntax with placeholder values


resp = client.describe_maintenance_window_tasks({
  window_id: "MaintenanceWindowId", # required
  filters: [
    {
      key: "MaintenanceWindowFilterKey",
      values: ["MaintenanceWindowFilterValue"],
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.tasks #=> Array
resp.tasks[0].window_id #=> String
resp.tasks[0].window_task_id #=> String
resp.tasks[0].task_arn #=> String
resp.tasks[0].type #=> String, one of "RUN_COMMAND", "AUTOMATION", "STEP_FUNCTIONS", "LAMBDA"
resp.tasks[0].targets #=> Array
resp.tasks[0].targets[0].key #=> String
resp.tasks[0].targets[0].values #=> Array
resp.tasks[0].targets[0].values[0] #=> String
resp.tasks[0].task_parameters #=> Hash
resp.tasks[0].task_parameters["MaintenanceWindowTaskParameterName"].values #=> Array
resp.tasks[0].task_parameters["MaintenanceWindowTaskParameterName"].values[0] #=> String
resp.tasks[0].priority #=> Integer
resp.tasks[0].logging_info.s3_bucket_name #=> String
resp.tasks[0].logging_info.s3_key_prefix #=> String
resp.tasks[0].logging_info.s3_region #=> String
resp.tasks[0].service_role_arn #=> String
resp.tasks[0].max_concurrency #=> String
resp.tasks[0].max_errors #=> String
resp.tasks[0].name #=> String
resp.tasks[0].description #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :window_id (required, String)

    The ID of the Maintenance Window whose tasks should be retrieved.

  • :filters (Array<Types::MaintenanceWindowFilter>)

    Optional filters used to narrow down the scope of the returned tasks. The supported filter keys are WindowTaskId, TaskArn, Priority, and TaskType.

  • :max_results (Integer)

    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.

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

Returns:

See Also:



2245
2246
2247
2248
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2245

def describe_maintenance_window_tasks(params = {}, options = {})
  req = build_request(:describe_maintenance_window_tasks, params)
  req.send_request(options)
end

#describe_maintenance_windows(params = {}) ⇒ Types::DescribeMaintenanceWindowsResult

Retrieves the Maintenance Windows in an AWS account.

Examples:

Request syntax with placeholder values


resp = client.describe_maintenance_windows({
  filters: [
    {
      key: "MaintenanceWindowFilterKey",
      values: ["MaintenanceWindowFilterValue"],
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.window_identities #=> Array
resp.window_identities[0].window_id #=> String
resp.window_identities[0].name #=> String
resp.window_identities[0].description #=> String
resp.window_identities[0].enabled #=> Boolean
resp.window_identities[0].duration #=> Integer
resp.window_identities[0].cutoff #=> Integer
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :filters (Array<Types::MaintenanceWindowFilter>)

    Optional filters used to narrow down the scope of the returned Maintenance Windows. Supported filter keys are Name and Enabled.

  • :max_results (Integer)

    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.

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

Returns:

See Also:



2298
2299
2300
2301
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2298

def describe_maintenance_windows(params = {}, options = {})
  req = build_request(:describe_maintenance_windows, params)
  req.send_request(options)
end

#describe_parameters(params = {}) ⇒ Types::DescribeParametersResult

Get information about a parameter.

Request results are returned on a best-effort basis. If you specify MaxResults in the request, the response includes information up to the limit specified. The number of items returned, however, can be between zero and the value of MaxResults. If the service reaches an internal limit while processing the results, it stops the operation and returns the matching values up to that point and a NextToken. You can specify the NextToken in a subsequent call to get the next set of results.

Examples:

Request syntax with placeholder values


resp = client.describe_parameters({
  filters: [
    {
      key: "Name", # required, accepts Name, Type, KeyId
      values: ["ParametersFilterValue"], # required
    },
  ],
  parameter_filters: [
    {
      key: "ParameterStringFilterKey", # required
      option: "ParameterStringQueryOption",
      values: ["ParameterStringFilterValue"],
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.parameters #=> Array
resp.parameters[0].name #=> String
resp.parameters[0].type #=> String, one of "String", "StringList", "SecureString"
resp.parameters[0].key_id #=> String
resp.parameters[0].last_modified_date #=> Time
resp.parameters[0].last_modified_user #=> String
resp.parameters[0].description #=> String
resp.parameters[0].allowed_pattern #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :filters (Array<Types::ParametersFilter>)

    One or more filters. Use a filter to return a more specific list of results.

  • :parameter_filters (Array<Types::ParameterStringFilter>)

    Filters to limit the request results.

  • :max_results (Integer)

    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.

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

Returns:

See Also:



2371
2372
2373
2374
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2371

def describe_parameters(params = {}, options = {})
  req = build_request(:describe_parameters, params)
  req.send_request(options)
end

#describe_patch_baselines(params = {}) ⇒ Types::DescribePatchBaselinesResult

Lists the patch baselines in your AWS account.

Examples:

Request syntax with placeholder values


resp = client.describe_patch_baselines({
  filters: [
    {
      key: "PatchOrchestratorFilterKey",
      values: ["PatchOrchestratorFilterValue"],
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.baseline_identities #=> Array
resp.baseline_identities[0].baseline_id #=> String
resp.baseline_identities[0].baseline_name #=> String
resp.baseline_identities[0].operating_system #=> String, one of "WINDOWS", "AMAZON_LINUX", "UBUNTU", "REDHAT_ENTERPRISE_LINUX"
resp.baseline_identities[0].baseline_description #=> String
resp.baseline_identities[0].default_baseline #=> Boolean
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :filters (Array<Types::PatchOrchestratorFilter>)

    Each element in the array is a structure containing:

    Key: (string, "NAME_PREFIX" or "OWNER")

    Value: (array of strings, exactly 1 entry, between 1 and 255 characters)

  • :max_results (Integer)

    The maximum number of patch baselines to return (per page).

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

Returns:

See Also:



2425
2426
2427
2428
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2425

def describe_patch_baselines(params = {}, options = {})
  req = build_request(:describe_patch_baselines, params)
  req.send_request(options)
end

#describe_patch_group_state(params = {}) ⇒ Types::DescribePatchGroupStateResult

Returns high-level aggregated patch compliance state for a patch group.

Examples:

Request syntax with placeholder values


resp = client.describe_patch_group_state({
  patch_group: "PatchGroup", # required
})

Response structure


resp.instances #=> Integer
resp.instances_with_installed_patches #=> Integer
resp.instances_with_installed_other_patches #=> Integer
resp.instances_with_missing_patches #=> Integer
resp.instances_with_failed_patches #=> Integer
resp.instances_with_not_applicable_patches #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :patch_group (required, String)

    The name of the patch group whose patch snapshot should be retrieved.

Returns:

See Also:



2464
2465
2466
2467
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2464

def describe_patch_group_state(params = {}, options = {})
  req = build_request(:describe_patch_group_state, params)
  req.send_request(options)
end

#describe_patch_groups(params = {}) ⇒ Types::DescribePatchGroupsResult

Lists all patch groups that have been registered with patch baselines.

Examples:

Request syntax with placeholder values


resp = client.describe_patch_groups({
  max_results: 1,
  filters: [
    {
      key: "PatchOrchestratorFilterKey",
      values: ["PatchOrchestratorFilterValue"],
    },
  ],
  next_token: "NextToken",
})

Response structure


resp.mappings #=> Array
resp.mappings[0].patch_group #=> String
resp.mappings[0].baseline_identity.baseline_id #=> String
resp.mappings[0].baseline_identity.baseline_name #=> String
resp.mappings[0].baseline_identity.operating_system #=> String, one of "WINDOWS", "AMAZON_LINUX", "UBUNTU", "REDHAT_ENTERPRISE_LINUX"
resp.mappings[0].baseline_identity.baseline_description #=> String
resp.mappings[0].baseline_identity.default_baseline #=> Boolean
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of patch groups to return (per page).

  • :filters (Array<Types::PatchOrchestratorFilter>)

    One or more filters. Use a filter to return a more specific list of results.

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

Returns:

See Also:



2515
2516
2517
2518
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2515

def describe_patch_groups(params = {}, options = {})
  req = build_request(:describe_patch_groups, params)
  req.send_request(options)
end

#get_automation_execution(params = {}) ⇒ Types::GetAutomationExecutionResult

Get detailed information about a particular Automation execution.

Examples:

Request syntax with placeholder values


resp = client.get_automation_execution({
  automation_execution_id: "AutomationExecutionId", # required
})

Response structure


resp.automation_execution.automation_execution_id #=> String
resp.automation_execution.document_name #=> String
resp.automation_execution.document_version #=> String
resp.automation_execution.execution_start_time #=> Time
resp.automation_execution.execution_end_time #=> Time
resp.automation_execution.automation_execution_status #=> String, one of "Pending", "InProgress", "Waiting", "Success", "TimedOut", "Cancelled", "Failed"
resp.automation_execution.step_executions #=> Array
resp.automation_execution.step_executions[0].step_name #=> String
resp.automation_execution.step_executions[0].action #=> String
resp.automation_execution.step_executions[0].execution_start_time #=> Time
resp.automation_execution.step_executions[0].execution_end_time #=> Time
resp.automation_execution.step_executions[0].step_status #=> String, one of "Pending", "InProgress", "Waiting", "Success", "TimedOut", "Cancelled", "Failed"
resp.automation_execution.step_executions[0].response_code #=> String
resp.automation_execution.step_executions[0].inputs #=> Hash
resp.automation_execution.step_executions[0].inputs["String"] #=> String
resp.automation_execution.step_executions[0].outputs #=> Hash
resp.automation_execution.step_executions[0].outputs["AutomationParameterKey"] #=> Array
resp.automation_execution.step_executions[0].outputs["AutomationParameterKey"][0] #=> String
resp.automation_execution.step_executions[0].response #=> String
resp.automation_execution.step_executions[0].failure_message #=> String
resp.automation_execution.step_executions[0].failure_details.failure_stage #=> String
resp.automation_execution.step_executions[0].failure_details.failure_type #=> String
resp.automation_execution.step_executions[0].failure_details.details #=> Hash
resp.automation_execution.step_executions[0].failure_details.details["AutomationParameterKey"] #=> Array
resp.automation_execution.step_executions[0].failure_details.details["AutomationParameterKey"][0] #=> String
resp.automation_execution.parameters #=> Hash
resp.automation_execution.parameters["AutomationParameterKey"] #=> Array
resp.automation_execution.parameters["AutomationParameterKey"][0] #=> String
resp.automation_execution.outputs #=> Hash
resp.automation_execution.outputs["AutomationParameterKey"] #=> Array
resp.automation_execution.outputs["AutomationParameterKey"][0] #=> String
resp.automation_execution.failure_message #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :automation_execution_id (required, String)

    The unique identifier for an existing automation execution to examine. The execution ID is returned by StartAutomationExecution when the execution of an Automation document is initiated.

Returns:

See Also:



2576
2577
2578
2579
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2576

def get_automation_execution(params = {}, options = {})
  req = build_request(:get_automation_execution, params)
  req.send_request(options)
end

#get_command_invocation(params = {}) ⇒ Types::GetCommandInvocationResult

Returns detailed information about command execution for an invocation or plugin.

Examples:

Request syntax with placeholder values


resp = client.get_command_invocation({
  command_id: "CommandId", # required
  instance_id: "InstanceId", # required
  plugin_name: "CommandPluginName",
})

Response structure


resp.command_id #=> String
resp.instance_id #=> String
resp.comment #=> String
resp.document_name #=> String
resp.plugin_name #=> String
resp.response_code #=> Integer
resp.execution_start_date_time #=> String
resp.execution_elapsed_time #=> String
resp.execution_end_date_time #=> String
resp.status #=> String, one of "Pending", "InProgress", "Delayed", "Success", "Cancelled", "TimedOut", "Failed", "Cancelling"
resp.status_details #=> String
resp.standard_output_content #=> String
resp.standard_output_url #=> String
resp.standard_error_content #=> String
resp.standard_error_url #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :command_id (required, String) — default: Required

    The parent command ID of the invocation plugin.

  • :instance_id (required, String) — default: Required

    The ID of the managed instance targeted by the command. A managed instance can be an Amazon EC2 instance or an instance in your hybrid environment that is configured for Systems Manager.

  • :plugin_name (String) — default: Optional

    The name of the plugin for which you want detailed results. If the document contains only one plugin, the name can be omitted and the details will be returned.

Returns:

See Also:



2645
2646
2647
2648
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2645

def get_command_invocation(params = {}, options = {})
  req = build_request(:get_command_invocation, params)
  req.send_request(options)
end

#get_default_patch_baseline(params = {}) ⇒ Types::GetDefaultPatchBaselineResult

Retrieves the default patch baseline. Note that Systems Manager supports creating multiple default patch baselines. For example, you can create a default patch baseline for each operating system.

Examples:

Request syntax with placeholder values


resp = client.get_default_patch_baseline({
  operating_system: "WINDOWS", # accepts WINDOWS, AMAZON_LINUX, UBUNTU, REDHAT_ENTERPRISE_LINUX
})

Response structure


resp.baseline_id #=> String
resp.operating_system #=> String, one of "WINDOWS", "AMAZON_LINUX", "UBUNTU", "REDHAT_ENTERPRISE_LINUX"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :operating_system (String)

    Returns the default patch baseline for the specified operating system.

Returns:

See Also:



2677
2678
2679
2680
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2677

def get_default_patch_baseline(params = {}, options = {})
  req = build_request(:get_default_patch_baseline, params)
  req.send_request(options)
end

#get_deployable_patch_snapshot_for_instance(params = {}) ⇒ Types::GetDeployablePatchSnapshotForInstanceResult

Retrieves the current snapshot for the patch baseline the instance uses. This API is primarily used by the AWS-RunPatchBaseline Systems Manager document.

Examples:

Request syntax with placeholder values


resp = client.get_deployable_patch_snapshot_for_instance({
  instance_id: "InstanceId", # required
  snapshot_id: "SnapshotId", # required
})

Response structure


resp.instance_id #=> String
resp.snapshot_id #=> String
resp.snapshot_download_url #=> String
resp.product #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The ID of the instance for which the appropriate patch snapshot should be retrieved.

  • :snapshot_id (required, String)

    The user-defined snapshot ID.

Returns:

See Also:



2718
2719
2720
2721
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2718

def get_deployable_patch_snapshot_for_instance(params = {}, options = {})
  req = build_request(:get_deployable_patch_snapshot_for_instance, params)
  req.send_request(options)
end

#get_document(params = {}) ⇒ Types::GetDocumentResult

Gets the contents of the specified Systems Manager document.

Examples:

Request syntax with placeholder values


resp = client.get_document({
  name: "DocumentARN", # required
  document_version: "DocumentVersion",
})

Response structure


resp.name #=> String
resp.document_version #=> String
resp.content #=> String
resp.document_type #=> String, one of "Command", "Policy", "Automation"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the Systems Manager document.

  • :document_version (String)

    The document version for which you want information.

Returns:

See Also:



2756
2757
2758
2759
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2756

def get_document(params = {}, options = {})
  req = build_request(:get_document, params)
  req.send_request(options)
end

#get_inventory(params = {}) ⇒ Types::GetInventoryResult

Query inventory information.

Examples:

Request syntax with placeholder values


resp = client.get_inventory({
  filters: [
    {
      key: "InventoryFilterKey", # required
      values: ["InventoryFilterValue"], # required
      type: "Equal", # accepts Equal, NotEqual, BeginWith, LessThan, GreaterThan
    },
  ],
  result_attributes: [
    {
      type_name: "InventoryItemTypeName", # required
    },
  ],
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.entities #=> Array
resp.entities[0].id #=> String
resp.entities[0].data #=> Hash
resp.entities[0].data["InventoryResultItemKey"].type_name #=> String
resp.entities[0].data["InventoryResultItemKey"].schema_version #=> String
resp.entities[0].data["InventoryResultItemKey"].capture_time #=> String
resp.entities[0].data["InventoryResultItemKey"].content_hash #=> String
resp.entities[0].data["InventoryResultItemKey"].content #=> Array
resp.entities[0].data["InventoryResultItemKey"].content[0] #=> Hash
resp.entities[0].data["InventoryResultItemKey"].content[0]["AttributeName"] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :filters (Array<Types::InventoryFilter>)

    One or more filters. Use a filter to return a more specific list of results.

  • :result_attributes (Array<Types::ResultAttribute>)

    The list of inventory item types to return.

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

  • :max_results (Integer)

    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.

Returns:

See Also:



2821
2822
2823
2824
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2821

def get_inventory(params = {}, options = {})
  req = build_request(:get_inventory, params)
  req.send_request(options)
end

#get_inventory_schema(params = {}) ⇒ Types::GetInventorySchemaResult

Return a list of inventory type names for the account, or return a list of attribute names for a specific Inventory item type.

Examples:

Request syntax with placeholder values


resp = client.get_inventory_schema({
  type_name: "InventoryItemTypeNameFilter",
  next_token: "NextToken",
  max_results: 1,
  sub_type: false,
})

Response structure


resp.schemas #=> Array
resp.schemas[0].type_name #=> String
resp.schemas[0].version #=> String
resp.schemas[0].attributes #=> Array
resp.schemas[0].attributes[0].name #=> String
resp.schemas[0].attributes[0].data_type #=> String, one of "string", "number"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :type_name (String)

    The type of inventory item to return.

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

  • :max_results (Integer)

    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.

  • :sub_type (Boolean)

    Returns the sub-type schema for a specified inventory type.

Returns:

See Also:



2872
2873
2874
2875
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2872

def get_inventory_schema(params = {}, options = {})
  req = build_request(:get_inventory_schema, params)
  req.send_request(options)
end

#get_maintenance_window(params = {}) ⇒ Types::GetMaintenanceWindowResult

Retrieves a Maintenance Window.

Examples:

Request syntax with placeholder values


resp = client.get_maintenance_window({
  window_id: "MaintenanceWindowId", # required
})

Response structure


resp.window_id #=> String
resp.name #=> String
resp.description #=> String
resp.schedule #=> String
resp.duration #=> Integer
resp.cutoff #=> Integer
resp.allow_unassociated_targets #=> Boolean
resp.enabled #=> Boolean
resp.created_date #=> Time
resp.modified_date #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :window_id (required, String)

    The ID of the desired Maintenance Window.

Returns:

See Also:



2918
2919
2920
2921
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2918

def get_maintenance_window(params = {}, options = {})
  req = build_request(:get_maintenance_window, params)
  req.send_request(options)
end

#get_maintenance_window_execution(params = {}) ⇒ Types::GetMaintenanceWindowExecutionResult

Retrieves details about a specific task executed as part of a Maintenance Window execution.

Examples:

Request syntax with placeholder values


resp = client.get_maintenance_window_execution({
  window_execution_id: "MaintenanceWindowExecutionId", # required
})

Response structure


resp.window_execution_id #=> String
resp.task_ids #=> Array
resp.task_ids[0] #=> String
resp.status #=> String, one of "PENDING", "IN_PROGRESS", "SUCCESS", "FAILED", "TIMED_OUT", "CANCELLING", "CANCELLED", "SKIPPED_OVERLAPPING"
resp.status_details #=> String
resp.start_time #=> Time
resp.end_time #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :window_execution_id (required, String)

    The ID of the Maintenance Window execution that includes the task.

Returns:

See Also:



2958
2959
2960
2961
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2958

def get_maintenance_window_execution(params = {}, options = {})
  req = build_request(:get_maintenance_window_execution, params)
  req.send_request(options)
end

#get_maintenance_window_execution_task(params = {}) ⇒ Types::GetMaintenanceWindowExecutionTaskResult

Retrieves the details about a specific task executed as part of a Maintenance Window execution.

Examples:

Request syntax with placeholder values


resp = client.get_maintenance_window_execution_task({
  window_execution_id: "MaintenanceWindowExecutionId", # required
  task_id: "MaintenanceWindowExecutionTaskId", # required
})

Response structure


resp.window_execution_id #=> String
resp.task_execution_id #=> String
resp.task_arn #=> String
resp.service_role #=> String
resp.type #=> String, one of "RUN_COMMAND", "AUTOMATION", "STEP_FUNCTIONS", "LAMBDA"
resp.task_parameters #=> Array
resp.task_parameters[0] #=> Hash
resp.task_parameters[0]["MaintenanceWindowTaskParameterName"].values #=> Array
resp.task_parameters[0]["MaintenanceWindowTaskParameterName"].values[0] #=> String
resp.priority #=> Integer
resp.max_concurrency #=> String
resp.max_errors #=> String
resp.status #=> String, one of "PENDING", "IN_PROGRESS", "SUCCESS", "FAILED", "TIMED_OUT", "CANCELLING", "CANCELLED", "SKIPPED_OVERLAPPING"
resp.status_details #=> String
resp.start_time #=> Time
resp.end_time #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :window_execution_id (required, String)

    The ID of the Maintenance Window execution that includes the task.

  • :task_id (required, String)

    The ID of the specific task execution in the Maintenance Window task that should be retrieved.

Returns:

See Also:



3019
3020
3021
3022
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3019

def get_maintenance_window_execution_task(params = {}, options = {})
  req = build_request(:get_maintenance_window_execution_task, params)
  req.send_request(options)
end

#get_maintenance_window_execution_task_invocation(params = {}) ⇒ Types::GetMaintenanceWindowExecutionTaskInvocationResult

Retrieves a task invocation. A task invocation is a specific task executing on a specific target. Maintenance Windows report status for all invocations.

Examples:

Request syntax with placeholder values


resp = client.get_maintenance_window_execution_task_invocation({
  window_execution_id: "MaintenanceWindowExecutionId", # required
  task_id: "MaintenanceWindowExecutionTaskId", # required
  invocation_id: "MaintenanceWindowExecutionTaskInvocationId", # required
})

Response structure


resp.window_execution_id #=> String
resp.task_execution_id #=> String
resp.invocation_id #=> String
resp.execution_id #=> String
resp.task_type #=> String, one of "RUN_COMMAND", "AUTOMATION", "STEP_FUNCTIONS", "LAMBDA"
resp.parameters #=> String
resp.status #=> String, one of "PENDING", "IN_PROGRESS", "SUCCESS", "FAILED", "TIMED_OUT", "CANCELLING", "CANCELLED", "SKIPPED_OVERLAPPING"
resp.status_details #=> String
resp.start_time #=> Time
resp.end_time #=> Time
resp.owner_information #=> String
resp.window_target_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :window_execution_id (required, String)

    The ID of the Maintenance Window execution for which the task is a part.

  • :task_id (required, String)

    The ID of the specific task in the Maintenance Window task that should be retrieved.

  • :invocation_id (required, String)

    The invocation ID to retrieve.

Returns:

See Also:



3081
3082
3083
3084
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3081

def get_maintenance_window_execution_task_invocation(params = {}, options = {})
  req = build_request(:get_maintenance_window_execution_task_invocation, params)
  req.send_request(options)
end

#get_maintenance_window_task(params = {}) ⇒ Types::GetMaintenanceWindowTaskResult

Lists the tasks in a Maintenance Window.

Examples:

Request syntax with placeholder values


resp = client.get_maintenance_window_task({
  window_id: "MaintenanceWindowId", # required
  window_task_id: "MaintenanceWindowTaskId", # required
})

Response structure


resp.window_id #=> String
resp.window_task_id #=> String
resp.targets #=> Array
resp.targets[0].key #=> String
resp.targets[0].values #=> Array
resp.targets[0].values[0] #=> String
resp.task_arn #=> String
resp.service_role_arn #=> String
resp.task_type #=> String, one of "RUN_COMMAND", "AUTOMATION", "STEP_FUNCTIONS", "LAMBDA"
resp.task_parameters #=> Hash
resp.task_parameters["MaintenanceWindowTaskParameterName"].values #=> Array
resp.task_parameters["MaintenanceWindowTaskParameterName"].values[0] #=> String
resp.task_invocation_parameters.run_command.comment #=> String
resp.task_invocation_parameters.run_command.document_hash #=> String
resp.task_invocation_parameters.run_command.document_hash_type #=> String, one of "Sha256", "Sha1"
resp.task_invocation_parameters.run_command.notification_config.notification_arn #=> String
resp.task_invocation_parameters.run_command.notification_config.notification_events #=> Array
resp.task_invocation_parameters.run_command.notification_config.notification_events[0] #=> String, one of "All", "InProgress", "Success", "TimedOut", "Cancelled", "Failed"
resp.task_invocation_parameters.run_command.notification_config.notification_type #=> String, one of "Command", "Invocation"
resp.task_invocation_parameters.run_command.output_s3_bucket_name #=> String
resp.task_invocation_parameters.run_command.output_s3_key_prefix #=> String
resp.task_invocation_parameters.run_command.parameters #=> Hash
resp.task_invocation_parameters.run_command.parameters["ParameterName"] #=> Array
resp.task_invocation_parameters.run_command.parameters["ParameterName"][0] #=> String
resp.task_invocation_parameters.run_command.service_role_arn #=> String
resp.task_invocation_parameters.run_command.timeout_seconds #=> Integer
resp.task_invocation_parameters.automation.document_version #=> String
resp.task_invocation_parameters.automation.parameters #=> Hash
resp.task_invocation_parameters.automation.parameters["AutomationParameterKey"] #=> Array
resp.task_invocation_parameters.automation.parameters["AutomationParameterKey"][0] #=> String
resp.task_invocation_parameters.step_functions.input #=> String
resp.task_invocation_parameters.step_functions.name #=> String
resp.task_invocation_parameters.lambda.client_context #=> String
resp.task_invocation_parameters.lambda.qualifier #=> String
resp.task_invocation_parameters.lambda.payload #=> String
resp.priority #=> Integer
resp.max_concurrency #=> String
resp.max_errors #=> String
resp.logging_info.s3_bucket_name #=> String
resp.logging_info.s3_key_prefix #=> String
resp.logging_info.s3_region #=> String
resp.name #=> String
resp.description #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :window_id (required, String)

    The Maintenance Window ID that includes the task to retrieve.

  • :window_task_id (required, String)

    The Maintenance Window task ID to retrieve.

Returns:

See Also:



3168
3169
3170
3171
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3168

def get_maintenance_window_task(params = {}, options = {})
  req = build_request(:get_maintenance_window_task, params)
  req.send_request(options)
end

#get_parameter(params = {}) ⇒ Types::GetParameterResult

Get information about a parameter by using the parameter name.

Examples:

Request syntax with placeholder values


resp = client.get_parameter({
  name: "PSParameterName", # required
  with_decryption: false,
})

Response structure


resp.parameter.name #=> String
resp.parameter.type #=> String, one of "String", "StringList", "SecureString"
resp.parameter.value #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the parameter you want to query.

  • :with_decryption (Boolean)

    Return decrypted values for secure string parameters. This flag is ignored for String and StringList parameter types.

Returns:

See Also:



3203
3204
3205
3206
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3203

def get_parameter(params = {}, options = {})
  req = build_request(:get_parameter, params)
  req.send_request(options)
end

#get_parameter_history(params = {}) ⇒ Types::GetParameterHistoryResult

Query a list of all parameters used by the AWS account.

Examples:

Request syntax with placeholder values


resp = client.get_parameter_history({
  name: "PSParameterName", # required
  with_decryption: false,
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.parameters #=> Array
resp.parameters[0].name #=> String
resp.parameters[0].type #=> String, one of "String", "StringList", "SecureString"
resp.parameters[0].key_id #=> String
resp.parameters[0].last_modified_date #=> Time
resp.parameters[0].last_modified_user #=> String
resp.parameters[0].description #=> String
resp.parameters[0].value #=> String
resp.parameters[0].allowed_pattern #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    The name of a parameter you want to query.

  • :with_decryption (Boolean)

    Return decrypted values for secure string parameters. This flag is ignored for String and StringList parameter types.

  • :max_results (Integer)

    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.

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

Returns:

See Also:



3257
3258
3259
3260
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3257

def get_parameter_history(params = {}, options = {})
  req = build_request(:get_parameter_history, params)
  req.send_request(options)
end

#get_parameters(params = {}) ⇒ Types::GetParametersResult

Get details of a parameter.

Examples:

Request syntax with placeholder values


resp = client.get_parameters({
  names: ["PSParameterName"], # required
  with_decryption: false,
})

Response structure


resp.parameters #=> Array
resp.parameters[0].name #=> String
resp.parameters[0].type #=> String, one of "String", "StringList", "SecureString"
resp.parameters[0].value #=> String
resp.invalid_parameters #=> Array
resp.invalid_parameters[0] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :names (required, Array<String>)

    Names of the parameters for which you want to query information.

  • :with_decryption (Boolean)

    Return decrypted secure string value. Return decrypted values for secure string parameters. This flag is ignored for String and StringList parameter types.

Returns:

See Also:



3297
3298
3299
3300
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3297

def get_parameters(params = {}, options = {})
  req = build_request(:get_parameters, params)
  req.send_request(options)
end

#get_parameters_by_path(params = {}) ⇒ Types::GetParametersByPathResult

Retrieve parameters in a specific hierarchy. For more information, see Working with Systems Manager Parameters.

Request results are returned on a best-effort basis. If you specify MaxResults in the request, the response includes information up to the limit specified. The number of items returned, however, can be between zero and the value of MaxResults. If the service reaches an internal limit while processing the results, it stops the operation and returns the matching values up to that point and a NextToken. You can specify the NextToken in a subsequent call to get the next set of results.

Examples:

Request syntax with placeholder values


resp = client.get_parameters_by_path({
  path: "PSParameterName", # required
  recursive: false,
  parameter_filters: [
    {
      key: "ParameterStringFilterKey", # required
      option: "ParameterStringQueryOption",
      values: ["ParameterStringFilterValue"],
    },
  ],
  with_decryption: false,
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.parameters #=> Array
resp.parameters[0].name #=> String
resp.parameters[0].type #=> String, one of "String", "StringList", "SecureString"
resp.parameters[0].value #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :path (required, String)

    The hierarchy for the parameter. Hierarchies start with a forward slash (/) and end with the parameter name. A hierarchy can have a maximum of five levels. Examples: /Environment/Test/DBString003

    /Finance/Prod/IAD/OS/WinServ2016/license15

  • :recursive (Boolean)

    Retrieve all parameters within a hierarchy.

  • :parameter_filters (Array<Types::ParameterStringFilter>)

    Filters to limit the request results.

  • :with_decryption (Boolean)

    Retrieve all parameters in a hierarchy with their value decrypted.

  • :max_results (Integer)

    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.

  • :next_token (String)

    A token to start the list. Use this token to get the next set of results.

Returns:

See Also:



3377
3378
3379
3380
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3377

def get_parameters_by_path(params = {}, options = {})
  req = build_request(:get_parameters_by_path, params)
  req.send_request(options)
end

#get_patch_baseline(params = {}) ⇒ Types::GetPatchBaselineResult

Retrieves information about a patch baseline.

Examples:

Request syntax with placeholder values


resp = client.get_patch_baseline({
  baseline_id: "BaselineId", # required
})

Response structure


resp.baseline_id #=> String
resp.name #=> String
resp.operating_system #=> String, one of "WINDOWS", "AMAZON_LINUX", "UBUNTU", "REDHAT_ENTERPRISE_LINUX"
resp.global_filters.patch_filters #=> Array
resp.global_filters.patch_filters[0].key #=> String, one of "PRODUCT", "CLASSIFICATION", "MSRC_SEVERITY", "PATCH_ID", "SECTION", "PRIORITY", "SEVERITY"
resp.global_filters.patch_filters[0].values #=> Array
resp.global_filters.patch_filters[0].values[0] #=> String
resp.approval_rules.patch_rules #=> Array
resp.approval_rules.patch_rules[0].patch_filter_group.patch_filters #=> Array
resp.approval_rules.patch_rules[0].patch_filter_group.patch_filters[0].key #=> String, one of "PRODUCT", "CLASSIFICATION", "MSRC_SEVERITY", "PATCH_ID", "SECTION", "PRIORITY", "SEVERITY"
resp.approval_rules.patch_rules[0].patch_filter_group.patch_filters[0].values #=> Array
resp.approval_rules.patch_rules[0].patch_filter_group.patch_filters[0].values[0] #=> String
resp.approval_rules.patch_rules[0].compliance_level #=> String, one of "CRITICAL", "HIGH", "MEDIUM", "LOW", "INFORMATIONAL", "UNSPECIFIED"
resp.approval_rules.patch_rules[0].approve_after_days #=> Integer
resp.approved_patches #=> Array
resp.approved_patches[0] #=> String
resp.approved_patches_compliance_level #=> String, one of "CRITICAL", "HIGH", "MEDIUM", "LOW", "INFORMATIONAL", "UNSPECIFIED"
resp.rejected_patches #=> Array
resp.rejected_patches[0] #=> String
resp.patch_groups #=> Array
resp.patch_groups[0] #=> String
resp.created_date #=> Time
resp.modified_date #=> Time
resp.description #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :baseline_id (required, String)

    The ID of the patch baseline to retrieve.

Returns:

See Also:



3439
3440
3441
3442
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3439

def get_patch_baseline(params = {}, options = {})
  req = build_request(:get_patch_baseline, params)
  req.send_request(options)
end

#get_patch_baseline_for_patch_group(params = {}) ⇒ Types::GetPatchBaselineForPatchGroupResult

Retrieves the patch baseline that should be used for the specified patch group.

Examples:

Request syntax with placeholder values


resp = client.get_patch_baseline_for_patch_group({
  patch_group: "PatchGroup", # required
  operating_system: "WINDOWS", # accepts WINDOWS, AMAZON_LINUX, UBUNTU, REDHAT_ENTERPRISE_LINUX
})

Response structure


resp.baseline_id #=> String
resp.patch_group #=> String
resp.operating_system #=> String, one of "WINDOWS", "AMAZON_LINUX", "UBUNTU", "REDHAT_ENTERPRISE_LINUX"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :patch_group (required, String)

    The name of the patch group whose patch baseline should be retrieved.

  • :operating_system (String)

    Returns he operating system rule specified for patch groups using the patch baseline.

Returns:

See Also:



3477
3478
3479
3480
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3477

def get_patch_baseline_for_patch_group(params = {}, options = {})
  req = build_request(:get_patch_baseline_for_patch_group, params)
  req.send_request(options)
end

#list_association_versions(params = {}) ⇒ Types::ListAssociationVersionsResult

Retrieves all versions of an association for a specific association ID.

Examples:

Request syntax with placeholder values


resp = client.list_association_versions({
  association_id: "AssociationId", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.association_versions #=> Array
resp.association_versions[0].association_id #=> String
resp.association_versions[0].association_version #=> String
resp.association_versions[0].created_date #=> Time
resp.association_versions[0].name #=> String
resp.association_versions[0].document_version #=> String
resp.association_versions[0].parameters #=> Hash
resp.association_versions[0].parameters["ParameterName"] #=> Array
resp.association_versions[0].parameters["ParameterName"][0] #=> String
resp.association_versions[0].targets #=> Array
resp.association_versions[0].targets[0].key #=> String
resp.association_versions[0].targets[0].values #=> Array
resp.association_versions[0].targets[0].values[0] #=> String
resp.association_versions[0].schedule_expression #=> String
resp.association_versions[0].output_location.s3_location.output_s3_region #=> String
resp.association_versions[0].output_location.s3_location.output_s3_bucket_name #=> String
resp.association_versions[0].output_location.s3_location.output_s3_key_prefix #=> String
resp.association_versions[0].association_name #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :association_id (required, String)

    The association ID for which you want to view all versions.

  • :max_results (Integer)

    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.

  • :next_token (String)

    A token to start the list. Use this token to get the next set of results.

Returns:

See Also:



3536
3537
3538
3539
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3536

def list_association_versions(params = {}, options = {})
  req = build_request(:list_association_versions, params)
  req.send_request(options)
end

#list_associations(params = {}) ⇒ Types::ListAssociationsResult

Lists the associations for the specified Systems Manager document or instance.

Examples:

Request syntax with placeholder values


resp = client.list_associations({
  association_filter_list: [
    {
      key: "InstanceId", # required, accepts InstanceId, Name, AssociationId, AssociationStatusName, LastExecutedBefore, LastExecutedAfter, AssociationName
      value: "AssociationFilterValue", # required
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.associations #=> Array
resp.associations[0].name #=> String
resp.associations[0].instance_id #=> String
resp.associations[0].association_id #=> String
resp.associations[0].association_version #=> String
resp.associations[0].document_version #=> String
resp.associations[0].targets #=> Array
resp.associations[0].targets[0].key #=> String
resp.associations[0].targets[0].values #=> Array
resp.associations[0].targets[0].values[0] #=> String
resp.associations[0].last_execution_date #=> Time
resp.associations[0].overview.status #=> String
resp.associations[0].overview.detailed_status #=> String
resp.associations[0].overview.association_status_aggregated_count #=> Hash
resp.associations[0].overview.association_status_aggregated_count["StatusName"] #=> Integer
resp.associations[0].schedule_expression #=> String
resp.associations[0].association_name #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :association_filter_list (Array<Types::AssociationFilter>)

    One or more filters. Use a filter to return a more specific list of results.

  • :max_results (Integer)

    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.

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

Returns:

See Also:



3600
3601
3602
3603
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3600

def list_associations(params = {}, options = {})
  req = build_request(:list_associations, params)
  req.send_request(options)
end

#list_command_invocations(params = {}) ⇒ Types::ListCommandInvocationsResult

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.

Examples:

Request syntax with placeholder values


resp = client.list_command_invocations({
  command_id: "CommandId",
  instance_id: "InstanceId",
  max_results: 1,
  next_token: "NextToken",
  filters: [
    {
      key: "InvokedAfter", # required, accepts InvokedAfter, InvokedBefore, Status
      value: "CommandFilterValue", # required
    },
  ],
  details: false,
})

Response structure


resp.command_invocations #=> Array
resp.command_invocations[0].command_id #=> String
resp.command_invocations[0].instance_id #=> String
resp.command_invocations[0].instance_name #=> String
resp.command_invocations[0].comment #=> String
resp.command_invocations[0].document_name #=> String
resp.command_invocations[0].requested_date_time #=> Time
resp.command_invocations[0].status #=> String, one of "Pending", "InProgress", "Delayed", "Success", "Cancelled", "TimedOut", "Failed", "Cancelling"
resp.command_invocations[0].status_details #=> String
resp.command_invocations[0].trace_output #=> String
resp.command_invocations[0].standard_output_url #=> String
resp.command_invocations[0].standard_error_url #=> String
resp.command_invocations[0].command_plugins #=> Array
resp.command_invocations[0].command_plugins[0].name #=> String
resp.command_invocations[0].command_plugins[0].status #=> String, one of "Pending", "InProgress", "Success", "TimedOut", "Cancelled", "Failed"
resp.command_invocations[0].command_plugins[0].status_details #=> String
resp.command_invocations[0].command_plugins[0].response_code #=> Integer
resp.command_invocations[0].command_plugins[0].response_start_date_time #=> Time
resp.command_invocations[0].command_plugins[0].response_finish_date_time #=> Time
resp.command_invocations[0].command_plugins[0].output #=> String
resp.command_invocations[0].command_plugins[0].standard_output_url #=> String
resp.command_invocations[0].command_plugins[0].standard_error_url #=> String
resp.command_invocations[0].command_plugins[0].output_s3_region #=> String
resp.command_invocations[0].command_plugins[0].output_s3_bucket_name #=> String
resp.command_invocations[0].command_plugins[0].output_s3_key_prefix #=> String
resp.command_invocations[0].service_role #=> String
resp.command_invocations[0].notification_config.notification_arn #=> String
resp.command_invocations[0].notification_config.notification_events #=> Array
resp.command_invocations[0].notification_config.notification_events[0] #=> String, one of "All", "InProgress", "Success", "TimedOut", "Cancelled", "Failed"
resp.command_invocations[0].notification_config.notification_type #=> String, one of "Command", "Invocation"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :command_id (String) — default: Optional

    The invocations for a specific command ID.

  • :instance_id (String) — default: Optional

    The command execution details for a specific instance ID.

  • :max_results (Integer) — default: 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.

  • :next_token (String) — default: Optional

    The token for the next set of items to return. (You received this token from a previous call.)

  • :filters (Array<Types::CommandFilter>) — default: Optional

    One or more filters. Use a filter to return a more specific list of results.

  • :details (Boolean) — default: Optional

    If set this returns the response of the command executions and any command output. By default this is set to False.

Returns:

See Also:



3694
3695
3696
3697
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3694

def list_command_invocations(params = {}, options = {})
  req = build_request(:list_command_invocations, params)
  req.send_request(options)
end

#list_commands(params = {}) ⇒ Types::ListCommandsResult

Lists the commands requested by users of the AWS account.

Examples:

Request syntax with placeholder values


resp = client.list_commands({
  command_id: "CommandId",
  instance_id: "InstanceId",
  max_results: 1,
  next_token: "NextToken",
  filters: [
    {
      key: "InvokedAfter", # required, accepts InvokedAfter, InvokedBefore, Status
      value: "CommandFilterValue", # required
    },
  ],
})

Response structure


resp.commands #=> Array
resp.commands[0].command_id #=> String
resp.commands[0].document_name #=> String
resp.commands[0].comment #=> String
resp.commands[0].expires_after #=> Time
resp.commands[0].parameters #=> Hash
resp.commands[0].parameters["ParameterName"] #=> Array
resp.commands[0].parameters["ParameterName"][0] #=> String
resp.commands[0].instance_ids #=> Array
resp.commands[0].instance_ids[0] #=> String
resp.commands[0].targets #=> Array
resp.commands[0].targets[0].key #=> String
resp.commands[0].targets[0].values #=> Array
resp.commands[0].targets[0].values[0] #=> String
resp.commands[0].requested_date_time #=> Time
resp.commands[0].status #=> String, one of "Pending", "InProgress", "Success", "Cancelled", "Failed", "TimedOut", "Cancelling"
resp.commands[0].status_details #=> String
resp.commands[0].output_s3_region #=> String
resp.commands[0].output_s3_bucket_name #=> String
resp.commands[0].output_s3_key_prefix #=> String
resp.commands[0].max_concurrency #=> String
resp.commands[0].max_errors #=> String
resp.commands[0].target_count #=> Integer
resp.commands[0].completed_count #=> Integer
resp.commands[0].error_count #=> Integer
resp.commands[0].service_role #=> String
resp.commands[0].notification_config.notification_arn #=> String
resp.commands[0].notification_config.notification_events #=> Array
resp.commands[0].notification_config.notification_events[0] #=> String, one of "All", "InProgress", "Success", "TimedOut", "Cancelled", "Failed"
resp.commands[0].notification_config.notification_type #=> String, one of "Command", "Invocation"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :command_id (String) — default: Optional

    If provided, lists only the specified command.

  • :instance_id (String) — default: Optional

    Lists commands issued against this instance ID.

  • :max_results (Integer) — default: 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.

  • :next_token (String) — default: Optional

    The token for the next set of items to return. (You received this token from a previous call.)

  • :filters (Array<Types::CommandFilter>) — default: Optional

    One or more filters. Use a filter to return a more specific list of results.

Returns:

See Also:



3778
3779
3780
3781
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3778

def list_commands(params = {}, options = {})
  req = build_request(:list_commands, params)
  req.send_request(options)
end

#list_compliance_items(params = {}) ⇒ Types::ListComplianceItemsResult

For a specified resource ID, this API action returns a list of compliance statuses for different resource types. Currently, you can only specify one resource ID per call. List results depend on the criteria specified in the filter.

Examples:

Request syntax with placeholder values


resp = client.list_compliance_items({
  filters: [
    {
      key: "ComplianceStringFilterKey",
      values: ["ComplianceFilterValue"],
      type: "EQUAL", # accepts EQUAL, NOT_EQUAL, BEGIN_WITH, LESS_THAN, GREATER_THAN
    },
  ],
  resource_ids: ["ComplianceResourceId"],
  resource_types: ["ComplianceResourceType"],
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.compliance_items #=> Array
resp.compliance_items[0].compliance_type #=> String
resp.compliance_items[0].resource_type #=> String
resp.compliance_items[0].resource_id #=> String
resp.compliance_items[0].id #=> String
resp.compliance_items[0].title #=> String
resp.compliance_items[0].status #=> String, one of "COMPLIANT", "NON_COMPLIANT"
resp.compliance_items[0].severity #=> String, one of "CRITICAL", "HIGH", "MEDIUM", "LOW", "INFORMATIONAL", "UNSPECIFIED"
resp.compliance_items[0].execution_summary.execution_time #=> Time
resp.compliance_items[0].execution_summary.execution_id #=> String
resp.compliance_items[0].execution_summary.execution_type #=> String
resp.compliance_items[0].details #=> Hash
resp.compliance_items[0].details["AttributeName"] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :filters (Array<Types::ComplianceStringFilter>)

    One or more compliance filters. Use a filter to return a more specific list of results.

  • :resource_ids (Array<String>)

    The ID for the resources from which to get compliance information. Currently, you can only specify one resource ID.

  • :resource_types (Array<String>)

    The type of resource from which to get compliance information. Currently, the only supported resource type is ManagedInstance.

  • :next_token (String)

    A token to start the list. Use this token to get the next set of results.

  • :max_results (Integer)

    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.

Returns:

See Also:



3851
3852
3853
3854
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3851

def list_compliance_items(params = {}, options = {})
  req = build_request(:list_compliance_items, params)
  req.send_request(options)
end

#list_compliance_summaries(params = {}) ⇒ Types::ListComplianceSummariesResult

Returns a summary count of compliant and non-compliant resources for a compliance type. For example, this call can return State Manager associations, patches, or custom compliance types according to the filter criteria that you specify.

Examples:

Request syntax with placeholder values


resp = client.list_compliance_summaries({
  filters: [
    {
      key: "ComplianceStringFilterKey",
      values: ["ComplianceFilterValue"],
      type: "EQUAL", # accepts EQUAL, NOT_EQUAL, BEGIN_WITH, LESS_THAN, GREATER_THAN
    },
  ],
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.compliance_summary_items #=> Array
resp.compliance_summary_items[0].compliance_type #=> String
resp.compliance_summary_items[0].compliant_summary.compliant_count #=> Integer
resp.compliance_summary_items[0].compliant_summary.severity_summary.critical_count #=> Integer
resp.compliance_summary_items[0].compliant_summary.severity_summary.high_count #=> Integer
resp.compliance_summary_items[0].compliant_summary.severity_summary.medium_count #=> Integer
resp.compliance_summary_items[0].compliant_summary.severity_summary.low_count #=> Integer
resp.compliance_summary_items[0].compliant_summary.severity_summary.informational_count #=> Integer
resp.compliance_summary_items[0].compliant_summary.severity_summary.unspecified_count #=> Integer
resp.compliance_summary_items[0].non_compliant_summary.non_compliant_count #=> Integer
resp.compliance_summary_items[0].non_compliant_summary.severity_summary.critical_count #=> Integer
resp.compliance_summary_items[0].non_compliant_summary.severity_summary.high_count #=> Integer
resp.compliance_summary_items[0].non_compliant_summary.severity_summary.medium_count #=> Integer
resp.compliance_summary_items[0].non_compliant_summary.severity_summary.low_count #=> Integer
resp.compliance_summary_items[0].non_compliant_summary.severity_summary.informational_count #=> Integer
resp.compliance_summary_items[0].non_compliant_summary.severity_summary.unspecified_count #=> Integer
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :filters (Array<Types::ComplianceStringFilter>)

    One or more compliance or inventory filters. Use a filter to return a more specific list of results.

  • :next_token (String)

    A token to start the list. Use this token to get the next set of results.

  • :max_results (Integer)

    The maximum number of items to return for this call. Currently, you can specify null or 50. The call also returns a token that you can specify in a subsequent call to get the next set of results.

Returns:

See Also:



3917
3918
3919
3920
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3917

def list_compliance_summaries(params = {}, options = {})
  req = build_request(:list_compliance_summaries, params)
  req.send_request(options)
end

#list_document_versions(params = {}) ⇒ Types::ListDocumentVersionsResult

List all versions for a document.

Examples:

Request syntax with placeholder values


resp = client.list_document_versions({
  name: "DocumentName", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.document_versions #=> Array
resp.document_versions[0].name #=> String
resp.document_versions[0].document_version #=> String
resp.document_versions[0].created_date #=> Time
resp.document_versions[0].is_default_version #=> Boolean
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the document about which you want version information.

  • :max_results (Integer)

    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.

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

Returns:

See Also:



3962
3963
3964
3965
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3962

def list_document_versions(params = {}, options = {})
  req = build_request(:list_document_versions, params)
  req.send_request(options)
end

#list_documents(params = {}) ⇒ Types::ListDocumentsResult

Describes one or more of your Systems Manager documents.

Examples:

Request syntax with placeholder values


resp = client.list_documents({
  document_filter_list: [
    {
      key: "Name", # required, accepts Name, Owner, PlatformTypes, DocumentType
      value: "DocumentFilterValue", # required
    },
  ],
  filters: [
    {
      key: "DocumentKeyValuesFilterKey",
      values: ["DocumentKeyValuesFilterValue"],
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.document_identifiers #=> Array
resp.document_identifiers[0].name #=> String
resp.document_identifiers[0].owner #=> String
resp.document_identifiers[0].platform_types #=> Array
resp.document_identifiers[0].platform_types[0] #=> String, one of "Windows", "Linux"
resp.document_identifiers[0].document_version #=> String
resp.document_identifiers[0].document_type #=> String, one of "Command", "Policy", "Automation"
resp.document_identifiers[0].schema_version #=> String
resp.document_identifiers[0].tags #=> Array
resp.document_identifiers[0].tags[0].key #=> String
resp.document_identifiers[0].tags[0].value #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :document_filter_list (Array<Types::DocumentFilter>)

    One or more filters. Use a filter to return a more specific list of results.

  • :filters (Array<Types::DocumentKeyValuesFilter>)

    One or more filters. Use a filter to return a more specific list of results.

  • :max_results (Integer)

    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.

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

Returns:

See Also:



4029
4030
4031
4032
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4029

def list_documents(params = {}, options = {})
  req = build_request(:list_documents, params)
  req.send_request(options)
end

#list_inventory_entries(params = {}) ⇒ Types::ListInventoryEntriesResult

A list of inventory items returned by the request.

Examples:

Request syntax with placeholder values


resp = client.list_inventory_entries({
  instance_id: "InstanceId", # required
  type_name: "InventoryItemTypeName", # required
  filters: [
    {
      key: "InventoryFilterKey", # required
      values: ["InventoryFilterValue"], # required
      type: "Equal", # accepts Equal, NotEqual, BeginWith, LessThan, GreaterThan
    },
  ],
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.type_name #=> String
resp.instance_id #=> String
resp.schema_version #=> String
resp.capture_time #=> String
resp.entries #=> Array
resp.entries[0] #=> Hash
resp.entries[0]["AttributeName"] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The instance ID for which you want inventory information.

  • :type_name (required, String)

    The type of inventory item for which you want information.

  • :filters (Array<Types::InventoryFilter>)

    One or more filters. Use a filter to return a more specific list of results.

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a previous call.)

  • :max_results (Integer)

    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.

Returns:

See Also:



4095
4096
4097
4098
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4095

def list_inventory_entries(params = {}, options = {})
  req = build_request(:list_inventory_entries, params)
  req.send_request(options)
end

#list_resource_compliance_summaries(params = {}) ⇒ Types::ListResourceComplianceSummariesResult

Returns a resource-level summary count. The summary includes information about compliant and non-compliant statuses and detailed compliance-item severity counts, according to the filter criteria you specify.

Examples:

Request syntax with placeholder values


resp = client.list_resource_compliance_summaries({
  filters: [
    {
      key: "ComplianceStringFilterKey",
      values: ["ComplianceFilterValue"],
      type: "EQUAL", # accepts EQUAL, NOT_EQUAL, BEGIN_WITH, LESS_THAN, GREATER_THAN
    },
  ],
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.resource_compliance_summary_items #=> Array
resp.resource_compliance_summary_items[0].compliance_type #=> String
resp.resource_compliance_summary_items[0].resource_type #=> String
resp.resource_compliance_summary_items[0].resource_id #=> String
resp.resource_compliance_summary_items[0].status #=> String, one of "COMPLIANT", "NON_COMPLIANT"
resp.resource_compliance_summary_items[0].overall_severity #=> String, one of "CRITICAL", "HIGH", "MEDIUM", "LOW", "INFORMATIONAL", "UNSPECIFIED"
resp.resource_compliance_summary_items[0].execution_summary.execution_time #=> Time
resp.resource_compliance_summary_items[0].execution_summary.execution_id #=> String
resp.resource_compliance_summary_items[0].execution_summary.execution_type #=> String
resp.resource_compliance_summary_items[0].compliant_summary.compliant_count #=> Integer
resp.resource_compliance_summary_items[0].compliant_summary.severity_summary.critical_count #=> Integer
resp.resource_compliance_summary_items[0].compliant_summary.severity_summary.high_count #=> Integer
resp.resource_compliance_summary_items[0].compliant_summary.severity_summary.medium_count #=> Integer
resp.resource_compliance_summary_items[0].compliant_summary.severity_summary.low_count #=> Integer
resp.resource_compliance_summary_items[0].compliant_summary.severity_summary.informational_count #=> Integer
resp.resource_compliance_summary_items[0].compliant_summary.severity_summary.unspecified_count #=> Integer
resp.resource_compliance_summary_items[0].non_compliant_summary.non_compliant_count #=> Integer
resp.resource_compliance_summary_items[0].non_compliant_summary.severity_summary.critical_count #=> Integer
resp.resource_compliance_summary_items[0].non_compliant_summary.severity_summary.high_count #=> Integer
resp.resource_compliance_summary_items[0].non_compliant_summary.severity_summary.medium_count #=> Integer
resp.resource_compliance_summary_items[0].non_compliant_summary.severity_summary.low_count #=> Integer
resp.resource_compliance_summary_items[0].non_compliant_summary.severity_summary.informational_count #=> Integer
resp.resource_compliance_summary_items[0].non_compliant_summary.severity_summary.unspecified_count #=> Integer
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :filters (Array<Types::ComplianceStringFilter>)

    One or more filters. Use a filter to return a more specific list of results.

  • :next_token (String)

    A token to start the list. Use this token to get the next set of results.

  • :max_results (Integer)

    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.

Returns:

See Also:



4168
4169
4170
4171
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4168

def list_resource_compliance_summaries(params = {}, options = {})
  req = build_request(:list_resource_compliance_summaries, params)
  req.send_request(options)
end

#list_resource_data_sync(params = {}) ⇒ Types::ListResourceDataSyncResult

Lists your resource data sync configurations. Includes information about the last time a sync attempted to start, the last sync status, and the last time a sync successfully completed.

The number of sync configurations might be too large to return using a single call to ListResourceDataSync. You can limit the number of sync configurations returned by using the MaxResults parameter. To determine whether there are more sync configurations to list, check the value of NextToken in the output. If there are more sync configurations to list, you can request them by specifying the NextToken returned in the call to the parameter of a subsequent call.

Examples:

Request syntax with placeholder values


resp = client.list_resource_data_sync({
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.resource_data_sync_items #=> Array
resp.resource_data_sync_items[0].sync_name #=> String
resp.resource_data_sync_items[0].s3_destination.bucket_name #=> String
resp.resource_data_sync_items[0].s3_destination.prefix #=> String
resp.resource_data_sync_items[0].s3_destination.sync_format #=> String, one of "JsonSerDe"
resp.resource_data_sync_items[0].s3_destination.region #=> String
resp.resource_data_sync_items[0].s3_destination.awskms_key_arn #=> String
resp.resource_data_sync_items[0].last_sync_time #=> Time
resp.resource_data_sync_items[0].last_successful_sync_time #=> Time
resp.resource_data_sync_items[0].last_status #=> String, one of "Successful", "Failed", "InProgress"
resp.resource_data_sync_items[0].sync_created_time #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :next_token (String)

    A token to start the list. Use this token to get the next set of results.

  • :max_results (Integer)

    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.

Returns:

See Also:



4226
4227
4228
4229
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4226

def list_resource_data_sync(params = {}, options = {})
  req = build_request(:list_resource_data_sync, params)
  req.send_request(options)
end

#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResult

Returns a list of the tags assigned to the specified resource.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_type: "Document", # required, accepts Document, ManagedInstance, MaintenanceWindow, Parameter, PatchBaseline
  resource_id: "ResourceId", # required
})

Response structure


resp.tag_list #=> Array
resp.tag_list[0].key #=> String
resp.tag_list[0].value #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_type (required, String)

    Returns a list of tags for a specific resource type.

  • :resource_id (required, String)

    The resource ID for which you want to see a list of tags.

Returns:

See Also:



4260
4261
4262
4263
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4260

def list_tags_for_resource(params = {}, options = {})
  req = build_request(:list_tags_for_resource, params)
  req.send_request(options)
end

#modify_document_permission(params = {}) ⇒ Struct

Shares a Systems Manager document publicly or privately. If you share a document privately, you must specify the AWS user account IDs for those people who can use the document. If you share a document publicly, you must specify All as the account ID.

Examples:

Request syntax with placeholder values


resp = client.modify_document_permission({
  name: "DocumentName", # required
  permission_type: "Share", # required, accepts Share
  account_ids_to_add: ["AccountId"],
  account_ids_to_remove: ["AccountId"],
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the document that you want to share.

  • :permission_type (required, String)

    The permission type for the document. The permission type can be Share.

  • :account_ids_to_add (Array<String>)

    The AWS user accounts that should have access to the document. The account IDs can either be a group of account IDs or All.

  • :account_ids_to_remove (Array<String>)

    The AWS user accounts that should no longer have access to the document. The AWS user account can either be a group of account IDs or All. This action has a higher priority than AccountIdsToAdd. If you specify an account ID to add and the same ID to remove, the system removes access to the document.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4303
4304
4305
4306
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4303

def modify_document_permission(params = {}, options = {})
  req = build_request(:modify_document_permission, params)
  req.send_request(options)
end

#put_compliance_items(params = {}) ⇒ Struct

Registers a compliance type and other compliance details on a designated resource. This action lets you register custom compliance details with a resource. This call overwrites existing compliance information on the resource, so you must provide a full list of compliance items each time that you send the request.

Examples:

Request syntax with placeholder values


resp = client.put_compliance_items({
  resource_id: "ComplianceResourceId", # required
  resource_type: "ComplianceResourceType", # required
  compliance_type: "ComplianceTypeName", # required
  execution_summary: { # required
    execution_time: Time.now, # required
    execution_id: "ComplianceExecutionId",
    execution_type: "ComplianceExecutionType",
  },
  items: [ # required
    {
      id: "ComplianceItemId",
      title: "ComplianceItemTitle",
      severity: "CRITICAL", # required, accepts CRITICAL, HIGH, MEDIUM, LOW, INFORMATIONAL, UNSPECIFIED
      status: "COMPLIANT", # required, accepts COMPLIANT, NON_COMPLIANT
      details: {
        "AttributeName" => "AttributeValue",
      },
    },
  ],
  item_content_hash: "ComplianceItemContentHash",
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_id (required, String)

    Specify an ID for this resource. For a managed instance, this is the instance ID.

  • :resource_type (required, String)

    Specify the type of resource. ManagedInstance is currently the only supported resource type.

  • :compliance_type (required, String)

    Specify the compliance type. For example, specify Association (for a State Manager association), Patch, or Custom:string.

  • :execution_summary (required, Types::ComplianceExecutionSummary)

    A summary of the call execution that includes an execution ID, the type of execution (for example, Command), and the date/time of the execution using a datetime object that is saved in the following format: yyyy-MM-dd'T'HH:mm:ss'Z'.

  • :items (required, Array<Types::ComplianceItemEntry>)

    Information about the compliance as defined by the resource type. For example, for a patch compliance type, Items includes information about the PatchSeverity, Classification, etc.

  • :item_content_hash (String)

    MD5 or SHA-256 content hash. The content hash is used to determine if existing information should be overwritten or ignored. If the content hashes match, the request to put compliance information is ignored.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4373
4374
4375
4376
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4373

def put_compliance_items(params = {}, options = {})
  req = build_request(:put_compliance_items, params)
  req.send_request(options)
end

#put_inventory(params = {}) ⇒ Struct

Bulk update custom inventory items on one more instance. The request adds an inventory item, if it doesn't already exist, or updates an inventory item, if it does exist.

Examples:

Request syntax with placeholder values


resp = client.put_inventory({
  instance_id: "InstanceId", # required
  items: [ # required
    {
      type_name: "InventoryItemTypeName", # required
      schema_version: "InventoryItemSchemaVersion", # required
      capture_time: "InventoryItemCaptureTime", # required
      content_hash: "InventoryItemContentHash",
      content: [
        {
          "AttributeName" => "AttributeValue",
        },
      ],
      context: {
        "AttributeName" => "AttributeValue",
      },
    },
  ],
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    One or more instance IDs where you want to add or update inventory items.

  • :items (required, Array<Types::InventoryItem>)

    The inventory items that you want to add or update on instances.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4417
4418
4419
4420
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4417

def put_inventory(params = {}, options = {})
  req = build_request(:put_inventory, params)
  req.send_request(options)
end

#put_parameter(params = {}) ⇒ Struct

Add one or more parameters to the system.

Examples:

Request syntax with placeholder values


resp = client.put_parameter({
  name: "PSParameterName", # required
  description: "ParameterDescription",
  value: "PSParameterValue", # required
  type: "String", # required, accepts String, StringList, SecureString
  key_id: "ParameterKeyId",
  overwrite: false,
  allowed_pattern: "AllowedPattern",
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the parameter that you want to add to the system.

  • :description (String)

    Information about the parameter that you want to add to the system

  • :value (required, String)

    The parameter value that you want to add to the system.

  • :type (required, String)

    The type of parameter that you want to add to the system.

  • :key_id (String)

    The KMS Key ID that you want to use to encrypt a parameter when you choose the SecureString data type. If you don't specify a key ID, the system uses the default key associated with your AWS account.

  • :overwrite (Boolean)

    Overwrite an existing parameter. If not specified, will default to "false".

  • :allowed_pattern (String)

    A regular expression used to validate the parameter value. For example, for String types with values restricted to numbers, you can specify the following: AllowedPattern=^\d+$

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4468
4469
4470
4471
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4468

def put_parameter(params = {}, options = {})
  req = build_request(:put_parameter, params)
  req.send_request(options)
end

#register_default_patch_baseline(params = {}) ⇒ Types::RegisterDefaultPatchBaselineResult

Defines the default patch baseline.

Examples:

Request syntax with placeholder values


resp = client.register_default_patch_baseline({
  baseline_id: "BaselineId", # required
})

Response structure


resp.baseline_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :baseline_id (required, String)

    The ID of the patch baseline that should be the default patch baseline.

Returns:

See Also:



4497
4498
4499
4500
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4497

def register_default_patch_baseline(params = {}, options = {})
  req = build_request(:register_default_patch_baseline, params)
  req.send_request(options)
end

#register_patch_baseline_for_patch_group(params = {}) ⇒ Types::RegisterPatchBaselineForPatchGroupResult

Registers a patch baseline for a patch group.

Examples:

Request syntax with placeholder values


resp = client.register_patch_baseline_for_patch_group({
  baseline_id: "BaselineId", # required
  patch_group: "PatchGroup", # required
})

Response structure


resp.baseline_id #=> String
resp.patch_group #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :baseline_id (required, String)

    The ID of the patch baseline to register the patch group with.

  • :patch_group (required, String)

    The name of the patch group that should be registered with the patch baseline.

Returns:

See Also:



4532
4533
4534
4535
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4532

def register_patch_baseline_for_patch_group(params = {}, options = {})
  req = build_request(:register_patch_baseline_for_patch_group, params)
  req.send_request(options)
end

#register_target_with_maintenance_window(params = {}) ⇒ Types::RegisterTargetWithMaintenanceWindowResult

Registers a target with a Maintenance Window.

Examples:

Request syntax with placeholder values


resp = client.register_target_with_maintenance_window({
  window_id: "MaintenanceWindowId", # required
  resource_type: "INSTANCE", # required, accepts INSTANCE
  targets: [ # required
    {
      key: "TargetKey",
      values: ["TargetValue"],
    },
  ],
  owner_information: "OwnerInformation",
  name: "MaintenanceWindowName",
  description: "MaintenanceWindowDescription",
  client_token: "ClientToken",
})

Response structure


resp.window_target_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :window_id (required, String)

    The ID of the Maintenance Window the target should be registered with.

  • :resource_type (required, String)

    The type of target being registered with the Maintenance Window.

  • :targets (required, Array<Types::Target>)

    The targets (either instances or tags). Instances are specified using Key=instanceids,Values=<instanceid1>,<instanceid2>. Tags are specified using Key=<tag name>,Values=<tag value>.

  • :owner_information (String)

    User-provided value that will be included in any CloudWatch events raised while running tasks for these targets in this Maintenance Window.

  • :name (String)

    An optional name for the target.

  • :description (String)

    An optional description for the target.

  • :client_token (String)

    User-provided idempotency token.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

See Also:



4596
4597
4598
4599
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4596

def register_target_with_maintenance_window(params = {}, options = {})
  req = build_request(:register_target_with_maintenance_window, params)
  req.send_request(options)
end

#register_task_with_maintenance_window(params = {}) ⇒ Types::RegisterTaskWithMaintenanceWindowResult

Adds a new task to a Maintenance Window.

Examples:

Request syntax with placeholder values


resp = client.register_task_with_maintenance_window({
  window_id: "MaintenanceWindowId", # required
  targets: [ # required
    {
      key: "TargetKey",
      values: ["TargetValue"],
    },
  ],
  task_arn: "MaintenanceWindowTaskArn", # required
  service_role_arn: "ServiceRole", # required
  task_type: "RUN_COMMAND", # required, accepts RUN_COMMAND, AUTOMATION, STEP_FUNCTIONS, LAMBDA
  task_parameters: {
    "MaintenanceWindowTaskParameterName" => {
      values: ["MaintenanceWindowTaskParameterValue"],
    },
  },
  task_invocation_parameters: {
    run_command: {
      comment: "Comment",
      document_hash: "DocumentHash",
      document_hash_type: "Sha256", # accepts Sha256, Sha1
      notification_config: {
        notification_arn: "NotificationArn",
        notification_events: ["All"], # accepts All, InProgress, Success, TimedOut, Cancelled, Failed
        notification_type: "Command", # accepts Command, Invocation
      },
      output_s3_bucket_name: "S3BucketName",
      output_s3_key_prefix: "S3KeyPrefix",
      parameters: {
        "ParameterName" => ["ParameterValue"],
      },
      service_role_arn: "ServiceRole",
      timeout_seconds: 1,
    },
    automation: {
      document_version: "DocumentVersion",
      parameters: {
        "AutomationParameterKey" => ["AutomationParameterValue"],
      },
    },
    step_functions: {
      input: "MaintenanceWindowStepFunctionsInput",
      name: "MaintenanceWindowStepFunctionsName",
    },
    lambda: {
      client_context: "MaintenanceWindowLambdaClientContext",
      qualifier: "MaintenanceWindowLambdaQualifier",
      payload: "data",
    },
  },
  priority: 1,
  max_concurrency: "MaxConcurrency", # required
  max_errors: "MaxErrors", # required
  logging_info: {
    s3_bucket_name: "S3BucketName", # required
    s3_key_prefix: "S3KeyPrefix",
    s3_region: "S3Region", # required
  },
  name: "MaintenanceWindowName",
  description: "MaintenanceWindowDescription",
  client_token: "ClientToken",
})

Response structure


resp.window_task_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :window_id (required, String)

    The id of the Maintenance Window the task should be added to.

  • :targets (required, Array<Types::Target>)

    The targets (either instances or tags). Instances are specified using Key=instanceids,Values=<instanceid1>,<instanceid2>. Tags are specified using Key=<tag name>,Values=<tag value>.

  • :task_arn (required, String)

    The ARN of the task to execute

  • :service_role_arn (required, String)

    The role that should be assumed when executing the task.

  • :task_type (required, String)

    The type of task being registered.

  • :task_parameters (Hash<String,Types::MaintenanceWindowTaskParameterValueExpression>)

    The parameters that should be passed to the task when it is executed.

  • :task_invocation_parameters (Types::MaintenanceWindowTaskInvocationParameters)

    The parameters that the task should use during execution. Populate only the fields that match the task type. All other fields should be empty.

  • :priority (Integer)

    The priority of the task in the Maintenance Window, the lower the number the higher the priority. Tasks in a Maintenance Window are scheduled in priority order with tasks that have the same priority scheduled in parallel.

  • :max_concurrency (required, String)

    The maximum number of targets this task can be run for in parallel.

  • :max_errors (required, String)

    The maximum number of errors allowed before this task stops being scheduled.

  • :logging_info (Types::LoggingInfo)

    A structure containing information about an Amazon S3 bucket to write instance-level logs to.

  • :name (String)

    An optional name for the task.

  • :description (String)

    An optional description for the task.

  • :client_token (String)

    User-provided idempotency token.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

See Also:



4734
4735
4736
4737
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4734

def register_task_with_maintenance_window(params = {}, options = {})
  req = build_request(:register_task_with_maintenance_window, params)
  req.send_request(options)
end

#remove_tags_from_resource(params = {}) ⇒ Struct

Removes all tags from the specified resource.

Examples:

Request syntax with placeholder values


resp = client.remove_tags_from_resource({
  resource_type: "Document", # required, accepts Document, ManagedInstance, MaintenanceWindow, Parameter, PatchBaseline
  resource_id: "ResourceId", # required
  tag_keys: ["TagKey"], # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_type (required, String)

    The type of resource of which you want to remove a tag.

  • :resource_id (required, String)

    The resource ID for which you want to remove tags.

  • :tag_keys (required, Array<String>)

    Tag keys that you want to remove from the specified resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4764
4765
4766
4767
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4764

def remove_tags_from_resource(params = {}, options = {})
  req = build_request(:remove_tags_from_resource, params)
  req.send_request(options)
end

#send_automation_signal(params = {}) ⇒ Struct

Sends a signal to an Automation execution to change the current behavior or status of the execution.

Examples:

Request syntax with placeholder values


resp = client.send_automation_signal({
  automation_execution_id: "AutomationExecutionId", # required
  signal_type: "Approve", # required, accepts Approve, Reject
  payload: {
    "AutomationParameterKey" => ["AutomationParameterValue"],
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :automation_execution_id (required, String)

    The unique identifier for an existing Automation execution that you want to send the signal to.

  • :signal_type (required, String)

    The type of signal. Valid signal types include the following: Approve and Reject

  • :payload (Hash<String,Array>)

    The data sent with the signal. The data schema depends on the type of signal used in the request.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4800
4801
4802
4803
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4800

def send_automation_signal(params = {}, options = {})
  req = build_request(:send_automation_signal, params)
  req.send_request(options)
end

#send_command(params = {}) ⇒ Types::SendCommandResult

Executes commands on one or more managed instances.

Examples:

Request syntax with placeholder values


resp = client.send_command({
  instance_ids: ["InstanceId"],
  targets: [
    {
      key: "TargetKey",
      values: ["TargetValue"],
    },
  ],
  document_name: "DocumentARN", # required
  document_hash: "DocumentHash",
  document_hash_type: "Sha256", # accepts Sha256, Sha1
  timeout_seconds: 1,
  comment: "Comment",
  parameters: {
    "ParameterName" => ["ParameterValue"],
  },
  output_s3_region: "S3Region",
  output_s3_bucket_name: "S3BucketName",
  output_s3_key_prefix: "S3KeyPrefix",
  max_concurrency: "MaxConcurrency",
  max_errors: "MaxErrors",
  service_role_arn: "ServiceRole",
  notification_config: {
    notification_arn: "NotificationArn",
    notification_events: ["All"], # accepts All, InProgress, Success, TimedOut, Cancelled, Failed
    notification_type: "Command", # accepts Command, Invocation
  },
})

Response structure


resp.command.command_id #=> String
resp.command.document_name #=> String
resp.command.comment #=> String
resp.command.expires_after #=> Time
resp.command.parameters #=> Hash
resp.command.parameters["ParameterName"] #=> Array
resp.command.parameters["ParameterName"][0] #=> String
resp.command.instance_ids #=> Array
resp.command.instance_ids[0] #=> String
resp.command.targets #=> Array
resp.command.targets[0].key #=> String
resp.command.targets[0].values #=> Array
resp.command.targets[0].values[0] #=> String
resp.command.requested_date_time #=> Time
resp.command.status #=> String, one of "Pending", "InProgress", "Success", "Cancelled", "Failed", "TimedOut", "Cancelling"
resp.command.status_details #=> String
resp.command.output_s3_region #=> String
resp.command.output_s3_bucket_name #=> String
resp.command.output_s3_key_prefix #=> String
resp.command.max_concurrency #=> String
resp.command.max_errors #=> String
resp.command.target_count #=> Integer
resp.command.completed_count #=> Integer
resp.command.error_count #=> Integer
resp.command.service_role #=> String
resp.command.notification_config.notification_arn #=> String
resp.command.notification_config.notification_events #=> Array
resp.command.notification_config.notification_events[0] #=> String, one of "All", "InProgress", "Success", "TimedOut", "Cancelled", "Failed"
resp.command.notification_config.notification_type #=> String, one of "Command", "Invocation"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_ids (Array<String>)

    The instance IDs where the command should execute. You can specify a maximum of 50 IDs. If you prefer not to list individual instance IDs, you can instead send commands to a fleet of instances using the Targets parameter, which accepts EC2 tags. For more information about how to use Targets, see Sending Commands to a Fleet.

  • :targets (Array<Types::Target>) — default: Optional

    An array of search criteria that targets instances using a Key,Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call. For more information about how to use Targets, see Sending Commands to a Fleet.

  • :document_name (required, String)

    Required. The name of the Systems Manager document to execute. This can be a public document or a custom document.

  • :document_hash (String)

    The Sha256 or Sha1 hash created by the system when the document was created.

    Sha1 hashes have been deprecated.

  • :document_hash_type (String)

    Sha256 or Sha1.

    Sha1 hashes have been deprecated.

  • :timeout_seconds (Integer)

    If this time is reached and the command has not already started executing, it will not execute.

  • :comment (String)

    User-specified information about the command, such as a brief description of what the command should do.

  • :parameters (Hash<String,Array>)

    The required and optional parameters specified in the document being executed.

  • :output_s3_region (String) — default: Deprecated

    You can no longer specify this parameter. The system ignores it. Instead, Systems Manager automatically determines the Amazon S3 bucket region.

  • :output_s3_bucket_name (String)

    The name of the S3 bucket where command execution responses should be stored.

  • :output_s3_key_prefix (String)

    The directory structure within the S3 bucket where the responses should be stored.

  • :max_concurrency (String) — default: Optional

    The maximum number of instances that are allowed to execute the command at the same time. You can specify a number such as 10 or a percentage such as 10%. The default value is 50. For more information about how to use MaxConcurrency, see Using Concurrency Controls.

  • :max_errors (String)

    The maximum number of errors allowed without the command failing. When the command fails one more time beyond the value of MaxErrors, the systems stops sending the command to additional targets. You can specify a number like 10 or a percentage like 10%. The default value is 50. For more information about how to use MaxErrors, see Using Error Controls.

  • :service_role_arn (String)

    The IAM role that Systems Manager uses to send notifications.

  • :notification_config (Types::NotificationConfig)

    Configurations for sending notifications.

Returns:

See Also:



4972
4973
4974
4975
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4972

def send_command(params = {}, options = {})
  req = build_request(:send_command, params)
  req.send_request(options)
end

#start_automation_execution(params = {}) ⇒ Types::StartAutomationExecutionResult

Initiates execution of an Automation document.

Examples:

Request syntax with placeholder values


resp = client.start_automation_execution({
  document_name: "DocumentARN", # required
  document_version: "DocumentVersion",
  parameters: {
    "AutomationParameterKey" => ["AutomationParameterValue"],
  },
  client_token: "IdempotencyToken",
})

Response structure


resp.automation_execution_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :document_name (required, String)

    The name of the Automation document to use for this execution.

  • :document_version (String)

    The version of the Automation document to use for this execution.

  • :parameters (Hash<String,Array>)

    A key-value map of execution parameters, which match the declared parameters in the Automation document.

  • :client_token (String)

    User-provided idempotency token. The token must be unique, is case insensitive, enforces the UUID format, and can't be reused.

Returns:

See Also:



5016
5017
5018
5019
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 5016

def start_automation_execution(params = {}, options = {})
  req = build_request(:start_automation_execution, params)
  req.send_request(options)
end

#stop_automation_execution(params = {}) ⇒ Struct

Stop an Automation that is currently executing.

Examples:

Request syntax with placeholder values


resp = client.stop_automation_execution({
  automation_execution_id: "AutomationExecutionId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :automation_execution_id (required, String)

    The execution ID of the Automation to stop.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



5038
5039
5040
5041
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 5038

def stop_automation_execution(params = {}, options = {})
  req = build_request(:stop_automation_execution, params)
  req.send_request(options)
end

#update_association(params = {}) ⇒ Types::UpdateAssociationResult

Updates an association. You can update the association name and version, the document version, schedule, parameters, and Amazon S3 output.

Examples:

Request syntax with placeholder values


resp = client.update_association({
  association_id: "AssociationId", # required
  parameters: {
    "ParameterName" => ["ParameterValue"],
  },
  document_version: "DocumentVersion",
  schedule_expression: "ScheduleExpression",
  output_location: {
    s3_location: {
      output_s3_region: "S3Region",
      output_s3_bucket_name: "S3BucketName",
      output_s3_key_prefix: "S3KeyPrefix",
    },
  },
  name: "DocumentName",
  targets: [
    {
      key: "TargetKey",
      values: ["TargetValue"],
    },
  ],
  association_name: "AssociationName",
  association_version: "AssociationVersion",
})

Response structure


resp.association_description.name #=> String
resp.association_description.instance_id #=> String
resp.association_description.association_version #=> String
resp.association_description.date #=> Time
resp.association_description.last_update_association_date #=> Time
resp.association_description.status.date #=> Time
resp.association_description.status.name #=> String, one of "Pending", "Success", "Failed"
resp.association_description.status.message #=> String
resp.association_description.status.additional_info #=> String
resp.association_description.overview.status #=> String
resp.association_description.overview.detailed_status #=> String
resp.association_description.overview.association_status_aggregated_count #=> Hash
resp.association_description.overview.association_status_aggregated_count["StatusName"] #=> Integer
resp.association_description.document_version #=> String
resp.association_description.parameters #=> Hash
resp.association_description.parameters["ParameterName"] #=> Array
resp.association_description.parameters["ParameterName"][0] #=> String
resp.association_description.association_id #=> String
resp.association_description.targets #=> Array
resp.association_description.targets[0].key #=> String
resp.association_description.targets[0].values #=> Array
resp.association_description.targets[0].values[0] #=> String
resp.association_description.schedule_expression #=> String
resp.association_description.output_location.s3_location.output_s3_region #=> String
resp.association_description.output_location.s3_location.output_s3_bucket_name #=> String
resp.association_description.output_location.s3_location.output_s3_key_prefix #=> String
resp.association_description.last_execution_date #=> Time
resp.association_description.last_successful_execution_date #=> Time
resp.association_description.association_name #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :association_id (required, String)

    The ID of the association you want to update.

  • :parameters (Hash<String,Array>)

    The parameters you want to update for the association. If you create a parameter using Parameter Store, you can reference the parameter using {\{ssm:parameter-name\}\}

  • :document_version (String)

    The document version you want update for the association.

  • :schedule_expression (String)

    The cron expression used to schedule the association that you want to update.

  • :output_location (