Class: Aws::SupplyChain::Client

Inherits:
Seahorse::Client::Base
  • Object
show all
Includes:
ClientStubs
Defined in:
lib/aws-sdk-supplychain/client.rb

Overview

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

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

For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).

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

Class Attribute Summary collapse

API Operations collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

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

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

  • :credentials (required, Aws::CredentialProvider)

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

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

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

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

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

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

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

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

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

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

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

    • Aws.config`

    • The ‘:access_key_id`, `:secret_access_key`, `:session_token`, and `:account_id` options.

    • ENV, ENV, ENV, and ENV

    • ‘~/.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 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:

  • :access_key_id (String)
  • :account_id (String)
  • :active_endpoint_cache (Boolean) — default: false

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

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

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

  • :client_side_monitoring (Boolean) — default: false

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

  • :client_side_monitoring_client_id (String) — default: ""

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

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

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

  • :client_side_monitoring_port (Integer) — default: 31000

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

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

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

  • :convert_params (Boolean) — default: true

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

  • :correct_clock_skew (Boolean) — default: true

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

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

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

  • :disable_host_prefix_injection (Boolean) — default: false

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

  • :disable_request_compression (Boolean) — default: false

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

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

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

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

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

  • :endpoint_cache_max_threads (Integer) — default: 10

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

  • :endpoint_cache_poll_interval (Integer) — default: 60

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

  • :endpoint_discovery (Boolean) — default: false

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

  • :ignore_configured_endpoint_urls (Boolean)

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

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

    The log formatter.

  • :log_level (Symbol) — default: :info

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

  • :logger (Logger)

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

  • :max_attempts (Integer) — default: 3

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

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

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

  • :request_min_compression_size_bytes (Integer) — default: 10240

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

  • :retry_backoff (Proc)

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

  • :retry_base_delay (Float) — default: 0.3

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

  • :retry_jitter (Symbol) — default: :none

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

    @see 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:

  • :stub_responses (Boolean) — default: false

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

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

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

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

    • OpenTelemetry (OTel) - To use the OTel provider, install and require the

    ‘opentelemetry-sdk` gem and then, pass in an instance of a `Aws::Telemetry::OTelProvider` for telemetry provider.

  • :token_provider (Aws::TokenProvider)

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

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

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

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

  • :use_dualstack_endpoint (Boolean)

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

  • :use_fips_endpoint (Boolean)

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

  • :validate_params (Boolean) — default: true

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

  • :endpoint_provider (Aws::SupplyChain::EndpointProvider)

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



444
445
446
# File 'lib/aws-sdk-supplychain/client.rb', line 444

def initialize(*args)
  super
end

Class Attribute Details

.identifierObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



3608
3609
3610
# File 'lib/aws-sdk-supplychain/client.rb', line 3608

def identifier
  @identifier
end

Class Method Details

.errors_moduleObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



3611
3612
3613
# File 'lib/aws-sdk-supplychain/client.rb', line 3611

def errors_module
  Errors
end

Instance Method Details

#build_request(operation_name, params = {}) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

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


3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
# File 'lib/aws-sdk-supplychain/client.rb', line 3581

def build_request(operation_name, params = {})
  handlers = @handlers.for(operation_name)
  tracer = config.telemetry_provider.tracer_provider.tracer(
    Aws::Telemetry.module_to_tracer_name('Aws::SupplyChain')
  )
  context = Seahorse::Client::RequestContext.new(
    operation_name: operation_name,
    operation: config.api.operation(operation_name),
    client: self,
    params: params,
    config: config,
    tracer: tracer
  )
  context[:gem_name] = 'aws-sdk-supplychain'
  context[:gem_version] = '1.19.0'
  Seahorse::Client::Request.new(handlers, context)
end

#create_bill_of_materials_import_job(params = {}) ⇒ Types::CreateBillOfMaterialsImportJobResponse

CreateBillOfMaterialsImportJob creates an import job for the Product Bill Of Materials (BOM) entity. For information on the product_bom entity, see the AWS Supply Chain User Guide.

The CSV file must be located in an Amazon S3 location accessible to AWS Supply Chain. It is recommended to use the same Amazon S3 bucket created during your AWS Supply Chain instance creation.

Examples:

Example: Invoke CreateBillOfMaterialsImportJob


resp = client.create_bill_of_materials_import_job({
  client_token: "550e8400-e29b-41d4-a716-446655440000", 
  instance_id: "60f82bbd-71f7-4fcd-a941-472f574c5243", 
  s3uri: "s3://mybucketname/pathelemene/file.csv", 
})

resp.to_h outputs the following:
{
  job_id: "f79b359b-1515-4436-a3bf-bae7b33e47b4", 
}

Request syntax with placeholder values


resp = client.create_bill_of_materials_import_job({
  instance_id: "UUID", # required
  s3uri: "ConfigurationS3Uri", # required
  client_token: "ClientToken",
})

Response structure


resp.job_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The AWS Supply Chain instance identifier.

  • :s3uri (required, String)

    The S3 URI of the CSV file to be imported. The bucket must grant permissions for AWS Supply Chain to read the file.

  • :client_token (String)

    An idempotency token ensures the API request is only completed no more than once. This way, retrying the request will not trigger the operation multiple times. A client token is a unique, case-sensitive string of 33 to 128 ASCII characters. To make an idempotent API request, specify a client token in the request. You should not reuse the same client token for other requests. If you retry a successful request with the same client token, the request will succeed with no further actions being taken, and you will receive the same API response as the original successful request.

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

Returns:

See Also:



513
514
515
516
# File 'lib/aws-sdk-supplychain/client.rb', line 513

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

#create_data_integration_flow(params = {}) ⇒ Types::CreateDataIntegrationFlowResponse

Enables you to programmatically create a data pipeline to ingest data from source systems such as Amazon S3 buckets, to a predefined Amazon Web Services Supply Chain dataset (product, inbound_order) or a temporary dataset along with the data transformation query provided with the API.

Examples:

Example: Successful CreateDataIntegrationFlow for s3 to dataset flow


resp = client.create_data_integration_flow({
  name: "testStagingFlow", 
  instance_id: "8850c54e-e187-4fa7-89d4-6370f165174d", 
  sources: [
    {
      s3_source: {
        bucket_name: "aws-supply-chain-data-b8c7bb28-a576-4334-b481-6d6e8e47371f", 
        prefix: "example-prefix", 
      }, 
      source_name: "testSourceName", 
      source_type: "S3", 
    }, 
  ], 
  tags: {
    "tagKey1" => "tagValue1", 
  }, 
  target: {
    dataset_target: {
      dataset_identifier: "arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset", 
    }, 
    target_type: "DATASET", 
  }, 
  transformation: {
    sql_transformation: {
      query: "SELECT * FROM testSourceName", 
    }, 
    transformation_type: "SQL", 
  }, 
})

resp.to_h outputs the following:
{
  name: "testStagingFlow", 
  instance_id: "8850c54e-e187-4fa7-89d4-6370f165174d", 
}

Example: Successful CreateDataIntegrationFlow for dataset to dataset flow


resp = client.create_data_integration_flow({
  name: "trading-partner", 
  instance_id: "8850c54e-e187-4fa7-89d4-6370f165174d", 
  sources: [
    {
      dataset_source: {
        dataset_identifier: "arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset1", 
      }, 
      source_name: "testSourceName1", 
      source_type: "DATASET", 
    }, 
    {
      dataset_source: {
        dataset_identifier: "arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset2", 
      }, 
      source_name: "testSourceName2", 
      source_type: "DATASET", 
    }, 
  ], 
  tags: {
    "tagKey1" => "tagValue1", 
  }, 
  target: {
    dataset_target: {
      dataset_identifier: "arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/asc/datasets/trading_partner", 
    }, 
    target_type: "DATASET", 
  }, 
  transformation: {
    sql_transformation: {
      query: "SELECT S1.id AS id, S1.poc_org_unit_description AS description, S1.company_id AS company_id, S1.tpartner_type AS tpartner_type, S1.geo_id AS geo_id, S1.eff_start_date AS eff_start_date, S1.eff_end_date AS eff_end_date FROM testSourceName1 AS S1 LEFT JOIN testSourceName2 as S2 ON S1.id=S2.id", 
    }, 
    transformation_type: "SQL", 
  }, 
})

resp.to_h outputs the following:
{
  name: "trading-partner", 
  instance_id: "8850c54e-e187-4fa7-89d4-6370f165174d", 
}

Request syntax with placeholder values


resp = client.create_data_integration_flow({
  instance_id: "UUID", # required
  name: "DataIntegrationFlowName", # required
  sources: [ # required
    {
      source_type: "S3", # required, accepts S3, DATASET
      source_name: "DataIntegrationFlowSourceName", # required
      s3_source: {
        bucket_name: "S3BucketName", # required
        prefix: "DataIntegrationFlowS3Prefix", # required
        options: {
          file_type: "CSV", # accepts CSV, PARQUET, JSON
        },
      },
      dataset_source: {
        dataset_identifier: "DatasetIdentifier", # required
        options: {
          load_type: "INCREMENTAL", # accepts INCREMENTAL, REPLACE
          dedupe_records: false,
        },
      },
    },
  ],
  transformation: { # required
    transformation_type: "SQL", # required, accepts SQL, NONE
    sql_transformation: {
      query: "DataIntegrationFlowSQLQuery", # required
    },
  },
  target: { # required
    target_type: "S3", # required, accepts S3, DATASET
    s3_target: {
      bucket_name: "S3BucketName", # required
      prefix: "DataIntegrationFlowS3Prefix", # required
      options: {
        file_type: "CSV", # accepts CSV, PARQUET, JSON
      },
    },
    dataset_target: {
      dataset_identifier: "DatasetIdentifier", # required
      options: {
        load_type: "INCREMENTAL", # accepts INCREMENTAL, REPLACE
        dedupe_records: false,
      },
    },
  },
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.instance_id #=> String
resp.name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The Amazon Web Services Supply Chain instance identifier.

  • :name (required, String)

    Name of the DataIntegrationFlow.

  • :sources (required, Array<Types::DataIntegrationFlowSource>)

    The source configurations for DataIntegrationFlow.

  • :transformation (required, Types::DataIntegrationFlowTransformation)

    The transformation configurations for DataIntegrationFlow.

  • :target (required, Types::DataIntegrationFlowTarget)

    The target configurations for DataIntegrationFlow.

  • :tags (Hash<String,String>)

    The tags of the DataIntegrationFlow to be created

Returns:

See Also:



692
693
694
695
# File 'lib/aws-sdk-supplychain/client.rb', line 692

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

#create_data_lake_dataset(params = {}) ⇒ Types::CreateDataLakeDatasetResponse

Enables you to programmatically create an Amazon Web Services Supply Chain data lake dataset. Developers can create the datasets using their pre-defined or custom schema for a given instance ID, namespace, and dataset name.

Examples:

Example: Create an AWS Supply Chain inbound order dataset


resp = client.create_data_lake_dataset({
  name: "inbound_order", 
  description: "This is an AWS Supply Chain inbound order dataset", 
  instance_id: "1877dd20-dee9-4639-8e99-cb67acf21fe5", 
  namespace: "asc", 
  tags: {
    "tagKey1" => "tagValue1", 
    "tagKey2" => "tagValue2", 
  }, 
})

resp.to_h outputs the following:
{
  dataset: {
    name: "inbound_order", 
    arn: "arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/asc/datasets/inbound_order", 
    created_time: Time.parse(1727116807.751), 
    description: "This is an AWS Supply Chain inbound order dataset", 
    instance_id: "1877dd20-dee9-4639-8e99-cb67acf21fe5", 
    last_modified_time: Time.parse(1727116807.751), 
    namespace: "asc", 
    schema: {
      name: "InboundOrder", 
      fields: [
        {
          name: "id", 
          type: "STRING", 
          is_required: true, 
        }, 
        {
          name: "tpartner_id", 
          type: "STRING", 
          is_required: true, 
        }, 
        {
          name: "connection_id", 
          type: "STRING", 
          is_required: true, 
        }, 
        {
          name: "order_type", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "order_status", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "inbound_order_url", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "order_creation_date", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
        {
          name: "company_id", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "to_site_id", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "order_currency_uom", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "vendor_currency_uom", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "exchange_rate", 
          type: "DOUBLE", 
          is_required: false, 
        }, 
        {
          name: "exchange_rate_date", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
        {
          name: "incoterm", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "incoterm2", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "incoterm_location_1", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "incoterm_location_2", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "submitted_date", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
        {
          name: "agreement_start_date", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
        {
          name: "agreement_end_date", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
        {
          name: "shipping_instr_code", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "payment_terms_code", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "std_terms_agreement", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "std_terms_agreement_ver", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "agreement_number", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "source", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "source_update_dttm", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
        {
          name: "source_event_id", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "db_creation_dttm", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
        {
          name: "db_updation_dttm", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
      ], 
    }, 
  }, 
}

Example: Create a custom dataset


resp = client.create_data_lake_dataset({
  name: "my_dataset", 
  description: "This is a custom dataset", 
  instance_id: "1877dd20-dee9-4639-8e99-cb67acf21fe5", 
  namespace: "default", 
  schema: {
    name: "MyDataset", 
    fields: [
      {
        name: "id", 
        type: "INT", 
        is_required: true, 
      }, 
      {
        name: "description", 
        type: "STRING", 
        is_required: true, 
      }, 
      {
        name: "price", 
        type: "DOUBLE", 
        is_required: false, 
      }, 
      {
        name: "creation_time", 
        type: "TIMESTAMP", 
        is_required: false, 
      }, 
    ], 
  }, 
  tags: {
    "tagKey1" => "tagValue1", 
    "tagKey2" => "tagValue2", 
  }, 
})

resp.to_h outputs the following:
{
  dataset: {
    name: "my_dataset", 
    arn: "arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/default/datasets/my_dataset", 
    created_time: Time.parse(1727116807.751), 
    description: "This is a custom dataset", 
    instance_id: "1877dd20-dee9-4639-8e99-cb67acf21fe5", 
    last_modified_time: Time.parse(1727116807.751), 
    namespace: "default", 
    schema: {
      name: "MyDataset", 
      fields: [
        {
          name: "id", 
          type: "INT", 
          is_required: true, 
        }, 
        {
          name: "description", 
          type: "STRING", 
          is_required: true, 
        }, 
        {
          name: "price", 
          type: "DOUBLE", 
          is_required: false, 
        }, 
        {
          name: "creation_time", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
      ], 
    }, 
  }, 
}

Request syntax with placeholder values


resp = client.create_data_lake_dataset({
  instance_id: "UUID", # required
  namespace: "DataLakeDatasetNamespace", # required
  name: "DataLakeDatasetName", # required
  schema: {
    name: "DataLakeDatasetSchemaName", # required
    fields: [ # required
      {
        name: "DataLakeDatasetSchemaFieldName", # required
        type: "INT", # required, accepts INT, DOUBLE, STRING, TIMESTAMP
        is_required: false, # required
      },
    ],
  },
  description: "DataLakeDatasetDescription",
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.dataset.instance_id #=> String
resp.dataset.namespace #=> String
resp.dataset.name #=> String
resp.dataset.arn #=> String
resp.dataset.schema.name #=> String
resp.dataset.schema.fields #=> Array
resp.dataset.schema.fields[0].name #=> String
resp.dataset.schema.fields[0].type #=> String, one of "INT", "DOUBLE", "STRING", "TIMESTAMP"
resp.dataset.schema.fields[0].is_required #=> Boolean
resp.dataset.description #=> String
resp.dataset.created_time #=> Time
resp.dataset.last_modified_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

Returns:

See Also:



1040
1041
1042
1043
# File 'lib/aws-sdk-supplychain/client.rb', line 1040

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

#create_instance(params = {}) ⇒ Types::CreateInstanceResponse

Enables you to programmatically create an Amazon Web Services Supply Chain instance by applying KMS keys and relevant information associated with the API without using the Amazon Web Services console.

This is an asynchronous operation. Upon receiving a CreateInstance request, Amazon Web Services Supply Chain immediately returns the instance resource, instance ID, and the initializing state while simultaneously creating all required Amazon Web Services resources for an instance creation. You can use GetInstance to check the status of the instance. If the instance results in an unhealthy state, you need to check the error message, delete the current instance, and recreate a new one based on the mitigation from the error message.

Examples:

Example: Successful CreateInstance request with all input data


resp = client.create_instance({
  instance_description: "example instance description", 
  instance_name: "example instance name", 
  kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b14ffc39-b7d4-45ab-991a-6257a7f0d24d", 
  tags: {
    "tagKey1" => "tagValue1", 
  }, 
})

resp.to_h outputs the following:
{
  instance: {
    aws_account_id: "123456789012", 
    created_time: Time.parse(172615383136), 
    instance_description: "example instance description", 
    instance_id: "9e193580-7cc5-45f7-9609-c43ba0ada793", 
    instance_name: "example instance name", 
    kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b14ffc39-b7d4-45ab-991a-6257a7f0d24d", 
    last_modified_time: Time.parse(172615383136), 
    state: "Initializing", 
    version_number: 2.0, 
  }, 
}

Example: Successful CreateInstance request with no input data


resp = client.create_instance({
})

resp.to_h outputs the following:
{
  instance: {
    aws_account_id: "123456789012", 
    created_time: Time.parse(172615383136), 
    instance_description: "", 
    instance_id: "9e193580-7cc5-45f7-9609-c43ba0ada793", 
    kms_key_arn: "arn:aws:kms:us-west-2:456789012345:key/7372eb6d-874c-4212-8d49-7804282d33a8", 
    last_modified_time: Time.parse(172615383136), 
    state: "Initializing", 
    version_number: 2.0, 
  }, 
}

Request syntax with placeholder values


resp = client.create_instance({
  instance_name: "InstanceName",
  instance_description: "InstanceDescription",
  kms_key_arn: "KmsKeyArn",
  tags: {
    "TagKey" => "TagValue",
  },
  client_token: "ClientToken",
})

Response structure


resp.instance.instance_id #=> String
resp.instance. #=> String
resp.instance.state #=> String, one of "Initializing", "Active", "CreateFailed", "DeleteFailed", "Deleting", "Deleted"
resp.instance.error_message #=> String
resp.instance.web_app_dns_domain #=> String
resp.instance.created_time #=> Time
resp.instance.last_modified_time #=> Time
resp.instance.instance_name #=> String
resp.instance.instance_description #=> String
resp.instance.kms_key_arn #=> String
resp.instance.version_number #=> Float

Parameters:

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

    ({})

Options Hash (params):

  • :instance_name (String)

    The AWS Supply Chain instance name.

  • :instance_description (String)

    The AWS Supply Chain instance description.

  • :kms_key_arn (String)

    The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for encryption. This is required if you do not want to use the Amazon Web Services owned KMS key. If you don’t provide anything here, AWS Supply Chain uses the Amazon Web Services owned KMS key.

  • :tags (Hash<String,String>)

    The Amazon Web Services tags of an instance to be created.

  • :client_token (String)

    The client token for idempotency.

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

Returns:

See Also:



1159
1160
1161
1162
# File 'lib/aws-sdk-supplychain/client.rb', line 1159

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

#delete_data_integration_flow(params = {}) ⇒ Types::DeleteDataIntegrationFlowResponse

Enable you to programmatically delete an existing data pipeline for the provided Amazon Web Services Supply Chain instance and DataIntegrationFlow name.

Examples:

Example: Successful DeleteDataIntegrationFlow


resp = client.delete_data_integration_flow({
  name: "testStagingFlow", 
  instance_id: "8850c54e-e187-4fa7-89d4-6370f165174d", 
})

resp.to_h outputs the following:
{
  name: "testStagingFlow", 
  instance_id: "8850c54e-e187-4fa7-89d4-6370f165174d", 
}

Request syntax with placeholder values


resp = client.delete_data_integration_flow({
  instance_id: "UUID", # required
  name: "DataIntegrationFlowName", # required
})

Response structure


resp.instance_id #=> String
resp.name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The Amazon Web Services Supply Chain instance identifier.

  • :name (required, String)

    The name of the DataIntegrationFlow to be deleted.

Returns:

See Also:



1209
1210
1211
1212
# File 'lib/aws-sdk-supplychain/client.rb', line 1209

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

#delete_data_lake_dataset(params = {}) ⇒ Types::DeleteDataLakeDatasetResponse

Enables you to programmatically delete an Amazon Web Services Supply Chain data lake dataset. Developers can delete the existing datasets for a given instance ID, namespace, and instance name.

Examples:

Example: Delete an AWS Supply Chain inbound_order dataset


resp = client.delete_data_lake_dataset({
  name: "inbound_order", 
  instance_id: "1877dd20-dee9-4639-8e99-cb67acf21fe5", 
  namespace: "asc", 
})

resp.to_h outputs the following:
{
  name: "inbound_order", 
  instance_id: "1877dd20-dee9-4639-8e99-cb67acf21fe5", 
  namespace: "asc", 
}

Example: Delete a custom dataset


resp = client.delete_data_lake_dataset({
  name: "my_dataset", 
  instance_id: "1877dd20-dee9-4639-8e99-cb67acf21fe5", 
  namespace: "default", 
})

resp.to_h outputs the following:
{
  name: "my_dataset", 
  instance_id: "1877dd20-dee9-4639-8e99-cb67acf21fe5", 
  namespace: "default", 
}

Request syntax with placeholder values


resp = client.delete_data_lake_dataset({
  instance_id: "UUID", # required
  namespace: "DataLakeDatasetNamespace", # required
  name: "DataLakeDatasetName", # required
})

Response structure


resp.instance_id #=> String
resp.namespace #=> String
resp.name #=> String

Parameters:

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

    ({})

Options Hash (params):

Returns:

See Also:



1295
1296
1297
1298
# File 'lib/aws-sdk-supplychain/client.rb', line 1295

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

#delete_instance(params = {}) ⇒ Types::DeleteInstanceResponse

Enables you to programmatically delete an Amazon Web Services Supply Chain instance by deleting the KMS keys and relevant information associated with the API without using the Amazon Web Services console.

This is an asynchronous operation. Upon receiving a DeleteInstance request, Amazon Web Services Supply Chain immediately returns a response with the instance resource, delete state while cleaning up all Amazon Web Services resources created during the instance creation process. You can use the GetInstance action to check the instance status.

Examples:

Example: Successful DeleteInstance request


resp = client.delete_instance({
  instance_id: "9e193580-7cc5-45f7-9609-c43ba0ada793", 
})

resp.to_h outputs the following:
{
  instance: {
    aws_account_id: "123456789012", 
    created_time: Time.parse(172615383136), 
    instance_description: "updated example instance description", 
    instance_id: "9e193580-7cc5-45f7-9609-c43ba0ada793", 
    instance_name: "updated example instance name", 
    kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b14ffc39-b7d4-45ab-991a-6257a7f0d24d", 
    last_modified_time: Time.parse(172615383136), 
    state: "Deleting", 
    version_number: 2.0, 
  }, 
}

Request syntax with placeholder values


resp = client.delete_instance({
  instance_id: "UUID", # required
})

Response structure


resp.instance.instance_id #=> String
resp.instance. #=> String
resp.instance.state #=> String, one of "Initializing", "Active", "CreateFailed", "DeleteFailed", "Deleting", "Deleted"
resp.instance.error_message #=> String
resp.instance.web_app_dns_domain #=> String
resp.instance.created_time #=> Time
resp.instance.last_modified_time #=> Time
resp.instance.instance_name #=> String
resp.instance.instance_description #=> String
resp.instance.kms_key_arn #=> String
resp.instance.version_number #=> Float

Parameters:

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

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The AWS Supply Chain instance identifier.

Returns:

See Also:



1364
1365
1366
1367
# File 'lib/aws-sdk-supplychain/client.rb', line 1364

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

#get_bill_of_materials_import_job(params = {}) ⇒ Types::GetBillOfMaterialsImportJobResponse

Get status and details of a BillOfMaterialsImportJob.

Examples:

Example: Invoke GetBillOfMaterialsImportJob for a successful job


resp = client.get_bill_of_materials_import_job({
  instance_id: "60f82bbd-71f7-4fcd-a941-472f574c5243", 
  job_id: "f79b359b-1515-4436-a3bf-bae7b33e47b4", 
})

resp.to_h outputs the following:
{
  job: {
    instance_id: "60f82bbd-71f7-4fcd-a941-472f574c5243", 
    job_id: "f79b359b-1515-4436-a3bf-bae7b33e47b4", 
    message: "Import job completed successfully.", 
    s3uri: "s3://mybucketname/pathelemene/file.csv", 
    status: "SUCCESS", 
  }, 
}

Example: Invoke GetBillOfMaterialsImportJob for an in-progress job


resp = client.get_bill_of_materials_import_job({
  instance_id: "60f82bbd-71f7-4fcd-a941-472f574c5243", 
  job_id: "f79b359b-1515-4436-a3bf-bae7b33e47b4", 
})

resp.to_h outputs the following:
{
  job: {
    instance_id: "60f82bbd-71f7-4fcd-a941-472f574c5243", 
    job_id: "f79b359b-1515-4436-a3bf-bae7b33e47b4", 
    s3uri: "s3://mybucketname/pathelemene/file.csv", 
    status: "IN_PROGRESS", 
  }, 
}

Request syntax with placeholder values


resp = client.get_bill_of_materials_import_job({
  instance_id: "UUID", # required
  job_id: "UUID", # required
})

Response structure


resp.job.instance_id #=> String
resp.job.job_id #=> String
resp.job.status #=> String, one of "NEW", "FAILED", "IN_PROGRESS", "QUEUED", "SUCCESS"
resp.job.s3uri #=> String
resp.job.message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The AWS Supply Chain instance identifier.

  • :job_id (required, String)

    The BillOfMaterialsImportJob identifier.

Returns:

See Also:



1436
1437
1438
1439
# File 'lib/aws-sdk-supplychain/client.rb', line 1436

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

#get_data_integration_flow(params = {}) ⇒ Types::GetDataIntegrationFlowResponse

Enables you to programmatically view a specific data pipeline for the provided Amazon Web Services Supply Chain instance and DataIntegrationFlow name.

Examples:

Example: Successful GetDataIntegrationFlow


resp = client.get_data_integration_flow({
  name: "testStagingFlow", 
  instance_id: "8850c54e-e187-4fa7-89d4-6370f165174d", 
})

resp.to_h outputs the following:
{
  flow: {
    name: "testStagingFlow", 
    created_time: Time.parse(1724956400.44), 
    instance_id: "8850c54e-e187-4fa7-89d4-6370f165174d", 
    last_modified_time: Time.parse(1724956400.44), 
    sources: [
      {
        s3_source: {
          bucket_name: "aws-supply-chain-data-b8c7bb28-a576-4334-b481-6d6e8e47371f", 
          prefix: "example-prefix", 
        }, 
        source_name: "testSourceName", 
        source_type: "S3", 
      }, 
    ], 
    target: {
      dataset_target: {
        dataset_identifier: "arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset", 
      }, 
      target_type: "DATASET", 
    }, 
    transformation: {
      sql_transformation: {
        query: "SELECT * FROM testSourceName", 
      }, 
      transformation_type: "SQL", 
    }, 
  }, 
}

Request syntax with placeholder values


resp = client.get_data_integration_flow({
  instance_id: "UUID", # required
  name: "DataIntegrationFlowName", # required
})

Response structure


resp.flow.instance_id #=> String
resp.flow.name #=> String
resp.flow.sources #=> Array
resp.flow.sources[0].source_type #=> String, one of "S3", "DATASET"
resp.flow.sources[0].source_name #=> String
resp.flow.sources[0].s3_source.bucket_name #=> String
resp.flow.sources[0].s3_source.prefix #=> String
resp.flow.sources[0].s3_source.options.file_type #=> String, one of "CSV", "PARQUET", "JSON"
resp.flow.sources[0].dataset_source.dataset_identifier #=> String
resp.flow.sources[0].dataset_source.options.load_type #=> String, one of "INCREMENTAL", "REPLACE"
resp.flow.sources[0].dataset_source.options.dedupe_records #=> Boolean
resp.flow.transformation.transformation_type #=> String, one of "SQL", "NONE"
resp.flow.transformation.sql_transformation.query #=> String
resp.flow.target.target_type #=> String, one of "S3", "DATASET"
resp.flow.target.s3_target.bucket_name #=> String
resp.flow.target.s3_target.prefix #=> String
resp.flow.target.s3_target.options.file_type #=> String, one of "CSV", "PARQUET", "JSON"
resp.flow.target.dataset_target.dataset_identifier #=> String
resp.flow.target.dataset_target.options.load_type #=> String, one of "INCREMENTAL", "REPLACE"
resp.flow.target.dataset_target.options.dedupe_records #=> Boolean
resp.flow.created_time #=> Time
resp.flow.last_modified_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The Amazon Web Services Supply Chain instance identifier.

  • :name (required, String)

    The name of the DataIntegrationFlow created.

Returns:

See Also:



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

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

#get_data_lake_dataset(params = {}) ⇒ Types::GetDataLakeDatasetResponse

Enables you to programmatically view an Amazon Web Services Supply Chain data lake dataset. Developers can view the data lake dataset information such as namespace, schema, and so on for a given instance ID, namespace, and dataset name.

Examples:

Example: Get properties of an existing AWS Supply Chain inbound order dataset


resp = client.get_data_lake_dataset({
  name: "inbound_order", 
  instance_id: "1877dd20-dee9-4639-8e99-cb67acf21fe5", 
  namespace: "asc", 
})

resp.to_h outputs the following:
{
  dataset: {
    name: "inbound_order", 
    arn: "arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/asc/datasets/inbound_order", 
    created_time: Time.parse(1727116807.751), 
    description: "This is an AWS Supply Chain inbound order dataset", 
    instance_id: "1877dd20-dee9-4639-8e99-cb67acf21fe5", 
    last_modified_time: Time.parse(1727116807.751), 
    namespace: "asc", 
    schema: {
      name: "InboundOrder", 
      fields: [
        {
          name: "id", 
          type: "STRING", 
          is_required: true, 
        }, 
        {
          name: "tpartner_id", 
          type: "STRING", 
          is_required: true, 
        }, 
        {
          name: "connection_id", 
          type: "STRING", 
          is_required: true, 
        }, 
        {
          name: "order_type", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "order_status", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "inbound_order_url", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "order_creation_date", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
        {
          name: "company_id", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "to_site_id", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "order_currency_uom", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "vendor_currency_uom", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "exchange_rate", 
          type: "DOUBLE", 
          is_required: false, 
        }, 
        {
          name: "exchange_rate_date", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
        {
          name: "incoterm", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "incoterm2", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "incoterm_location_1", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "incoterm_location_2", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "submitted_date", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
        {
          name: "agreement_start_date", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
        {
          name: "agreement_end_date", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
        {
          name: "shipping_instr_code", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "payment_terms_code", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "std_terms_agreement", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "std_terms_agreement_ver", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "agreement_number", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "source", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "source_update_dttm", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
        {
          name: "source_event_id", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "db_creation_dttm", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
        {
          name: "db_updation_dttm", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
      ], 
    }, 
  }, 
}

Example: Get proporties of an existing custom dataset


resp = client.get_data_lake_dataset({
  name: "my_dataset", 
  instance_id: "1877dd20-dee9-4639-8e99-cb67acf21fe5", 
  namespace: "default", 
})

resp.to_h outputs the following:
{
  dataset: {
    name: "my_dataset", 
    arn: "arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/default/datasets/my_dataset", 
    created_time: Time.parse(1727116807.751), 
    description: "This is a custom dataset", 
    instance_id: "1877dd20-dee9-4639-8e99-cb67acf21fe5", 
    last_modified_time: Time.parse(1727116807.751), 
    namespace: "default", 
    schema: {
      name: "MyDataset", 
      fields: [
        {
          name: "id", 
          type: "INT", 
          is_required: true, 
        }, 
        {
          name: "description", 
          type: "STRING", 
          is_required: true, 
        }, 
        {
          name: "price", 
          type: "DOUBLE", 
          is_required: false, 
        }, 
        {
          name: "creation_time", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
      ], 
    }, 
  }, 
}

Request syntax with placeholder values


resp = client.get_data_lake_dataset({
  instance_id: "UUID", # required
  namespace: "DataLakeDatasetNamespace", # required
  name: "DataLakeDatasetName", # required
})

Response structure


resp.dataset.instance_id #=> String
resp.dataset.namespace #=> String
resp.dataset.name #=> String
resp.dataset.arn #=> String
resp.dataset.schema.name #=> String
resp.dataset.schema.fields #=> Array
resp.dataset.schema.fields[0].name #=> String
resp.dataset.schema.fields[0].type #=> String, one of "INT", "DOUBLE", "STRING", "TIMESTAMP"
resp.dataset.schema.fields[0].is_required #=> Boolean
resp.dataset.description #=> String
resp.dataset.created_time #=> Time
resp.dataset.last_modified_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

Returns:

See Also:



1820
1821
1822
1823
# File 'lib/aws-sdk-supplychain/client.rb', line 1820

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

#get_instance(params = {}) ⇒ Types::GetInstanceResponse

Enables you to programmatically retrieve the information related to an Amazon Web Services Supply Chain instance ID.

Examples:

Example: Successful GetInstance request


resp = client.get_instance({
  instance_id: "9e193580-7cc5-45f7-9609-c43ba0ada793", 
})

resp.to_h outputs the following:
{
  instance: {
    aws_account_id: "123456789012", 
    created_time: Time.parse(172615383136), 
    instance_description: "example instance description", 
    instance_id: "9e193580-7cc5-45f7-9609-c43ba0ada793", 
    instance_name: "example instance name", 
    kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b14ffc39-b7d4-45ab-991a-6257a7f0d24d", 
    last_modified_time: Time.parse(172615383136), 
    state: "Active", 
    version_number: 2.0, 
  }, 
}

Example: Successful GetInstance request with error message


resp = client.get_instance({
  instance_id: "9e193580-7cc5-45f7-9609-c43ba0ada793", 
})

resp.to_h outputs the following:
{
  instance: {
    aws_account_id: "123456789012", 
    created_time: Time.parse(172615383136), 
    error_message: "Access denied when attempting to create an S3 bucket. Please correct your IAM policy and try again.", 
    instance_description: "example instance description", 
    instance_id: "9e193580-7cc5-45f7-9609-c43ba0ada793", 
    instance_name: "example instance name", 
    kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b14ffc39-b7d4-45ab-991a-6257a7f0d24d", 
    last_modified_time: Time.parse(172615383136), 
    state: "CreateFailed", 
    version_number: 2.0, 
  }, 
}

Request syntax with placeholder values


resp = client.get_instance({
  instance_id: "UUID", # required
})

Response structure


resp.instance.instance_id #=> String
resp.instance. #=> String
resp.instance.state #=> String, one of "Initializing", "Active", "CreateFailed", "DeleteFailed", "Deleting", "Deleted"
resp.instance.error_message #=> String
resp.instance.web_app_dns_domain #=> String
resp.instance.created_time #=> Time
resp.instance.last_modified_time #=> Time
resp.instance.instance_name #=> String
resp.instance.instance_description #=> String
resp.instance.kms_key_arn #=> String
resp.instance.version_number #=> Float

Parameters:

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

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The AWS Supply Chain instance identifier

Returns:

See Also:



1903
1904
1905
1906
# File 'lib/aws-sdk-supplychain/client.rb', line 1903

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

#list_data_integration_flows(params = {}) ⇒ Types::ListDataIntegrationFlowsResponse

Enables you to programmatically list all data pipelines for the provided Amazon Web Services Supply Chain instance.

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

Examples:

Example: Successful ListDataIntegrationFlow


resp = client.list_data_integration_flows({
  instance_id: "8850c54e-e187-4fa7-89d4-6370f165174d", 
})

resp.to_h outputs the following:
{
  flows: [
    {
      name: "testStagingFlow", 
      created_time: Time.parse(1724956400.44), 
      instance_id: "8850c54e-e187-4fa7-89d4-6370f165174d", 
      last_modified_time: Time.parse(1724956400.44), 
      sources: [
        {
          s3_source: {
            bucket_name: "aws-supply-chain-data-b8c7bb28-a576-4334-b481-6d6e8e47371f", 
            prefix: "example-prefix", 
          }, 
          source_name: "testSourceName", 
          source_type: "S3", 
        }, 
      ], 
      target: {
        dataset_target: {
          dataset_identifier: "arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset", 
        }, 
        target_type: "DATASET", 
      }, 
      transformation: {
        sql_transformation: {
          query: "SELECT * FROM testSourceName", 
        }, 
        transformation_type: "SQL", 
      }, 
    }, 
    {
      name: "trading-partner", 
      created_time: Time.parse(17235763506.88), 
      instance_id: "8850c54e-e187-4fa7-89d4-6370f165174d", 
      last_modified_time: Time.parse(17235763506.88), 
      sources: [
        {
          dataset_source: {
            dataset_identifier: "arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset1", 
          }, 
          source_name: "testSourceName1", 
          source_type: "DATASET", 
        }, 
        {
          dataset_source: {
            dataset_identifier: "arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset2", 
          }, 
          source_name: "testSourceName2", 
          source_type: "DATASET", 
        }, 
      ], 
      target: {
        dataset_target: {
          dataset_identifier: "arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/asc/datasets/trading_partner", 
        }, 
        target_type: "DATASET", 
      }, 
      transformation: {
        sql_transformation: {
          query: "SELECT S1.id AS id, S1.poc_org_unit_description AS description, S1.company_id AS company_id, S1.tpartner_type AS tpartner_type, S1.geo_id AS geo_id, S1.eff_start_date AS eff_start_date, S1.eff_end_date AS eff_end_date FROM testSourceName1 AS S1 LEFT JOIN testSourceName2 as S2 ON S1.id=S2.id", 
        }, 
        transformation_type: "SQL", 
      }, 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_data_integration_flows({
  instance_id: "UUID", # required
  next_token: "DataIntegrationFlowNextToken",
  max_results: 1,
})

Response structure


resp.flows #=> Array
resp.flows[0].instance_id #=> String
resp.flows[0].name #=> String
resp.flows[0].sources #=> Array
resp.flows[0].sources[0].source_type #=> String, one of "S3", "DATASET"
resp.flows[0].sources[0].source_name #=> String
resp.flows[0].sources[0].s3_source.bucket_name #=> String
resp.flows[0].sources[0].s3_source.prefix #=> String
resp.flows[0].sources[0].s3_source.options.file_type #=> String, one of "CSV", "PARQUET", "JSON"
resp.flows[0].sources[0].dataset_source.dataset_identifier #=> String
resp.flows[0].sources[0].dataset_source.options.load_type #=> String, one of "INCREMENTAL", "REPLACE"
resp.flows[0].sources[0].dataset_source.options.dedupe_records #=> Boolean
resp.flows[0].transformation.transformation_type #=> String, one of "SQL", "NONE"
resp.flows[0].transformation.sql_transformation.query #=> String
resp.flows[0].target.target_type #=> String, one of "S3", "DATASET"
resp.flows[0].target.s3_target.bucket_name #=> String
resp.flows[0].target.s3_target.prefix #=> String
resp.flows[0].target.s3_target.options.file_type #=> String, one of "CSV", "PARQUET", "JSON"
resp.flows[0].target.dataset_target.dataset_identifier #=> String
resp.flows[0].target.dataset_target.options.load_type #=> String, one of "INCREMENTAL", "REPLACE"
resp.flows[0].target.dataset_target.options.dedupe_records #=> Boolean
resp.flows[0].created_time #=> Time
resp.flows[0].last_modified_time #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The Amazon Web Services Supply Chain instance identifier.

  • :next_token (String)

    The pagination token to fetch the next page of the DataIntegrationFlows.

  • :max_results (Integer)

    Specify the maximum number of DataIntegrationFlows to fetch in one paginated request.

Returns:

See Also:



2043
2044
2045
2046
# File 'lib/aws-sdk-supplychain/client.rb', line 2043

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

#list_data_lake_datasets(params = {}) ⇒ Types::ListDataLakeDatasetsResponse

Enables you to programmatically view the list of Amazon Web Services Supply Chain data lake datasets. Developers can view the datasets and the corresponding information such as namespace, schema, and so on for a given instance ID and namespace.

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

Examples:

Example: List AWS Supply Chain datasets


resp = client.list_data_lake_datasets({
  instance_id: "1877dd20-dee9-4639-8e99-cb67acf21fe5", 
  namespace: "asc", 
})

resp.to_h outputs the following:
{
  datasets: [
    {
      name: "inbound_order", 
      arn: "arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/asc/datasets/inbound_order", 
      created_time: Time.parse(1727116807.751), 
      description: "This is an AWS Supply Chain inbound order dataset", 
      instance_id: "1877dd20-dee9-4639-8e99-cb67acf21fe5", 
      last_modified_time: Time.parse(1727116807.751), 
      namespace: "asc", 
      schema: {
        name: "InboundOrder", 
        fields: [
          {
            name: "id", 
            type: "STRING", 
            is_required: true, 
          }, 
          {
            name: "tpartner_id", 
            type: "STRING", 
            is_required: true, 
          }, 
          {
            name: "connection_id", 
            type: "STRING", 
            is_required: true, 
          }, 
          {
            name: "order_type", 
            type: "STRING", 
            is_required: false, 
          }, 
          {
            name: "order_status", 
            type: "STRING", 
            is_required: false, 
          }, 
          {
            name: "inbound_order_url", 
            type: "STRING", 
            is_required: false, 
          }, 
          {
            name: "order_creation_date", 
            type: "TIMESTAMP", 
            is_required: false, 
          }, 
          {
            name: "company_id", 
            type: "STRING", 
            is_required: false, 
          }, 
          {
            name: "to_site_id", 
            type: "STRING", 
            is_required: false, 
          }, 
          {
            name: "order_currency_uom", 
            type: "STRING", 
            is_required: false, 
          }, 
          {
            name: "vendor_currency_uom", 
            type: "STRING", 
            is_required: false, 
          }, 
          {
            name: "exchange_rate", 
            type: "DOUBLE", 
            is_required: false, 
          }, 
          {
            name: "exchange_rate_date", 
            type: "TIMESTAMP", 
            is_required: false, 
          }, 
          {
            name: "incoterm", 
            type: "STRING", 
            is_required: false, 
          }, 
          {
            name: "incoterm2", 
            type: "STRING", 
            is_required: false, 
          }, 
          {
            name: "incoterm_location_1", 
            type: "STRING", 
            is_required: false, 
          }, 
          {
            name: "incoterm_location_2", 
            type: "STRING", 
            is_required: false, 
          }, 
          {
            name: "submitted_date", 
            type: "TIMESTAMP", 
            is_required: false, 
          }, 
          {
            name: "agreement_start_date", 
            type: "TIMESTAMP", 
            is_required: false, 
          }, 
          {
            name: "agreement_end_date", 
            type: "TIMESTAMP", 
            is_required: false, 
          }, 
          {
            name: "shipping_instr_code", 
            type: "STRING", 
            is_required: false, 
          }, 
          {
            name: "payment_terms_code", 
            type: "STRING", 
            is_required: false, 
          }, 
          {
            name: "std_terms_agreement", 
            type: "STRING", 
            is_required: false, 
          }, 
          {
            name: "std_terms_agreement_ver", 
            type: "STRING", 
            is_required: false, 
          }, 
          {
            name: "agreement_number", 
            type: "STRING", 
            is_required: false, 
          }, 
          {
            name: "source", 
            type: "STRING", 
            is_required: false, 
          }, 
          {
            name: "source_update_dttm", 
            type: "TIMESTAMP", 
            is_required: false, 
          }, 
          {
            name: "source_event_id", 
            type: "STRING", 
            is_required: false, 
          }, 
          {
            name: "db_creation_dttm", 
            type: "TIMESTAMP", 
            is_required: false, 
          }, 
          {
            name: "db_updation_dttm", 
            type: "TIMESTAMP", 
            is_required: false, 
          }, 
        ], 
      }, 
    }, 
  ], 
}

Example: List custom datasets using pagination


resp = client.list_data_lake_datasets({
  instance_id: "1877dd20-dee9-4639-8e99-cb67acf21fe5", 
  max_results: 2, 
  namespace: "default", 
  next_token: "next_token_returned_from_previous_list_request", 
})

resp.to_h outputs the following:
{
  datasets: [
    {
      name: "my_dataset", 
      arn: "arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/default/datasets/my_dataset", 
      created_time: Time.parse(1727116807.751), 
      description: "This is a custom dataset", 
      instance_id: "1877dd20-dee9-4639-8e99-cb67acf21fe5", 
      last_modified_time: Time.parse(1727116807.751), 
      namespace: "default", 
      schema: {
        name: "MyDataset", 
        fields: [
          {
            name: "id", 
            type: "INT", 
            is_required: true, 
          }, 
          {
            name: "description", 
            type: "STRING", 
            is_required: true, 
          }, 
          {
            name: "price", 
            type: "DOUBLE", 
            is_required: false, 
          }, 
          {
            name: "creation_time", 
            type: "TIMESTAMP", 
            is_required: false, 
          }, 
        ], 
      }, 
    }, 
    {
      name: "my_dataset_2", 
      arn: "arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/default/datasets/my_dataset_2", 
      created_time: Time.parse(1727116907.751), 
      description: "This is a custom dataset 2", 
      instance_id: "1877dd20-dee9-4639-8e99-cb67acf21fe5", 
      last_modified_time: Time.parse(1727116907.751), 
      namespace: "default", 
      schema: {
        name: "MyDataset2", 
        fields: [
          {
            name: "id", 
            type: "INT", 
            is_required: true, 
          }, 
          {
            name: "description", 
            type: "STRING", 
            is_required: true, 
          }, 
        ], 
      }, 
    }, 
  ], 
  next_token: "next_token_for_next_list_request", 
}

Request syntax with placeholder values


resp = client.list_data_lake_datasets({
  instance_id: "UUID", # required
  namespace: "DataLakeDatasetNamespace", # required
  next_token: "DataLakeDatasetNextToken",
  max_results: 1,
})

Response structure


resp.datasets #=> Array
resp.datasets[0].instance_id #=> String
resp.datasets[0].namespace #=> String
resp.datasets[0].name #=> String
resp.datasets[0].arn #=> String
resp.datasets[0].schema.name #=> String
resp.datasets[0].schema.fields #=> Array
resp.datasets[0].schema.fields[0].name #=> String
resp.datasets[0].schema.fields[0].type #=> String, one of "INT", "DOUBLE", "STRING", "TIMESTAMP"
resp.datasets[0].schema.fields[0].is_required #=> Boolean
resp.datasets[0].description #=> String
resp.datasets[0].created_time #=> Time
resp.datasets[0].last_modified_time #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The Amazon Web Services Supply Chain instance identifier.

  • :namespace (required, String)

    The namespace of the dataset. The available values are:

    • asc: for [ AWS Supply Chain supported datasets ][1].

    • default: for datasets with custom user-defined schemas.

    [1]: docs.aws.amazon.com/aws-supply-chain/latest/userguide/data-model-asc.html

  • :next_token (String)

    The pagination token to fetch next page of datasets.

  • :max_results (Integer)

    The max number of datasets to fetch in this paginated request.

Returns:

See Also:



2362
2363
2364
2365
# File 'lib/aws-sdk-supplychain/client.rb', line 2362

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

#list_instances(params = {}) ⇒ Types::ListInstancesResponse

List all Amazon Web Services Supply Chain instances for a specific account. Enables you to programmatically list all Amazon Web Services Supply Chain instances based on their account ID, instance name, and state of the instance (active or delete).

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

Examples:

Example: Successful ListInstance request with no input data


resp = client.list_instances({
})

resp.to_h outputs the following:
{
  instances: [
    {
      aws_account_id: "123456789012", 
      created_time: Time.parse(172615383136), 
      instance_description: "example instance description", 
      instance_id: "9e193580-7cc5-45f7-9609-c43ba0ada793", 
      instance_name: "example instance name", 
      kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b14ffc39-b7d4-45ab-991a-6257a7f0d24d", 
      last_modified_time: Time.parse(172615383136), 
      state: "Active", 
      version_number: 2.0, 
    }, 
    {
      aws_account_id: "123456789012", 
      created_time: Time.parse(17261674383136), 
      instance_description: "example instance description", 
      instance_id: "3ad8116a-644d-4172-8dcb-20e51d314c14", 
      kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b14ffc39-b7d4-45ab-991a-6257a7f0d24d", 
      last_modified_time: Time.parse(17261674383136), 
      state: "Initializing", 
      version_number: 2.0, 
    }, 
  ], 
}

Example: Successful ListInstance request with filters


resp = client.list_instances({
  instance_name_filter: [
    "example instance name", 
  ], 
  instance_state_filter: [
    "Active", 
  ], 
})

resp.to_h outputs the following:
{
  instances: [
    {
      aws_account_id: "123456789012", 
      created_time: Time.parse(172615383136), 
      instance_description: "example instance description", 
      instance_id: "9e193580-7cc5-45f7-9609-c43ba0ada793", 
      instance_name: "example instance name", 
      kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b14ffc39-b7d4-45ab-991a-6257a7f0d24d", 
      last_modified_time: Time.parse(172615383136), 
      state: "Active", 
      version_number: 2.0, 
    }, 
  ], 
}

Example: Successful ListInstance request with maxResult override


resp = client.list_instances({
  max_results: 1, 
})

resp.to_h outputs the following:
{
  instances: [
    {
      aws_account_id: "123456789012", 
      created_time: Time.parse(172615383136), 
      instance_description: "example instance description", 
      instance_id: "9e193580-7cc5-45f7-9609-c43ba0ada793", 
      instance_name: "example instance name", 
      kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b14ffc39-b7d4-45ab-991a-6257a7f0d24d", 
      last_modified_time: Time.parse(172615383136), 
      state: "Active", 
      version_number: 2.0, 
    }, 
  ], 
  next_token: "AAQA-EFRSURBSGhtcng0c0dxbENwUHdnckVIbkFYNU1QVjRTZWN2ak5iMFVicC8zemlHOVF3SEpjSC9WTWJVVXBMV2Z1N3ZvZlQ0WEFBQUFmakI4QmdrcWhraUc5dzBCQndhZ2J6QnRBZ0VBTUdnR0NTcUdTSWIzRFFFSEFUQWVCZ2xnaGtnQlpRTUVBUzR3RVFRTTJibW9LemgrSWZTY0RaZEdBZ0VRZ0R2dDhsQnVGbGJ0dnFTZityWmNSWEVPbG93emJoSjhxOGNMbGQ1UGMvY0VRbWlTR3pQUFd4N2RraXY5Y0ovcS9vSmFYZVBGdWVHaU0zWmd0dz09n-rC1ejA5--7ltJxpDT2xP_i8xGqDPMOZfjpp8q6l5NuP9_bnBURvwwYhdqDriMK5_f96LuPEnPbuML-ItfgEiCcUy0p2tApvpZkZqOG5fbqP-4C5aDYPTffHLyq-MMqvfrGVJzL1nvkpZcnTkVR9VJsu5b8I0qqDW0H8EMKGgTo78U9lr4sj3Usi9VMwZxgKCBmr03HhFLYXOW--XMbIx0CTZF0fYIcRxmA_sVS6J7gpaB9yMcnzs5VUKokoA5JTcAPY5d1Y1VyE8KKxv51cfPgXw8OYCDbFQncw8mZPmE-VqxjFbksmk_FmghpPn9j2Ppoe-zr0LQ%3D", 
}

Example: Successful ListInstance request with nextToken


resp = client.list_instances({
  max_results: 1, 
  next_token: "AAQA-EFRSURBSGhtcng0c0dxbENwUHdnckVIbkFYNU1QVjRTZWN2ak5iMFVicC8zemlHOVF3SEpjSC9WTWJVVXBMV2Z1N3ZvZlQ0WEFBQUFmakI4QmdrcWhraUc5dzBCQndhZ2J6QnRBZ0VBTUdnR0NTcUdTSWIzRFFFSEFUQWVCZ2xnaGtnQlpRTUVBUzR3RVFRTTJibW9LemgrSWZTY0RaZEdBZ0VRZ0R2dDhsQnVGbGJ0dnFTZityWmNSWEVPbG93emJoSjhxOGNMbGQ1UGMvY0VRbWlTR3pQUFd4N2RraXY5Y0ovcS9vSmFYZVBGdWVHaU0zWmd0dz09n-rC1ejA5--7ltJxpDT2xP_i8xGqDPMOZfjpp8q6l5NuP9_bnBURvwwYhdqDriMK5_f96LuPEnPbuML-ItfgEiCcUy0p2tApvpZkZqOG5fbqP-4C5aDYPTffHLyq-MMqvfrGVJzL1nvkpZcnTkVR9VJsu5b8I0qqDW0H8EMKGgTo78U9lr4sj3Usi9VMwZxgKCBmr03HhFLYXOW--XMbIx0CTZF0fYIcRxmA_sVS6J7gpaB9yMcnzs5VUKokoA5JTcAPY5d1Y1VyE8KKxv51cfPgXw8OYCDbFQncw8mZPmE-VqxjFbksmk_FmghpPn9j2Ppoe-zr0LQ%3D", 
})

resp.to_h outputs the following:
{
  instances: [
    {
      aws_account_id: "123456789012", 
      created_time: Time.parse(17261674383136), 
      instance_description: "example instance description", 
      instance_id: "3ad8116a-644d-4172-8dcb-20e51d314c14", 
      kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b14ffc39-b7d4-45ab-991a-6257a7f0d24d", 
      last_modified_time: Time.parse(17261674383136), 
      state: "Initializing", 
      version_number: 2.0, 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_instances({
  next_token: "InstanceNextToken",
  max_results: 1,
  instance_name_filter: ["InstanceName"],
  instance_state_filter: ["Initializing"], # accepts Initializing, Active, CreateFailed, DeleteFailed, Deleting, Deleted
})

Response structure


resp.instances #=> Array
resp.instances[0].instance_id #=> String
resp.instances[0]. #=> String
resp.instances[0].state #=> String, one of "Initializing", "Active", "CreateFailed", "DeleteFailed", "Deleting", "Deleted"
resp.instances[0].error_message #=> String
resp.instances[0].web_app_dns_domain #=> String
resp.instances[0].created_time #=> Time
resp.instances[0].last_modified_time #=> Time
resp.instances[0].instance_name #=> String
resp.instances[0].instance_description #=> String
resp.instances[0].kms_key_arn #=> String
resp.instances[0].version_number #=> Float
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    The pagination token to fetch the next page of instances.

  • :max_results (Integer)

    Specify the maximum number of instances to fetch in this paginated request.

  • :instance_name_filter (Array<String>)

    The filter to ListInstances based on their names.

  • :instance_state_filter (Array<String>)

    The filter to ListInstances based on their state.

Returns:

See Also:



2529
2530
2531
2532
# File 'lib/aws-sdk-supplychain/client.rb', line 2529

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

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

List all the tags for an Amazon Web ServicesSupply Chain resource. You can list all the tags added to a resource. By listing the tags, developers can view the tag level information on a resource and perform actions such as, deleting a resource associated with a particular tag.

Examples:

Example: Successful ListTagsForResource


resp = client.list_tags_for_resource({
  resource_arn: "arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/data-integration-flows/my_flow1", 
})

resp.to_h outputs the following:
{
  tags: {
    "tagKey1" => "tagValue1", 
  }, 
}

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Web Services Supply chain resource ARN that needs tags to be listed.

Returns:

See Also:



2577
2578
2579
2580
# File 'lib/aws-sdk-supplychain/client.rb', line 2577

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

#send_data_integration_event(params = {}) ⇒ Types::SendDataIntegrationEventResponse

Send the transactional data payload for the event with real-time data for analysis or monitoring. The real-time data events are stored in an Amazon Web Services service before being processed and stored in data lake. New data events are synced with data lake at 5 PM GMT everyday. The updated transactional data is available in data lake after ingestion.

Examples:

Example: Successful SendDataIntegrationEvent for inboundorder event type


resp = client.send_data_integration_event({
  data: "{\"id\": \"inbound-order-id-test-123\", \"tpartner_id\": \"partner-id-test-123\" }", 
  event_group_id: "inboundOrderId", 
  event_timestamp: Time.parse(1515531081.123), 
  event_type: "scn.data.inboundorder", 
  instance_id: "8928ae12-15e5-4441-825d-ec2184f0a43a", 
})

resp.to_h outputs the following:
{
  event_id: "c4132c1d-8f60-44a2-9932-f723c4f7b8a7", 
}

Example: Successful SendDataIntegrationEvent for inboundorderline event type


resp = client.send_data_integration_event({
  data: "{\"id\": \"inbound-order-line-id-test-123\", \"order_id\": \"order-id-test-123\", \"tpartner_id\": \"partner-id-test-123\", \"product_id\": \"product-id-test-123\", \"quantity_submitted\": \"100.0\" }", 
  event_group_id: "inboundOrderLineId", 
  event_timestamp: Time.parse(1515531081.123), 
  event_type: "scn.data.inboundorderline", 
  instance_id: "8928ae12-15e5-4441-825d-ec2184f0a43a", 
})

resp.to_h outputs the following:
{
  event_id: "45d95db2-d106-40e0-aa98-f1204230a691", 
}

Example: Successful SendDataIntegrationEvent for inboundorderlineschedule event type


resp = client.send_data_integration_event({
  data: "{\"id\": \"inbound-order-line-schedule-id-test-123\", \"order_id\": \"order-id-test-123\", \"order_line_id\": \"order-line-id-test-123\", \"product_id\": \"product-id-test-123\"}", 
  event_group_id: "inboundOrderLineScheduleId", 
  event_timestamp: Time.parse(1515531081.123), 
  event_type: "scn.data.inboundorderlineschedule", 
  instance_id: "8928ae12-15e5-4441-825d-ec2184f0a43a", 
})

resp.to_h outputs the following:
{
  event_id: "5abba995-7735-4d1e-95c4-7cc93e48cf9f", 
}

Example: Successful SendDataIntegrationEvent for forecast event type


resp = client.send_data_integration_event({
  data: "{\"snapshot_date\": \"1672470400000\", \"product_id\": \"product-id-test-123\", \"site_id\": \"site-id-test-123\", \"region_id\": \"region-id-test-123\", \"product_group_id\": \"product-group-id-test-123\", \"forecast_start_dttm\": \"1672470400000\", \"forecast_end_dttm\": \"1672470400000\" }", 
  event_group_id: "forecastId", 
  event_timestamp: Time.parse(1515531081.123), 
  event_type: "scn.data.forecast", 
  instance_id: "8928ae12-15e5-4441-825d-ec2184f0a43a", 
})

resp.to_h outputs the following:
{
  event_id: "29312d5b-f499-4dcd-b017-3dab3cd34d61", 
}

Example: Successful SendDataIntegrationEvent for inventorylevel event type


resp = client.send_data_integration_event({
  data: "{\"snapshot_date\": \"1672470400000\", \"site_id\": \"site-id-test-123\", \"product_id\": \"product-id-test-123\", \"on_hand_inventory\": \"100.0\", \"inv_condition\": \"good\", \"lot_number\": \"lot-number-test-123\"}", 
  event_group_id: "inventoryLevelId", 
  event_timestamp: Time.parse(1515531081.123), 
  event_type: "scn.data.inventorylevel", 
  instance_id: "8928ae12-15e5-4441-825d-ec2184f0a43a", 
})

resp.to_h outputs the following:
{
  event_id: "3aa78324-acd8-4fdd-a19e-231ea003c2b3", 
}

Example: Successful SendDataIntegrationEvent for outboundorderline event type


resp = client.send_data_integration_event({
  data: "{\"id\": \"outbound-orderline-id-test-123\", \"cust_order_id\": \"cust-order-id-test-123\", \"product_id\": \"product-id-test-123\" }", 
  event_group_id: "outboundOrderLineId", 
  event_timestamp: Time.parse(1515531081.123), 
  event_type: "scn.data.outboundorderline", 
  instance_id: "8928ae12-15e5-4441-825d-ec2184f0a43a", 
})

resp.to_h outputs the following:
{
  event_id: "959b7ef9-5e2d-4795-b1ca-5b16a3eb6b89", 
}

Example: Successful SendDataIntegrationEvent for outboundshipment event type


resp = client.send_data_integration_event({
  data: "{\"id\": \"outbound-shipment-id-test-123\", \"cust_order_id\": \"cust-order-id-test-123\", \"cust_order_line_id\": \"cust-order-line-id-test-123\", \"product_id\": \"product-id-test-123\" }", 
  event_group_id: "outboundShipmentId", 
  event_timestamp: Time.parse(1515531081.123), 
  event_type: "scn.data.outboundshipment", 
  instance_id: "8928ae12-15e5-4441-825d-ec2184f0a43a", 
})

resp.to_h outputs the following:
{
  event_id: "59feded3-5e46-4126-81bf-0137ca176ee0", 
}

Example: Successful SendDataIntegrationEvent for processheader event type


resp = client.send_data_integration_event({
  data: "{\"process_id\": \"process-id-test-123\" }", 
  event_group_id: "processHeaderId", 
  event_timestamp: Time.parse(1515531081.123), 
  event_type: "scn.data.processheader", 
  instance_id: "8928ae12-15e5-4441-825d-ec2184f0a43a", 
})

resp.to_h outputs the following:
{
  event_id: "564130eb-2d8a-4550-a768-ddf0daf7b4a9", 
}

Example: Successful SendDataIntegrationEvent for processoperation event type


resp = client.send_data_integration_event({
  data: "{\"process_operation_id\": \"process-operation-id-test-123\", \"process_id\": \"process-id-test-123\" }", 
  event_group_id: "processOperationId", 
  event_timestamp: Time.parse(1515531081.123), 
  event_type: "scn.data.processoperation", 
  instance_id: "8928ae12-15e5-4441-825d-ec2184f0a43a", 
})

resp.to_h outputs the following:
{
  event_id: "db5df408-89c7-4b9f-a326-016f6c2b3396", 
}

Example: Successful SendDataIntegrationEvent for processproduct event type


resp = client.send_data_integration_event({
  data: "{\"process_product_id\": \"process-product-id-test-123\", \"process_id\": \"process-id-test-123\" }", 
  event_group_id: "processProductId", 
  event_timestamp: Time.parse(1515531081.123), 
  event_type: "scn.data.processproduct", 
  instance_id: "8928ae12-15e5-4441-825d-ec2184f0a43a", 
})

resp.to_h outputs the following:
{
  event_id: "6929b275-485e-4035-a798-99077ca6d669", 
}

Example: Successful SendDataIntegrationEvent for reservation event type


resp = client.send_data_integration_event({
  data: "{\"reservation_id\": \"reservation-id-test-123\", \"reservation_detail_id\": \"reservation-detail-id-test-123\" }", 
  event_group_id: "reservationId", 
  event_timestamp: Time.parse(1515531081.123), 
  event_type: "scn.data.reservation", 
  instance_id: "8928ae12-15e5-4441-825d-ec2184f0a43a", 
})

resp.to_h outputs the following:
{
  event_id: "f6c55a8b-fde2-44f6-848a-9b4336c77209", 
}

Example: Successful SendDataIntegrationEvent for shipment event type


resp = client.send_data_integration_event({
  data: "{\"id\": \"shipment-id-test-123\", \"supplier_tpartner_id\": \"supplier-tpartner-id-test-123\", \"product_id\": \"product-id-test-123\", \"order_id\": \"order-id-test-123\", \"order_line_id\": \"order-line-id-test-123\", \"package_id\": \"package-id-test-123\" }", 
  event_group_id: "shipmentId", 
  event_timestamp: Time.parse(1515531081.123), 
  event_type: "scn.data.shipment", 
  instance_id: "8928ae12-15e5-4441-825d-ec2184f0a43a", 
})

resp.to_h outputs the following:
{
  event_id: "61d079d8-3f56-49bb-b35a-c0271a4e4f0a", 
}

Example: Successful SendDataIntegrationEvent for shipmentstop event type


resp = client.send_data_integration_event({
  data: "{\"shipment_stop_id\": \"shipment-stop-id-test-123\", \"shipment_id\": \"shipment-id-test-123\" }", 
  event_group_id: "shipmentStopId", 
  event_timestamp: Time.parse(1515531081.123), 
  event_type: "scn.data.shipmentstop", 
  instance_id: "8928ae12-15e5-4441-825d-ec2184f0a43a", 
})

resp.to_h outputs the following:
{
  event_id: "3610992a-fc2f-4da4-9beb-724994622ba1", 
}

Example: Successful SendDataIntegrationEvent for shipmentstoporder event type


resp = client.send_data_integration_event({
  data: "{\"shipment_stop_order_id\": \"shipment-stop-order-id-test-123\", \"shipment_stop_id\": \"shipment-stop-id-test-123\", \"shipment_id\": \"shipment-id-test-123\" }", 
  event_group_id: "shipmentStopOrderId", 
  event_timestamp: Time.parse(1515531081.123), 
  event_type: "scn.data.shipmentstoporder", 
  instance_id: "8928ae12-15e5-4441-825d-ec2184f0a43a", 
})

resp.to_h outputs the following:
{
  event_id: "1d550a60-9321-4d25-a132-9dd4b2d9e934", 
}

Example: Successful SendDataIntegrationEvent for supplyplan event type


resp = client.send_data_integration_event({
  data: "{\"supply_plan_id\": \"supply-plan-id-test-123\" }", 
  event_group_id: "supplyPlanId", 
  event_timestamp: Time.parse(1515531081.123), 
  event_type: "scn.data.supplyplan", 
  instance_id: "8928ae12-15e5-4441-825d-ec2184f0a43a", 
})

resp.to_h outputs the following:
{
  event_id: "9abaee56-5dc4-4c31-8250-3206a651d8a1", 
}

Request syntax with placeholder values


resp = client.send_data_integration_event({
  instance_id: "UUID", # required
  event_type: "scn.data.forecast", # required, accepts scn.data.forecast, scn.data.inventorylevel, scn.data.inboundorder, scn.data.inboundorderline, scn.data.inboundorderlineschedule, scn.data.outboundorderline, scn.data.outboundshipment, scn.data.processheader, scn.data.processoperation, scn.data.processproduct, scn.data.reservation, scn.data.shipment, scn.data.shipmentstop, scn.data.shipmentstoporder, scn.data.supplyplan
  data: "DataIntegrationEventData", # required
  event_group_id: "DataIntegrationEventGroupId", # required
  event_timestamp: Time.now,
  client_token: "ClientToken",
})

Response structure


resp.event_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The AWS Supply Chain instance identifier.

  • :event_type (required, String)

    The data event type.

  • :data (required, String)

    The data payload of the event. For more information on the data schema to use, see [Data entities supported in AWS Supply Chain ][1].

    [1]: docs.aws.amazon.com/aws-supply-chain/latest/userguide/data-model-asc.html

  • :event_group_id (required, String)

    Event identifier (for example, orderId for InboundOrder) used for data sharing or partitioning.

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

    The event timestamp (in epoch seconds).

  • :client_token (String)

    The idempotent client token.

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

Returns:

See Also:



2865
2866
2867
2868
# File 'lib/aws-sdk-supplychain/client.rb', line 2865

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

#tag_resource(params = {}) ⇒ Struct

You can create tags during or after creating a resource such as instance, data flow, or dataset in AWS Supply chain. During the data ingestion process, you can add tags such as dev, test, or prod to data flows created during the data ingestion process in the AWS Supply Chain datasets. You can use these tags to identify a group of resources or a single resource used by the developer.

Examples:

Example: Successful TagResource


resp = client.tag_resource({
  resource_arn: "arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/data-integration-flows/my_flow1", 
  tags: {
    "tagKey1" => "tagValue1", 
  }, 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Web Services Supply chain resource ARN that needs to be tagged.

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

    The tags of the Amazon Web Services Supply chain resource to be created.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2914
2915
2916
2917
# File 'lib/aws-sdk-supplychain/client.rb', line 2914

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

#untag_resource(params = {}) ⇒ Struct

You can delete tags for an Amazon Web Services Supply chain resource such as instance, data flow, or dataset in AWS Supply Chain. During the data ingestion process, you can delete tags such as dev, test, or prod to data flows created during the data ingestion process in the AWS Supply Chain datasets.

Examples:

Example: Successful UntagResource


resp = client.untag_resource({
  resource_arn: "arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/data-integration-flows/my_flow1", 
  tag_keys: [
    "tagKey1", 
  ], 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Web Services Supply chain resource ARN that needs to be untagged.

  • :tag_keys (required, Array<String>)

    The list of tag keys to be deleted for an Amazon Web Services Supply Chain resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2960
2961
2962
2963
# File 'lib/aws-sdk-supplychain/client.rb', line 2960

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

#update_data_integration_flow(params = {}) ⇒ Types::UpdateDataIntegrationFlowResponse

Enables you to programmatically update an existing data pipeline to ingest data from the source systems such as, Amazon S3 buckets, to a predefined Amazon Web Services Supply Chain dataset (product, inbound_order) or a temporary dataset along with the data transformation query provided with the API.

Examples:

Example: Successful UpdateDataIntegrationFlow for s3 to dataset flow to update SQL transformation


resp = client.update_data_integration_flow({
  name: "testStagingFlow", 
  instance_id: "8850c54e-e187-4fa7-89d4-6370f165174d", 
  sources: [
    {
      s3_source: {
        bucket_name: "aws-supply-chain-data-b8c7bb28-a576-4334-b481-6d6e8e47371f", 
        prefix: "example-prefix", 
      }, 
      source_name: "testSourceName", 
      source_type: "S3", 
    }, 
  ], 
  target: {
    dataset_target: {
      dataset_identifier: "arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset", 
    }, 
    target_type: "DATASET", 
  }, 
  transformation: {
    sql_transformation: {
      query: "SELECT connection_id, bukrs AS id, txtmd AS description FROM testSourceName WHERE langu = 'E'", 
    }, 
    transformation_type: "SQL", 
  }, 
})

resp.to_h outputs the following:
{
  flow: {
    name: "testStagingFlow", 
    created_time: Time.parse(1724956400.44), 
    instance_id: "8850c54e-e187-4fa7-89d4-6370f165174d", 
    last_modified_time: Time.parse(1732456405.77), 
    sources: [
      {
        s3_source: {
          bucket_name: "aws-supply-chain-data-b8c7bb28-a576-4334-b481-6d6e8e47371f", 
          prefix: "example-prefix", 
        }, 
        source_name: "testSourceName", 
        source_type: "S3", 
      }, 
    ], 
    target: {
      dataset_target: {
        dataset_identifier: "arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset", 
      }, 
      target_type: "DATASET", 
    }, 
    transformation: {
      sql_transformation: {
        query: "SELECT connection_id, bukrs AS id, txtmd AS description FROM testSourceName WHERE langu = 'E'", 
      }, 
      transformation_type: "SQL", 
    }, 
  }, 
}

Example: Successful UpdateDataIntegrationFlow for dataset to dataset flow to update sources


resp = client.update_data_integration_flow({
  name: "trading-partner", 
  instance_id: "8850c54e-e187-4fa7-89d4-6370f165174d", 
  sources: [
    {
      dataset_source: {
        dataset_identifier: "arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset1", 
      }, 
      source_name: "testSourceName1", 
      source_type: "DATASET", 
    }, 
    {
      dataset_source: {
        dataset_identifier: "arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset2_updated", 
      }, 
      source_name: "testSourceName2", 
      source_type: "DATASET", 
    }, 
  ], 
  target: {
    dataset_target: {
      dataset_identifier: "arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/asc/datasets/trading_partner", 
    }, 
    target_type: "DATASET", 
  }, 
  transformation: {
    sql_transformation: {
      query: "SELECT S1.id AS id, S1.poc_org_unit_description AS description, S1.company_id AS company_id, S1.tpartner_type AS tpartner_type, S1.geo_id AS geo_id, S1.eff_start_date AS eff_start_date, S1.eff_end_date AS eff_end_date FROM testSourceName1 AS S1 LEFT JOIN testSourceName2 as S2 ON S1.id=S2.id", 
    }, 
    transformation_type: "SQL", 
  }, 
})

resp.to_h outputs the following:
{
  flow: {
    name: "trading-partner", 
    created_time: Time.parse(1724956400.44), 
    instance_id: "8850c54e-e187-4fa7-89d4-6370f165174d", 
    last_modified_time: Time.parse(1732456405.77), 
    sources: [
      {
        dataset_source: {
          dataset_identifier: "arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset1", 
        }, 
        source_name: "testSourceName1", 
        source_type: "DATASET", 
      }, 
      {
        dataset_source: {
          dataset_identifier: "arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset2_updated", 
        }, 
        source_name: "testSourceName2", 
        source_type: "DATASET", 
      }, 
    ], 
    target: {
      dataset_target: {
        dataset_identifier: "arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/asc/datasets/trading_partner", 
      }, 
      target_type: "DATASET", 
    }, 
    transformation: {
      sql_transformation: {
        query: "SELECT S1.id AS id, S1.poc_org_unit_description AS description, S1.company_id AS company_id, S1.tpartner_type AS tpartner_type, S1.geo_id AS geo_id, S1.eff_start_date AS eff_start_date, S1.eff_end_date AS eff_end_date FROM testSourceName1 AS S1 LEFT JOIN testSourceName2 as S2 ON S1.id=S2.id", 
      }, 
      transformation_type: "SQL", 
    }, 
  }, 
}

Request syntax with placeholder values


resp = client.update_data_integration_flow({
  instance_id: "UUID", # required
  name: "DataIntegrationFlowName", # required
  sources: [
    {
      source_type: "S3", # required, accepts S3, DATASET
      source_name: "DataIntegrationFlowSourceName", # required
      s3_source: {
        bucket_name: "S3BucketName", # required
        prefix: "DataIntegrationFlowS3Prefix", # required
        options: {
          file_type: "CSV", # accepts CSV, PARQUET, JSON
        },
      },
      dataset_source: {
        dataset_identifier: "DatasetIdentifier", # required
        options: {
          load_type: "INCREMENTAL", # accepts INCREMENTAL, REPLACE
          dedupe_records: false,
        },
      },
    },
  ],
  transformation: {
    transformation_type: "SQL", # required, accepts SQL, NONE
    sql_transformation: {
      query: "DataIntegrationFlowSQLQuery", # required
    },
  },
  target: {
    target_type: "S3", # required, accepts S3, DATASET
    s3_target: {
      bucket_name: "S3BucketName", # required
      prefix: "DataIntegrationFlowS3Prefix", # required
      options: {
        file_type: "CSV", # accepts CSV, PARQUET, JSON
      },
    },
    dataset_target: {
      dataset_identifier: "DatasetIdentifier", # required
      options: {
        load_type: "INCREMENTAL", # accepts INCREMENTAL, REPLACE
        dedupe_records: false,
      },
    },
  },
})

Response structure


resp.flow.instance_id #=> String
resp.flow.name #=> String
resp.flow.sources #=> Array
resp.flow.sources[0].source_type #=> String, one of "S3", "DATASET"
resp.flow.sources[0].source_name #=> String
resp.flow.sources[0].s3_source.bucket_name #=> String
resp.flow.sources[0].s3_source.prefix #=> String
resp.flow.sources[0].s3_source.options.file_type #=> String, one of "CSV", "PARQUET", "JSON"
resp.flow.sources[0].dataset_source.dataset_identifier #=> String
resp.flow.sources[0].dataset_source.options.load_type #=> String, one of "INCREMENTAL", "REPLACE"
resp.flow.sources[0].dataset_source.options.dedupe_records #=> Boolean
resp.flow.transformation.transformation_type #=> String, one of "SQL", "NONE"
resp.flow.transformation.sql_transformation.query #=> String
resp.flow.target.target_type #=> String, one of "S3", "DATASET"
resp.flow.target.s3_target.bucket_name #=> String
resp.flow.target.s3_target.prefix #=> String
resp.flow.target.s3_target.options.file_type #=> String, one of "CSV", "PARQUET", "JSON"
resp.flow.target.dataset_target.dataset_identifier #=> String
resp.flow.target.dataset_target.options.load_type #=> String, one of "INCREMENTAL", "REPLACE"
resp.flow.target.dataset_target.options.dedupe_records #=> Boolean
resp.flow.created_time #=> Time
resp.flow.last_modified_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The Amazon Web Services Supply Chain instance identifier.

  • :name (required, String)

    The name of the DataIntegrationFlow to be updated.

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

    The new source configurations for the DataIntegrationFlow.

  • :transformation (Types::DataIntegrationFlowTransformation)

    The new transformation configurations for the DataIntegrationFlow.

  • :target (Types::DataIntegrationFlowTarget)

    The new target configurations for the DataIntegrationFlow.

Returns:

See Also:



3204
3205
3206
3207
# File 'lib/aws-sdk-supplychain/client.rb', line 3204

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

#update_data_lake_dataset(params = {}) ⇒ Types::UpdateDataLakeDatasetResponse

Enables you to programmatically update an Amazon Web Services Supply Chain data lake dataset. Developers can update the description of a data lake dataset for a given instance ID, namespace, and dataset name.

Examples:

Example: Update description of an existing AWS Supply Chain inbound order dataset


resp = client.update_data_lake_dataset({
  name: "inbound_order", 
  description: "This is an updated AWS Supply Chain inbound order dataset", 
  instance_id: "1877dd20-dee9-4639-8e99-cb67acf21fe5", 
  namespace: "asc", 
})

resp.to_h outputs the following:
{
  dataset: {
    name: "inbound_order", 
    arn: "arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/asc/datasets/inbound_order", 
    created_time: Time.parse(1727116807.751), 
    description: "This is an updated AWS Supply Chain inbound order dataset", 
    instance_id: "1877dd20-dee9-4639-8e99-cb67acf21fe5", 
    last_modified_time: Time.parse(1727117453.568), 
    namespace: "asc", 
    schema: {
      name: "InboundOrder", 
      fields: [
        {
          name: "id", 
          type: "STRING", 
          is_required: true, 
        }, 
        {
          name: "tpartner_id", 
          type: "STRING", 
          is_required: true, 
        }, 
        {
          name: "connection_id", 
          type: "STRING", 
          is_required: true, 
        }, 
        {
          name: "order_type", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "order_status", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "inbound_order_url", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "order_creation_date", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
        {
          name: "company_id", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "to_site_id", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "order_currency_uom", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "vendor_currency_uom", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "exchange_rate", 
          type: "DOUBLE", 
          is_required: false, 
        }, 
        {
          name: "exchange_rate_date", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
        {
          name: "incoterm", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "incoterm2", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "incoterm_location_1", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "incoterm_location_2", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "submitted_date", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
        {
          name: "agreement_start_date", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
        {
          name: "agreement_end_date", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
        {
          name: "shipping_instr_code", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "payment_terms_code", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "std_terms_agreement", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "std_terms_agreement_ver", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "agreement_number", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "source", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "source_update_dttm", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
        {
          name: "source_event_id", 
          type: "STRING", 
          is_required: false, 
        }, 
        {
          name: "db_creation_dttm", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
        {
          name: "db_updation_dttm", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
      ], 
    }, 
  }, 
}

Example: Update description of an existing custom dataset


resp = client.update_data_lake_dataset({
  name: "my_dataset", 
  description: "This is an updated custom dataset", 
  instance_id: "1877dd20-dee9-4639-8e99-cb67acf21fe5", 
  namespace: "default", 
})

resp.to_h outputs the following:
{
  dataset: {
    name: "my_dataset", 
    arn: "arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/default/datasets/my_dataset", 
    created_time: Time.parse(1727116807.751), 
    description: "This is an updated custom dataset", 
    instance_id: "1877dd20-dee9-4639-8e99-cb67acf21fe5", 
    last_modified_time: Time.parse(1727117453.568), 
    namespace: "default", 
    schema: {
      name: "MyDataset", 
      fields: [
        {
          name: "id", 
          type: "INT", 
          is_required: true, 
        }, 
        {
          name: "description", 
          type: "STRING", 
          is_required: true, 
        }, 
        {
          name: "price", 
          type: "DOUBLE", 
          is_required: false, 
        }, 
        {
          name: "creation_time", 
          type: "TIMESTAMP", 
          is_required: false, 
        }, 
      ], 
    }, 
  }, 
}

Request syntax with placeholder values


resp = client.update_data_lake_dataset({
  instance_id: "UUID", # required
  namespace: "DataLakeDatasetNamespace", # required
  name: "DataLakeDatasetName", # required
  description: "DataLakeDatasetDescription",
})

Response structure


resp.dataset.instance_id #=> String
resp.dataset.namespace #=> String
resp.dataset.name #=> String
resp.dataset.arn #=> String
resp.dataset.schema.name #=> String
resp.dataset.schema.fields #=> Array
resp.dataset.schema.fields[0].name #=> String
resp.dataset.schema.fields[0].type #=> String, one of "INT", "DOUBLE", "STRING", "TIMESTAMP"
resp.dataset.schema.fields[0].is_required #=> Boolean
resp.dataset.description #=> String
resp.dataset.created_time #=> Time
resp.dataset.last_modified_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

Returns:

See Also:



3499
3500
3501
3502
# File 'lib/aws-sdk-supplychain/client.rb', line 3499

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

#update_instance(params = {}) ⇒ Types::UpdateInstanceResponse

Enables you to programmatically update an Amazon Web Services Supply Chain instance description by providing all the relevant information such as account ID, instance ID and so on without using the AWS console.

Examples:

Example: Successful UpdateInstance request


resp = client.update_instance({
  instance_description: "updated example instance description", 
  instance_id: "9e193580-7cc5-45f7-9609-c43ba0ada793", 
  instance_name: "updated example instance name", 
})

resp.to_h outputs the following:
{
  instance: {
    aws_account_id: "123456789012", 
    created_time: Time.parse(172615383136), 
    instance_description: "updated example instance description", 
    instance_id: "9e193580-7cc5-45f7-9609-c43ba0ada793", 
    instance_name: "updated example instance name", 
    kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b14ffc39-b7d4-45ab-991a-6257a7f0d24d", 
    last_modified_time: Time.parse(172615383136), 
    state: "Active", 
    version_number: 2.0, 
  }, 
}

Request syntax with placeholder values


resp = client.update_instance({
  instance_id: "UUID", # required
  instance_name: "InstanceName",
  instance_description: "InstanceDescription",
})

Response structure


resp.instance.instance_id #=> String
resp.instance. #=> String
resp.instance.state #=> String, one of "Initializing", "Active", "CreateFailed", "DeleteFailed", "Deleting", "Deleted"
resp.instance.error_message #=> String
resp.instance.web_app_dns_domain #=> String
resp.instance.created_time #=> Time
resp.instance.last_modified_time #=> Time
resp.instance.instance_name #=> String
resp.instance.instance_description #=> String
resp.instance.kms_key_arn #=> String
resp.instance.version_number #=> Float

Parameters:

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

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The AWS Supply Chain instance identifier.

  • :instance_name (String)

    The AWS Supply Chain instance name.

  • :instance_description (String)

    The AWS Supply Chain instance description.

Returns:

See Also:



3572
3573
3574
3575
# File 'lib/aws-sdk-supplychain/client.rb', line 3572

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

#waiter_namesObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Deprecated.


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

def waiter_names
  []
end