Class: Aws::SecurityIR::Client

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

Overview

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

client = Aws::SecurityIR::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 used for authentication. This can be any class that includes and implements Aws::CredentialProvider, or 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.

  • :auth_scheme_preference (Array<String>)

    A list of preferred authentication schemes to use when making a request. Supported values are: sigv4, sigv4a, httpBearerAuth, and noAuth. When set using ENV['AWS_AUTH_SCHEME_PREFERENCE'] or in shared config as auth_scheme_preference, the value should be a comma-separated list.

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

    When true, the SDK will not prepend the modeled host prefix to the endpoint.

  • :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_checksum_calculation (String) — default: "when_supported"

    Determines when a checksum will be calculated for request payloads. Values are:

    • when_supported - (default) When set, a checksum will be calculated for all request payloads of operations modeled with the httpChecksum trait where requestChecksumRequired is true and/or a requestAlgorithmMember is modeled.
    • when_required - When set, a checksum will only be calculated for request payloads of operations modeled with the httpChecksum trait where requestChecksumRequired is true or where a requestAlgorithmMember is modeled and supplied.
  • :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.

  • :response_checksum_validation (String) — default: "when_supported"

    Determines when checksum validation will be performed on response payloads. Values are:

    • when_supported - (default) When set, checksum validation is performed on all response payloads of operations modeled with the httpChecksum trait where responseAlgorithms is modeled, except when no modeled checksum algorithms are supported.
    • when_required - When set, checksum validation is not performed on response payloads of operations unless the checksum algorithm is supported and the requestValidationModeMember member is set to ENABLED.
  • :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
  • :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)

    Your Bearer token used for authentication. This can be any class that includes and implements Aws::TokenProvider, or 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::SecurityIR::EndpointProvider)

    The endpoint provider used to resolve endpoints. Any object that responds to #resolve_endpoint(parameters) where parameters is a Struct similar to Aws::SecurityIR::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.



473
474
475
# File 'gems/aws-sdk-securityir/lib/aws-sdk-securityir/client.rb', line 473

def initialize(*args)
  super
end

Instance Method Details

#batch_get_member_account_details(params = {}) ⇒ Types::BatchGetMemberAccountDetailsResponse

Provides information on whether the supplied account IDs are associated with a membership.

AWS account ID's may appear less than 12 characters and need to be zero-prepended. An example would be 123123123 which is nine digits, and with zero-prepend would be 000123123123. Not zero-prepending to 12 digits could result in errors.

Examples:

Example: Invoke BatchGetMemberAccountDetails


resp = client.({
  account_ids: [
    "123412341234", 
  ], 
  membership_id: "m-abcd1234efgh", 
})

resp.to_h outputs the following:
{
  items: [
    {
      account_id: "123412341234", 
      relationship_status: "Associated", 
      relationship_type: "Organization", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.({
  membership_id: "MembershipId", # required
  account_ids: ["AWSAccountId"], # required
})

Response structure


resp.items #=> Array
resp.items[0]. #=> String
resp.items[0].relationship_status #=> String, one of "Associated", "Disassociated", "Unassociated"
resp.items[0].relationship_type #=> String, one of "Organization", "Unrelated"
resp.errors #=> Array
resp.errors[0]. #=> String
resp.errors[0].error #=> String
resp.errors[0].message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :membership_id (required, String)

    Required element used in combination with BatchGetMemberAccountDetails to identify the membership ID to query.

  • :account_ids (required, Array<String>)

    Optional element to query the membership relationship status to a provided list of account IDs.

    AWS account ID's may appear less than 12 characters and need to be zero-prepended. An example would be 123123123 which is nine digits, and with zero-prepend would be 000123123123. Not zero-prepending to 12 digits could result in errors.

Returns:

See Also:



552
553
554
555
# File 'gems/aws-sdk-securityir/lib/aws-sdk-securityir/client.rb', line 552

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

#cancel_membership(params = {}) ⇒ Types::CancelMembershipResponse

Cancels an existing membership.

Examples:

Example: Invoke CancelMembership


resp = client.cancel_membership({
  membership_id: "m-abcd1234efgh", 
})

resp.to_h outputs the following:
{
  membership_id: "m-abcd1234efgh", 
}

Request syntax with placeholder values


resp = client.cancel_membership({
  membership_id: "MembershipId", # required
})

Response structure


resp.membership_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :membership_id (required, String)

    Required element used in combination with CancelMembershipRequest to identify the membership ID to cancel.

Returns:

See Also:



593
594
595
596
# File 'gems/aws-sdk-securityir/lib/aws-sdk-securityir/client.rb', line 593

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

#close_case(params = {}) ⇒ Types::CloseCaseResponse

Closes an existing case.

Examples:

Example: Invoke CloseCase


resp = client.close_case({
  case_id: "8403556009", 
})

resp.to_h outputs the following:
{
  case_status: "Closed", 
  closed_date: Time.parse("2024-02-27T17:01:33.000Z"), 
}

Request syntax with placeholder values


resp = client.close_case({
  case_id: "CaseId", # required
})

Response structure


resp.case_status #=> String, one of "Submitted", "Acknowledged", "Detection and Analysis", "Containment, Eradication and Recovery", "Post-incident Activities", "Ready to Close", "Closed"
resp.closed_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :case_id (required, String)

    Required element used in combination with CloseCase to identify the case ID to close.

Returns:

See Also:



637
638
639
640
# File 'gems/aws-sdk-securityir/lib/aws-sdk-securityir/client.rb', line 637

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

#create_case(params = {}) ⇒ Types::CreateCaseResponse

Creates a new case.

Examples:

Example: Invoke CreateCase


resp = client.create_case({
  description: "Case description", 
  engagement_type: "Investigation", 
  impacted_accounts: [
    "000000000000", 
    "111111111111", 
  ], 
  impacted_aws_regions: [
    {
      region: "ap-southeast-1", 
    }, 
  ], 
  impacted_services: [
    "Amazon EC2", 
    "Amazon EKS", 
  ], 
  reported_incident_start_date: Time.parse("2023-03-27T15:32:01.789Z"), 
  resolver_type: "Self", 
  threat_actor_ip_addresses: [
    {
      ip_address: "192.168.192.168", 
      user_agent: "Browser", 
    }, 
  ], 
  title: "My sample case", 
  watchers: [
    {
      name: "Alice", 
      email: "alice@example.com", 
      job_title: "CEO", 
    }, 
    {
      name: "Bob", 
      email: "bob@example.com", 
      job_title: "CFO", 
    }, 
  ], 
})

Request syntax with placeholder values


resp = client.create_case({
  client_token: "CreateCaseRequestClientTokenString",
  resolver_type: "AWS", # required, accepts AWS, Self
  title: "CaseTitle", # required
  description: "CaseDescription", # required
  engagement_type: "Security Incident", # required, accepts Security Incident, Investigation
  reported_incident_start_date: Time.now, # required
  impacted_accounts: ["AWSAccountId"], # required
  watchers: [ # required
    {
      email: "EmailAddress", # required
      name: "PersonName",
      job_title: "JobTitle",
    },
  ],
  threat_actor_ip_addresses: [
    {
      ip_address: "IPAddress", # required
      user_agent: "UserAgent",
    },
  ],
  impacted_services: ["AwsService"],
  impacted_aws_regions: [
    {
      region: "af-south-1", # required, accepts af-south-1, ap-east-1, ap-east-2, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-south-2, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, ap-southeast-5, ap-southeast-7, ca-central-1, ca-west-1, cn-north-1, cn-northwest-1, eu-central-1, eu-central-2, eu-north-1, eu-south-1, eu-south-2, eu-west-1, eu-west-2, eu-west-3, il-central-1, me-central-1, me-south-1, mx-central-1, sa-east-1, us-east-1, us-east-2, us-west-1, us-west-2
    },
  ],
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.case_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :client_token (String)

    The clientToken field is an idempotency key used to ensure that repeated attempts for a single action will be ignored by the server during retries. A caller supplied unique ID (typically a UUID) should be provided.

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

  • :resolver_type (required, String)

    Required element used in combination with CreateCase to identify the resolver type.

  • :title (required, String)

    Required element used in combination with CreateCase to provide a title for the new case.

  • :description (required, String)

    Required element used in combination with CreateCase

    to provide a description for the new case.

  • :engagement_type (required, String)

    Required element used in combination with CreateCase to provide an engagement type for the new cases. Available engagement types include Security Incident | Investigation

  • :reported_incident_start_date (required, Time, DateTime, Date, Integer, String)

    Required element used in combination with CreateCase to provide an initial start date for the unauthorized activity.

  • :impacted_accounts (required, Array<String>)

    Required element used in combination with CreateCase to provide a list of impacted accounts.

    AWS account ID's may appear less than 12 characters and need to be zero-prepended. An example would be 123123123 which is nine digits, and with zero-prepend would be 000123123123. Not zero-prepending to 12 digits could result in errors.

  • :watchers (required, Array<Types::Watcher>)

    Required element used in combination with CreateCase to provide a list of entities to receive notifications for case updates.

  • :threat_actor_ip_addresses (Array<Types::ThreatActorIp>)

    An optional element used in combination with CreateCase to provide a list of suspicious internet protocol addresses associated with unauthorized activity.

  • :impacted_services (Array<String>)

    An optional element used in combination with CreateCase to provide a list of services impacted.

  • :impacted_aws_regions (Array<Types::ImpactedAwsRegion>)

    An optional element used in combination with CreateCase to provide a list of impacted regions.

  • :tags (Hash<String,String>)

    An optional element used in combination with CreateCase to add customer specified tags to a case.

Returns:

See Also:



798
799
800
801
# File 'gems/aws-sdk-securityir/lib/aws-sdk-securityir/client.rb', line 798

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

#create_case_comment(params = {}) ⇒ Types::CreateCaseCommentResponse

Adds a comment to an existing case.

Examples:

Example: Invoke CreateCaseComment


resp = client.create_case_comment({
  body: "Case comment body.", 
  case_id: "8403556009", 
})

resp.to_h outputs the following:
{
  comment_id: "000000", 
}

Request syntax with placeholder values


resp = client.create_case_comment({
  case_id: "CaseId", # required
  client_token: "CreateCaseCommentRequestClientTokenString",
  body: "CommentBody", # required
})

Response structure


resp.comment_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :case_id (required, String)

    Required element used in combination with CreateCaseComment to specify a case ID.

  • :client_token (String)

    The clientToken field is an idempotency key used to ensure that repeated attempts for a single action will be ignored by the server during retries. A caller supplied unique ID (typically a UUID) should be provided.

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

  • :body (required, String)

    Required element used in combination with CreateCaseComment to add content for the new comment.

Returns:

See Also:



858
859
860
861
# File 'gems/aws-sdk-securityir/lib/aws-sdk-securityir/client.rb', line 858

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

#create_membership(params = {}) ⇒ Types::CreateMembershipResponse

Creates a new membership.

Examples:

Example: Invoke CreateMembership


resp = client.create_membership({
  incident_response_team: [
    {
      name: "Bob Jones", 
      email: "bob.jones@gmail.com", 
      job_title: "Security Responder", 
    }, 
    {
      name: "Alice", 
      email: "alice@example.com", 
      job_title: "CEO", 
    }, 
  ], 
  membership_name: "Example Membership Name.", 
  opt_in_features: [
    {
      feature_name: "Triage", 
      is_enabled: true, 
    }, 
  ], 
})

resp.to_h outputs the following:
{
  membership_id: "m-abcd1234efgh", 
}

Request syntax with placeholder values


resp = client.create_membership({
  client_token: "CreateMembershipRequestClientTokenString",
  membership_name: "MembershipName", # required
  incident_response_team: [ # required
    {
      name: "IncidentResponderName", # required
      job_title: "JobTitle", # required
      email: "EmailAddress", # required
    },
  ],
  opt_in_features: [
    {
      feature_name: "Triage", # required, accepts Triage
      is_enabled: false, # required
    },
  ],
  tags: {
    "TagKey" => "TagValue",
  },
  cover_entire_organization: false,
})

Response structure


resp.membership_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :client_token (String)

    The clientToken field is an idempotency key used to ensure that repeated attempts for a single action will be ignored by the server during retries. A caller supplied unique ID (typically a UUID) should be provided.

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

  • :membership_name (required, String)

    Required element used in combination with CreateMembership to create a name for the membership.

  • :incident_response_team (required, Array<Types::IncidentResponder>)

    Required element used in combination with CreateMembership to add customer incident response team members and trusted partners to the membership.

  • :opt_in_features (Array<Types::OptInFeature>)

    Optional element to enable the monitoring and investigation opt-in features for the service.

  • :tags (Hash<String,String>)

    Optional element for customer configured tags.

  • :cover_entire_organization (Boolean)

    The coverEntireOrganization parameter is a boolean flag that determines whether the membership should be applied to the entire Amazon Web Services Organization. When set to true, the membership will be created for all accounts within the organization. When set to false, the membership will only be created for specified accounts.

    This parameter is optional. If not specified, the default value is false.

    • If set to true: The membership will automatically include all existing and future accounts in the Amazon Web Services Organization.

    • If set to false: The membership will only apply to explicitly specified accounts.

Returns:

See Also:



976
977
978
979
# File 'gems/aws-sdk-securityir/lib/aws-sdk-securityir/client.rb', line 976

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

#get_case(params = {}) ⇒ Types::GetCaseResponse

Returns the attributes of a case.

Examples:

Example: Invoke GetCase


resp = client.get_case({
  case_id: "8403556009", 
})

resp.to_h outputs the following:
{
  actual_incident_start_date: Time.parse("2023-03-27T15:32:01.789Z"), 
  case_arn: "arn:aws:security-ir:us-west-1:123456789012:case/1234567890", 
  case_status: "Submitted", 
  created_date: Time.parse("2023-01-27T15:32:01.789Z"), 
  description: "Case description", 
  engagement_type: "Investigation", 
  impacted_accounts: [
    "000000000000", 
    "111111111111", 
  ], 
  impacted_aws_regions: [
    {
      region: "ap-southeast-1", 
    }, 
  ], 
  impacted_services: [
    "Amazon EC2", 
    "Amazon EKS", 
  ], 
  last_updated_date: Time.parse("2023-02-27T15:32:01.789Z"), 
  pending_action: "Customer", 
  reported_incident_start_date: Time.parse("2023-03-27T15:32:01.789Z"), 
  resolver_type: "Self", 
  threat_actor_ip_addresses: [
    {
      ip_address: "192.168.192.168", 
      user_agent: "Browser", 
    }, 
  ], 
  title: "My sample case", 
  watchers: [
    {
      name: "Alice", 
      email: "alice@example.com", 
      job_title: "CEO", 
    }, 
    {
      name: "Bob", 
      email: "bob@example.com", 
      job_title: "CFO", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.get_case({
  case_id: "CaseId", # required
})

Response structure


resp.title #=> String
resp.case_arn #=> String
resp.description #=> String
resp.case_status #=> String, one of "Submitted", "Acknowledged", "Detection and Analysis", "Containment, Eradication and Recovery", "Post-incident Activities", "Ready to Close", "Closed"
resp.engagement_type #=> String, one of "Security Incident", "Investigation"
resp.reported_incident_start_date #=> Time
resp.actual_incident_start_date #=> Time
resp.impacted_aws_regions #=> Array
resp.impacted_aws_regions[0].region #=> String, one of "af-south-1", "ap-east-1", "ap-east-2", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-south-1", "ap-south-2", "ap-southeast-1", "ap-southeast-2", "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", "ap-southeast-7", "ca-central-1", "ca-west-1", "cn-north-1", "cn-northwest-1", "eu-central-1", "eu-central-2", "eu-north-1", "eu-south-1", "eu-south-2", "eu-west-1", "eu-west-2", "eu-west-3", "il-central-1", "me-central-1", "me-south-1", "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", "us-west-1", "us-west-2"
resp.threat_actor_ip_addresses #=> Array
resp.threat_actor_ip_addresses[0].ip_address #=> String
resp.threat_actor_ip_addresses[0].user_agent #=> String
resp.pending_action #=> String, one of "Customer", "None"
resp.impacted_accounts #=> Array
resp.impacted_accounts[0] #=> String
resp.watchers #=> Array
resp.watchers[0].email #=> String
resp.watchers[0].name #=> String
resp.watchers[0].job_title #=> String
resp.created_date #=> Time
resp.last_updated_date #=> Time
resp.closure_code #=> String, one of "Investigation Completed", "Not Resolved", "False Positive", "Duplicate"
resp.resolver_type #=> String, one of "AWS", "Self"
resp.impacted_services #=> Array
resp.impacted_services[0] #=> String
resp.case_attachments #=> Array
resp.case_attachments[0].attachment_id #=> String
resp.case_attachments[0].file_name #=> String
resp.case_attachments[0].attachment_status #=> String, one of "Verified", "Failed", "Pending"
resp.case_attachments[0].creator #=> String
resp.case_attachments[0].created_date #=> Time
resp.closed_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :case_id (required, String)

    Required element for GetCase to identify the requested case ID.

Returns:

See Also:



1106
1107
1108
1109
# File 'gems/aws-sdk-securityir/lib/aws-sdk-securityir/client.rb', line 1106

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

#get_case_attachment_download_url(params = {}) ⇒ Types::GetCaseAttachmentDownloadUrlResponse

Returns a Pre-Signed URL for uploading attachments into a case.

Examples:

Example: Invoke GetCaseAttachmentDownloadUrl


resp = client.get_case_attachment_download_url({
  attachment_id: "3C5A6B89-1DEF-4C2D-A5B6-123456789ABC", 
  case_id: "8403556009", 
})

resp.to_h outputs the following:
{
  attachment_presigned_url: "https://presignedurl.com", 
}

Request syntax with placeholder values


resp = client.get_case_attachment_download_url({
  case_id: "CaseId", # required
  attachment_id: "AttachmentId", # required
})

Response structure


resp.attachment_presigned_url #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :case_id (required, String)

    Required element for GetCaseAttachmentDownloadUrl to identify the case ID for downloading an attachment from.

  • :attachment_id (required, String)

    Required element for GetCaseAttachmentDownloadUrl to identify the attachment ID for downloading an attachment.

Returns:

See Also:



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

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

#get_case_attachment_upload_url(params = {}) ⇒ Types::GetCaseAttachmentUploadUrlResponse

Uploads an attachment to a case.

Examples:

Example: Invoke GetCaseAttachmentUploadUrl


resp = client.get_case_attachment_upload_url({
  case_id: "8403556009", 
  content_length: 1500, 
  file_name: "TestFileName", 
})

resp.to_h outputs the following:
{
  attachment_presigned_url: "https://presignedurl.com", 
}

Request syntax with placeholder values


resp = client.get_case_attachment_upload_url({
  case_id: "CaseId", # required
  file_name: "FileName", # required
  content_length: 1, # required
  client_token: "GetCaseAttachmentUploadUrlRequestClientTokenString",
})

Response structure


resp.attachment_presigned_url #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :case_id (required, String)

    Required element for GetCaseAttachmentUploadUrl to identify the case ID for uploading an attachment.

  • :file_name (required, String)

    Required element for GetCaseAttachmentUploadUrl to identify the file name of the attachment to upload.

  • :content_length (required, Integer)

    Required element for GetCaseAttachmentUploadUrl to identify the size of the file attachment.

  • :client_token (String)

    The clientToken field is an idempotency key used to ensure that repeated attempts for a single action will be ignored by the server during retries. A caller supplied unique ID (typically a UUID) should be provided.

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

Returns:

See Also:



1219
1220
1221
1222
# File 'gems/aws-sdk-securityir/lib/aws-sdk-securityir/client.rb', line 1219

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

#get_membership(params = {}) ⇒ Types::GetMembershipResponse

Returns the attributes of a membership.

Examples:

Example: Invoke GetMembership


resp = client.get_membership({
  membership_id: "m-abcd1234efgh", 
})

resp.to_h outputs the following:
{
  account_id: "123412341234", 
  customer_type: "Standalone", 
  incident_response_team: [
    {
      name: "Bob Jones", 
      email: "bob.jones@gmail.com", 
      job_title: "Security Responder", 
    }, 
    {
      name: "Alice", 
      email: "alice@example.com", 
      job_title: "CEO", 
    }, 
  ], 
  membership_activation_timestamp: Time.parse("2023-03-27T15:32:01.789Z"), 
  membership_arn: "arn:aws:security-ir:us-west-1:123456789012:membership/m-abcd1234efgh", 
  membership_deactivation_timestamp: Time.parse("2023-04-27T15:32:01.789Z"), 
  membership_id: "m-abcd1234efgh", 
  membership_name: "Example Membership", 
  membership_status: "Active", 
  number_of_accounts_covered: 50, 
  opt_in_features: [
    {
      feature_name: "Triage", 
      is_enabled: true, 
    }, 
  ], 
  region: "af-south-1", 
}

Request syntax with placeholder values


resp = client.get_membership({
  membership_id: "MembershipId", # required
})

Response structure


resp.membership_id #=> String
resp. #=> String
resp.region #=> String, one of "af-south-1", "ap-east-1", "ap-east-2", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-south-1", "ap-south-2", "ap-southeast-1", "ap-southeast-2", "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", "ap-southeast-7", "ca-central-1", "ca-west-1", "cn-north-1", "cn-northwest-1", "eu-central-1", "eu-central-2", "eu-north-1", "eu-south-1", "eu-south-2", "eu-west-1", "eu-west-2", "eu-west-3", "il-central-1", "me-central-1", "me-south-1", "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", "us-west-1", "us-west-2"
resp.membership_name #=> String
resp.membership_arn #=> String
resp.membership_status #=> String, one of "Active", "Cancelled", "Terminated"
resp.membership_activation_timestamp #=> Time
resp.membership_deactivation_timestamp #=> Time
resp.customer_type #=> String, one of "Standalone", "Organization"
resp.number_of_accounts_covered #=> Integer
resp.incident_response_team #=> Array
resp.incident_response_team[0].name #=> String
resp.incident_response_team[0].job_title #=> String
resp.incident_response_team[0].email #=> String
resp.opt_in_features #=> Array
resp.opt_in_features[0].feature_name #=> String, one of "Triage"
resp.opt_in_features[0].is_enabled #=> Boolean
resp.membership_accounts_configurations.cover_entire_organization #=> Boolean
resp.membership_accounts_configurations.organizational_units #=> Array
resp.membership_accounts_configurations.organizational_units[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :membership_id (required, String)

    Required element for GetMembership to identify the membership ID to query.

Returns:

See Also:



1318
1319
1320
1321
# File 'gems/aws-sdk-securityir/lib/aws-sdk-securityir/client.rb', line 1318

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

#list_case_edits(params = {}) ⇒ Types::ListCaseEditsResponse

Views the case history for edits made to a designated case.

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

Examples:

Example: Invoke ListCaseEdits


resp = client.list_case_edits({
  case_id: "8403556009", 
})

resp.to_h outputs the following:
{
  items: [
    {
      action: "Add comment", 
      event_timestamp: Time.parse("2023-03-27T15:32:01.789Z"), 
      message: "Added comment to ask question to responder.", 
      principal: "00000000000", 
    }, 
  ], 
  total: 1, 
}

Request syntax with placeholder values


resp = client.list_case_edits({
  next_token: "ListCaseEditsRequestNextTokenString",
  max_results: 1,
  case_id: "CaseId", # required
})

Response structure


resp.next_token #=> String
resp.items #=> Array
resp.items[0].event_timestamp #=> Time
resp.items[0].principal #=> String
resp.items[0].action #=> String
resp.items[0].message #=> String
resp.total #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    An optional string that, if supplied, must be copied from the output of a previous call to ListCaseEdits. When provided in this manner, the API fetches the next page of results.

  • :max_results (Integer)

    Optional element to identify how many results to obtain. There is a maximum value of 25.

  • :case_id (required, String)

    Required element used with ListCaseEdits to identify the case to query.

Returns:

See Also:



1388
1389
1390
1391
# File 'gems/aws-sdk-securityir/lib/aws-sdk-securityir/client.rb', line 1388

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

#list_cases(params = {}) ⇒ Types::ListCasesResponse

Lists all cases the requester has access to.

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

Examples:

Example: Invoke ListCases


resp = client.list_cases({
  max_results: 10, 
})

resp.to_h outputs the following:
{
  items: [
    {
      case_arn: "arn:aws:security-ir:us-west-1:123456789012:case/1234567890", 
      case_id: "8403556009", 
      case_status: "Acknowledged", 
      created_date: Time.parse("2023-01-27T15:32:01.789Z"), 
      engagement_type: "Security Incident", 
      last_updated_date: Time.parse("2023-03-27T15:32:01.789Z"), 
      pending_action: "None", 
      resolver_type: "Self", 
      title: "Example case title", 
    }, 
  ], 
  total: 1, 
}

Request syntax with placeholder values


resp = client.list_cases({
  next_token: "ListCasesRequestNextTokenString",
  max_results: 1,
})

Response structure


resp.next_token #=> String
resp.items #=> Array
resp.items[0].case_id #=> String
resp.items[0].last_updated_date #=> Time
resp.items[0].title #=> String
resp.items[0].case_arn #=> String
resp.items[0].engagement_type #=> String, one of "Security Incident", "Investigation"
resp.items[0].case_status #=> String, one of "Submitted", "Acknowledged", "Detection and Analysis", "Containment, Eradication and Recovery", "Post-incident Activities", "Ready to Close", "Closed"
resp.items[0].created_date #=> Time
resp.items[0].closed_date #=> Time
resp.items[0].resolver_type #=> String, one of "AWS", "Self"
resp.items[0].pending_action #=> String, one of "Customer", "None"
resp.total #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    An optional string that, if supplied, must be copied from the output of a previous call to ListCases. When provided in this manner, the API fetches the next page of results.

  • :max_results (Integer)

    Optional element for ListCases to limit the number of responses.

Returns:

See Also:



1463
1464
1465
1466
# File 'gems/aws-sdk-securityir/lib/aws-sdk-securityir/client.rb', line 1463

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

#list_comments(params = {}) ⇒ Types::ListCommentsResponse

Returns comments for a designated case.

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

Examples:

Example: Invoke ListComments


resp = client.list_comments({
  case_id: "8403556009", 
})

resp.to_h outputs the following:
{
  items: [
    {
      body: "Case comment body.", 
      comment_id: "000000", 
    }, 
  ], 
  total: 1, 
}

Request syntax with placeholder values


resp = client.list_comments({
  next_token: "ListCommentsRequestNextTokenString",
  max_results: 1,
  case_id: "CaseId", # required
})

Response structure


resp.next_token #=> String
resp.items #=> Array
resp.items[0].comment_id #=> String
resp.items[0].created_date #=> Time
resp.items[0].last_updated_date #=> Time
resp.items[0].creator #=> String
resp.items[0].last_updated_by #=> String
resp.items[0].body #=> String
resp.total #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    An optional string that, if supplied, must be copied from the output of a previous call to ListComments. When provided in this manner, the API fetches the next page of results.

  • :max_results (Integer)

    Optional element for ListComments to limit the number of responses.

  • :case_id (required, String)

    Required element for ListComments to designate the case to query.

Returns:

See Also:



1531
1532
1533
1534
# File 'gems/aws-sdk-securityir/lib/aws-sdk-securityir/client.rb', line 1531

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

#list_memberships(params = {}) ⇒ Types::ListMembershipsResponse

Returns the memberships that the calling principal can access.

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

Examples:

Example: Invoke ListMemberships


resp = client.list_memberships({
  max_results: 10, 
})

resp.to_h outputs the following:
{
  items: [
    {
      account_id: "123123123123", 
      membership_arn: "arn:aws:security-ir:us-west-1:123456789012:membership/m-abcd1234efgh", 
      membership_id: "m-abcd1234efgh", 
      membership_status: "Cancelled", 
      region: "af-south-1", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_memberships({
  next_token: "ListMembershipsRequestNextTokenString",
  max_results: 1,
})

Response structure


resp.next_token #=> String
resp.items #=> Array
resp.items[0].membership_id #=> String
resp.items[0]. #=> String
resp.items[0].region #=> String, one of "af-south-1", "ap-east-1", "ap-east-2", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-south-1", "ap-south-2", "ap-southeast-1", "ap-southeast-2", "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", "ap-southeast-7", "ca-central-1", "ca-west-1", "cn-north-1", "cn-northwest-1", "eu-central-1", "eu-central-2", "eu-north-1", "eu-south-1", "eu-south-2", "eu-west-1", "eu-west-2", "eu-west-3", "il-central-1", "me-central-1", "me-south-1", "mx-central-1", "sa-east-1", "us-east-1", "us-east-2", "us-west-1", "us-west-2"
resp.items[0].membership_arn #=> String
resp.items[0].membership_status #=> String, one of "Active", "Cancelled", "Terminated"

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    An optional string that, if supplied, must be copied from the output of a previous call to ListMemberships. When provided in this manner, the API fetches the next page of results.

  • :max_results (Integer)

    Request element for ListMemberships to limit the number of responses.

Returns:

See Also:



1594
1595
1596
1597
# File 'gems/aws-sdk-securityir/lib/aws-sdk-securityir/client.rb', line 1594

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

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

Returns currently configured tags on a resource.

Examples:

Example: Invoke ListTagsForResource


resp = client.list_tags_for_resource({
  resource_arn: "arn:aws:security-ir:us-west-1:123456789012:membership/m-abcd1234efgh", 
})

resp.to_h outputs the following:
{
  tags: {
    "key" => "example-tag-key", 
    "value" => "example-tag-value", 
  }, 
}

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "Arn", # required
})

Response structure


resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    Required element for ListTagsForResource to provide the ARN to identify a specific resource.

Returns:

See Also:



1639
1640
1641
1642
# File 'gems/aws-sdk-securityir/lib/aws-sdk-securityir/client.rb', line 1639

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

#tag_resource(params = {}) ⇒ Struct

Adds a tag(s) to a designated resource.

Examples:

Example: Invoke TagResource


resp = client.tag_resource({
  resource_arn: "arn:aws:security-ir:us-west-1:123456789012:membership/m-abcd1234efgh", 
  tags: {
    "key" => "example-tag-key", 
    "value" => "example-tag-value", 
  }, 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "Arn", # required
  tags: { # required
    "TagKey" => "TagValue",
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    Required element for TagResource to identify the ARN for the resource to add a tag to.

  • :tags (required, Hash<String,String>)

    Required element for ListTagsForResource to provide the content for a tag.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1684
1685
1686
1687
# File 'gems/aws-sdk-securityir/lib/aws-sdk-securityir/client.rb', line 1684

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

#untag_resource(params = {}) ⇒ Struct

Removes a tag(s) from a designate resource.

Examples:

Example: Invoke UntagResource


resp = client.untag_resource({
  resource_arn: "arn:aws:security-ir:us-west-1:123456789012:membership/m-abcd1234efgh", 
  tag_keys: [
    "example-tag-key", 
  ], 
})

Request syntax with placeholder values


resp = client.untag_resource({
  resource_arn: "Arn", # required
  tag_keys: ["TagKey"], # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    Required element for UnTagResource to identify the ARN for the resource to remove a tag from.

  • :tag_keys (required, Array<String>)

    Required element for UnTagResource to identify tag to remove.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1721
1722
1723
1724
# File 'gems/aws-sdk-securityir/lib/aws-sdk-securityir/client.rb', line 1721

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

#update_case(params = {}) ⇒ Struct

Updates an existing case.

Examples:

Example: Invoke UpdateCase


resp = client.update_case({
  actual_incident_start_date: Time.parse("2023-03-25T15:32:01.789Z"), 
  case_id: "8403556009", 
  description: "Case description", 
  engagement_type: "Investigation", 
  impacted_accounts_to_add: [
    "000000000000", 
  ], 
  impacted_accounts_to_delete: [
    "111111111111", 
  ], 
  impacted_aws_regions_to_add: [
    {
      region: "ap-southeast-1", 
    }, 
  ], 
  impacted_aws_regions_to_delete: [
    {
      region: "us-east-1", 
    }, 
  ], 
  impacted_services_to_add: [
    "Amazon EC2", 
  ], 
  impacted_services_to_delete: [
    "Amazon EKS", 
  ], 
  reported_incident_start_date: Time.parse("2023-03-27T15:32:01.789Z"), 
  threat_actor_ip_addresses_to_add: [
    {
      ip_address: "190.160.190.160", 
      user_agent: "Browser", 
    }, 
  ], 
  threat_actor_ip_addresses_to_delete: [
    {
      ip_address: "192.168.192.168", 
      user_agent: "Browser", 
    }, 
  ], 
  title: "My sample case", 
  watchers_to_add: [
    {
      name: "Same", 
      email: "Sam@example.com", 
      job_title: "CEO", 
    }, 
  ], 
  watchers_to_delete: [
    {
      name: "Bob", 
      email: "bob@example.com", 
      job_title: "CFO", 
    }, 
  ], 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.update_case({
  case_id: "CaseId", # required
  title: "CaseTitle",
  description: "CaseDescription",
  reported_incident_start_date: Time.now,
  actual_incident_start_date: Time.now,
  engagement_type: "Security Incident", # accepts Security Incident, Investigation
  watchers_to_add: [
    {
      email: "EmailAddress", # required
      name: "PersonName",
      job_title: "JobTitle",
    },
  ],
  watchers_to_delete: [
    {
      email: "EmailAddress", # required
      name: "PersonName",
      job_title: "JobTitle",
    },
  ],
  threat_actor_ip_addresses_to_add: [
    {
      ip_address: "IPAddress", # required
      user_agent: "UserAgent",
    },
  ],
  threat_actor_ip_addresses_to_delete: [
    {
      ip_address: "IPAddress", # required
      user_agent: "UserAgent",
    },
  ],
  impacted_services_to_add: ["AwsService"],
  impacted_services_to_delete: ["AwsService"],
  impacted_aws_regions_to_add: [
    {
      region: "af-south-1", # required, accepts af-south-1, ap-east-1, ap-east-2, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-south-2, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, ap-southeast-5, ap-southeast-7, ca-central-1, ca-west-1, cn-north-1, cn-northwest-1, eu-central-1, eu-central-2, eu-north-1, eu-south-1, eu-south-2, eu-west-1, eu-west-2, eu-west-3, il-central-1, me-central-1, me-south-1, mx-central-1, sa-east-1, us-east-1, us-east-2, us-west-1, us-west-2
    },
  ],
  impacted_aws_regions_to_delete: [
    {
      region: "af-south-1", # required, accepts af-south-1, ap-east-1, ap-east-2, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-south-2, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, ap-southeast-5, ap-southeast-7, ca-central-1, ca-west-1, cn-north-1, cn-northwest-1, eu-central-1, eu-central-2, eu-north-1, eu-south-1, eu-south-2, eu-west-1, eu-west-2, eu-west-3, il-central-1, me-central-1, me-south-1, mx-central-1, sa-east-1, us-east-1, us-east-2, us-west-1, us-west-2
    },
  ],
  impacted_accounts_to_add: ["AWSAccountId"],
  impacted_accounts_to_delete: ["AWSAccountId"],
})

Parameters:

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

    ({})

Options Hash (params):

  • :case_id (required, String)

    Required element for UpdateCase to identify the case ID for updates.

  • :title (String)

    Optional element for UpdateCase to provide content for the title field.

  • :description (String)

    Optional element for UpdateCase to provide content for the description field.

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

    Optional element for UpdateCase to provide content for the customer reported incident start date field.

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

    Optional element for UpdateCase to provide content for the incident start date field.

  • :engagement_type (String)

    Optional element for UpdateCase to provide content for the engagement type field. Available engagement types include Security Incident | Investigation.

  • :watchers_to_add (Array<Types::Watcher>)

    Optional element for UpdateCase to provide content to add additional watchers to a case.

  • :watchers_to_delete (Array<Types::Watcher>)

    Optional element for UpdateCase to provide content to remove existing watchers from a case.

  • :threat_actor_ip_addresses_to_add (Array<Types::ThreatActorIp>)

    Optional element for UpdateCase to provide content to add additional suspicious IP addresses related to a case.

  • :threat_actor_ip_addresses_to_delete (Array<Types::ThreatActorIp>)

    Optional element for UpdateCase to provide content to remove suspicious IP addresses from a case.

  • :impacted_services_to_add (Array<String>)

    Optional element for UpdateCase to provide content to add services impacted.

  • :impacted_services_to_delete (Array<String>)

    Optional element for UpdateCase to provide content to remove services impacted.

  • :impacted_aws_regions_to_add (Array<Types::ImpactedAwsRegion>)

    Optional element for UpdateCase to provide content to add regions impacted.

  • :impacted_aws_regions_to_delete (Array<Types::ImpactedAwsRegion>)

    Optional element for UpdateCase to provide content to remove regions impacted.

  • :impacted_accounts_to_add (Array<String>)

    Optional element for UpdateCase to provide content to add accounts impacted.

    AWS account ID's may appear less than 12 characters and need to be zero-prepended. An example would be 123123123 which is nine digits, and with zero-prepend would be 000123123123. Not zero-prepending to 12 digits could result in errors.

  • :impacted_accounts_to_delete (Array<String>)

    Optional element for UpdateCase to provide content to add accounts impacted.

    AWS account ID's may appear less than 12 characters and need to be zero-prepended. An example would be 123123123 which is nine digits, and with zero-prepend would be 000123123123. Not zero-prepending to 12 digits could result in errors.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1927
1928
1929
1930
# File 'gems/aws-sdk-securityir/lib/aws-sdk-securityir/client.rb', line 1927

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

#update_case_comment(params = {}) ⇒ Types::UpdateCaseCommentResponse

Updates an existing case comment.

Examples:

Example: Invoke UpdateCaseComment


resp = client.update_case_comment({
  body: "Updated case comment.", 
  case_id: "8403556009", 
  comment_id: "000000", 
})

resp.to_h outputs the following:
{
  body: "Updated case comment.", 
  comment_id: "000000", 
}

Request syntax with placeholder values


resp = client.update_case_comment({
  case_id: "CaseId", # required
  comment_id: "CommentId", # required
  body: "CommentBody", # required
})

Response structure


resp.comment_id #=> String
resp.body #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :case_id (required, String)

    Required element for UpdateCaseComment to identify the case ID containing the comment to be updated.

  • :comment_id (required, String)

    Required element for UpdateCaseComment to identify the case ID to be updated.

  • :body (required, String)

    Required element for UpdateCaseComment to identify the content for the comment to be updated.

Returns:

See Also:



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

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

#update_case_status(params = {}) ⇒ Types::UpdateCaseStatusResponse

Updates the state transitions for a designated cases.

Self-managed: the following states are available for self-managed cases.

  • Submitted → Detection and Analysis

  • Detection and Analysis → Containment, Eradication, and Recovery

  • Detection and Analysis → Post-incident Activities

  • Containment, Eradication, and Recovery → Detection and Analysis

  • Containment, Eradication, and Recovery → Post-incident Activities

  • Post-incident Activities → Containment, Eradication, and Recovery

  • Post-incident Activities → Detection and Analysis

  • Any → Closed

AWS supported: You must use the CloseCase API to close.

Examples:

Example: Invoke UpdateCaseStatus


resp = client.update_case_status({
  case_id: "8403556009", 
  case_status: "Post-incident Activities", 
})

resp.to_h outputs the following:
{
  case_status: "Post-incident Activities", 
}

Request syntax with placeholder values


resp = client.update_case_status({
  case_id: "CaseId", # required
  case_status: "Submitted", # required, accepts Submitted, Detection and Analysis, Containment, Eradication and Recovery, Post-incident Activities
})

Response structure


resp.case_status #=> String, one of "Submitted", "Detection and Analysis", "Containment, Eradication and Recovery", "Post-incident Activities"

Parameters:

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

    ({})

Options Hash (params):

  • :case_id (required, String)

    Required element for UpdateCaseStatus to identify the case to update.

  • :case_status (required, String)

    Required element for UpdateCaseStatus to identify the status for a case. Options include Submitted | Detection and Analysis | Containment, Eradication and Recovery | Post-incident Activities.

Returns:

See Also:



2051
2052
2053
2054
# File 'gems/aws-sdk-securityir/lib/aws-sdk-securityir/client.rb', line 2051

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

#update_membership(params = {}) ⇒ Struct

Updates membership configuration.

Examples:

Example: Invoke UpdateMembership


resp = client.update_membership({
  incident_response_team: [
    {
      name: "Bob Jones", 
      email: "bob.jones@gmail.com", 
      job_title: "Security Responder", 
    }, 
    {
      name: "Alice", 
      email: "alice@example.com", 
      job_title: "CEO", 
    }, 
  ], 
  membership_id: "m-abcd1234efgh", 
  membership_name: "New membership name", 
  opt_in_features: [
    {
      feature_name: "Triage", 
      is_enabled: true, 
    }, 
  ], 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.update_membership({
  membership_id: "MembershipId", # required
  membership_name: "MembershipName",
  incident_response_team: [
    {
      name: "IncidentResponderName", # required
      job_title: "JobTitle", # required
      email: "EmailAddress", # required
    },
  ],
  opt_in_features: [
    {
      feature_name: "Triage", # required, accepts Triage
      is_enabled: false, # required
    },
  ],
  membership_accounts_configurations_update: {
    cover_entire_organization: false,
    organizational_units_to_add: ["OrganizationalUnitId"],
    organizational_units_to_remove: ["OrganizationalUnitId"],
  },
  undo_membership_cancellation: false,
})

Parameters:

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

    ({})

Options Hash (params):

  • :membership_id (required, String)

    Required element for UpdateMembership to identify the membership to update.

  • :membership_name (String)

    Optional element for UpdateMembership to update the membership name.

  • :incident_response_team (Array<Types::IncidentResponder>)

    Optional element for UpdateMembership to update the membership name.

  • :opt_in_features (Array<Types::OptInFeature>)

    Optional element for UpdateMembership to enable or disable opt-in features for the service.

  • :membership_accounts_configurations_update (Types::MembershipAccountsConfigurationsUpdate)

    The membershipAccountsConfigurationsUpdate field in the UpdateMembershipRequest structure allows you to update the configuration settings for accounts within a membership.

    This field is optional and contains a structure of type MembershipAccountsConfigurationsUpdate that specifies the updated account configurations for the membership.

  • :undo_membership_cancellation (Boolean)

    The undoMembershipCancellation parameter is a boolean flag that indicates whether to reverse a previously requested membership cancellation. When set to true, this will revoke the cancellation request and maintain the membership status.

    This parameter is optional and can be used in scenarios where you need to restore a membership that was marked for cancellation but hasn't been fully terminated yet.

    • If set to true, the cancellation request will be revoked

    • If set to false the service will throw a ValidationException.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2157
2158
2159
2160
# File 'gems/aws-sdk-securityir/lib/aws-sdk-securityir/client.rb', line 2157

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

#update_resolver_type(params = {}) ⇒ Types::UpdateResolverTypeResponse

Updates the resolver type for a case.

This is a one-way action and cannot be reversed.

Examples:

Example: Invoke UpdateResolverType


resp = client.update_resolver_type({
  case_id: "8403556009", 
  resolver_type: "AWS", 
})

resp.to_h outputs the following:
{
  case_id: "8403556009", 
  case_status: "Detection and Analysis", 
  resolver_type: "AWS", 
}

Request syntax with placeholder values


resp = client.update_resolver_type({
  case_id: "CaseId", # required
  resolver_type: "AWS", # required, accepts AWS, Self
})

Response structure


resp.case_id #=> String
resp.case_status #=> String, one of "Submitted", "Acknowledged", "Detection and Analysis", "Containment, Eradication and Recovery", "Post-incident Activities", "Ready to Close", "Closed"
resp.resolver_type #=> String, one of "AWS", "Self"

Parameters:

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

    ({})

Options Hash (params):

  • :case_id (required, String)

    Required element for UpdateResolverType to identify the case to update.

  • :resolver_type (required, String)

    Required element for UpdateResolverType to identify the new resolver.

Returns:

See Also:



2211
2212
2213
2214
# File 'gems/aws-sdk-securityir/lib/aws-sdk-securityir/client.rb', line 2211

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