Class: Aws::SSM::Client

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

Overview

An API client for SSM. To construct a client, you need to configure a :region and :credentials.

client = Aws::SSM::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

For details on configuring region and credentials see the developer guide.

See #initialize for a full list of supported configuration options.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #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(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :plugins (Array<Seahorse::Client::Plugin>) — default: []]

    A list of plugins to apply to the client. Each plugin is either a class name or an instance of a plugin class.

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::SharedCredentials - Used for loading static credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    • Aws::AssumeRoleWebIdentityCredentials - Used when you need to assume a role after providing credentials via the web.

    • Aws::SSOCredentials - Used for loading credentials from AWS SSO using an access token generated from aws login.

    • Aws::ProcessCredentials - Used for loading credentials from a process that outputs to stdout.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::ECSCredentials - Used for loading credentials from instances running in ECS.

    • Aws::CognitoIdentityCredentials - Used for loading credentials from the Cognito Identity service.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]
    • The :access_key_id, :secret_access_key, :session_token, and :account_id options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'], ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
    • ~/.aws/credentials
    • ~/.aws/config
    • EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentials or Aws::ECSCredentials to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED'] to true.
  • :region (required, String)

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is searched for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :account_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in adaptive retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a RetryCapacityNotAvailableError and will not retry instead of sleeping.

  • :client_side_monitoring (Boolean) — default: false

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true

    Used only in standard and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :defaults_mode (String) — default: "legacy"

    See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :disable_request_compression (Boolean) — default: false

    When set to 'true' the request body will not be compressed for supported operations.

  • :endpoint (String, URI::HTTPS, URI::HTTP)

    Normally you should not configure the :endpoint option directly. This is normally constructed from the :region option. Configuring :endpoint is normally reserved for connecting to test or custom endpoints. The endpoint should be a URI formatted like:

    'http://example.com'
    'https://example.com'
    'http://example.com:123'
    
  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false

    When set to true, endpoint discovery will be enabled for operations when available.

  • :ignore_configured_endpoint_urls (Boolean)

    Setting to true disables use of endpoint URLs provided via environment variables and the shared configuration file.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the :logger at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in standard and adaptive retry modes.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :request_min_compression_size_bytes (Integer) — default: 10240

    The minimum size in bytes that triggers compression for request bodies. The value must be non-negative integer value between 0 and 10485780 bytes inclusive.

  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the legacy retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the legacy retry mode.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the legacy retry mode.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    • legacy - The pre-existing retry behavior. This is default value if no retry mode is provided.

    • standard - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • adaptive - An experimental retry mode that includes all the functionality of standard mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

  • :sdk_ua_app_id (String)

    A unique and opaque application ID that is appended to the User-Agent header as app/sdk_ua_app_id. It should have a maximum length of 50. This variable is sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.

  • :secret_access_key (String)
  • :session_token (String)
  • :sigv4a_signing_region_set (Array)

    A list of regions that should be signed with SigV4a signing. When not passed, a default :sigv4a_signing_region_set is searched for in the following locations:

    • Aws.config[:sigv4a_signing_region_set]
    • ENV['AWS_SIGV4A_SIGNING_REGION_SET']
    • ~/.aws/config
  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disables response data type conversions. The request parameters hash must be formatted exactly as the API expects.This option is useful when you want to ensure the highest level of performance by avoiding overhead of walking request parameters and response data structures.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :telemetry_provider (Aws::Telemetry::TelemetryProviderBase) — default: Aws::Telemetry::NoOpTelemetryProvider

    Allows you to provide a telemetry provider, which is used to emit telemetry data. By default, uses NoOpTelemetryProvider which will not record or emit any telemetry data. The SDK supports the following telemetry providers:

    • OpenTelemetry (OTel) - To use the OTel provider, install and require the opentelemetry-sdk gem and then, pass in an instance of a Aws::Telemetry::OTelProvider for telemetry provider.
  • :token_provider (Aws::TokenProvider)

    A Bearer Token Provider. This can be an instance of any one of the following classes:

    • Aws::StaticTokenProvider - Used for configuring static, non-refreshing tokens.

    • Aws::SSOTokenProvider - Used for loading tokens from AWS SSO using an access token generated from aws login.

    When :token_provider is not configured directly, the Aws::TokenProviderChain will be used to search for tokens configured for your profile in shared configuration files.

  • :use_dualstack_endpoint (Boolean)

    When set to true, dualstack enabled endpoints (with .aws TLD) will be used if available.

  • :use_fips_endpoint (Boolean)

    When set to true, fips compatible endpoints will be used if available. When a fips region is used, the region is normalized and this config is set to true.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request.

  • :endpoint_provider (Aws::SSM::EndpointProvider)

    The endpoint provider used to resolve endpoints. Any object that responds to #resolve_endpoint(parameters) where parameters is a Struct similar to Aws::SSM::EndpointParameters.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_open_timeout (Float) — default: 15

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_read_timeout (Float) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_wire_trace (Boolean) — default: false

    When true, HTTP debug output will be sent to the :logger.

  • :on_chunk_received (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the response body is received. It provides three arguments: the chunk, the number of bytes received, and the total number of bytes in the response (or nil if the server did not send a content-length).

  • :on_chunk_sent (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the request body is sent. It provides three arguments: the chunk, the number of bytes read from the body, and the total number of bytes in the body.

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_store (String)

    Sets the X509::Store to verify peer certificate.

  • :ssl_cert (OpenSSL::X509::Certificate)

    Sets a client certificate when creating http connections.

  • :ssl_key (OpenSSL::PKey)

    Sets a client key when creating http connections.

  • :ssl_timeout (Float)

    Sets the SSL timeout in seconds

  • :ssl_verify_peer (Boolean) — default: true

    When true, SSL peer certificates are verified when establishing a connection.



451
452
453
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 451

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 automations, documents, managed nodes, 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 nodes that helps you track each node's owner and stack level. For example:

  • Key=Owner,Value=DbAdmin

  • Key=Owner,Value=SysAdmin

  • Key=Owner,Value=Dev

  • Key=Stack,Value=Production

  • Key=Stack,Value=Pre-Production

  • Key=Stack,Value=Test

Most resources can have a maximum of 50 tags. Automations can have a maximum of 5 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 and are interpreted strictly as a string of characters.

For more information about using tags with Amazon Elastic Compute Cloud (Amazon EC2) instances, see Tag 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, OpsItem, OpsMetadata, Automation, Association
  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.

    The ManagedInstance type for this API operation is for on-premises managed nodes. You must specify the name of the managed node in the following format: mi-ID_number. For example, mi-1a2b3c4d5e6f.

  • :resource_id (required, String)

    The resource ID you want to tag.

    Use the ID of the resource. Here are some examples:

    MaintenanceWindow: mw-012345abcde

    PatchBaseline: pb-012345abcde

    Automation: example-c160-4567-8519-012345abcde

    OpsMetadata object: ResourceID for tagging is created from the Amazon Resource Name (ARN) for the object. Specifically, ResourceID is created from the strings that come after the word opsmetadata in the ARN. For example, an OpsMetadata object with an ARN of arn:aws:ssm:us-east-2:1234567890:opsmetadata/aws/ssm/MyGroup/appmanager has a ResourceID of either aws/ssm/MyGroup/appmanager or /aws/ssm/MyGroup/appmanager.

    For the Document and Parameter values, use the name of the resource. If you're tagging a shared document, you must use the full ARN of the document.

    ManagedInstance: mi-012345abcde

    The ManagedInstance type for this API operation is only for on-premises managed nodes. You must specify the name of the managed node in the following format: mi-ID_number. For example, mi-1a2b3c4d5e6f.

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

    One or more tags. The value parameter is required.

    Don't enter personally identifiable information in this field.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



561
562
563
564
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 561

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

Associates a related item to a Systems Manager OpsCenter OpsItem. For example, you can associate an Incident Manager incident or analysis with an OpsItem. Incident Manager and OpsCenter are capabilities of Amazon Web Services Systems Manager.

Examples:

Request syntax with placeholder values


resp = client.associate_ops_item_related_item({
  ops_item_id: "OpsItemId", # required
  association_type: "OpsItemRelatedItemAssociationType", # required
  resource_type: "OpsItemRelatedItemAssociationResourceType", # required
  resource_uri: "OpsItemRelatedItemAssociationResourceUri", # required
})

Response structure


resp.association_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :ops_item_id (required, String)

    The ID of the OpsItem to which you want to associate a resource as a related item.

  • :association_type (required, String)

    The type of association that you want to create between an OpsItem and a resource. OpsCenter supports IsParentOf and RelatesTo association types.

  • :resource_type (required, String)

    The type of resource that you want to associate with an OpsItem. OpsCenter supports the following types:

    AWS::SSMIncidents::IncidentRecord: an Incident Manager incident.

    AWS::SSM::Document: a Systems Manager (SSM) document.

  • :resource_uri (required, String)

    The Amazon Resource Name (ARN) of the Amazon Web Services resource that you want to associate with the OpsItem.

Returns:

See Also:



613
614
615
616
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 613

def associate_ops_item_related_item(params = {}, options = {})
  req = build_request(:associate_ops_item_related_item, 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 managed node IDs on which you want to cancel the command. If not provided, the command is canceled on every node on which it was requested.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



643
644
645
646
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 643

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

#cancel_maintenance_window_execution(params = {}) ⇒ Types::CancelMaintenanceWindowExecutionResult

Stops a maintenance window execution that is already in progress and cancels any tasks in the window that haven't already starting running. Tasks already in progress will continue to completion.

Examples:

Request syntax with placeholder values


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

Response structure


resp.window_execution_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :window_execution_id (required, String)

    The ID of the maintenance window execution to stop.

Returns:

See Also:



673
674
675
676
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 673

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

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

Generates an activation code and activation ID you can use to register your on-premises servers, edge devices, or virtual machine (VM) with Amazon Web Services Systems Manager. Registering these machines with Systems Manager makes it possible to manage them using Systems Manager capabilities. You use the activation code and ID when installing SSM Agent on machines in your hybrid environment. For more information about requirements for managing on-premises machines using Systems Manager, see Using Amazon Web Services Systems Manager in hybrid and multicloud environments in the Amazon Web Services Systems Manager User Guide.

Amazon Elastic Compute Cloud (Amazon EC2) instances, edge devices, and on-premises servers and VMs that are configured for Systems Manager are all called managed nodes.

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,
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  registration_metadata: [
    {
      key: "RegistrationMetadataKey", # required
      value: "RegistrationMetadataValue", # required
    },
  ],
})

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :description (String)

    A user-defined description of the resource that you want to register with Systems Manager.

    Don't enter personally identifiable information in this field.

  • :default_instance_name (String)

    The name of the registered, managed node as it will appear in the Amazon Web Services Systems Manager console or when you use the Amazon Web Services command line tools to list Systems Manager resources.

    Don't enter personally identifiable information in this field.

  • :iam_role (required, String)

    The name of the Identity and Access Management (IAM) role that you want to assign to the managed node. This IAM role must provide AssumeRole permissions for the Amazon Web Services Systems Manager service principal ssm.amazonaws.com. For more information, see Create the IAM service role required for Systems Manager in a hybrid and multicloud environments in the Amazon Web Services Systems Manager User Guide.

    You can't specify an IAM service-linked role for this parameter. You must create a unique role.

  • :registration_limit (Integer)

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

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

    The date by which this activation request should expire, in timestamp format, such as "2024-07-07T00:00:00". You can specify a date up to 30 days in advance. If you don't provide an expiration date, the activation code expires in 24 hours.

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

    Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag an activation to identify which servers or virtual machines (VMs) in your on-premises environment you intend to activate. In this case, you could specify the following key-value pairs:

    • Key=OS,Value=Windows

    • Key=Environment,Value=Production

    When you install SSM Agent on your on-premises servers and VMs, you specify an activation ID and code. When you specify the activation ID and code, tags assigned to the activation are automatically applied to the on-premises servers or VMs.

    You can't add tags to or delete tags from an existing activation. You can tag your on-premises servers, edge devices, and VMs after they connect to Systems Manager for the first time and are assigned a managed node ID. This means they are listed in the Amazon Web Services Systems Manager console with an ID that is prefixed with "mi-". For information about how to add tags to your managed nodes, see AddTagsToResource. For information about how to remove tags from your managed nodes, see RemoveTagsFromResource.

  • :registration_metadata (Array<Types::RegistrationMetadataItem>)

    Reserved for internal use.

Returns:

See Also:



805
806
807
808
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 805

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

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

A State Manager association defines the state that you want to maintain on your managed nodes. For example, an association can specify that anti-virus software must be installed and running on your managed nodes, or that certain ports must be closed. For static targets, the association specifies a schedule for when the configuration is reapplied. For dynamic targets, such as an Amazon Web Services resource group or an Amazon Web Services autoscaling group, State Manager, a capability of Amazon Web Services Systems Manager applies the configuration when new managed nodes are added to the group. The association also specifies actions to take when applying the configuration. For example, an association for anti-virus software might run once a day. If the software isn't installed, then State Manager installs it. If the software is installed, but the service isn't running, then the association might instruct State Manager to start the service.

Examples:

Request syntax with placeholder values


resp = client.create_association({
  name: "DocumentARN", # 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",
  automation_target_parameter_name: "AutomationTargetParameterName",
  max_errors: "MaxErrors",
  max_concurrency: "MaxConcurrency",
  compliance_severity: "CRITICAL", # accepts CRITICAL, HIGH, MEDIUM, LOW, UNSPECIFIED
  sync_compliance: "AUTO", # accepts AUTO, MANUAL
  apply_only_at_cron_interval: false,
  calendar_names: ["CalendarNameOrARN"],
  target_locations: [
    {
      accounts: ["Account"],
      regions: ["Region"],
      target_location_max_concurrency: "MaxConcurrency",
      target_location_max_errors: "MaxErrors",
      execution_role_name: "ExecutionRoleName",
      target_location_alarm_configuration: {
        ignore_poll_alarm_failure: false,
        alarms: [ # required
          {
            name: "AlarmName", # required
          },
        ],
      },
      include_child_organization_units: false,
      exclude_accounts: ["ExcludeAccount"],
      targets: [
        {
          key: "TargetKey",
          values: ["TargetValue"],
        },
      ],
      targets_max_concurrency: "MaxConcurrency",
      targets_max_errors: "MaxErrors",
    },
  ],
  schedule_offset: 1,
  duration: 1,
  target_maps: [
    {
      "TargetMapKey" => ["TargetMapValue"],
    },
  ],
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  alarm_configuration: {
    ignore_poll_alarm_failure: false,
    alarms: [ # required
      {
        name: "AlarmName", # required
      },
    ],
  },
})

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.automation_target_parameter_name #=> 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
resp.association_description.max_errors #=> String
resp.association_description.max_concurrency #=> String
resp.association_description.compliance_severity #=> String, one of "CRITICAL", "HIGH", "MEDIUM", "LOW", "UNSPECIFIED"
resp.association_description.sync_compliance #=> String, one of "AUTO", "MANUAL"
resp.association_description.apply_only_at_cron_interval #=> Boolean
resp.association_description.calendar_names #=> Array
resp.association_description.calendar_names[0] #=> String
resp.association_description.target_locations #=> Array
resp.association_description.target_locations[0].accounts #=> Array
resp.association_description.target_locations[0].accounts[0] #=> String
resp.association_description.target_locations[0].regions #=> Array
resp.association_description.target_locations[0].regions[0] #=> String
resp.association_description.target_locations[0].target_location_max_concurrency #=> String
resp.association_description.target_locations[0].target_location_max_errors #=> String
resp.association_description.target_locations[0].execution_role_name #=> String
resp.association_description.target_locations[0].target_location_alarm_configuration.ignore_poll_alarm_failure #=> Boolean
resp.association_description.target_locations[0].target_location_alarm_configuration.alarms #=> Array
resp.association_description.target_locations[0].target_location_alarm_configuration.alarms[0].name #=> String
resp.association_description.target_locations[0].include_child_organization_units #=> Boolean
resp.association_description.target_locations[0].exclude_accounts #=> Array
resp.association_description.target_locations[0].exclude_accounts[0] #=> String
resp.association_description.target_locations[0].targets #=> Array
resp.association_description.target_locations[0].targets[0].key #=> String
resp.association_description.target_locations[0].targets[0].values #=> Array
resp.association_description.target_locations[0].targets[0].values[0] #=> String
resp.association_description.target_locations[0].targets_max_concurrency #=> String
resp.association_description.target_locations[0].targets_max_errors #=> String
resp.association_description.schedule_offset #=> Integer
resp.association_description.duration #=> Integer
resp.association_description.target_maps #=> Array
resp.association_description.target_maps[0] #=> Hash
resp.association_description.target_maps[0]["TargetMapKey"] #=> Array
resp.association_description.target_maps[0]["TargetMapKey"][0] #=> String
resp.association_description.alarm_configuration.ignore_poll_alarm_failure #=> Boolean
resp.association_description.alarm_configuration.alarms #=> Array
resp.association_description.alarm_configuration.alarms[0].name #=> String
resp.association_description.triggered_alarms #=> Array
resp.association_description.triggered_alarms[0].name #=> String
resp.association_description.triggered_alarms[0].state #=> String, one of "UNKNOWN", "ALARM"

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the SSM Command document or Automation runbook that contains the configuration information for the managed node.

    You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another Amazon Web Services account.

    For Systems Manager documents (SSM documents) that are shared with you from other Amazon Web Services accounts, you must specify the complete SSM document ARN, in the following format:

    arn:partition:ssm:region:account-id:document/document-name

    For example:

    arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document

    For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need to specify the document name. For example, AWS-ApplyPatchBaseline or My-Document.

  • :document_version (String)

    The document version you want to associate with the targets. Can be a specific version or the default version.

    State Manager doesn't support running associations that use a new version of a document if that document is shared from another account. State Manager always runs the default version of a document if shared from another account, even though the Systems Manager console shows that a new version was processed. If you want to run an association using a new version of a document shared form another account, you must set the document version to default.

  • :instance_id (String)

    The managed node ID.

    InstanceId has been deprecated. To specify a managed node ID for an association, use the Targets parameter. Requests that include the parameter InstanceID with Systems Manager documents (SSM documents) that use schema version 2.0 or later will fail. In addition, if you use the parameter InstanceId, you can't use the parameters AssociationName, DocumentVersion, MaxErrors, MaxConcurrency, OutputLocation, or ScheduleExpression. To use these parameters, you must use the Targets parameter.

  • :parameters (Hash<String,Array>)

    The parameters for the runtime configuration of the document.

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

    The targets for the association. You can target managed nodes by using tags, Amazon Web Services resource groups, all managed nodes in an Amazon Web Services account, or individual managed node IDs. You can target all managed nodes in an Amazon Web Services account by specifying the InstanceIds key with a value of *. For more information about choosing targets for an association, see Understanding targets and rate controls in State Manager associations in the Amazon Web Services Systems Manager User Guide.

  • :schedule_expression (String)

    A cron expression when the association will be applied to the targets.

  • :output_location (Types::InstanceAssociationOutputLocation)

    An Amazon Simple Storage Service (Amazon S3) bucket where you want to store the output details of the request.

  • :association_name (String)

    Specify a descriptive name for the association.

  • :automation_target_parameter_name (String)

    Choose the parameter that will define how your automation will branch out. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a capability of Amazon Web Services Systems Manager.

  • :max_errors (String)

    The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify either an absolute number of errors, for example 10, or a percentage of the target set, for example 10%. If you specify 3, for example, the system stops sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set MaxError to 10%, then the system stops sending the request when the sixth error is received.

    Executions that are already running an association when MaxErrors is reached are allowed to complete, but some of these executions may fail as well. If you need to ensure that there won't be more than max-errors failed executions, set MaxConcurrency to 1 so that executions proceed one at a time.

  • :max_concurrency (String)

    The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.

    If a new managed node starts and attempts to run an association while Systems Manager is running MaxConcurrency associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for MaxConcurrency.

  • :compliance_severity (String)

    The severity level to assign to the association.

  • :sync_compliance (String)

    The mode for generating association compliance. You can specify AUTO or MANUAL. In AUTO mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is COMPLIANT. If the association execution doesn't run successfully, the association is NON-COMPLIANT.

    In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API operation. In this case, compliance data isn't managed by State Manager. It is managed by your direct call to the PutComplianceItems API operation.

    By default, all associations use AUTO mode.

  • :apply_only_at_cron_interval (Boolean)

    By default, when you create a new association, the system runs it immediately after it is created and then according to the schedule you specified. Specify this option if you don't want an association to run immediately after you create it. This parameter isn't supported for rate expressions.

  • :calendar_names (Array<String>)

    The names or Amazon Resource Names (ARNs) of the Change Calendar type documents you want to gate your associations under. The associations only run when that change calendar is open. For more information, see Amazon Web Services Systems Manager Change Calendar.

  • :target_locations (Array<Types::TargetLocation>)

    A location is a combination of Amazon Web Services Regions and Amazon Web Services accounts where you want to run the association. Use this action to create an association in multiple Regions and multiple accounts.

  • :schedule_offset (Integer)

    Number of days to wait after the scheduled day to run an association. For example, if you specified a cron schedule of cron(0 0 ? * THU#2 *), you could specify an offset of 3 to run the association each Sunday after the second Thursday of the month. For more information about cron schedules for associations, see Reference: Cron and rate expressions for Systems Manager in the Amazon Web Services Systems Manager User Guide.

    To use offsets, you must specify the ApplyOnlyAtCronInterval parameter. This option tells the system not to run an association immediately after you create it.

  • :duration (Integer)

    The number of hours the association can run before it is canceled. Duration applies to associations that are currently running, and any pending and in progress commands on all targets. If a target was taken offline for the association to run, it is made available again immediately, without a reboot.

    The Duration parameter applies only when both these conditions are true:

    • The association for which you specify a duration is cancelable according to the parameters of the SSM command document or Automation runbook associated with this execution.

    • The command specifies the ApplyOnlyAtCronInterval parameter, which means that the association doesn't run immediately after it is created, but only according to the specified schedule.

  • :target_maps (Array<Hash>)

    A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.

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

    Adds or overwrites one or more tags for a State Manager association. Tags are metadata that you can assign to your Amazon Web Services resources. 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.

  • :alarm_configuration (Types::AlarmConfiguration)

    The details for the CloudWatch alarm you want to apply to an automation or command.

Returns:

See Also:



1191
1192
1193
1194
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 1191

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 Amazon Web Services Systems Manager document (SSM document) with the specified managed nodes or targets.

When you associate a document with one or more managed nodes using IDs or tags, Amazon Web Services Systems Manager Agent (SSM Agent) running on the managed node processes the document and configures the node as specified.

If you associate a document with a managed node that already has an associated document, the system returns the AssociationAlreadyExists exception.

Examples:

Request syntax with placeholder values


resp = client.create_association_batch({
  entries: [ # required
    {
      name: "DocumentARN", # required
      instance_id: "InstanceId",
      parameters: {
        "ParameterName" => ["ParameterValue"],
      },
      automation_target_parameter_name: "AutomationTargetParameterName",
      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",
      max_errors: "MaxErrors",
      max_concurrency: "MaxConcurrency",
      compliance_severity: "CRITICAL", # accepts CRITICAL, HIGH, MEDIUM, LOW, UNSPECIFIED
      sync_compliance: "AUTO", # accepts AUTO, MANUAL
      apply_only_at_cron_interval: false,
      calendar_names: ["CalendarNameOrARN"],
      target_locations: [
        {
          accounts: ["Account"],
          regions: ["Region"],
          target_location_max_concurrency: "MaxConcurrency",
          target_location_max_errors: "MaxErrors",
          execution_role_name: "ExecutionRoleName",
          target_location_alarm_configuration: {
            ignore_poll_alarm_failure: false,
            alarms: [ # required
              {
                name: "AlarmName", # required
              },
            ],
          },
          include_child_organization_units: false,
          exclude_accounts: ["ExcludeAccount"],
          targets: [
            {
              key: "TargetKey",
              values: ["TargetValue"],
            },
          ],
          targets_max_concurrency: "MaxConcurrency",
          targets_max_errors: "MaxErrors",
        },
      ],
      schedule_offset: 1,
      duration: 1,
      target_maps: [
        {
          "TargetMapKey" => ["TargetMapValue"],
        },
      ],
      alarm_configuration: {
        ignore_poll_alarm_failure: false,
        alarms: [ # required
          {
            name: "AlarmName", # required
          },
        ],
      },
    },
  ],
})

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].automation_target_parameter_name #=> 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.successful[0].max_errors #=> String
resp.successful[0].max_concurrency #=> String
resp.successful[0].compliance_severity #=> String, one of "CRITICAL", "HIGH", "MEDIUM", "LOW", "UNSPECIFIED"
resp.successful[0].sync_compliance #=> String, one of "AUTO", "MANUAL"
resp.successful[0].apply_only_at_cron_interval #=> Boolean
resp.successful[0].calendar_names #=> Array
resp.successful[0].calendar_names[0] #=> String
resp.successful[0].target_locations #=> Array
resp.successful[0].target_locations[0].accounts #=> Array
resp.successful[0].target_locations[0].accounts[0] #=> String
resp.successful[0].target_locations[0].regions #=> Array
resp.successful[0].target_locations[0].regions[0] #=> String
resp.successful[0].target_locations[0].target_location_max_concurrency #=> String
resp.successful[0].target_locations[0].target_location_max_errors #=> String
resp.successful[0].target_locations[0].execution_role_name #=> String
resp.successful[0].target_locations[0].target_location_alarm_configuration.ignore_poll_alarm_failure #=> Boolean
resp.successful[0].target_locations[0].target_location_alarm_configuration.alarms #=> Array
resp.successful[0].target_locations[0].target_location_alarm_configuration.alarms[0].name #=> String
resp.successful[0].target_locations[0].include_child_organization_units #=> Boolean
resp.successful[0].target_locations[0].exclude_accounts #=> Array
resp.successful[0].target_locations[0].exclude_accounts[0] #=> String
resp.successful[0].target_locations[0].targets #=> Array
resp.successful[0].target_locations[0].targets[0].key #=> String
resp.successful[0].target_locations[0].targets[0].values #=> Array
resp.successful[0].target_locations[0].targets[0].values[0] #=> String
resp.successful[0].target_locations[0].targets_max_concurrency #=> String
resp.successful[0].target_locations[0].targets_max_errors #=> String
resp.successful[0].schedule_offset #=> Integer
resp.successful[0].duration #=> Integer
resp.successful[0].target_maps #=> Array
resp.successful[0].target_maps[0] #=> Hash
resp.successful[0].target_maps[0]["TargetMapKey"] #=> Array
resp.successful[0].target_maps[0]["TargetMapKey"][0] #=> String
resp.successful[0].alarm_configuration.ignore_poll_alarm_failure #=> Boolean
resp.successful[0].alarm_configuration.alarms #=> Array
resp.successful[0].alarm_configuration.alarms[0].name #=> String
resp.successful[0].triggered_alarms #=> Array
resp.successful[0].triggered_alarms[0].name #=> String
resp.successful[0].triggered_alarms[0].state #=> String, one of "UNKNOWN", "ALARM"
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.automation_target_parameter_name #=> 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].entry.max_errors #=> String
resp.failed[0].entry.max_concurrency #=> String
resp.failed[0].entry.compliance_severity #=> String, one of "CRITICAL", "HIGH", "MEDIUM", "LOW", "UNSPECIFIED"
resp.failed[0].entry.sync_compliance #=> String, one of "AUTO", "MANUAL"
resp.failed[0].entry.apply_only_at_cron_interval #=> Boolean
resp.failed[0].entry.calendar_names #=> Array
resp.failed[0].entry.calendar_names[0] #=> String
resp.failed[0].entry.target_locations #=> Array
resp.failed[0].entry.target_locations[0].accounts #=> Array
resp.failed[0].entry.target_locations[0].accounts[0] #=> String
resp.failed[0].entry.target_locations[0].regions #=> Array
resp.failed[0].entry.target_locations[0].regions[0] #=> String
resp.failed[0].entry.target_locations[0].target_location_max_concurrency #=> String
resp.failed[0].entry.target_locations[0].target_location_max_errors #=> String
resp.failed[0].entry.target_locations[0].execution_role_name #=> String
resp.failed[0].entry.target_locations[0].target_location_alarm_configuration.ignore_poll_alarm_failure #=> Boolean
resp.failed[0].entry.target_locations[0].target_location_alarm_configuration.alarms #=> Array
resp.failed[0].entry.target_locations[0].target_location_alarm_configuration.alarms[0].name #=> String
resp.failed[0].entry.target_locations[0].include_child_organization_units #=> Boolean
resp.failed[0].entry.target_locations[0].exclude_accounts #=> Array
resp.failed[0].entry.target_locations[0].exclude_accounts[0] #=> String
resp.failed[0].entry.target_locations[0].targets #=> Array
resp.failed[0].entry.target_locations[0].targets[0].key #=> String
resp.failed[0].entry.target_locations[0].targets[0].values #=> Array
resp.failed[0].entry.target_locations[0].targets[0].values[0] #=> String
resp.failed[0].entry.target_locations[0].targets_max_concurrency #=> String
resp.failed[0].entry.target_locations[0].targets_max_errors #=> String
resp.failed[0].entry.schedule_offset #=> Integer
resp.failed[0].entry.duration #=> Integer
resp.failed[0].entry.target_maps #=> Array
resp.failed[0].entry.target_maps[0] #=> Hash
resp.failed[0].entry.target_maps[0]["TargetMapKey"] #=> Array
resp.failed[0].entry.target_maps[0]["TargetMapKey"][0] #=> String
resp.failed[0].entry.alarm_configuration.ignore_poll_alarm_failure #=> Boolean
resp.failed[0].entry.alarm_configuration.alarms #=> Array
resp.failed[0].entry.alarm_configuration.alarms[0].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:



1427
1428
1429
1430
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 1427

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 Amazon Web Services Systems Manager (SSM document). An SSM document defines the actions that Systems Manager performs on your managed nodes. For more information about SSM documents, including information about supported schemas, features, and syntax, see Amazon Web Services Systems Manager Documents in the Amazon Web Services Systems Manager User Guide.

Examples:

Request syntax with placeholder values


resp = client.create_document({
  content: "DocumentContent", # required
  requires: [
    {
      name: "DocumentARN", # required
      version: "DocumentVersion",
      require_type: "RequireType",
      version_name: "DocumentVersionName",
    },
  ],
  attachments: [
    {
      key: "SourceUrl", # accepts SourceUrl, S3FileUrl, AttachmentReference
      values: ["AttachmentsSourceValue"],
      name: "AttachmentIdentifier",
    },
  ],
  name: "DocumentName", # required
  display_name: "DocumentDisplayName",
  version_name: "DocumentVersionName",
  document_type: "Command", # accepts Command, Policy, Automation, Session, Package, ApplicationConfiguration, ApplicationConfigurationSchema, DeploymentStrategy, ChangeCalendar, Automation.ChangeTemplate, ProblemAnalysis, ProblemAnalysisTemplate, CloudFormation, ConformancePackTemplate, QuickSetup
  document_format: "YAML", # accepts YAML, JSON, TEXT
  target_type: "TargetType",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

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.display_name #=> String
resp.document_description.version_name #=> String
resp.document_description.owner #=> String
resp.document_description.created_date #=> Time
resp.document_description.status #=> String, one of "Creating", "Active", "Updating", "Deleting", "Failed"
resp.document_description.status_information #=> String
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", "MacOS"
resp.document_description.document_type #=> String, one of "Command", "Policy", "Automation", "Session", "Package", "ApplicationConfiguration", "ApplicationConfigurationSchema", "DeploymentStrategy", "ChangeCalendar", "Automation.ChangeTemplate", "ProblemAnalysis", "ProblemAnalysisTemplate", "CloudFormation", "ConformancePackTemplate", "QuickSetup"
resp.document_description.schema_version #=> String
resp.document_description.latest_version #=> String
resp.document_description.default_version #=> String
resp.document_description.document_format #=> String, one of "YAML", "JSON", "TEXT"
resp.document_description.target_type #=> String
resp.document_description.tags #=> Array
resp.document_description.tags[0].key #=> String
resp.document_description.tags[0].value #=> String
resp.document_description.attachments_information #=> Array
resp.document_description.attachments_information[0].name #=> String
resp.document_description.requires #=> Array
resp.document_description.requires[0].name #=> String
resp.document_description.requires[0].version #=> String
resp.document_description.requires[0].require_type #=> String
resp.document_description.requires[0].version_name #=> String
resp.document_description.author #=> String
resp.document_description.review_information #=> Array
resp.document_description.review_information[0].reviewed_time #=> Time
resp.document_description.review_information[0].status #=> String, one of "APPROVED", "NOT_REVIEWED", "PENDING", "REJECTED"
resp.document_description.review_information[0].reviewer #=> String
resp.document_description.approved_version #=> String
resp.document_description.pending_review_version #=> String
resp.document_description.review_status #=> String, one of "APPROVED", "NOT_REVIEWED", "PENDING", "REJECTED"
resp.document_description.category #=> Array
resp.document_description.category[0] #=> String
resp.document_description.category_enum #=> Array
resp.document_description.category_enum[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :content (required, String)

    The content for the new SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.

    For examples, see the following topics in the Amazon Web Services Systems Manager User Guide.

  • :requires (Array<Types::DocumentRequires>)

    A list of SSM documents required by a document. This parameter is used exclusively by AppConfig. When a user creates an AppConfig configuration in an SSM document, the user must also specify a required document for validation purposes. In this case, an ApplicationConfiguration document requires an ApplicationConfigurationSchema document for validation purposes. For more information, see What is AppConfig? in the AppConfig User Guide.

  • :attachments (Array<Types::AttachmentsSource>)

    A list of key-value pairs that describe attachments to a version of a document.

  • :name (required, String)

    A name for the SSM document.

    You can't use the following strings as document name prefixes. These are reserved by Amazon Web Services for use as document name prefixes:

    • aws

    • amazon

    • amzn

    • AWSEC2

    • AWSConfigRemediation

    • AWSSupport

  • :display_name (String)

    An optional field where you can specify a friendly name for the SSM document. This value can differ for each version of the document. You can update this value at a later time using the UpdateDocument operation.

  • :version_name (String)

    An optional field specifying the version of the artifact you are creating with the document. For example, Release12.1. This value is unique across all versions of a document, and can't be changed.

  • :document_type (String)

    The type of document to create.

    The DeploymentStrategy document type is an internal-use-only document type reserved for AppConfig.

  • :document_format (String)

    Specify the document format for the request. The document format can be JSON, YAML, or TEXT. JSON is the default format.

  • :target_type (String)

    Specify a target type to define the kinds of resources the document can run on. For example, to run a document on EC2 instances, specify the following value: /AWS::EC2::Instance. If you specify a value of '/' the document can run on all types of resources. If you don't specify a value, the document can't run on any resources. For a list of valid resource types, see Amazon Web Services resource and property types reference in the CloudFormation User Guide.

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

    Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag an SSM document to identify the types of targets or the environment where it will run. In this case, you could specify the following key-value pairs:

    • Key=OS,Value=Windows

    • Key=Environment,Value=Production

    To add tags to an existing SSM document, use the AddTagsToResource operation.

Returns:

See Also:



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

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.

The value you specify for Duration determines the specific end time for the maintenance window based on the time it begins. No maintenance window tasks are permitted to start after the resulting endtime minus the number of hours you specify for Cutoff. For example, if the maintenance window starts at 3 PM, the duration is three hours, and the value you specify for Cutoff is one hour, no maintenance window tasks can start after 5 PM.

Examples:

Request syntax with placeholder values


resp = client.create_maintenance_window({
  name: "MaintenanceWindowName", # required
  description: "MaintenanceWindowDescription",
  start_date: "MaintenanceWindowStringDateTime",
  end_date: "MaintenanceWindowStringDateTime",
  schedule: "MaintenanceWindowSchedule", # required
  schedule_timezone: "MaintenanceWindowTimezone",
  schedule_offset: 1,
  duration: 1, # required
  cutoff: 1, # required
  allow_unassociated_targets: false, # required
  client_token: "ClientToken",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

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.

  • :start_date (String)

    The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become active. StartDate allows you to delay activation of the maintenance window until the specified future date.

    When using a rate schedule, if you provide a start date that occurs in the past, the current date and time are used as the start date.

  • :end_date (String)

    The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become inactive. EndDate allows you to set a date and time in the future when the maintenance window will no longer run.

  • :schedule (required, String)

    The schedule of the maintenance window in the form of a cron or rate expression.

  • :schedule_timezone (String)

    The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the Time Zone Database on the IANA website.

  • :schedule_offset (Integer)

    The number of days to wait after the date and time specified by a cron expression before running the maintenance window.

    For example, the following cron expression schedules a maintenance window to run on the third Tuesday of every month at 11:30 PM.

    cron(30 23 ? * TUE#3 *)

    If the schedule offset is 2, the maintenance window won't run until two days later.

  • :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 Amazon Web Services Systems Manager stops scheduling new tasks for execution.

  • :allow_unassociated_targets (required, Boolean)

    Enables a maintenance window task to run on managed nodes, even if you haven't registered those nodes as targets. If enabled, then you must specify the unregistered managed nodes (by node 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.**

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

    Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a maintenance window to identify the type of tasks it will run, the types of targets, and the environment it will run in. In this case, you could specify the following key-value pairs:

    • Key=TaskType,Value=AgentUpdate

    • Key=OS,Value=Windows

    • Key=Environment,Value=Production

    To add tags to an existing maintenance window, use the AddTagsToResource operation.

Returns:

See Also:



1788
1789
1790
1791
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 1788

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

#create_ops_item(params = {}) ⇒ Types::CreateOpsItemResponse

Creates a new OpsItem. You must have permission in Identity and Access Management (IAM) to create a new OpsItem. For more information, see Set up OpsCenter in the Amazon Web Services Systems Manager User Guide.

Operations engineers and IT professionals use Amazon Web Services Systems Manager OpsCenter to view, investigate, and remediate operational issues impacting the performance and health of their Amazon Web Services resources. For more information, see Amazon Web Services Systems Manager OpsCenter in the Amazon Web Services Systems Manager User Guide.

Examples:

Request syntax with placeholder values


resp = client.create_ops_item({
  description: "OpsItemDescription", # required
  ops_item_type: "OpsItemType",
  operational_data: {
    "OpsItemDataKey" => {
      value: "OpsItemDataValueString",
      type: "SearchableString", # accepts SearchableString, String
    },
  },
  notifications: [
    {
      arn: "String",
    },
  ],
  priority: 1,
  related_ops_items: [
    {
      ops_item_id: "String", # required
    },
  ],
  source: "OpsItemSource", # required
  title: "OpsItemTitle", # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  category: "OpsItemCategory",
  severity: "OpsItemSeverity",
  actual_start_time: Time.now,
  actual_end_time: Time.now,
  planned_start_time: Time.now,
  planned_end_time: Time.now,
  account_id: "OpsItemAccountId",
})

Response structure


resp.ops_item_id #=> String
resp.ops_item_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :description (required, String)

    User-defined text that contains information about the OpsItem, in Markdown format.

    Provide enough information so that users viewing this OpsItem for the first time understand the issue.

  • :ops_item_type (String)

    The type of OpsItem to create. Systems Manager supports the following types of OpsItems:

    • /aws/issue

      This type of OpsItem is used for default OpsItems created by OpsCenter.

    • /aws/changerequest

      This type of OpsItem is used by Change Manager for reviewing and approving or rejecting change requests.

    • /aws/insight

      This type of OpsItem is used by OpsCenter for aggregating and reporting on duplicate OpsItems.

  • :operational_data (Hash<String,Types::OpsItemDataValue>)

    Operational data is custom data that provides useful reference details about the OpsItem. For example, you can specify log files, error strings, license keys, troubleshooting tips, or other relevant data. You enter operational data as key-value pairs. The key has a maximum length of 128 characters. The value has a maximum size of 20 KB.

    Operational data keys can't begin with the following: amazon, aws, amzn, ssm, /amazon, /aws, /amzn, /ssm.

    You can choose to make the data searchable by other users in the account or you can restrict search access. Searchable data means that all users with access to the OpsItem Overview page (as provided by the DescribeOpsItems API operation) can view and search on the specified data. Operational data that isn't searchable is only viewable by users who have access to the OpsItem (as provided by the GetOpsItem API operation).

    Use the /aws/resources key in OperationalData to specify a related resource in the request. Use the /aws/automations key in OperationalData to associate an Automation runbook with the OpsItem. To view Amazon Web Services CLI example commands that use these keys, see Create OpsItems manually in the Amazon Web Services Systems Manager User Guide.

  • :notifications (Array<Types::OpsItemNotification>)

    The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is edited or changed.

  • :priority (Integer)

    The importance of this OpsItem in relation to other OpsItems in the system.

  • :related_ops_items (Array<Types::RelatedOpsItem>)

    One or more OpsItems that share something in common with the current OpsItems. For example, related OpsItems can include OpsItems with similar error messages, impacted resources, or statuses for the impacted resource.

  • :source (required, String)

    The origin of the OpsItem, such as Amazon EC2 or Systems Manager.

    The source name can't contain the following strings: aws, amazon, and amzn.

  • :title (required, String)

    A short heading that describes the nature of the OpsItem and the impacted resource.

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

    Optional metadata that you assign to a resource.

    Tags use a key-value pair. For example:

    Key=Department,Value=Finance

    To add tags to a new OpsItem, a user must have IAM permissions for both the ssm:CreateOpsItems operation and the ssm:AddTagsToResource operation. To add tags to an existing OpsItem, use the AddTagsToResource operation.

  • :category (String)

    Specify a category to assign to an OpsItem.

  • :severity (String)

    Specify a severity to assign to an OpsItem.

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

    The time a runbook workflow started. Currently reported only for the OpsItem type /aws/changerequest.

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

    The time a runbook workflow ended. Currently reported only for the OpsItem type /aws/changerequest.

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

    The time specified in a change request for a runbook workflow to start. Currently supported only for the OpsItem type /aws/changerequest.

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

    The time specified in a change request for a runbook workflow to end. Currently supported only for the OpsItem type /aws/changerequest.

  • :account_id (String)

    The target Amazon Web Services account where you want to create an OpsItem. To make this call, your account must be configured to work with OpsItems across accounts. For more information, see Set up OpsCenter in the Amazon Web Services Systems Manager User Guide.

Returns:

See Also:



1991
1992
1993
1994
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 1991

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

#create_ops_metadata(params = {}) ⇒ Types::CreateOpsMetadataResult

If you create a new application in Application Manager, Amazon Web Services Systems Manager calls this API operation to specify information about the new application, including the application type.

Examples:

Request syntax with placeholder values


resp = client.({
  resource_id: "OpsMetadataResourceId", # required
  metadata: {
    "MetadataKey" => {
      value: "MetadataValueString",
    },
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp. #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :resource_id (required, String)

    A resource ID for a new Application Manager application.

  • :metadata (Hash<String,Types::MetadataValue>)

    Metadata for a new Application Manager application.

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

    Optional metadata that you assign to a resource. You can specify a maximum of five tags for an OpsMetadata object. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag an OpsMetadata object to identify an environment or target Amazon Web Services Region. In this case, you could specify the following key-value pairs:

    • Key=Environment,Value=Production

    • Key=Region,Value=us-east-2

Returns:

See Also:



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

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

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

Creates a patch baseline.

For information about valid key-value pairs in PatchFilters for each supported operating system type, see PatchFilter.

Examples:

Request syntax with placeholder values


resp = client.create_patch_baseline({
  operating_system: "WINDOWS", # accepts WINDOWS, AMAZON_LINUX, AMAZON_LINUX_2, AMAZON_LINUX_2022, UBUNTU, REDHAT_ENTERPRISE_LINUX, SUSE, CENTOS, ORACLE_LINUX, DEBIAN, MACOS, RASPBIAN, ROCKY_LINUX, ALMA_LINUX, AMAZON_LINUX_2023
  name: "BaselineName", # required
  global_filters: {
    patch_filters: [ # required
      {
        key: "ARCH", # required, accepts ARCH, ADVISORY_ID, BUGZILLA_ID, PATCH_SET, PRODUCT, PRODUCT_FAMILY, CLASSIFICATION, CVE_ID, EPOCH, MSRC_SEVERITY, NAME, PATCH_ID, SECTION, PRIORITY, REPOSITORY, RELEASE, SEVERITY, SECURITY, VERSION
        values: ["PatchFilterValue"], # required
      },
    ],
  },
  approval_rules: {
    patch_rules: [ # required
      {
        patch_filter_group: { # required
          patch_filters: [ # required
            {
              key: "ARCH", # required, accepts ARCH, ADVISORY_ID, BUGZILLA_ID, PATCH_SET, PRODUCT, PRODUCT_FAMILY, CLASSIFICATION, CVE_ID, EPOCH, MSRC_SEVERITY, NAME, PATCH_ID, SECTION, PRIORITY, REPOSITORY, RELEASE, SEVERITY, SECURITY, VERSION
              values: ["PatchFilterValue"], # required
            },
          ],
        },
        compliance_level: "CRITICAL", # accepts CRITICAL, HIGH, MEDIUM, LOW, INFORMATIONAL, UNSPECIFIED
        approve_after_days: 1,
        approve_until_date: "PatchStringDateTime",
        enable_non_security: false,
      },
    ],
  },
  approved_patches: ["PatchId"],
  approved_patches_compliance_level: "CRITICAL", # accepts CRITICAL, HIGH, MEDIUM, LOW, INFORMATIONAL, UNSPECIFIED
  approved_patches_enable_non_security: false,
  rejected_patches: ["PatchId"],
  rejected_patches_action: "ALLOW_AS_DEPENDENCY", # accepts ALLOW_AS_DEPENDENCY, BLOCK
  description: "BaselineDescription",
  sources: [
    {
      name: "PatchSourceName", # required
      products: ["PatchSourceProduct"], # required
      configuration: "PatchSourceConfiguration", # required
    },
  ],
  client_token: "ClientToken",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

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. 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 include patches in 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.

    For information about accepted formats for lists of approved patches and rejected patches, see Package name formats for approved and rejected patch lists in the Amazon Web Services Systems Manager User Guide.

  • :approved_patches_compliance_level (String)

    Defines the compliance level for approved patches. When an approved patch is reported as missing, this value describes the severity of the compliance violation. The default value is UNSPECIFIED.

  • :approved_patches_enable_non_security (Boolean)

    Indicates whether the list of approved patches includes non-security updates that should be applied to the managed nodes. The default value is false. Applies to Linux managed nodes only.

  • :rejected_patches (Array<String>)

    A list of explicitly rejected patches for the baseline.

    For information about accepted formats for lists of approved patches and rejected patches, see Package name formats for approved and rejected patch lists in the Amazon Web Services Systems Manager User Guide.

  • :rejected_patches_action (String)

    The action for Patch Manager to take on patches included in the RejectedPackages list.

    ALLOW_AS_DEPENDENCY

    Linux and macOS: A package in the rejected patches list is installed only if it is a dependency of another package. It is considered compliant with the patch baseline, and its status is reported as INSTALLED_OTHER. This is the default action if no option is specified.

    Windows Server: Windows Server doesn't support the concept of package dependencies. If a package in the rejected patches list and already installed on the node, its status is reported as INSTALLED_OTHER. Any package not already installed on the node is skipped. This is the default action if no option is specified.

    BLOCK

    All OSs: Packages in the rejected patches list, and packages that include them as dependencies, aren't installed by Patch Manager under any circumstances. If a package was installed before it was added to the rejected patches list, or is installed outside of Patch Manager afterward, it's considered noncompliant with the patch baseline and its status is reported as INSTALLED_REJECTED.

  • :description (String)

    A description of the patch baseline.

  • :sources (Array<Types::PatchSource>)

    Information about the patches to use to update the managed nodes, including target operating systems and source repositories. Applies to Linux managed nodes only.

  • :client_token (String)

    User-provided idempotency token.

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

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

    Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a patch baseline to identify the severity level of patches it specifies and the operating system family it applies to. In this case, you could specify the following key-value pairs:

    • Key=PatchSeverity,Value=Critical

    • Key=OS,Value=Windows

    To add tags to an existing patch baseline, use the AddTagsToResource operation.

Returns:

See Also:



2229
2230
2231
2232
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2229

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

#create_resource_data_sync(params = {}) ⇒ Struct

A resource data sync helps you view data from multiple sources in a single location. Amazon Web Services Systems Manager offers two types of resource data sync: SyncToDestination and SyncFromSource.

You can configure Systems Manager Inventory to use the SyncToDestination type to synchronize Inventory data from multiple Amazon Web Services Regions to a single Amazon Simple Storage Service (Amazon S3) bucket. For more information, see Creatinga a resource data sync for Inventory in the Amazon Web Services Systems Manager User Guide.

You can configure Systems Manager Explorer to use the SyncFromSource type to synchronize operational work items (OpsItems) and operational data (OpsData) from multiple Amazon Web Services Regions to a single Amazon S3 bucket. This type can synchronize OpsItems and OpsData from multiple Amazon Web Services accounts and Amazon Web Services Regions or EntireOrganization by using Organizations. For more information, see Setting up Systems Manager Explorer to display data from multiple accounts and Regions in the Amazon Web Services Systems Manager User Guide.

A resource data sync is an asynchronous operation that returns immediately. After a successful initial sync is completed, the system continuously syncs data. To check the status of a sync, use the ListResourceDataSync.

By default, data isn't 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.

Examples:

Request syntax with placeholder values


resp = client.create_resource_data_sync({
  sync_name: "ResourceDataSyncName", # required
  s3_destination: {
    bucket_name: "ResourceDataSyncS3BucketName", # required
    prefix: "ResourceDataSyncS3Prefix",
    sync_format: "JsonSerDe", # required, accepts JsonSerDe
    region: "ResourceDataSyncS3Region", # required
    awskms_key_arn: "ResourceDataSyncAWSKMSKeyARN",
    destination_data_sharing: {
      destination_data_sharing_type: "ResourceDataSyncDestinationDataSharingType",
    },
  },
  sync_type: "ResourceDataSyncType",
  sync_source: {
    source_type: "ResourceDataSyncSourceType", # required
    aws_organizations_source: {
      organization_source_type: "ResourceDataSyncOrganizationSourceType", # required
      organizational_units: [
        {
          organizational_unit_id: "ResourceDataSyncOrganizationalUnitId",
        },
      ],
    },
    source_regions: ["ResourceDataSyncSourceRegion"], # required
    include_future_regions: false,
    enable_all_ops_data_sources: false,
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :sync_name (required, String)

    A name for the configuration.

  • :s3_destination (Types::ResourceDataSyncS3Destination)

    Amazon S3 configuration details for the sync. This parameter is required if the SyncType value is SyncToDestination.

  • :sync_type (String)

    Specify SyncToDestination to create a resource data sync that synchronizes data to an S3 bucket for Inventory. If you specify SyncToDestination, you must provide a value for S3Destination. Specify SyncFromSource to synchronize data from a single account and multiple Regions, or multiple Amazon Web Services accounts and Amazon Web Services Regions, as listed in Organizations for Explorer. If you specify SyncFromSource, you must provide a value for SyncSource. The default value is SyncToDestination.

  • :sync_source (Types::ResourceDataSyncSource)

    Specify information about the data sources to synchronize. This parameter is required if the SyncType value is SyncFromSource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2330
2331
2332
2333
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2330

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 aren't required to delete an activation. If you delete an activation, you can no longer use it to register additional managed nodes. Deleting an activation doesn't de-register managed nodes. You must manually de-register managed nodes.

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:



2355
2356
2357
2358
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2355

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

#delete_association(params = {}) ⇒ Struct

Disassociates the specified Amazon Web Services Systems Manager document (SSM document) from the specified managed node. If you created the association by using the Targets parameter, then you must delete the association by using the association ID.

When you disassociate a document from a managed node, it doesn't change the configuration of the node. To change the configuration state of a managed node after you disassociate a document, you must create a new document with the desired configuration and associate it with the node.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :name (String)

    The name of the SSM document.

  • :instance_id (String)

    The managed node ID.

    InstanceId has been deprecated. To specify a managed node ID for an association, use the Targets parameter. Requests that include the parameter InstanceID with Systems Manager documents (SSM documents) that use schema version 2.0 or later will fail. In addition, if you use the parameter InstanceId, you can't use the parameters AssociationName, DocumentVersion, MaxErrors, MaxConcurrency, OutputLocation, or ScheduleExpression. To use these parameters, you must use the Targets parameter.

  • :association_id (String)

    The association ID that you want to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2405
2406
2407
2408
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2405

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

#delete_document(params = {}) ⇒ Struct

Deletes the Amazon Web Services Systems Manager document (SSM document) and all managed node associations to the document.

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

Examples:

Request syntax with placeholder values


resp = client.delete_document({
  name: "DocumentName", # required
  document_version: "DocumentVersion",
  version_name: "DocumentVersionName",
  force: false,
})

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the document.

  • :document_version (String)

    The version of the document that you want to delete. If not provided, all versions of the document are deleted.

  • :version_name (String)

    The version name of the document that you want to delete. If not provided, all versions of the document are deleted.

  • :force (Boolean)

    Some SSM document types require that you specify a Force flag before you can delete the document. For example, you must specify a Force flag to delete a document of type ApplicationConfigurationSchema. You can restrict access to the Force flag in an Identity and Access Management (IAM) policy.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2450
2451
2452
2453
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2450

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

#delete_inventory(params = {}) ⇒ Types::DeleteInventoryResult

Delete a custom inventory type or the data associated with a custom Inventory type. Deleting a custom inventory type is also referred to as deleting a custom inventory schema.

Examples:

Request syntax with placeholder values


resp = client.delete_inventory({
  type_name: "InventoryItemTypeName", # required
  schema_delete_option: "DisableSchema", # accepts DisableSchema, DeleteSchema
  dry_run: false,
  client_token: "UUID",
})

Response structure


resp.deletion_id #=> String
resp.type_name #=> String
resp.deletion_summary.total_count #=> Integer
resp.deletion_summary.remaining_count #=> Integer
resp.deletion_summary.summary_items #=> Array
resp.deletion_summary.summary_items[0].version #=> String
resp.deletion_summary.summary_items[0].count #=> Integer
resp.deletion_summary.summary_items[0].remaining_count #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :type_name (required, String)

    The name of the custom inventory type for which you want to delete either all previously collected data or the inventory type itself.

  • :schema_delete_option (String)

    Use the SchemaDeleteOption to delete a custom inventory type (schema). If you don't choose this option, the system only deletes existing inventory data associated with the custom inventory type. Choose one of the following options:

    DisableSchema: If you choose this option, the system ignores all inventory data for the specified version, and any earlier versions. To enable this schema again, you must call the PutInventory operation for a version greater than the disabled version.

    DeleteSchema: This option deletes the specified custom type from the Inventory service. You can recreate the schema later, if you want.

  • :dry_run (Boolean)

    Use this option to view a summary of the deletion request without deleting any data or the data type. This option is useful when you only want to understand what will be deleted. Once you validate that the data to be deleted is what you intend to delete, you can run the same command without specifying the DryRun option.

  • :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:



2520
2521
2522
2523
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2520

def delete_inventory(params = {}, options = {})
  req = build_request(:delete_inventory, 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:



2548
2549
2550
2551
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2548

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

#delete_ops_item(params = {}) ⇒ Struct

Delete an OpsItem. You must have permission in Identity and Access Management (IAM) to delete an OpsItem.

Note the following important information about this operation.

  • Deleting an OpsItem is irreversible. You can't restore a deleted OpsItem.

  • This operation uses an eventual consistency model, which means the system can take a few minutes to complete this operation. If you delete an OpsItem and immediately call, for example, GetOpsItem, the deleted OpsItem might still appear in the response.

  • This operation is idempotent. The system doesn't throw an exception if you repeatedly call this operation for the same OpsItem. If the first call is successful, all additional calls return the same successful response as the first call.

  • This operation doesn't support cross-account calls. A delegated administrator or management account can't delete OpsItems in other accounts, even if OpsCenter has been set up for cross-account administration. For more information about cross-account administration, see Setting up OpsCenter to centrally manage OpsItems across accounts in the Systems Manager User Guide.

Examples:

Request syntax with placeholder values


resp = client.delete_ops_item({
  ops_item_id: "OpsItemId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :ops_item_id (required, String)

    The ID of the OpsItem that you want to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2597
2598
2599
2600
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2597

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

#delete_ops_metadata(params = {}) ⇒ Struct

Delete OpsMetadata related to an application.

Examples:

Request syntax with placeholder values


resp = client.({
  ops_metadata_arn: "OpsMetadataArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :ops_metadata_arn (required, String)

    The Amazon Resource Name (ARN) of an OpsMetadata Object to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2619
2620
2621
2622
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2619

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

#delete_parameter(params = {}) ⇒ Struct

Delete a parameter from the system. After deleting a parameter, wait for at least 30 seconds to create a parameter with the same name.

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.

    You can't enter the Amazon Resource Name (ARN) for a parameter, only the parameter name itself.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



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

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. After deleting a parameter, wait for at least 30 seconds to create a parameter with the same name.

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. After deleting a parameter, wait for at least 30 seconds to create a parameter with the same name.

    You can't enter the Amazon Resource Name (ARN) for a parameter, only the parameter name itself.

Returns:

See Also:



2686
2687
2688
2689
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2686

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:



2714
2715
2716
2717
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2714

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 data on managed nodes are no longer synced to or from the target. Deleting a sync configuration doesn't delete data.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :sync_name (required, String)

    The name of the configuration to delete.

  • :sync_type (String)

    Specify the type of resource data sync to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2742
2743
2744
2745
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2742

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

#delete_resource_policy(params = {}) ⇒ Struct

Deletes a Systems Manager resource policy. A resource policy helps you to define the IAM entity (for example, an Amazon Web Services account) that can manage your Systems Manager resources. The following resources support Systems Manager resource policies.

  • OpsItemGroup - The resource policy for OpsItemGroup enables Amazon Web Services accounts to view and interact with OpsCenter operational work items (OpsItems).

  • Parameter - The resource policy is used to share a parameter with other accounts using Resource Access Manager (RAM). For more information about cross-account sharing of parameters, see Working with shared parameters in the Amazon Web Services Systems Manager User Guide.

Examples:

Request syntax with placeholder values


resp = client.delete_resource_policy({
  resource_arn: "ResourceArnString", # required
  policy_id: "PolicyId", # required
  policy_hash: "PolicyHash", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    Amazon Resource Name (ARN) of the resource to which the policies are attached.

  • :policy_id (required, String)

    The policy ID.

  • :policy_hash (required, String)

    ID of the current policy version. The hash helps to prevent multiple calls from attempting to overwrite a policy.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2791
2792
2793
2794
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2791

def delete_resource_policy(params = {}, options = {})
  req = build_request(:delete_resource_policy, 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 node again at any time. If you don't plan to use Run Command on the server, we suggest uninstalling 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 node when you registered it using the activation process.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2817
2818
2819
2820
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2817

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:



2852
2853
2854
2855
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2852

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 doesn't deregister the target from the maintenance window.

Returns:

See Also:



2892
2893
2894
2895
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2892

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:



2926
2927
2928
2929
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2926

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

Describes details about the activation, such as the date and time the activation was created, its expiration date, the Identity and Access Management (IAM) role assigned to the managed nodes in the activation, and the number of nodes registered by using this activation.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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.activation_list[0].tags #=> Array
resp.activation_list[0].tags[0].key #=> String
resp.activation_list[0].tags[0].value #=> String
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:



2989
2990
2991
2992
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 2989

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

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

Describes the association for the specified target or managed node. If you created the association by using the Targets parameter, then you must retrieve the association by using the association ID.

Examples:

Request syntax with placeholder values


resp = client.describe_association({
  name: "DocumentARN",
  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.automation_target_parameter_name #=> 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
resp.association_description.max_errors #=> String
resp.association_description.max_concurrency #=> String
resp.association_description.compliance_severity #=> String, one of "CRITICAL", "HIGH", "MEDIUM", "LOW", "UNSPECIFIED"
resp.association_description.sync_compliance #=> String, one of "AUTO", "MANUAL"
resp.association_description.apply_only_at_cron_interval #=> Boolean
resp.association_description.calendar_names #=> Array
resp.association_description.calendar_names[0] #=> String
resp.association_description.target_locations #=> Array
resp.association_description.target_locations[0].accounts #=> Array
resp.association_description.target_locations[0].accounts[0] #=> String
resp.association_description.target_locations[0].regions #=> Array
resp.association_description.target_locations[0].regions[0] #=> String
resp.association_description.target_locations[0].target_location_max_concurrency #=> String
resp.association_description.target_locations[0].target_location_max_errors #=> String
resp.association_description.target_locations[0].execution_role_name #=> String
resp.association_description.target_locations[0].target_location_alarm_configuration.ignore_poll_alarm_failure #=> Boolean
resp.association_description.target_locations[0].target_location_alarm_configuration.alarms #=> Array
resp.association_description.target_locations[0].target_location_alarm_configuration.alarms[0].name #=> String
resp.association_description.target_locations[0].include_child_organization_units #=> Boolean
resp.association_description.target_locations[0].exclude_accounts #=> Array
resp.association_description.target_locations[0].exclude_accounts[0] #=> String
resp.association_description.target_locations[0].targets #=> Array
resp.association_description.target_locations[0].targets[0].key #=> String
resp.association_description.target_locations[0].targets[0].values #=> Array
resp.association_description.target_locations[0].targets[0].values[0] #=> String
resp.association_description.target_locations[0].targets_max_concurrency #=> String
resp.association_description.target_locations[0].targets_max_errors #=> String
resp.association_description.schedule_offset #=> Integer
resp.association_description.duration #=> Integer
resp.association_description.target_maps #=> Array
resp.association_description.target_maps[0] #=> Hash
resp.association_description.target_maps[0]["TargetMapKey"] #=> Array
resp.association_description.target_maps[0]["TargetMapKey"][0] #=> String
resp.association_description.alarm_configuration.ignore_poll_alarm_failure #=> Boolean
resp.association_description.alarm_configuration.alarms #=> Array
resp.association_description.alarm_configuration.alarms[0].name #=> String
resp.association_description.triggered_alarms #=> Array
resp.association_description.triggered_alarms[0].name #=> String
resp.association_description.triggered_alarms[0].state #=> String, one of "UNKNOWN", "ALARM"

Parameters:

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

    ({})

Options Hash (params):

  • :name (String)

    The name of the SSM document.

  • :instance_id (String)

    The managed node 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 a managed node, use ListAssociations. To get a list of versions for a specific association, use ListAssociationVersions.

Returns:

See Also:



3103
3104
3105
3106
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3103

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

#describe_association_execution_targets(params = {}) ⇒ Types::DescribeAssociationExecutionTargetsResult

Views information about a specific execution of a specific association.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_association_execution_targets({
  association_id: "AssociationId", # required
  execution_id: "AssociationExecutionId", # required
  filters: [
    {
      key: "Status", # required, accepts Status, ResourceId, ResourceType
      value: "AssociationExecutionTargetsFilterValue", # required
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.association_execution_targets #=> Array
resp.association_execution_targets[0].association_id #=> String
resp.association_execution_targets[0].association_version #=> String
resp.association_execution_targets[0].execution_id #=> String
resp.association_execution_targets[0].resource_id #=> String
resp.association_execution_targets[0].resource_type #=> String
resp.association_execution_targets[0].status #=> String
resp.association_execution_targets[0].detailed_status #=> String
resp.association_execution_targets[0].last_execution_date #=> Time
resp.association_execution_targets[0].output_source.output_source_id #=> String
resp.association_execution_targets[0].output_source.output_source_type #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :association_id (required, String)

    The association ID that includes the execution for which you want to view details.

  • :execution_id (required, String)

    The execution ID for which you want to view details.

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

    Filters for the request. You can specify the following filters and values.

    Status (EQUAL)

    ResourceId (EQUAL)

    ResourceType (EQUAL)

  • :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:



3178
3179
3180
3181
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3178

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

#describe_association_executions(params = {}) ⇒ Types::DescribeAssociationExecutionsResult

Views all executions for a specific association ID.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_association_executions({
  association_id: "AssociationId", # required
  filters: [
    {
      key: "ExecutionId", # required, accepts ExecutionId, Status, CreatedTime
      value: "AssociationExecutionFilterValue", # required
      type: "EQUAL", # required, accepts EQUAL, LESS_THAN, GREATER_THAN
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.association_executions #=> Array
resp.association_executions[0].association_id #=> String
resp.association_executions[0].association_version #=> String
resp.association_executions[0].execution_id #=> String
resp.association_executions[0].status #=> String
resp.association_executions[0].detailed_status #=> String
resp.association_executions[0].created_time #=> Time
resp.association_executions[0].last_execution_date #=> Time
resp.association_executions[0].resource_count_by_status #=> String
resp.association_executions[0].alarm_configuration.ignore_poll_alarm_failure #=> Boolean
resp.association_executions[0].alarm_configuration.alarms #=> Array
resp.association_executions[0].alarm_configuration.alarms[0].name #=> String
resp.association_executions[0].triggered_alarms #=> Array
resp.association_executions[0].triggered_alarms[0].name #=> String
resp.association_executions[0].triggered_alarms[0].state #=> String, one of "UNKNOWN", "ALARM"
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 execution history details.

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

    Filters for the request. You can specify the following filters and values.

    ExecutionId (EQUAL)

    Status (EQUAL)

    CreatedTime (EQUAL, GREATER_THAN, LESS_THAN)

  • :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:



3253
3254
3255
3256
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3253

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

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

Provides details about all active and terminated Automation executions.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_automation_executions({
  filters: [
    {
      key: "DocumentNamePrefix", # required, accepts DocumentNamePrefix, ExecutionStatus, ExecutionId, ParentExecutionId, CurrentAction, StartTimeBefore, StartTimeAfter, AutomationType, TagKey, TargetResourceGroup, AutomationSubtype, OpsItemId
      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", "Cancelling", "Cancelled", "Failed", "PendingApproval", "Approved", "Rejected", "Scheduled", "RunbookInProgress", "PendingChangeCalendarOverride", "ChangeCalendarOverrideApproved", "ChangeCalendarOverrideRejected", "CompletedWithSuccess", "CompletedWithFailure", "Exited"
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.[0].mode #=> String, one of "Auto", "Interactive"
resp.[0].parent_automation_execution_id #=> String
resp.[0].current_step_name #=> String
resp.[0].current_action #=> String
resp.[0].failure_message #=> String
resp.[0].target_parameter_name #=> String
resp.[0].targets #=> Array
resp.[0].targets[0].key #=> String
resp.[0].targets[0].values #=> Array
resp.[0].targets[0].values[0] #=> String
resp.[0].target_maps #=> Array
resp.[0].target_maps[0] #=> Hash
resp.[0].target_maps[0]["TargetMapKey"] #=> Array
resp.[0].target_maps[0]["TargetMapKey"][0] #=> String
resp.[0].resolved_targets.parameter_values #=> Array
resp.[0].resolved_targets.parameter_values[0] #=> String
resp.[0].resolved_targets.truncated #=> Boolean
resp.[0].max_concurrency #=> String
resp.[0].max_errors #=> String
resp.[0].target #=> String
resp.[0].automation_type #=> String, one of "CrossAccount", "Local"
resp.[0].alarm_configuration.ignore_poll_alarm_failure #=> Boolean
resp.[0].alarm_configuration.alarms #=> Array
resp.[0].alarm_configuration.alarms[0].name #=> String
resp.[0].triggered_alarms #=> Array
resp.[0].triggered_alarms[0].name #=> String
resp.[0].triggered_alarms[0].state #=> String, one of "UNKNOWN", "ALARM"
resp.[0].target_locations_url #=> String
resp.[0].automation_subtype #=> String, one of "ChangeRequest"
resp.[0].scheduled_time #=> Time
resp.[0].runbooks #=> Array
resp.[0].runbooks[0].document_name #=> String
resp.[0].runbooks[0].document_version #=> String
resp.[0].runbooks[0].parameters #=> Hash
resp.[0].runbooks[0].parameters["AutomationParameterKey"] #=> Array
resp.[0].runbooks[0].parameters["AutomationParameterKey"][0] #=> String
resp.[0].runbooks[0].target_parameter_name #=> String
resp.[0].runbooks[0].targets #=> Array
resp.[0].runbooks[0].targets[0].key #=> String
resp.[0].runbooks[0].targets[0].values #=> Array
resp.[0].runbooks[0].targets[0].values[0] #=> String
resp.[0].runbooks[0].target_maps #=> Array
resp.[0].runbooks[0].target_maps[0] #=> Hash
resp.[0].runbooks[0].target_maps[0]["TargetMapKey"] #=> Array
resp.[0].runbooks[0].target_maps[0]["TargetMapKey"][0] #=> String
resp.[0].runbooks[0].max_concurrency #=> String
resp.[0].runbooks[0].max_errors #=> String
resp.[0].runbooks[0].target_locations #=> Array
resp.[0].runbooks[0].target_locations[0].accounts #=> Array
resp.[0].runbooks[0].target_locations[0].accounts[0] #=> String
resp.[0].runbooks[0].target_locations[0].regions #=> Array
resp.[0].runbooks[0].target_locations[0].regions[0] #=> String
resp.[0].runbooks[0].target_locations[0].target_location_max_concurrency #=> String
resp.[0].runbooks[0].target_locations[0].target_location_max_errors #=> String
resp.[0].runbooks[0].target_locations[0].execution_role_name #=> String
resp.[0].runbooks[0].target_locations[0].target_location_alarm_configuration.ignore_poll_alarm_failure #=> Boolean
resp.[0].runbooks[0].target_locations[0].target_location_alarm_configuration.alarms #=> Array
resp.[0].runbooks[0].target_locations[0].target_location_alarm_configuration.alarms[0].name #=> String
resp.[0].runbooks[0].target_locations[0].include_child_organization_units #=> Boolean
resp.[0].runbooks[0].target_locations[0].exclude_accounts #=> Array
resp.[0].runbooks[0].target_locations[0].exclude_accounts[0] #=> String
resp.[0].runbooks[0].target_locations[0].targets #=> Array
resp.[0].runbooks[0].target_locations[0].targets[0].key #=> String
resp.[0].runbooks[0].target_locations[0].targets[0].values #=> Array
resp.[0].runbooks[0].target_locations[0].targets[0].values[0] #=> String
resp.[0].runbooks[0].target_locations[0].targets_max_concurrency #=> String
resp.[0].runbooks[0].target_locations[0].targets_max_errors #=> String
resp.[0].ops_item_id #=> String
resp.[0].association_id #=> String
resp.[0].change_request_name #=> 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:



3383
3384
3385
3386
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3383

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

#describe_automation_step_executions(params = {}) ⇒ Types::DescribeAutomationStepExecutionsResult

Information about all active and terminated step executions in an Automation workflow.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_automation_step_executions({
  automation_execution_id: "AutomationExecutionId", # required
  filters: [
    {
      key: "StartTimeBefore", # required, accepts StartTimeBefore, StartTimeAfter, StepExecutionStatus, StepExecutionId, StepName, Action, ParentStepExecutionId, ParentStepIteration, ParentStepIteratorValue
      values: ["StepExecutionFilterValue"], # required
    },
  ],
  next_token: "NextToken",
  max_results: 1,
  reverse_order: false,
})

Response structure


resp.step_executions #=> Array
resp.step_executions[0].step_name #=> String
resp.step_executions[0].action #=> String
resp.step_executions[0].timeout_seconds #=> Integer
resp.step_executions[0].on_failure #=> String
resp.step_executions[0].max_attempts #=> Integer
resp.step_executions[0].execution_start_time #=> Time
resp.step_executions[0].execution_end_time #=> Time
resp.step_executions[0].step_status #=> String, one of "Pending", "InProgress", "Waiting", "Success", "TimedOut", "Cancelling", "Cancelled", "Failed", "PendingApproval", "Approved", "Rejected", "Scheduled", "RunbookInProgress", "PendingChangeCalendarOverride", "ChangeCalendarOverrideApproved", "ChangeCalendarOverrideRejected", "CompletedWithSuccess", "CompletedWithFailure", "Exited"
resp.step_executions[0].response_code #=> String
resp.step_executions[0].inputs #=> Hash
resp.step_executions[0].inputs["String"] #=> String
resp.step_executions[0].outputs #=> Hash
resp.step_executions[0].outputs["AutomationParameterKey"] #=> Array
resp.step_executions[0].outputs["AutomationParameterKey"][0] #=> String
resp.step_executions[0].response #=> String
resp.step_executions[0].failure_message #=> String
resp.step_executions[0].failure_details.failure_stage #=> String
resp.step_executions[0].failure_details.failure_type #=> String
resp.step_executions[0].failure_details.details #=> Hash
resp.step_executions[0].failure_details.details["AutomationParameterKey"] #=> Array
resp.step_executions[0].failure_details.details["AutomationParameterKey"][0] #=> String
resp.step_executions[0].step_execution_id #=> String
resp.step_executions[0].overridden_parameters #=> Hash
resp.step_executions[0].overridden_parameters["AutomationParameterKey"] #=> Array
resp.step_executions[0].overridden_parameters["AutomationParameterKey"][0] #=> String
resp.step_executions[0].is_end #=> Boolean
resp.step_executions[0].next_step #=> String
resp.step_executions[0].is_critical #=> Boolean
resp.step_executions[0].valid_next_steps #=> Array
resp.step_executions[0].valid_next_steps[0] #=> String
resp.step_executions[0].targets #=> Array
resp.step_executions[0].targets[0].key #=> String
resp.step_executions[0].targets[0].values #=> Array
resp.step_executions[0].targets[0].values[0] #=> String
resp.step_executions[0].target_location.accounts #=> Array
resp.step_executions[0].target_location.accounts[0] #=> String
resp.step_executions[0].target_location.regions #=> Array
resp.step_executions[0].target_location.regions[0] #=> String
resp.step_executions[0].target_location.target_location_max_concurrency #=> String
resp.step_executions[0].target_location.target_location_max_errors #=> String
resp.step_executions[0].target_location.execution_role_name #=> String
resp.step_executions[0].target_location.target_location_alarm_configuration.ignore_poll_alarm_failure #=> Boolean
resp.step_executions[0].target_location.target_location_alarm_configuration.alarms #=> Array
resp.step_executions[0].target_location.target_location_alarm_configuration.alarms[0].name #=> String
resp.step_executions[0].target_location.include_child_organization_units #=> Boolean
resp.step_executions[0].target_location.exclude_accounts #=> Array
resp.step_executions[0].target_location.exclude_accounts[0] #=> String
resp.step_executions[0].target_location.targets #=> Array
resp.step_executions[0].target_location.targets[0].key #=> String
resp.step_executions[0].target_location.targets[0].values #=> Array
resp.step_executions[0].target_location.targets[0].values[0] #=> String
resp.step_executions[0].target_location.targets_max_concurrency #=> String
resp.step_executions[0].target_location.targets_max_errors #=> String
resp.step_executions[0].triggered_alarms #=> Array
resp.step_executions[0].triggered_alarms[0].name #=> String
resp.step_executions[0].triggered_alarms[0].state #=> String, one of "UNKNOWN", "ALARM"
resp.step_executions[0].parent_step_details.step_execution_id #=> String
resp.step_executions[0].parent_step_details.step_name #=> String
resp.step_executions[0].parent_step_details.action #=> String
resp.step_executions[0].parent_step_details.iteration #=> Integer
resp.step_executions[0].parent_step_details.iterator_value #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :automation_execution_id (required, String)

    The Automation execution ID for which you want step execution descriptions.

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

    One or more filters to limit the number of step executions returned by the request.

  • :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.

  • :reverse_order (Boolean)

    Indicates whether to list step executions in reverse order by start time. The default value is 'false'.

Returns:

See Also:



3504
3505
3506
3507
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3504

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

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

Lists all patches eligible to be included in a patch baseline.

Currently, DescribeAvailablePatches supports only the Amazon Linux 1, Amazon Linux 2, and Windows Server operating systems.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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.patches[0].advisory_ids #=> Array
resp.patches[0].advisory_ids[0] #=> String
resp.patches[0].bugzilla_ids #=> Array
resp.patches[0].bugzilla_ids[0] #=> String
resp.patches[0].cve_ids #=> Array
resp.patches[0].cve_ids[0] #=> String
resp.patches[0].name #=> String
resp.patches[0].epoch #=> Integer
resp.patches[0].version #=> String
resp.patches[0].release #=> String
resp.patches[0].arch #=> String
resp.patches[0].severity #=> String
resp.patches[0].repository #=> String
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 a key-value pair.

    Windows Server

    Supported keys for Windows Server managed node patches include the following:

    • PATCH_SET

      Sample values: OS | APPLICATION

    • PRODUCT

      Sample values: WindowsServer2012 | Office 2010 | MicrosoftDefenderAntivirus

    • PRODUCT_FAMILY

      Sample values: Windows | Office

    • MSRC_SEVERITY

      Sample values: ServicePacks | Important | Moderate

    • CLASSIFICATION

      Sample values: ServicePacks | SecurityUpdates | DefinitionUpdates

    • PATCH_ID

      Sample values: KB123456 | KB4516046

    Linux

    When specifying filters for Linux patches, you must specify a key-pair for PRODUCT. For example, using the Command Line Interface (CLI), the following command fails:

    aws ssm describe-available-patches --filters Key=CVE_ID,Values=CVE-2018-3615

    However, the following command succeeds:

    aws ssm describe-available-patches --filters Key=PRODUCT,Values=AmazonLinux2018.03 Key=CVE_ID,Values=CVE-2018-3615

    Supported keys for Linux managed node patches include the following:

    • PRODUCT

      Sample values: AmazonLinux2018.03 | AmazonLinux2.0

    • NAME

      Sample values: kernel-headers | samba-python | php

    • SEVERITY

      Sample values: Critical | Important | Medium | Low

    • EPOCH

      Sample values: 0 | 1

    • VERSION

      Sample values: 78.6.1 | 4.10.16

    • RELEASE

      Sample values: 9.56.amzn1 | 1.amzn2

    • ARCH

      Sample values: i686 | x86_64

    • REPOSITORY

      Sample values: Core | Updates

    • ADVISORY_ID

      Sample values: ALAS-2018-1058 | ALAS2-2021-1594

    • CVE_ID

      Sample values: CVE-2018-3615 | CVE-2020-1472

    • BUGZILLA_ID

      Sample values: 1463241

  • :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:



3672
3673
3674
3675
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3672

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 Amazon Web Services Systems Manager document (SSM document).

Examples:

Request syntax with placeholder values


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

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.display_name #=> String
resp.document.version_name #=> String
resp.document.owner #=> String
resp.document.created_date #=> Time
resp.document.status #=> String, one of "Creating", "Active", "Updating", "Deleting", "Failed"
resp.document.status_information #=> String
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", "MacOS"
resp.document.document_type #=> String, one of "Command", "Policy", "Automation", "Session", "Package", "ApplicationConfiguration", "ApplicationConfigurationSchema", "DeploymentStrategy", "ChangeCalendar", "Automation.ChangeTemplate", "ProblemAnalysis", "ProblemAnalysisTemplate", "CloudFormation", "ConformancePackTemplate", "QuickSetup"
resp.document.schema_version #=> String
resp.document.latest_version #=> String
resp.document.default_version #=> String
resp.document.document_format #=> String, one of "YAML", "JSON", "TEXT"
resp.document.target_type #=> String
resp.document.tags #=> Array
resp.document.tags[0].key #=> String
resp.document.tags[0].value #=> String
resp.document.attachments_information #=> Array
resp.document.attachments_information[0].name #=> String
resp.document.requires #=> Array
resp.document.requires[0].name #=> String
resp.document.requires[0].version #=> String
resp.document.requires[0].require_type #=> String
resp.document.requires[0].version_name #=> String
resp.document.author #=> String
resp.document.review_information #=> Array
resp.document.review_information[0].reviewed_time #=> Time
resp.document.review_information[0].status #=> String, one of "APPROVED", "NOT_REVIEWED", "PENDING", "REJECTED"
resp.document.review_information[0].reviewer #=> String
resp.document.approved_version #=> String
resp.document.pending_review_version #=> String
resp.document.review_status #=> String, one of "APPROVED", "NOT_REVIEWED", "PENDING", "REJECTED"
resp.document.category #=> Array
resp.document.category[0] #=> String
resp.document.category_enum #=> Array
resp.document.category_enum[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the SSM document.

  • :document_version (String)

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

  • :version_name (String)

    An optional field specifying the version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.

Returns:

See Also:



3758
3759
3760
3761
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3758

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 Amazon Web Services Systems Manager document (SSM 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 Amazon Web Services 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
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp. #=> Array
resp.[0] #=> String
resp. #=> Array
resp.[0]. #=> String
resp.[0].shared_document_version #=> String
resp.next_token #=> 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.

  • :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:



3813
3814
3815
3816
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3813

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 managed nodes.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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 managed node 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:



3860
3861
3862
3863
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3860

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. Applies to patch baselines for Windows only.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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.advisory_ids #=> Array
resp.effective_patches[0].patch.advisory_ids[0] #=> String
resp.effective_patches[0].patch.bugzilla_ids #=> Array
resp.effective_patches[0].patch.bugzilla_ids[0] #=> String
resp.effective_patches[0].patch.cve_ids #=> Array
resp.effective_patches[0].patch.cve_ids[0] #=> String
resp.effective_patches[0].patch.name #=> String
resp.effective_patches[0].patch.epoch #=> Integer
resp.effective_patches[0].patch.version #=> String
resp.effective_patches[0].patch.release #=> String
resp.effective_patches[0].patch.arch #=> String
resp.effective_patches[0].patch.severity #=> String
resp.effective_patches[0].patch.repository #=> 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:



3932
3933
3934
3935
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3932

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 managed nodes.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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 managed node 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:



3988
3989
3990
3991
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 3988

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

Provides information about one or more of your managed nodes, including the operating system platform, SSM Agent version, association status, and IP address. This operation does not return information for nodes that are either Stopped or Terminated.

If you specify one or more node IDs, the operation returns information for those managed nodes. If you don't specify node IDs, it returns information for all your managed nodes. If you specify a node ID that isn't valid or a node that you don't own, you receive an error.

The IamRole field returned for this API operation is the role assigned to an Amazon EC2 instance configured with a Systems Manager Quick Setup host management configuration or the role assigned to an on-premises managed node.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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", "MacOS"
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", "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.instance_information_list[0].source_id #=> String
resp.instance_information_list[0].source_type #=> String, one of "AWS::EC2::Instance", "AWS::IoT::Thing", "AWS::SSM::ManagedInstance"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

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

    This is a legacy method. We recommend that you don't use this method. Instead, use the Filters data type. Filters enables you to return node information by filtering based on tags applied to managed nodes.

    Attempting to use InstanceInformationFilterList and Filters leads to an exception error.

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

    One or more filters. Use a filter to return a more specific list of managed nodes. You can filter based on tags applied to your managed nodes. Tag filters can't be combined with other filter types. Use this Filters data type instead of InstanceInformationFilterList, which is deprecated.

  • :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. The default value is 10 items.

  • :next_token (String)

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

Returns:

See Also:



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

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 managed nodes.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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].install_override_list #=> 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].installed_pending_reboot_count #=> Integer
resp.instance_patch_states[0].installed_rejected_count #=> Integer
resp.instance_patch_states[0].missing_count #=> Integer
resp.instance_patch_states[0].failed_count #=> Integer
resp.instance_patch_states[0].unreported_not_applicable_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.instance_patch_states[0].last_no_reboot_install_operation_time #=> Time
resp.instance_patch_states[0].reboot_option #=> String, one of "RebootIfNeeded", "NoReboot"
resp.instance_patch_states[0].critical_non_compliant_count #=> Integer
resp.instance_patch_states[0].security_non_compliant_count #=> Integer
resp.instance_patch_states[0].other_non_compliant_count #=> Integer
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :instance_ids (required, Array<String>)

    The ID of the managed node for which 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 managed nodes to return (per page).

Returns:

See Also:



4158
4159
4160
4161
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4158

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 managed nodes in the specified patch group.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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].install_override_list #=> 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].installed_pending_reboot_count #=> Integer
resp.instance_patch_states[0].installed_rejected_count #=> Integer
resp.instance_patch_states[0].missing_count #=> Integer
resp.instance_patch_states[0].failed_count #=> Integer
resp.instance_patch_states[0].unreported_not_applicable_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.instance_patch_states[0].last_no_reboot_install_operation_time #=> Time
resp.instance_patch_states[0].reboot_option #=> String, one of "RebootIfNeeded", "NoReboot"
resp.instance_patch_states[0].critical_non_compliant_count #=> Integer
resp.instance_patch_states[0].security_non_compliant_count #=> Integer
resp.instance_patch_states[0].other_non_compliant_count #=> Integer
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:



4239
4240
4241
4242
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4239

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 managed node and their state relative to the patch baseline being used for the node.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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", "INSTALLED_PENDING_REBOOT", "INSTALLED_REJECTED", "MISSING", "NOT_APPLICABLE", "FAILED"
resp.patches[0].installed_time #=> Time
resp.patches[0].cve_ids #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :instance_id (required, String)

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

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

    Each element in the array is a structure containing a key-value pair.

    Supported keys for DescribeInstancePatchesinclude the following:

    • Classification

      Sample values: Security | SecurityUpdates

    • KBId

      Sample values: KB4480056 | java-1.7.0-openjdk.x86_64

    • Severity

      Sample values: Important | Medium | Low

    • State

      Sample values: Installed | InstalledOther | InstalledPendingReboot

      For lists of all State values, see Patch compliance state values in the Amazon Web Services Systems Manager User Guide.

  • :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:



4325
4326
4327
4328
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4325

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

#describe_instance_properties(params = {}) ⇒ Types::DescribeInstancePropertiesResult

An API operation used by the Systems Manager console to display information about Systems Manager managed nodes.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_instance_properties({
  instance_property_filter_list: [
    {
      key: "InstanceIds", # required, accepts InstanceIds, AgentVersion, PingStatus, PlatformTypes, DocumentName, ActivationIds, IamRole, ResourceType, AssociationStatus
      value_set: ["InstancePropertyFilterValue"], # required
    },
  ],
  filters_with_operator: [
    {
      key: "InstancePropertyStringFilterKey", # required
      values: ["InstancePropertyFilterValue"], # required
      operator: "Equal", # accepts Equal, NotEqual, BeginWith, LessThan, GreaterThan
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.instance_properties #=> Array
resp.instance_properties[0].name #=> String
resp.instance_properties[0].instance_id #=> String
resp.instance_properties[0].instance_type #=> String
resp.instance_properties[0].instance_role #=> String
resp.instance_properties[0].key_name #=> String
resp.instance_properties[0].instance_state #=> String
resp.instance_properties[0].architecture #=> String
resp.instance_properties[0].ip_address #=> String
resp.instance_properties[0].launch_time #=> Time
resp.instance_properties[0].ping_status #=> String, one of "Online", "ConnectionLost", "Inactive"
resp.instance_properties[0].last_ping_date_time #=> Time
resp.instance_properties[0].agent_version #=> String
resp.instance_properties[0].platform_type #=> String, one of "Windows", "Linux", "MacOS"
resp.instance_properties[0].platform_name #=> String
resp.instance_properties[0].platform_version #=> String
resp.instance_properties[0].activation_id #=> String
resp.instance_properties[0].iam_role #=> String
resp.instance_properties[0].registration_date #=> Time
resp.instance_properties[0].resource_type #=> String
resp.instance_properties[0].computer_name #=> String
resp.instance_properties[0].association_status #=> String
resp.instance_properties[0].last_association_execution_date #=> Time
resp.instance_properties[0].last_successful_association_execution_date #=> Time
resp.instance_properties[0].association_overview.detailed_status #=> String
resp.instance_properties[0].association_overview.instance_association_status_aggregated_count #=> Hash
resp.instance_properties[0].association_overview.instance_association_status_aggregated_count["StatusName"] #=> Integer
resp.instance_properties[0].source_id #=> String
resp.instance_properties[0].source_type #=> String, one of "AWS::EC2::Instance", "AWS::IoT::Thing", "AWS::SSM::ManagedInstance"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :instance_property_filter_list (Array<Types::InstancePropertyFilter>)

    An array of instance property filters.

  • :filters_with_operator (Array<Types::InstancePropertyStringFilter>)

    The request filters to use with the operator.

  • :max_results (Integer)

    The maximum number of items to return for the 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 provided by a previous request to use to return the next set of properties.

Returns:

See Also:



4412
4413
4414
4415
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4412

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

#describe_inventory_deletions(params = {}) ⇒ Types::DescribeInventoryDeletionsResult

Describes a specific delete inventory operation.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_inventory_deletions({
  deletion_id: "UUID",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.inventory_deletions #=> Array
resp.inventory_deletions[0].deletion_id #=> String
resp.inventory_deletions[0].type_name #=> String
resp.inventory_deletions[0].deletion_start_time #=> Time
resp.inventory_deletions[0].last_status #=> String, one of "InProgress", "Complete"
resp.inventory_deletions[0].last_status_message #=> String
resp.inventory_deletions[0].deletion_summary.total_count #=> Integer
resp.inventory_deletions[0].deletion_summary.remaining_count #=> Integer
resp.inventory_deletions[0].deletion_summary.summary_items #=> Array
resp.inventory_deletions[0].deletion_summary.summary_items[0].version #=> String
resp.inventory_deletions[0].deletion_summary.summary_items[0].count #=> Integer
resp.inventory_deletions[0].deletion_summary.summary_items[0].remaining_count #=> Integer
resp.inventory_deletions[0].last_status_update_time #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :deletion_id (String)

    Specify the delete inventory ID for which you want information. This ID was returned by the DeleteInventory operation.

  • :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:



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

def describe_inventory_deletions(params = {}, options = {})
  req = build_request(:describe_inventory_deletions, 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 run as part of a maintenance window execution.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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:



4541
4542
4543
4544
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4541

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 run.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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.window_execution_task_identities[0].alarm_configuration.ignore_poll_alarm_failure #=> Boolean
resp.window_execution_task_identities[0].alarm_configuration.alarms #=> Array
resp.window_execution_task_identities[0].alarm_configuration.alarms[0].name #=> String
resp.window_execution_task_identities[0].triggered_alarms #=> Array
resp.window_execution_task_identities[0].triggered_alarms[0].name #=> String
resp.window_execution_task_identities[0].triggered_alarms[0].state #=> String, one of "UNKNOWN", "ALARM"
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:



4612
4613
4614
4615
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4612

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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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. A string between 1 and 128 characters. Supported keys include ExecutedBefore and ExecutedAfter.

    • Values. An array of strings, each between 1 and 256 characters. Supported values are date/time strings in a valid ISO 8601 date/time format, such as 2024-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:



4680
4681
4682
4683
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4680

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

#describe_maintenance_window_schedule(params = {}) ⇒ Types::DescribeMaintenanceWindowScheduleResult

Retrieves information about upcoming executions of a maintenance window.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_maintenance_window_schedule({
  window_id: "MaintenanceWindowId",
  targets: [
    {
      key: "TargetKey",
      values: ["TargetValue"],
    },
  ],
  resource_type: "INSTANCE", # accepts INSTANCE, RESOURCE_GROUP
  filters: [
    {
      key: "PatchOrchestratorFilterKey",
      values: ["PatchOrchestratorFilterValue"],
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.scheduled_window_executions #=> Array
resp.scheduled_window_executions[0].window_id #=> String
resp.scheduled_window_executions[0].name #=> String
resp.scheduled_window_executions[0].execution_time #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :window_id (String)

    The ID of the maintenance window to retrieve information about.

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

    The managed node ID or key-value pair to retrieve information about.

  • :resource_type (String)

    The type of resource you want to retrieve information about. For example, INSTANCE.

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

    Filters used to limit the range of results. For example, you can limit maintenance window executions to only those scheduled before or after a certain date and time.

  • :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:



4752
4753
4754
4755
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4752

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

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

Lists the targets registered with the maintenance window.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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", "RESOURCE_GROUP"
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:



4816
4817
4818
4819
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4816

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.

For maintenance window tasks without a specified target, you can't supply values for --max-errors and --max-concurrency. Instead, the system inserts a placeholder value of 1, which may be reported in the response to this command. These values don't affect the running of your task and can be ignored.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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.tasks[0].cutoff_behavior #=> String, one of "CONTINUE_TASK", "CANCEL_TASK"
resp.tasks[0].alarm_configuration.ignore_poll_alarm_failure #=> Boolean
resp.tasks[0].alarm_configuration.alarms #=> Array
resp.tasks[0].alarm_configuration.alarms[0].name #=> 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:



4902
4903
4904
4905
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4902

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 Amazon Web Services account.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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.window_identities[0].schedule #=> String
resp.window_identities[0].schedule_timezone #=> String
resp.window_identities[0].schedule_offset #=> Integer
resp.window_identities[0].end_date #=> String
resp.window_identities[0].start_date #=> String
resp.window_identities[0].next_execution_time #=> String
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. For example, Name=MyMaintenanceWindow and Enabled=True.

  • :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:



4964
4965
4966
4967
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 4964

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

#describe_maintenance_windows_for_target(params = {}) ⇒ Types::DescribeMaintenanceWindowsForTargetResult

Retrieves information about the maintenance window targets or tasks that a managed node is associated with.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_maintenance_windows_for_target({
  targets: [ # required
    {
      key: "TargetKey",
      values: ["TargetValue"],
    },
  ],
  resource_type: "INSTANCE", # required, accepts INSTANCE, RESOURCE_GROUP
  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.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

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

    The managed node ID or key-value pair to retrieve information about.

  • :resource_type (required, String)

    The type of resource you want to retrieve information about. For example, INSTANCE.

  • :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:



5020
5021
5022
5023
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 5020

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

#describe_ops_items(params = {}) ⇒ Types::DescribeOpsItemsResponse

Query a set of OpsItems. You must have permission in Identity and Access Management (IAM) to query a list of OpsItems. For more information, see Set up OpsCenter in the Amazon Web Services Systems Manager User Guide.

Operations engineers and IT professionals use Amazon Web Services Systems Manager OpsCenter to view, investigate, and remediate operational issues impacting the performance and health of their Amazon Web Services resources. For more information, see Amazon Web Services Systems Manager OpsCenter in the Amazon Web Services Systems Manager User Guide.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_ops_items({
  ops_item_filters: [
    {
      key: "Status", # required, accepts Status, CreatedBy, Source, Priority, Title, OpsItemId, CreatedTime, LastModifiedTime, ActualStartTime, ActualEndTime, PlannedStartTime, PlannedEndTime, OperationalData, OperationalDataKey, OperationalDataValue, ResourceId, AutomationId, Category, Severity, OpsItemType, ChangeRequestByRequesterArn, ChangeRequestByRequesterName, ChangeRequestByApproverArn, ChangeRequestByApproverName, ChangeRequestByTemplate, ChangeRequestByTargetsResourceGroup, InsightByType, AccountId
      values: ["OpsItemFilterValue"], # required
      operator: "Equal", # required, accepts Equal, Contains, GreaterThan, LessThan
    },
  ],
  max_results: 1,
  next_token: "String",
})

Response structure


resp.next_token #=> String
resp.ops_item_summaries #=> Array
resp.ops_item_summaries[0].created_by #=> String
resp.ops_item_summaries[0].created_time #=> Time
resp.ops_item_summaries[0].last_modified_by #=> String
resp.ops_item_summaries[0].last_modified_time #=> Time
resp.ops_item_summaries[0].priority #=> Integer
resp.ops_item_summaries[0].source #=> String
resp.ops_item_summaries[0].status #=> String, one of "Open", "InProgress", "Resolved", "Pending", "TimedOut", "Cancelling", "Cancelled", "Failed", "CompletedWithSuccess", "CompletedWithFailure", "Scheduled", "RunbookInProgress", "PendingChangeCalendarOverride", "ChangeCalendarOverrideApproved", "ChangeCalendarOverrideRejected", "PendingApproval", "Approved", "Rejected", "Closed"
resp.ops_item_summaries[0].ops_item_id #=> String
resp.ops_item_summaries[0].title #=> String
resp.ops_item_summaries[0].operational_data #=> Hash
resp.ops_item_summaries[0].operational_data["OpsItemDataKey"].value #=> String
resp.ops_item_summaries[0].operational_data["OpsItemDataKey"].type #=> String, one of "SearchableString", "String"
resp.ops_item_summaries[0].category #=> String
resp.ops_item_summaries[0].severity #=> String
resp.ops_item_summaries[0].ops_item_type #=> String
resp.ops_item_summaries[0].actual_start_time #=> Time
resp.ops_item_summaries[0].actual_end_time #=> Time
resp.ops_item_summaries[0].planned_start_time #=> Time
resp.ops_item_summaries[0].planned_end_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :ops_item_filters (Array<Types::OpsItemFilter>)

    One or more filters to limit the response.

    • Key: CreatedTime

      Operations: GreaterThan, LessThan

    • Key: LastModifiedBy

      Operations: Contains, Equals

    • Key: LastModifiedTime

      Operations: GreaterThan, LessThan

    • Key: Priority

      Operations: Equals

    • Key: Source

      Operations: Contains, Equals

    • Key: Status

      Operations: Equals

    • Key: Title*

      Operations: Equals,Contains

    • Key: OperationalData**

      Operations: Equals

    • Key: OperationalDataKey

      Operations: Equals

    • Key: OperationalDataValue

      Operations: Equals, Contains

    • Key: OpsItemId

      Operations: Equals

    • Key: ResourceId

      Operations: Contains

    • Key: AutomationId

      Operations: Equals

    • Key: AccountId

      Operations: Equals

    *The Equals operator for Title matches the first 100 characters. If you specify more than 100 characters, they system returns an error that the filter value exceeds the length limit.

    **If you filter the response by using the OperationalData operator, specify a key-value pair by using the following JSON format: {"key":"key_name","value":"a_value"\}

  • :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:



5167
5168
5169
5170
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 5167

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

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

Lists the parameters in your Amazon Web Services account or the parameters shared with you when you enable the Shared option.

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.

If you change the KMS key alias for the KMS key used to encrypt a parameter, then you must also update the key alias the parameter uses to reference KMS. Otherwise, DescribeParameters retrieves whatever the original key alias was referencing.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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",
  shared: false,
})

Response structure


resp.parameters #=> Array
resp.parameters[0].name #=> String
resp.parameters[0].arn #=> 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.parameters[0].version #=> Integer
resp.parameters[0].tier #=> String, one of "Standard", "Advanced", "Intelligent-Tiering"
resp.parameters[0].policies #=> Array
resp.parameters[0].policies[0].policy_text #=> String
resp.parameters[0].policies[0].policy_type #=> String
resp.parameters[0].policies[0].policy_status #=> String
resp.parameters[0].data_type #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

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

    This data type is deprecated. Instead, use ParameterFilters.

  • :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.)

  • :shared (Boolean)

    Lists parameters that are shared with you.

    By default when using this option, the command returns parameters that have been shared using a standard Resource Access Manager Resource Share. In order for a parameter that was shared using the PutResourcePolicy command to be returned, the associated RAM Resource Share Created From Policy must have been promoted to a standard Resource Share using the RAM PromoteResourceShareCreatedFromPolicy API operation.

    For more information about sharing parameters, see Working with shared parameters in the Amazon Web Services Systems Manager User Guide.

Returns:

See Also:



5282
5283
5284
5285
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 5282

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 Amazon Web Services account.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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", "AMAZON_LINUX_2", "AMAZON_LINUX_2022", "UBUNTU", "REDHAT_ENTERPRISE_LINUX", "SUSE", "CENTOS", "ORACLE_LINUX", "DEBIAN", "MACOS", "RASPBIAN", "ROCKY_LINUX", "ALMA_LINUX", "AMAZON_LINUX_2023"
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 a key-value pair.

    Supported keys for DescribePatchBaselines include the following:

    • NAME_PREFIX

      Sample values: AWS- | My-

    • OWNER

      Sample values: AWS | Self

    • OPERATING_SYSTEM

      Sample values: AMAZON_LINUX | SUSE | WINDOWS

  • :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:



5347
5348
5349
5350
# File 'gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb', line 5347

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 information 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