Class: Aws::B2bi::Client

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

Overview

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

client = Aws::B2bi::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):

  • :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, and :session_token options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • ~/.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::InstanceProfileCredentails 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)
  • :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)

    The client endpoint is normally constructed from the :region option. You should only configure an :endpoint when connecting to test or custom endpoints. This should be a valid HTTP(S) URI.

  • :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/. It should have a maximum length of 50.

  • :secret_access_key (String)
  • :session_token (String)
  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disable response data type conversions. 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.

    When :simple_json is enabled, the request parameters hash must be formatted exactly as the DynamoDB API expects.

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

  • :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::B2bi::EndpointProvider)

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

  • :http_proxy (URI::HTTP, String)

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

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before raising a Timeout::Error.

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

  • :ssl_timeout (Float) — default: nil

    Sets the SSL timeout in seconds.

  • :http_wire_trace (Boolean) — default: false

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

  • :ssl_verify_peer (Boolean) — default: true

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

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



395
396
397
# File 'gems/aws-sdk-b2bi/lib/aws-sdk-b2bi/client.rb', line 395

def initialize(*args)
  super
end

Instance Method Details

#create_capability(params = {}) ⇒ Types::CreateCapabilityResponse

Instantiates a capability based on the specified parameters. A trading capability contains the information required to transform incoming EDI documents into JSON or XML outputs.

Examples:

Example: Sample CreateCapability call


resp = client.create_capability({
  name: "b2biexample", 
  type: "edi", 
  client_token: "foo", 
  configuration: {
    edi: {
      type: {
        x12_details: {
          version: "VERSION_4010", 
          transaction_set: "X12_110", 
        }, 
      }, 
      input_location: {
        key: "input/", 
        bucket_name: "test-bucket", 
      }, 
      output_location: {
        key: "output/", 
        bucket_name: "test-bucket", 
      }, 
      transformer_id: "tr-9a893cf536df4658b", 
    }, 
  }, 
  instructions_documents: [
    {
      key: "instructiondoc.txt", 
      bucket_name: "test-bucket", 
    }, 
  ], 
  tags: [
    {
      key: "capabilityKey1", 
      value: "capabilityValue1", 
    }, 
  ], 
})

resp.to_h outputs the following:
{
  name: "b2biexample", 
  type: "edi", 
  capability_arn: "arn:aws:b2bi:us-west-2:123456789012:capability/ca-963a8121e4fc4e348", 
  capability_id: "ca-963a8121e4fc4e348", 
  configuration: {
    edi: {
      type: {
        x12_details: {
          version: "VERSION_4010", 
          transaction_set: "X12_110", 
        }, 
      }, 
      input_location: {
        key: "input/", 
        bucket_name: "test-bucket", 
      }, 
      output_location: {
        key: "output/", 
        bucket_name: "test-bucket", 
      }, 
      transformer_id: "tr-9a893cf536df4658b", 
    }, 
  }, 
  created_at: Time.parse("2023-11-01T21:51:05.504Z"), 
  instructions_documents: [
    {
      key: "instructiondoc.txt", 
      bucket_name: "test-bucket", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.create_capability({
  name: "CapabilityName", # required
  type: "edi", # required, accepts edi
  configuration: { # required
    edi: {
      type: { # required
        x12_details: {
          transaction_set: "X12_110", # accepts X12_110, X12_180, X12_204, X12_210, X12_214, X12_215, X12_310, X12_315, X12_322, X12_404, X12_410, X12_820, X12_824, X12_830, X12_846, X12_850, X12_852, X12_855, X12_856, X12_860, X12_861, X12_864, X12_940, X12_990, X12_997
          version: "VERSION_4010", # accepts VERSION_4010, VERSION_4030, VERSION_5010
        },
      },
      input_location: { # required
        bucket_name: "BucketName",
        key: "S3Key",
      },
      output_location: { # required
        bucket_name: "BucketName",
        key: "S3Key",
      },
      transformer_id: "TransformerId", # required
    },
  },
  instructions_documents: [
    {
      bucket_name: "BucketName",
      key: "S3Key",
    },
  ],
  client_token: "String",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.capability_id #=> String
resp.capability_arn #=> String
resp.name #=> String
resp.type #=> String, one of "edi"
resp.configuration.edi.type.x12_details.transaction_set #=> String, one of "X12_110", "X12_180", "X12_204", "X12_210", "X12_214", "X12_215", "X12_310", "X12_315", "X12_322", "X12_404", "X12_410", "X12_820", "X12_824", "X12_830", "X12_846", "X12_850", "X12_852", "X12_855", "X12_856", "X12_860", "X12_861", "X12_864", "X12_940", "X12_990", "X12_997"
resp.configuration.edi.type.x12_details.version #=> String, one of "VERSION_4010", "VERSION_4030", "VERSION_5010"
resp.configuration.edi.input_location.bucket_name #=> String
resp.configuration.edi.input_location.key #=> String
resp.configuration.edi.output_location.bucket_name #=> String
resp.configuration.edi.output_location.key #=> String
resp.configuration.edi.transformer_id #=> String
resp.instructions_documents #=> Array
resp.instructions_documents[0].bucket_name #=> String
resp.instructions_documents[0].key #=> String
resp.created_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    Specifies the name of the capability, used to identify it.

  • :type (required, String)

    Specifies the type of the capability. Currently, only edi is supported.

  • :configuration (required, Types::CapabilityConfiguration)

    Specifies a structure that contains the details for a capability.

  • :instructions_documents (Array<Types::S3Location>)

    Specifies one or more locations in Amazon S3, each specifying an EDI document that can be used with this capability. Each item contains the name of the bucket and the key, to identify the document's location.

  • :client_token (String)

    Reserved for future use.

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

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

    Specifies the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.

Returns:

See Also:



576
577
578
579
# File 'gems/aws-sdk-b2bi/lib/aws-sdk-b2bi/client.rb', line 576

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

#create_partnership(params = {}) ⇒ Types::CreatePartnershipResponse

Creates a partnership between a customer and a trading partner, based on the supplied parameters. A partnership represents the connection between you and your trading partner. It ties together a profile and one or more trading capabilities.

Examples:

Example: Sample CreatePartnership call


resp = client.create_partnership({
  name: "b2bipartner", 
  capabilities: [
    "ca-963a8121e4fc4e348", 
  ], 
  client_token: "foo", 
  email: "john@example.com", 
  phone: "5555555555", 
  profile_id: "p-60fbc37c87f04fce9", 
  tags: [
    {
      key: "sampleKey1", 
      value: "sampleValue1", 
    }, 
  ], 
})

resp.to_h outputs the following:
{
  name: "b2bipartner", 
  capabilities: [
    "ca-963a8121e4fc4e348", 
  ], 
  created_at: Time.parse("2023-11-01T21:51:05.504Z"), 
  email: "john@example.com", 
  partnership_arn: "arn:aws:b2bi:us-west-2:123456789012:partnership/ps-60fbc37c87f04fce9", 
  partnership_id: "ps-219fa02f5b4242af8", 
  phone: "5555555555", 
  profile_id: "p-60fbc37c87f04fce9", 
  trading_partner_id: "tp-2a17ca447f6f4a8a8", 
}

Request syntax with placeholder values


resp = client.create_partnership({
  profile_id: "ProfileId", # required
  name: "PartnerName", # required
  email: "Email", # required
  phone: "Phone",
  capabilities: ["CapabilityId"],
  client_token: "String",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.profile_id #=> String
resp.partnership_id #=> String
resp.partnership_arn #=> String
resp.name #=> String
resp.email #=> String
resp.phone #=> String
resp.capabilities #=> Array
resp.capabilities[0] #=> String
resp.trading_partner_id #=> String
resp.created_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :profile_id (required, String)

    Specifies the unique, system-generated identifier for the profile connected to this partnership.

  • :name (required, String)

    Specifies a descriptive name for the partnership.

  • :email (required, String)

    Specifies the email address associated with this trading partner.

  • :phone (String)

    Specifies the phone number associated with the partnership.

  • :capabilities (Array<String>)

    Specifies a list of the capabilities associated with this partnership.

  • :client_token (String)

    Reserved for future use.

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

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

    Specifies the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.

Returns:

See Also:



694
695
696
697
# File 'gems/aws-sdk-b2bi/lib/aws-sdk-b2bi/client.rb', line 694

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

#create_profile(params = {}) ⇒ Types::CreateProfileResponse

Creates a customer profile. You can have up to five customer profiles, each representing a distinct private network. A profile is the mechanism used to create the concept of a private network.

Examples:

Example: Sample CreateProfile call


resp = client.create_profile({
  name: "Shipping Profile", 
  business_name: "John's Shipping", 
  client_token: "foo", 
  email: "john@example.com", 
  logging: "ENABLED", 
  phone: "5555555555", 
  tags: [
    {
      key: "sampleKey", 
      value: "sampleValue", 
    }, 
  ], 
})

resp.to_h outputs the following:
{
  name: "Shipping Profile", 
  business_name: "John's Trucking", 
  created_at: Time.parse("2023-11-01T21:51:05.504Z"), 
  email: "john@example.com", 
  log_group_name: "b2bi/p-60fbc37c87f04fce9-Logs", 
  logging: "ENABLED", 
  phone: "5555555555", 
  profile_arn: "arn:aws:b2bi:us-west-2:123456789012:profile/p-60fbc37c87f04fce9", 
  profile_id: "p-60fbc37c87f04fce9", 
}

Request syntax with placeholder values


resp = client.create_profile({
  name: "ProfileName", # required
  email: "Email",
  phone: "Phone", # required
  business_name: "BusinessName", # required
  logging: "ENABLED", # required, accepts ENABLED, DISABLED
  client_token: "String",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.profile_id #=> String
resp.profile_arn #=> String
resp.name #=> String
resp.business_name #=> String
resp.phone #=> String
resp.email #=> String
resp.logging #=> String, one of "ENABLED", "DISABLED"
resp.log_group_name #=> String
resp.created_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    Specifies the name of the profile.

  • :email (String)

    Specifies the email address associated with this customer profile.

  • :phone (required, String)

    Specifies the phone number associated with the profile.

  • :business_name (required, String)

    Specifies the name for the business associated with this profile.

  • :logging (required, String)

    Specifies whether or not logging is enabled for this profile.

  • :client_token (String)

    Reserved for future use.

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

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

    Specifies the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.

Returns:

See Also:



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

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

#create_transformer(params = {}) ⇒ Types::CreateTransformerResponse

Creates a transformer. A transformer describes how to process the incoming EDI documents and extract the necessary information to the output file.

Examples:

Example: Sample CreateTransformer call


resp = client.create_transformer({
  name: "transformJSON", 
  client_token: "foo", 
  edi_type: {
    x12_details: {
      version: "VERSION_4010", 
      transaction_set: "X12_110", 
    }, 
  }, 
  file_format: "JSON", 
  mapping_template: "{}", 
  sample_document: "s3://test-bucket/sampleDoc.txt", 
  tags: [
    {
      key: "sampleKey", 
      value: "sampleValue", 
    }, 
  ], 
})

resp.to_h outputs the following:
{
  name: "transformJSON", 
  created_at: Time.parse("2023-11-01T21:51:05.504Z"), 
  edi_type: {
    x12_details: {
      version: "VERSION_4010", 
      transaction_set: "X12_110", 
    }, 
  }, 
  file_format: "JSON", 
  mapping_template: "$", 
  sample_document: "s3://test-bucket/sampleDoc.txt", 
  status: "inactive", 
  transformer_arn: "arn:aws:b2bi:us-west-2:123456789012:transformer/tr-974c129999f84d8c9", 
  transformer_id: "tr-974c129999f84d8c9", 
}

Request syntax with placeholder values


resp = client.create_transformer({
  name: "TransformerName", # required
  file_format: "XML", # required, accepts XML, JSON
  mapping_template: "MappingTemplate", # required
  edi_type: { # required
    x12_details: {
      transaction_set: "X12_110", # accepts X12_110, X12_180, X12_204, X12_210, X12_214, X12_215, X12_310, X12_315, X12_322, X12_404, X12_410, X12_820, X12_824, X12_830, X12_846, X12_850, X12_852, X12_855, X12_856, X12_860, X12_861, X12_864, X12_940, X12_990, X12_997
      version: "VERSION_4010", # accepts VERSION_4010, VERSION_4030, VERSION_5010
    },
  },
  sample_document: "FileLocation",
  client_token: "String",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.transformer_id #=> String
resp.transformer_arn #=> String
resp.name #=> String
resp.file_format #=> String, one of "XML", "JSON"
resp.mapping_template #=> String
resp.status #=> String, one of "active", "inactive"
resp.edi_type.x12_details.transaction_set #=> String, one of "X12_110", "X12_180", "X12_204", "X12_210", "X12_214", "X12_215", "X12_310", "X12_315", "X12_322", "X12_404", "X12_410", "X12_820", "X12_824", "X12_830", "X12_846", "X12_850", "X12_852", "X12_855", "X12_856", "X12_860", "X12_861", "X12_864", "X12_940", "X12_990", "X12_997"
resp.edi_type.x12_details.version #=> String, one of "VERSION_4010", "VERSION_4030", "VERSION_5010"
resp.sample_document #=> String
resp.created_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    Specifies the name of the transformer, used to identify it.

  • :file_format (required, String)

    Specifies that the currently supported file formats for EDI transformations are JSON and XML.

  • :mapping_template (required, String)

    Specifies the name of the mapping template for the transformer. This template is used to convert the input document into the correct set of objects.

  • :edi_type (required, Types::EdiType)

    Specifies the details for the EDI standard that is being used for the transformer. Currently, only X12 is supported. X12 is a set of standards and corresponding messages that define specific business documents.

  • :sample_document (String)

    Specifies a sample EDI document that is used by a transformer as a guide for processing the EDI data.

  • :client_token (String)

    Reserved for future use.

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

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

    Specifies the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.

Returns:

See Also:



939
940
941
942
# File 'gems/aws-sdk-b2bi/lib/aws-sdk-b2bi/client.rb', line 939

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

#delete_capability(params = {}) ⇒ Struct

Deletes the specified capability. A trading capability contains the information required to transform incoming EDI documents into JSON or XML outputs.

Examples:

Example: Sample DeleteCapabilty call


resp = client.delete_capability({
  capability_id: "ca-963a8121e4fc4e348", 
})

Request syntax with placeholder values


resp = client.delete_capability({
  capability_id: "CapabilityId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :capability_id (required, String)

    Specifies a system-assigned unique identifier for the capability.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



970
971
972
973
# File 'gems/aws-sdk-b2bi/lib/aws-sdk-b2bi/client.rb', line 970

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

#delete_partnership(params = {}) ⇒ Struct

Deletes the specified partnership. A partnership represents the connection between you and your trading partner. It ties together a profile and one or more trading capabilities.

Examples:

Example: Sample DeletePartnership call


resp = client.delete_partnership({
  partnership_id: "ps-219fa02f5b4242af8", 
})

Request syntax with placeholder values


resp = client.delete_partnership({
  partnership_id: "PartnershipId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :partnership_id (required, String)

    Specifies the unique, system-generated identifier for a partnership.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1001
1002
1003
1004
# File 'gems/aws-sdk-b2bi/lib/aws-sdk-b2bi/client.rb', line 1001

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

#delete_profile(params = {}) ⇒ Struct

Deletes the specified profile. A profile is the mechanism used to create the concept of a private network.

Examples:

Example: Sample DeleteProfile call


resp = client.delete_profile({
  profile_id: "p-60fbc37c87f04fce9", 
})

Request syntax with placeholder values


resp = client.delete_profile({
  profile_id: "ProfileId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :profile_id (required, String)

    Specifies the unique, system-generated identifier for the profile.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1031
1032
1033
1034
# File 'gems/aws-sdk-b2bi/lib/aws-sdk-b2bi/client.rb', line 1031

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

#delete_transformer(params = {}) ⇒ Struct

Deletes the specified transformer. A transformer describes how to process the incoming EDI documents and extract the necessary information to the output file.

Examples:

Example: Sample DeleteTransformer call


resp = client.delete_transformer({
  transformer_id: "tr-974c129999f84d8c9", 
})

Request syntax with placeholder values


resp = client.delete_transformer({
  transformer_id: "TransformerId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :transformer_id (required, String)

    Specifies the system-assigned unique identifier for the transformer.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1062
1063
1064
1065
# File 'gems/aws-sdk-b2bi/lib/aws-sdk-b2bi/client.rb', line 1062

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

#get_capability(params = {}) ⇒ Types::GetCapabilityResponse

Retrieves the details for the specified capability. A trading capability contains the information required to transform incoming EDI documents into JSON or XML outputs.

Examples:

Example: Sample GetCapabilty call


resp = client.get_capability({
  capability_id: "ca-963a8121e4fc4e348", 
})

resp.to_h outputs the following:
{
  name: "b2biexample", 
  type: "edi", 
  capability_arn: "arn:aws:b2bi:us-west-2:123456789012:capability/ca-963a8121e4fc4e348", 
  capability_id: "ca-963a8121e4fc4e348", 
  configuration: {
    edi: {
      type: {
        x12_details: {
          version: "VERSION_4010", 
          transaction_set: "X12_110", 
        }, 
      }, 
      input_location: {
        key: "input/", 
        bucket_name: "test-bucket", 
      }, 
      output_location: {
        key: "output/", 
        bucket_name: "test-bucket", 
      }, 
      transformer_id: "tr-9a893cf536df4658b", 
    }, 
  }, 
  created_at: Time.parse("2023-11-01T21:51:05.504Z"), 
  instructions_documents: [
    {
      key: "instructiondoc.txt", 
      bucket_name: "test-bucket", 
    }, 
  ], 
  modified_at: Time.parse("2023-11-02T21:51:05.504Z"), 
}

Request syntax with placeholder values


resp = client.get_capability({
  capability_id: "CapabilityId", # required
})

Response structure


resp.capability_id #=> String
resp.capability_arn #=> String
resp.name #=> String
resp.type #=> String, one of "edi"
resp.configuration.edi.type.x12_details.transaction_set #=> String, one of "X12_110", "X12_180", "X12_204", "X12_210", "X12_214", "X12_215", "X12_310", "X12_315", "X12_322", "X12_404", "X12_410", "X12_820", "X12_824", "X12_830", "X12_846", "X12_850", "X12_852", "X12_855", "X12_856", "X12_860", "X12_861", "X12_864", "X12_940", "X12_990", "X12_997"
resp.configuration.edi.type.x12_details.version #=> String, one of "VERSION_4010", "VERSION_4030", "VERSION_5010"
resp.configuration.edi.input_location.bucket_name #=> String
resp.configuration.edi.input_location.key #=> String
resp.configuration.edi.output_location.bucket_name #=> String
resp.configuration.edi.output_location.key #=> String
resp.configuration.edi.transformer_id #=> String
resp.instructions_documents #=> Array
resp.instructions_documents[0].bucket_name #=> String
resp.instructions_documents[0].key #=> String
resp.created_at #=> Time
resp.modified_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :capability_id (required, String)

    Specifies a system-assigned unique identifier for the capability.

Returns:

See Also:



1156
1157
1158
1159
# File 'gems/aws-sdk-b2bi/lib/aws-sdk-b2bi/client.rb', line 1156

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

#get_partnership(params = {}) ⇒ Types::GetPartnershipResponse

Retrieves the details for a partnership, based on the partner and profile IDs specified. A partnership represents the connection between you and your trading partner. It ties together a profile and one or more trading capabilities.

Examples:

Example: Sample GetPartnership call


resp = client.get_partnership({
  partnership_id: "ps-219fa02f5b4242af8", 
})

resp.to_h outputs the following:
{
  name: "b2bipartner", 
  capabilities: [
    "ca-963a8121e4fc4e348", 
  ], 
  created_at: Time.parse("2023-11-01T21:51:05.504Z"), 
  email: "john@example.com", 
  modified_at: Time.parse("2023-11-01T21:51:05.504Z"), 
  partnership_arn: "arn:aws:b2bi:us-west-2:123456789012:partnership/ps-219fa02f5b4242af8", 
  partnership_id: "ps-219fa02f5b4242af8", 
  phone: "5555555555", 
  profile_id: "p-60fbc37c87f04fce9", 
  trading_partner_id: "tp-2a17ca447f6f4a8a8", 
}

Request syntax with placeholder values


resp = client.get_partnership({
  partnership_id: "PartnershipId", # required
})

Response structure


resp.profile_id #=> String
resp.partnership_id #=> String
resp.partnership_arn #=> String
resp.name #=> String
resp.email #=> String
resp.phone #=> String
resp.capabilities #=> Array
resp.capabilities[0] #=> String
resp.trading_partner_id #=> String
resp.created_at #=> Time
resp.modified_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :partnership_id (required, String)

    Specifies the unique, system-generated identifier for a partnership.

Returns:

See Also:



1229
1230
1231
1232
# File 'gems/aws-sdk-b2bi/lib/aws-sdk-b2bi/client.rb', line 1229

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

#get_profile(params = {}) ⇒ Types::GetProfileResponse

Retrieves the details for the profile specified by the profile ID. A profile is the mechanism used to create the concept of a private network.

Examples:

Example: Sample GetProfile call


resp = client.get_profile({
  profile_id: "p-60fbc37c87f04fce9", 
})

resp.to_h outputs the following:
{
  name: "Shipping Profile", 
  business_name: "John's Trucking", 
  created_at: Time.parse("2023-11-01T21:51:05.504Z"), 
  email: "john@example.com", 
  log_group_name: "b2bi/p-60fbc37c87f04fce9-Logs", 
  logging: "ENABLED", 
  phone: "5555555555", 
  profile_arn: "arn:aws:b2bi:us-west-2:123456789012:profile/p-60fbc37c87f04fce9", 
  profile_id: "p-60fbc37c87f04fce9", 
}

Request syntax with placeholder values


resp = client.get_profile({
  profile_id: "ProfileId", # required
})

Response structure


resp.profile_id #=> String
resp.profile_arn #=> String
resp.name #=> String
resp.email #=> String
resp.phone #=> String
resp.business_name #=> String
resp.logging #=> String, one of "ENABLED", "DISABLED"
resp.log_group_name #=> String
resp.created_at #=> Time
resp.modified_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :profile_id (required, String)

    Specifies the unique, system-generated identifier for the profile.

Returns:

See Also:



1297
1298
1299
1300
# File 'gems/aws-sdk-b2bi/lib/aws-sdk-b2bi/client.rb', line 1297

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

#get_transformer(params = {}) ⇒ Types::GetTransformerResponse

Retrieves the details for the transformer specified by the transformer ID. A transformer describes how to process the incoming EDI documents and extract the necessary information to the output file.

Examples:

Example: Sample GetTransformer call


resp = client.get_transformer({
  transformer_id: "tr-974c129999f84d8c9", 
})

resp.to_h outputs the following:
{
  name: "transformJSON", 
  created_at: Time.parse("2023-11-01T21:51:05.504Z"), 
  edi_type: {
    x12_details: {
      version: "VERSION_4010", 
      transaction_set: "X12_110", 
    }, 
  }, 
  file_format: "JSON", 
  mapping_template: "$", 
  modified_at: Time.parse("2023-11-01T21:51:05.504Z"), 
  sample_document: "s3://test-bucket/sampleDoc.txt", 
  status: "inactive", 
  transformer_arn: "arn:aws:b2bi:us-west-2:123456789012:transformer/tr-974c129999f84d8c9", 
  transformer_id: "tr-974c129999f84d8c9", 
}

Request syntax with placeholder values


resp = client.get_transformer({
  transformer_id: "TransformerId", # required
})

Response structure


resp.transformer_id #=> String
resp.transformer_arn #=> String
resp.name #=> String
resp.file_format #=> String, one of "XML", "JSON"
resp.mapping_template #=> String
resp.status #=> String, one of "active", "inactive"
resp.edi_type.x12_details.transaction_set #=> String, one of "X12_110", "X12_180", "X12_204", "X12_210", "X12_214", "X12_215", "X12_310", "X12_315", "X12_322", "X12_404", "X12_410", "X12_820", "X12_824", "X12_830", "X12_846", "X12_850", "X12_852", "X12_855", "X12_856", "X12_860", "X12_861", "X12_864", "X12_940", "X12_990", "X12_997"
resp.edi_type.x12_details.version #=> String, one of "VERSION_4010", "VERSION_4030", "VERSION_5010"
resp.sample_document #=> String
resp.created_at #=> Time
resp.modified_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :transformer_id (required, String)

    Specifies the system-assigned unique identifier for the transformer.

Returns:

See Also:



1372
1373
1374
1375
# File 'gems/aws-sdk-b2bi/lib/aws-sdk-b2bi/client.rb', line 1372

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

#get_transformer_job(params = {}) ⇒ Types::GetTransformerJobResponse

Returns the details of the transformer run, based on the Transformer job ID.

Examples:

Example: Sample GetTransformerJob call


resp = client.get_transformer_job({
  transformer_id: "tr-974c129999f84d8c9", 
  transformer_job_id: "tj-vpYxfV7yQOqjMSYllEslLw", 
})

resp.to_h outputs the following:
{
  message: "Transformed, writing output", 
  output_files: [
    {
      key: "output/sample-214.edi.2023-11-01T10:44:03.353Z.json", 
      bucket_name: "gt-edi-test", 
    }, 
  ], 
  status: "succeeded", 
}

Request syntax with placeholder values


resp = client.get_transformer_job({
  transformer_job_id: "TransformerJobId", # required
  transformer_id: "TransformerId", # required
})

Response structure


resp.status #=> String, one of "running", "succeeded", "failed"
resp.output_files #=> Array
resp.output_files[0].bucket_name #=> String
resp.output_files[0].key #=> String
resp.message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :transformer_job_id (required, String)

    Specifies the unique, system-generated identifier for a transformer run.

  • :transformer_id (required, String)

    Specifies the system-assigned unique identifier for the transformer.

Returns:

See Also:



1432
1433
1434
1435
# File 'gems/aws-sdk-b2bi/lib/aws-sdk-b2bi/client.rb', line 1432

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

#list_capabilities(params = {}) ⇒ Types::ListCapabilitiesResponse

Lists the capabilities associated with your Amazon Web Services account for your current or specified region. A trading capability contains the information required to transform incoming EDI documents into JSON or XML outputs.

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

Examples:

Example: Sample ListCapabilities call


resp = client.list_capabilities({
  max_results: 50, 
  next_token: "foo", 
})

resp.to_h outputs the following:
{
  capabilities: [
    {
      name: "b2biexample", 
      type: "edi", 
      capability_id: "ca-963a8121e4fc4e348", 
      created_at: Time.parse("2023-11-01T21:51:05.504Z"), 
      modified_at: Time.parse("2023-11-01T21:51:05.504Z"), 
    }, 
  ], 
  next_token: "foo", 
}

Request syntax with placeholder values


resp = client.list_capabilities({
  next_token: "PageToken",
  max_results: 1,
})

Response structure


resp.capabilities #=> Array
resp.capabilities[0].capability_id #=> String
resp.capabilities[0].name #=> String
resp.capabilities[0].type #=> String, one of "edi"
resp.capabilities[0].created_at #=> Time
resp.capabilities[0].modified_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    When additional results are obtained from the command, a NextToken parameter is returned in the output. You can then pass the NextToken parameter in a subsequent command to continue listing additional resources.

  • :max_results (Integer)

    Specifies the maximum number of capabilities to return.

Returns:

See Also:



1501
1502
1503
1504
# File 'gems/aws-sdk-b2bi/lib/aws-sdk-b2bi/client.rb', line 1501

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

#list_partnerships(params = {}) ⇒ Types::ListPartnershipsResponse

Lists the partnerships associated with your Amazon Web Services account for your current or specified region. A partnership represents the connection between you and your trading partner. It ties together a profile and one or more trading capabilities.

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

Examples:

Example: Sample ListPartnerships call


resp = client.list_partnerships({
  max_results: 50, 
  next_token: "foo", 
  profile_id: "p-60fbc37c87f04fce9", 
})

resp.to_h outputs the following:
{
  next_token: "string", 
  partnerships: [
    {
      name: "b2bipartner", 
      capabilities: [
        "ca-963a8121e4fc4e348", 
      ], 
      created_at: Time.parse("2023-11-01T21:51:05.504Z"), 
      modified_at: Time.parse("2023-11-01T21:51:05.504Z"), 
      partnership_id: "ps-219fa02f5b4242af8", 
      profile_id: "p-60fbc37c87f04fce9", 
      trading_partner_id: "tp-2a17ca447f6f4a8a8", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_partnerships({
  profile_id: "ProfileId",
  next_token: "PageToken",
  max_results: 1,
})

Response structure


resp.partnerships #=> Array
resp.partnerships[0].profile_id #=> String
resp.partnerships[0].partnership_id #=> String
resp.partnerships[0].name #=> String
resp.partnerships[0].capabilities #=> Array
resp.partnerships[0].capabilities[0] #=> String
resp.partnerships[0].trading_partner_id #=> String
resp.partnerships[0].created_at #=> Time
resp.partnerships[0].modified_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :profile_id (String)

    Specifies the unique, system-generated identifier for the profile connected to this partnership.

  • :next_token (String)

    When additional results are obtained from the command, a NextToken parameter is returned in the output. You can then pass the NextToken parameter in a subsequent command to continue listing additional resources.

  • :max_results (Integer)

    Specifies the maximum number of capabilities to return.

Returns:

See Also:



1583
1584
1585
1586
# File 'gems/aws-sdk-b2bi/lib/aws-sdk-b2bi/client.rb', line 1583

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

#list_profiles(params = {}) ⇒ Types::ListProfilesResponse

Lists the profiles associated with your Amazon Web Services account for your current or specified region. A profile is the mechanism used to create the concept of a private network.

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

Examples:

Example: Sample ListProfiles call


resp = client.list_profiles({
  max_results: 50, 
  next_token: "foo", 
})

resp.to_h outputs the following:
{
  next_token: "foo", 
  profiles: [
    {
      name: "Shipping Profile", 
      business_name: "John's Trucking", 
      created_at: Time.parse("2023-11-01T21:51:05.504Z"), 
      log_group_name: "b2bi/p-60fbc37c87f04fce9-Logs", 
      logging: "ENABLED", 
      profile_id: "p-60fbc37c87f04fce9", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_profiles({
  next_token: "PageToken",
  max_results: 1,
})

Response structure


resp.profiles #=> Array
resp.profiles[0].profile_id #=> String
resp.profiles[0].name #=> String
resp.profiles[0].business_name #=> String
resp.profiles[0].logging #=> String, one of "ENABLED", "DISABLED"
resp.profiles[0].log_group_name #=> String
resp.profiles[0].created_at #=> Time
resp.profiles[0].modified_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    When additional results are obtained from the command, a NextToken parameter is returned in the output. You can then pass the NextToken parameter in a subsequent command to continue listing additional resources.

  • :max_results (Integer)

    Specifies the maximum number of profiles to return.

Returns:

See Also:



1654
1655
1656
1657
# File 'gems/aws-sdk-b2bi/lib/aws-sdk-b2bi/client.rb', line 1654

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

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

Lists all of the tags associated with the Amazon Resource Name (ARN) that you specify. The resource can be a capability, partnership, profile, or transformer.

Examples:

Example: Sample ListTagsForResources call


resp = client.list_tags_for_resource({
  resource_arn: "arn:aws:b2bi:us-west-2:123456789012:profile/p-60fbc37c87f04fce9", 
})

resp.to_h outputs the following:
{
  tags: [
    {
      key: "sampleKey", 
      value: "SampleValue", 
    }, 
  ], 
}

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    Requests the tags associated with a particular Amazon Resource Name (ARN). An ARN is an identifier for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.

Returns:

See Also:



1705
1706
1707
1708
# File 'gems/aws-sdk-b2bi/lib/aws-sdk-b2bi/client.rb', line 1705

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

#list_transformers(params = {}) ⇒ Types::ListTransformersResponse

Lists the available transformers. A transformer describes how to process the incoming EDI documents and extract the necessary information to the output file.

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

Examples:

Example: Sample ListTransformers call


resp = client.list_transformers({
  max_results: 50, 
  next_token: "foo", 
})

resp.to_h outputs the following:
{
  next_token: "foo", 
  transformers: [
    {
      name: "transformJSON", 
      created_at: Time.parse("2023-11-01T21:51:05.504Z"), 
      edi_type: {
        x12_details: {
          version: "VERSION_4010", 
          transaction_set: "X12_110", 
        }, 
      }, 
      file_format: "JSON", 
      mapping_template: "$", 
      modified_at: Time.parse("2023-11-01T21:51:05.504Z"), 
      sample_document: "s3://test-bucket/sampleDoc.txt", 
      status: "inactive", 
      transformer_id: "tr-974c129999f84d8c9", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_transformers({
  next_token: "PageToken",
  max_results: 1,
})

Response structure


resp.transformers #=> Array
resp.transformers[0].transformer_id #=> String
resp.transformers[0].name #=> String
resp.transformers[0].file_format #=> String, one of "XML", "JSON"
resp.transformers[0].mapping_template #=> String
resp.transformers[0].status #=> String, one of "active", "inactive"
resp.transformers[0].edi_type.x12_details.transaction_set #=> String, one of "X12_110", "X12_180", "X12_204", "X12_210", "X12_214", "X12_215", "X12_310", "X12_315", "X12_322", "X12_404", "X12_410", "X12_820", "X12_824", "X12_830", "X12_846", "X12_850", "X12_852", "X12_855", "X12_856", "X12_860", "X12_861", "X12_864", "X12_940", "X12_990", "X12_997"
resp.transformers[0].edi_type.x12_details.version #=> String, one of "VERSION_4010", "VERSION_4030", "VERSION_5010"
resp.transformers[0].sample_document #=> String
resp.transformers[0].created_at #=> Time
resp.transformers[0].modified_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    When additional results are obtained from the command, a NextToken parameter is returned in the output. You can then pass the NextToken parameter in a subsequent command to continue listing additional resources.

  • :max_results (Integer)

    Specifies the number of items to return for the API response.

Returns:

See Also:



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

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

#start_transformer_job(params = {}) ⇒ Types::StartTransformerJobResponse

Runs a job, using a transformer, to parse input EDI (electronic data interchange) file into the output structures used by Amazon Web Services B2BI Data Interchange.

If you only want to transform EDI (electronic data interchange) documents, you don't need to create profiles, partnerships or capabilities. Just create and configure a transformer, and then run the StartTransformerJob API to process your files.

Examples:

Example: Sample StartTransformerJob call


resp = client.start_transformer_job({
  client_token: "foo", 
  input_file: {
    key: "input/inputFile.txt", 
    bucket_name: "test-bucket", 
  }, 
  output_location: {
    key: "output/", 
    bucket_name: "test-bucket", 
  }, 
  transformer_id: "tr-974c129999f84d8c9", 
})

resp.to_h outputs the following:
{
  transformer_job_id: "tj-vpYxfV7yQOqjMSYllEslLw", 
}

Request syntax with placeholder values


resp = client.start_transformer_job({
  input_file: { # required
    bucket_name: "BucketName",
    key: "S3Key",
  },
  output_location: { # required
    bucket_name: "BucketName",
    key: "S3Key",
  },
  transformer_id: "TransformerId", # required
  client_token: "String",
})

Response structure


resp.transformer_job_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :input_file (required, Types::S3Location)

    Specifies the location of the input file for the transformation. The location consists of an Amazon S3 bucket and prefix.

  • :output_location (required, Types::S3Location)

    Specifies the location of the output file for the transformation. The location consists of an Amazon S3 bucket and prefix.

  • :transformer_id (required, String)

    Specifies the system-assigned unique identifier for the transformer.

  • :client_token (String)

    Reserved for future use.

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

Returns:

See Also:



1866
1867
1868
1869
# File 'gems/aws-sdk-b2bi/lib/aws-sdk-b2bi/client.rb', line 1866

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

#tag_resource(params = {}) ⇒ Struct

Attaches a key-value pair to a resource, as identified by its Amazon Resource Name (ARN). Resources are capability, partnership, profile, transformers and other entities.

There is no response returned from this call.

Examples:

Example: Sample TagResource call


resp = client.tag_resource({
  resource_arn: "arn:aws:b2bi:us-west-2:123456789012:profile/p-60fbc37c87f04fce9", 
  tags: [
    {
      key: "sampleKey", 
      value: "SampleValue", 
    }, 
  ], 
})

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "AmazonResourceName", # required
  tags: [ # required
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    Specifies an Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.

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

    Specifies the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1918
1919
1920
1921
# File 'gems/aws-sdk-b2bi/lib/aws-sdk-b2bi/client.rb', line 1918

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

#test_mapping(params = {}) ⇒ Types::TestMappingResponse

Maps the input file according to the provided template file. The API call downloads the file contents from the Amazon S3 location, and passes the contents in as a string, to the inputFileContent parameter.

Examples:

Example: Sample TestMapping call


resp = client.test_mapping({
  file_format: "JSON", 
  input_file_content: "Sample file content", 
  mapping_template: "$", 
})

resp.to_h outputs the following:
{
  mapped_file_content: "Sample file content", 
}

Request syntax with placeholder values


resp = client.test_mapping({
  input_file_content: "TestMappingInputFileContent", # required
  mapping_template: "MappingTemplate", # required
  file_format: "XML", # required, accepts XML, JSON
})

Response structure


resp.mapped_file_content #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :input_file_content (required, String)

    Specify the contents of the EDI (electronic data interchange) XML or JSON file that is used as input for the transform.

  • :mapping_template (required, String)

    Specifies the name of the mapping template for the transformer. This template is used to convert the input document into the correct set of objects.

  • :file_format (required, String)

    Specifies that the currently supported file formats for EDI transformations are JSON and XML.

Returns:

See Also:



1975
1976
1977
1978
# File 'gems/aws-sdk-b2bi/lib/aws-sdk-b2bi/client.rb', line 1975

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

#test_parsing(params = {}) ⇒ Types::TestParsingResponse

Parses the input EDI (electronic data interchange) file. The input file has a file size limit of 250 KB.

Examples:

Example: Sample TestParsing call


resp = client.test_parsing({
  edi_type: {
    x12_details: {
      version: "VERSION_4010", 
      transaction_set: "X12_110", 
    }, 
  }, 
  file_format: "JSON", 
  input_file: {
    key: "sampleFile.txt", 
    bucket_name: "test-bucket", 
  }, 
})

resp.to_h outputs the following:
{
  parsed_file_content: "Sample parsed file content", 
}

Request syntax with placeholder values


resp = client.test_parsing({
  input_file: { # required
    bucket_name: "BucketName",
    key: "S3Key",
  },
  file_format: "XML", # required, accepts XML, JSON
  edi_type: { # required
    x12_details: {
      transaction_set: "X12_110", # accepts X12_110, X12_180, X12_204, X12_210, X12_214, X12_215, X12_310, X12_315, X12_322, X12_404, X12_410, X12_820, X12_824, X12_830, X12_846, X12_850, X12_852, X12_855, X12_856, X12_860, X12_861, X12_864, X12_940, X12_990, X12_997
      version: "VERSION_4010", # accepts VERSION_4010, VERSION_4030, VERSION_5010
    },
  },
})

Response structure


resp.parsed_file_content #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :input_file (required, Types::S3Location)

    Specifies an S3Location object, which contains the Amazon S3 bucket and prefix for the location of the input file.

  • :file_format (required, String)

    Specifies that the currently supported file formats for EDI transformations are JSON and XML.

  • :edi_type (required, Types::EdiType)

    Specifies the details for the EDI standard that is being used for the transformer. Currently, only X12 is supported. X12 is a set of standards and corresponding messages that define specific business documents.

Returns:

See Also:



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

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

#untag_resource(params = {}) ⇒ Struct

Detaches a key-value pair from the specified resource, as identified by its Amazon Resource Name (ARN). Resources are capability, partnership, profile, transformers and other entities.

Examples:

Example: Sample UntagResource call


resp = client.untag_resource({
  resource_arn: "arn:aws:b2bi:us-west-2:123456789012:profile/p-60fbc37c87f04fce9", 
  tag_keys: [
    "sampleKey", 
  ], 
})

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    Specifies an Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.

  • :tag_keys (required, Array<String>)

    Specifies the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2089
2090
2091
2092
# File 'gems/aws-sdk-b2bi/lib/aws-sdk-b2bi/client.rb', line 2089

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

#update_capability(params = {}) ⇒ Types::UpdateCapabilityResponse

Updates some of the parameters for a capability, based on the specified parameters. A trading capability contains the information required to transform incoming EDI documents into JSON or XML outputs.

Examples:

Example: Sample UpdateCapability call


resp = client.update_capability({
  name: "b2biexample", 
  capability_id: "ca-963a8121e4fc4e348", 
  configuration: {
    edi: {
      type: {
        x12_details: {
          version: "VERSION_4010", 
          transaction_set: "X12_110", 
        }, 
      }, 
      input_location: {
        key: "input/", 
        bucket_name: "test-bucket", 
      }, 
      output_location: {
        key: "output/", 
        bucket_name: "test-bucket", 
      }, 
      transformer_id: "tr-9a893cf536df4658b", 
    }, 
  }, 
  instructions_documents: [
    {
      key: "instructiondoc.txt", 
      bucket_name: "test-bucket", 
    }, 
  ], 
})

resp.to_h outputs the following:
{
  name: "b2biexample", 
  type: "edi", 
  capability_arn: "arn:aws:b2bi:us-west-2:123456789012:capability/ca-963a8121e4fc4e348", 
  capability_id: "ca-963a8121e4fc4e348", 
  configuration: {
    edi: {
      type: {
        x12_details: {
          version: "VERSION_4010", 
          transaction_set: "X12_110", 
        }, 
      }, 
      input_location: {
        key: "input/", 
        bucket_name: "test-bucket", 
      }, 
      output_location: {
        key: "output/", 
        bucket_name: "test-bucket", 
      }, 
      transformer_id: "tr-9a893cf536df4658b", 
    }, 
  }, 
  created_at: Time.parse("2023-11-01T21:51:05.504Z"), 
  instructions_documents: [
    {
      key: "instructiondoc.txt", 
      bucket_name: "test-bucket", 
    }, 
  ], 
  modified_at: Time.parse("2023-11-01T21:51:05.504Z"), 
}

Request syntax with placeholder values


resp = client.update_capability({
  capability_id: "CapabilityId", # required
  name: "CapabilityName",
  configuration: {
    edi: {
      type: { # required
        x12_details: {
          transaction_set: "X12_110", # accepts X12_110, X12_180, X12_204, X12_210, X12_214, X12_215, X12_310, X12_315, X12_322, X12_404, X12_410, X12_820, X12_824, X12_830, X12_846, X12_850, X12_852, X12_855, X12_856, X12_860, X12_861, X12_864, X12_940, X12_990, X12_997
          version: "VERSION_4010", # accepts VERSION_4010, VERSION_4030, VERSION_5010
        },
      },
      input_location: { # required
        bucket_name: "BucketName",
        key: "S3Key",
      },
      output_location: { # required
        bucket_name: "BucketName",
        key: "S3Key",
      },
      transformer_id: "TransformerId", # required
    },
  },
  instructions_documents: [
    {
      bucket_name: "BucketName",
      key: "S3Key",
    },
  ],
})

Response structure


resp.capability_id #=> String
resp.capability_arn #=> String
resp.name #=> String
resp.type #=> String, one of "edi"
resp.configuration.edi.type.x12_details.transaction_set #=> String, one of "X12_110", "X12_180", "X12_204", "X12_210", "X12_214", "X12_215", "X12_310", "X12_315", "X12_322", "X12_404", "X12_410", "X12_820", "X12_824", "X12_830", "X12_846", "X12_850", "X12_852", "X12_855", "X12_856", "X12_860", "X12_861", "X12_864", "X12_940", "X12_990", "X12_997"
resp.configuration.edi.type.x12_details.version #=> String, one of "VERSION_4010", "VERSION_4030", "VERSION_5010"
resp.configuration.edi.input_location.bucket_name #=> String
resp.configuration.edi.input_location.key #=> String
resp.configuration.edi.output_location.bucket_name #=> String
resp.configuration.edi.output_location.key #=> String
resp.configuration.edi.transformer_id #=> String
resp.instructions_documents #=> Array
resp.instructions_documents[0].bucket_name #=> String
resp.instructions_documents[0].key #=> String
resp.created_at #=> Time
resp.modified_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :capability_id (required, String)

    Specifies a system-assigned unique identifier for the capability.

  • :name (String)

    Specifies a new name for the capability, to replace the existing name.

  • :configuration (Types::CapabilityConfiguration)

    Specifies a structure that contains the details for a capability.

  • :instructions_documents (Array<Types::S3Location>)

    Specifies one or more locations in Amazon S3, each specifying an EDI document that can be used with this capability. Each item contains the name of the bucket and the key, to identify the document's location.

Returns:

See Also:



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

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

#update_partnership(params = {}) ⇒ Types::UpdatePartnershipResponse

Updates some of the parameters for a partnership between a customer and trading partner. A partnership represents the connection between you and your trading partner. It ties together a profile and one or more trading capabilities.

Examples:

Example: Sample UpdatePartnership call


resp = client.update_partnership({
  name: "b2bipartner", 
  capabilities: [
    "ca-963a8121e4fc4e348", 
  ], 
  partnership_id: "ps-219fa02f5b4242af8", 
})

resp.to_h outputs the following:
{
  name: "b2bipartner", 
  capabilities: [
    "ca-963a8121e4fc4e348", 
  ], 
  created_at: Time.parse("2023-11-01T21:51:05.504Z"), 
  email: "john@example.com", 
  modified_at: Time.parse("2023-11-01T21:51:05.504Z"), 
  partnership_arn: "arn:aws:b2bi:us-west-2:123456789012:partnership/ps-60fbc37c87f04fce9", 
  partnership_id: "ps-219fa02f5b4242af8", 
  phone: "5555555555", 
  profile_id: "p-60fbc37c87f04fce9", 
  trading_partner_id: "tp-2a17ca447f6f4a8a8", 
}

Request syntax with placeholder values


resp = client.update_partnership({
  partnership_id: "PartnershipId", # required
  name: "PartnerName",
  capabilities: ["CapabilityId"],
})

Response structure


resp.profile_id #=> String
resp.partnership_id #=> String
resp.partnership_arn #=> String
resp.name #=> String
resp.email #=> String
resp.phone #=> String
resp.capabilities #=> Array
resp.capabilities[0] #=> String
resp.trading_partner_id #=> String
resp.created_at #=> Time
resp.modified_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :partnership_id (required, String)

    Specifies the unique, system-generated identifier for a partnership.

  • :name (String)

    The name of the partnership, used to identify it.

  • :capabilities (Array<String>)

    List of the capabilities associated with this partnership.

Returns:

See Also:



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

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

#update_profile(params = {}) ⇒ Types::UpdateProfileResponse

Updates the specified parameters for a profile. A profile is the mechanism used to create the concept of a private network.

Examples:

Example: Sample UpdateProfile call


resp = client.update_profile({
  name: "Shipping Profile", 
  business_name: "John's Shipping", 
  email: "john@example.com", 
  phone: "5555555555", 
  profile_id: "p-60fbc37c87f04fce9", 
})

resp.to_h outputs the following:
{
  name: "Shipping Profile", 
  business_name: "John's Trucking", 
  created_at: Time.parse("2023-11-01T21:51:05.504Z"), 
  email: "john@example.com", 
  log_group_name: "b2bi/p-60fbc37c87f04fce9-Logs", 
  logging: "ENABLED", 
  modified_at: Time.parse("2023-11-02T21:51:05.504Z"), 
  phone: "5555555555", 
  profile_arn: "arn:aws:b2bi:us-west-2:123456789012:profile/p-60fbc37c87f04fce9", 
  profile_id: "p-60fbc37c87f04fce9", 
}

Request syntax with placeholder values


resp = client.update_profile({
  profile_id: "ProfileId", # required
  name: "ProfileName",
  email: "Email",
  phone: "Phone",
  business_name: "BusinessName",
})

Response structure


resp.profile_id #=> String
resp.profile_arn #=> String
resp.name #=> String
resp.email #=> String
resp.phone #=> String
resp.business_name #=> String
resp.logging #=> String, one of "ENABLED", "DISABLED"
resp.log_group_name #=> String
resp.created_at #=> Time
resp.modified_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :profile_id (required, String)

    Specifies the unique, system-generated identifier for the profile.

  • :name (String)

    The name of the profile, used to identify it.

  • :email (String)

    Specifies the email address associated with this customer profile.

  • :phone (String)

    Specifies the phone number associated with the profile.

  • :business_name (String)

    Specifies the name for the business associated with this profile.

Returns:

See Also:



2419
2420
2421
2422
# File 'gems/aws-sdk-b2bi/lib/aws-sdk-b2bi/client.rb', line 2419

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

#update_transformer(params = {}) ⇒ Types::UpdateTransformerResponse

Updates the specified parameters for a transformer. A transformer describes how to process the incoming EDI documents and extract the necessary information to the output file.

Examples:

Example: Sample UpdateTransformer call


resp = client.update_transformer({
  name: "transformJSON", 
  edi_type: {
    x12_details: {
      version: "VERSION_4010", 
      transaction_set: "X12_110", 
    }, 
  }, 
  file_format: "JSON", 
  mapping_template: "{}", 
  sample_document: "s3://test-bucket/sampleDoc.txt", 
  status: "inactive", 
  transformer_id: "tr-974c129999f84d8c9", 
})

resp.to_h outputs the following:
{
  name: "transformJSON", 
  created_at: Time.parse("2023-11-01T21:51:05.504Z"), 
  edi_type: {
    x12_details: {
      version: "VERSION_4010", 
      transaction_set: "X12_110", 
    }, 
  }, 
  file_format: "JSON", 
  mapping_template: "$", 
  modified_at: Time.parse("2023-11-01T21:51:05.504Z"), 
  sample_document: "s3://test-bucket/sampleDoc.txt", 
  status: "inactive", 
  transformer_arn: "arn:aws:b2bi:us-west-2:607686414464:transformer/tr-974c129999f84d8c9", 
  transformer_id: "tr-974c129999f84d8c9", 
}

Request syntax with placeholder values


resp = client.update_transformer({
  transformer_id: "TransformerId", # required
  name: "TransformerName",
  file_format: "XML", # accepts XML, JSON
  mapping_template: "MappingTemplate",
  status: "active", # accepts active, inactive
  edi_type: {
    x12_details: {
      transaction_set: "X12_110", # accepts X12_110, X12_180, X12_204, X12_210, X12_214, X12_215, X12_310, X12_315, X12_322, X12_404, X12_410, X12_820, X12_824, X12_830, X12_846, X12_850, X12_852, X12_855, X12_856, X12_860, X12_861, X12_864, X12_940, X12_990, X12_997
      version: "VERSION_4010", # accepts VERSION_4010, VERSION_4030, VERSION_5010
    },
  },
  sample_document: "FileLocation",
})

Response structure


resp.transformer_id #=> String
resp.transformer_arn #=> String
resp.name #=> String
resp.file_format #=> String, one of "XML", "JSON"
resp.mapping_template #=> String
resp.status #=> String, one of "active", "inactive"
resp.edi_type.x12_details.transaction_set #=> String, one of "X12_110", "X12_180", "X12_204", "X12_210", "X12_214", "X12_215", "X12_310", "X12_315", "X12_322", "X12_404", "X12_410", "X12_820", "X12_824", "X12_830", "X12_846", "X12_850", "X12_852", "X12_855", "X12_856", "X12_860", "X12_861", "X12_864", "X12_940", "X12_990", "X12_997"
resp.edi_type.x12_details.version #=> String, one of "VERSION_4010", "VERSION_4030", "VERSION_5010"
resp.sample_document #=> String
resp.created_at #=> Time
resp.modified_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :transformer_id (required, String)

    Specifies the system-assigned unique identifier for the transformer.

  • :name (String)

    Specify a new name for the transformer, if you want to update it.

  • :file_format (String)

    Specifies that the currently supported file formats for EDI transformations are JSON and XML.

  • :mapping_template (String)

    Specifies the name of the mapping template for the transformer. This template is used to convert the input document into the correct set of objects.

  • :status (String)

    Specifies the transformer's status. You can update the state of the transformer, from active to inactive, or inactive to active.

  • :edi_type (Types::EdiType)

    Specifies the details for the EDI standard that is being used for the transformer. Currently, only X12 is supported. X12 is a set of standards and corresponding messages that define specific business documents.

  • :sample_document (String)

    Specifies a sample EDI document that is used by a transformer as a guide for processing the EDI data.

Returns:

See Also:



2542
2543
2544
2545
# File 'gems/aws-sdk-b2bi/lib/aws-sdk-b2bi/client.rb', line 2542

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