SDK for PHP 3.x

Client: Aws\SupplyChain\SupplyChainClient
Service ID: supplychain
Version: 2024-01-01

This page describes the parameters and results for the operations of the AWS Supply Chain (2024-01-01), and shows how to use the Aws\SupplyChain\SupplyChainClient object to call the described operations. This documentation is specific to the 2024-01-01 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

CreateBillOfMaterialsImportJob ( array $params = [] )
CreateBillOfMaterialsImportJob creates an import job for the Product Bill Of Materials (BOM) entity.
CreateDataIntegrationFlow ( array $params = [] )
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.
CreateDataLakeDataset ( array $params = [] )
Enables you to programmatically create an Amazon Web Services Supply Chain data lake dataset.
CreateInstance ( array $params = [] )
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.
DeleteDataIntegrationFlow ( array $params = [] )
Enable you to programmatically delete an existing data pipeline for the provided Amazon Web Services Supply Chain instance and DataIntegrationFlow name.
DeleteDataLakeDataset ( array $params = [] )
Enables you to programmatically delete an Amazon Web Services Supply Chain data lake dataset.
DeleteInstance ( array $params = [] )
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.
GetBillOfMaterialsImportJob ( array $params = [] )
Get status and details of a BillOfMaterialsImportJob.
GetDataIntegrationFlow ( array $params = [] )
Enables you to programmatically view a specific data pipeline for the provided Amazon Web Services Supply Chain instance and DataIntegrationFlow name.
GetDataLakeDataset ( array $params = [] )
Enables you to programmatically view an Amazon Web Services Supply Chain data lake dataset.
GetInstance ( array $params = [] )
Enables you to programmatically retrieve the information related to an Amazon Web Services Supply Chain instance ID.
ListDataIntegrationFlows ( array $params = [] )
Enables you to programmatically list all data pipelines for the provided Amazon Web Services Supply Chain instance.
ListDataLakeDatasets ( array $params = [] )
Enables you to programmatically view the list of Amazon Web Services Supply Chain data lake datasets.
ListInstances ( array $params = [] )
List all Amazon Web Services Supply Chain instances for a specific account.
ListTagsForResource ( array $params = [] )
List all the tags for an Amazon Web ServicesSupply Chain resource.
SendDataIntegrationEvent ( array $params = [] )
Send the transactional data payload for the event with real-time data for analysis or monitoring.
TagResource ( array $params = [] )
You can create tags during or after creating a resource such as instance, data flow, or dataset in AWS Supply chain.
UntagResource ( array $params = [] )
You can delete tags for an Amazon Web Services Supply chain resource such as instance, data flow, or dataset in AWS Supply Chain.
UpdateDataIntegrationFlow ( array $params = [] )
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.
UpdateDataLakeDataset ( array $params = [] )
Enables you to programmatically update an Amazon Web Services Supply Chain data lake dataset.
UpdateInstance ( array $params = [] )
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.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

ListDataIntegrationFlows
ListDataLakeDatasets
ListInstances

Operations

CreateBillOfMaterialsImportJob

$result = $client->createBillOfMaterialsImportJob([/* ... */]);
$promise = $client->createBillOfMaterialsImportJobAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->createBillOfMaterialsImportJob([
    'clientToken' => '<string>',
    'instanceId' => '<string>', // REQUIRED
    's3uri' => '<string>', // REQUIRED
]);

Parameter Details

Members
clientToken
Type: 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.

instanceId
Required: Yes
Type: string

The AWS Supply Chain instance identifier.

s3uri
Required: Yes
Type: string

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

Result Syntax

[
    'jobId' => '<string>',
]

Result Details

Members
jobId
Required: Yes
Type: string

The new BillOfMaterialsImportJob identifier.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ThrottlingException:

Request was denied due to request throttling.

ResourceNotFoundException:

Request references a resource which does not exist.

AccessDeniedException:

You do not have the required privileges to perform this action.

ValidationException:

The input does not satisfy the constraints specified by an AWS service.

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

Example 1: Invoke CreateBillOfMaterialsImportJob
$result = $client->createBillOfMaterialsImportJob([
    'clientToken' => '550e8400-e29b-41d4-a716-446655440000',
    'instanceId' => '60f82bbd-71f7-4fcd-a941-472f574c5243',
    's3uri' => 's3://mybucketname/pathelemene/file.csv',
]);

Result syntax:

[
    'jobId' => 'f79b359b-1515-4436-a3bf-bae7b33e47b4',
]

CreateDataIntegrationFlow

$result = $client->createDataIntegrationFlow([/* ... */]);
$promise = $client->createDataIntegrationFlowAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->createDataIntegrationFlow([
    'instanceId' => '<string>', // REQUIRED
    'name' => '<string>', // REQUIRED
    'sources' => [ // REQUIRED
        [
            'datasetSource' => [
                'datasetIdentifier' => '<string>', // REQUIRED
                'options' => [
                    'dedupeRecords' => true || false,
                    'loadType' => 'INCREMENTAL|REPLACE',
                ],
            ],
            's3Source' => [
                'bucketName' => '<string>', // REQUIRED
                'options' => [
                    'fileType' => 'CSV|PARQUET|JSON',
                ],
                'prefix' => '<string>', // REQUIRED
            ],
            'sourceName' => '<string>', // REQUIRED
            'sourceType' => 'S3|DATASET', // REQUIRED
        ],
        // ...
    ],
    'tags' => ['<string>', ...],
    'target' => [ // REQUIRED
        'datasetTarget' => [
            'datasetIdentifier' => '<string>', // REQUIRED
            'options' => [
                'dedupeRecords' => true || false,
                'loadType' => 'INCREMENTAL|REPLACE',
            ],
        ],
        's3Target' => [
            'bucketName' => '<string>', // REQUIRED
            'options' => [
                'fileType' => 'CSV|PARQUET|JSON',
            ],
            'prefix' => '<string>', // REQUIRED
        ],
        'targetType' => 'S3|DATASET', // REQUIRED
    ],
    'transformation' => [ // REQUIRED
        'sqlTransformation' => [
            'query' => '<string>', // REQUIRED
        ],
        'transformationType' => 'SQL|NONE', // REQUIRED
    ],
]);

Parameter Details

Members
instanceId
Required: Yes
Type: string

The Amazon Web Services Supply Chain instance identifier.

name
Required: Yes
Type: string

Name of the DataIntegrationFlow.

sources
Required: Yes
Type: Array of DataIntegrationFlowSource structures

The source configurations for DataIntegrationFlow.

tags
Type: Associative array of custom strings keys (TagKey) to strings

The tags of the DataIntegrationFlow to be created

target
Required: Yes
Type: DataIntegrationFlowTarget structure

The target configurations for DataIntegrationFlow.

transformation
Required: Yes
Type: DataIntegrationFlowTransformation structure

The transformation configurations for DataIntegrationFlow.

Result Syntax

[
    'instanceId' => '<string>',
    'name' => '<string>',
]

Result Details

Members
instanceId
Required: Yes
Type: string

The Amazon Web Services Supply Chain instance identifier.

name
Required: Yes
Type: string

The name of the DataIntegrationFlow created.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ThrottlingException:

Request was denied due to request throttling.

ResourceNotFoundException:

Request references a resource which does not exist.

AccessDeniedException:

You do not have the required privileges to perform this action.

ValidationException:

The input does not satisfy the constraints specified by an AWS service.

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

Example 1: Successful CreateDataIntegrationFlow for s3 to dataset flow
$result = $client->createDataIntegrationFlow([
    'name' => 'testStagingFlow',
    'instanceId' => '8850c54e-e187-4fa7-89d4-6370f165174d',
    'sources' => [
        [
            's3Source' => [
                'bucketName' => 'aws-supply-chain-data-b8c7bb28-a576-4334-b481-6d6e8e47371f',
                'prefix' => 'example-prefix',
            ],
            'sourceName' => 'testSourceName',
            'sourceType' => 'S3',
        ],
    ],
    'tags' => [
        'tagKey1' => 'tagValue1',
    ],
    'target' => [
        'datasetTarget' => [
            'datasetIdentifier' => 'arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset',
        ],
        'targetType' => 'DATASET',
    ],
    'transformation' => [
        'sqlTransformation' => [
            'query' => 'SELECT * FROM testSourceName',
        ],
        'transformationType' => 'SQL',
    ],
]);

Result syntax:

[
    'name' => 'testStagingFlow',
    'instanceId' => '8850c54e-e187-4fa7-89d4-6370f165174d',
]
Example 2: Successful CreateDataIntegrationFlow for dataset to dataset flow
$result = $client->createDataIntegrationFlow([
    'name' => 'trading-partner',
    'instanceId' => '8850c54e-e187-4fa7-89d4-6370f165174d',
    'sources' => [
        [
            'datasetSource' => [
                'datasetIdentifier' => 'arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset1',
            ],
            'sourceName' => 'testSourceName1',
            'sourceType' => 'DATASET',
        ],
        [
            'datasetSource' => [
                'datasetIdentifier' => 'arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset2',
            ],
            'sourceName' => 'testSourceName2',
            'sourceType' => 'DATASET',
        ],
    ],
    'tags' => [
        'tagKey1' => 'tagValue1',
    ],
    'target' => [
        'datasetTarget' => [
            'datasetIdentifier' => 'arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/asc/datasets/trading_partner',
        ],
        'targetType' => 'DATASET',
    ],
    'transformation' => [
        'sqlTransformation' => [
            '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',
        ],
        'transformationType' => 'SQL',
    ],
]);

Result syntax:

[
    'name' => 'trading-partner',
    'instanceId' => '8850c54e-e187-4fa7-89d4-6370f165174d',
]

CreateDataLakeDataset

$result = $client->createDataLakeDataset([/* ... */]);
$promise = $client->createDataLakeDatasetAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->createDataLakeDataset([
    'description' => '<string>',
    'instanceId' => '<string>', // REQUIRED
    'name' => '<string>', // REQUIRED
    'namespace' => '<string>', // REQUIRED
    'schema' => [
        'fields' => [ // REQUIRED
            [
                'isRequired' => true || false, // REQUIRED
                'name' => '<string>', // REQUIRED
                'type' => 'INT|DOUBLE|STRING|TIMESTAMP', // REQUIRED
            ],
            // ...
        ],
        'name' => '<string>', // REQUIRED
    ],
    'tags' => ['<string>', ...],
]);

Parameter Details

Members
description
Type: string

The description of the dataset.

instanceId
Required: Yes
Type: string

The Amazon Web Services Supply Chain instance identifier.

name
Required: Yes
Type: string

The name of the dataset. For asc name space, the name must be one of the supported data entities under https://docs.aws.amazon.com/aws-supply-chain/latest/userguide/data-model-asc.html.

namespace
Required: Yes
Type: string

The name space of the dataset.

schema
Type: DataLakeDatasetSchema structure

The custom schema of the data lake dataset and is only required when the name space is default.

tags
Type: Associative array of custom strings keys (TagKey) to strings

The tags of the dataset.

Result Syntax

[
    'dataset' => [
        'arn' => '<string>',
        'createdTime' => <DateTime>,
        'description' => '<string>',
        'instanceId' => '<string>',
        'lastModifiedTime' => <DateTime>,
        'name' => '<string>',
        'namespace' => '<string>',
        'schema' => [
            'fields' => [
                [
                    'isRequired' => true || false,
                    'name' => '<string>',
                    'type' => 'INT|DOUBLE|STRING|TIMESTAMP',
                ],
                // ...
            ],
            'name' => '<string>',
        ],
    ],
]

Result Details

Members
dataset
Required: Yes
Type: DataLakeDataset structure

The detail of created dataset.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ThrottlingException:

Request was denied due to request throttling.

ResourceNotFoundException:

Request references a resource which does not exist.

AccessDeniedException:

You do not have the required privileges to perform this action.

ValidationException:

The input does not satisfy the constraints specified by an AWS service.

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

Example 1: Create an AWS Supply Chain inbound order dataset
$result = $client->createDataLakeDataset([
    'name' => 'inbound_order',
    'description' => 'This is an AWS Supply Chain inbound order dataset',
    'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
    'namespace' => 'asc',
    'tags' => [
        'tagKey1' => 'tagValue1',
        'tagKey2' => 'tagValue2',
    ],
]);

Result syntax:

[
    'dataset' => [
        'name' => 'inbound_order',
        'arn' => 'arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/asc/datasets/inbound_order',
        'createdTime' => ,
        'description' => 'This is an AWS Supply Chain inbound order dataset',
        'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
        'lastModifiedTime' => ,
        'namespace' => 'asc',
        'schema' => [
            'name' => 'InboundOrder',
            'fields' => [
                [
                    'name' => 'id',
                    'type' => 'STRING',
                    'isRequired' => 1,
                ],
                [
                    'name' => 'tpartner_id',
                    'type' => 'STRING',
                    'isRequired' => 1,
                ],
                [
                    'name' => 'connection_id',
                    'type' => 'STRING',
                    'isRequired' => 1,
                ],
                [
                    'name' => 'order_type',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'order_status',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'inbound_order_url',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'order_creation_date',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
                [
                    'name' => 'company_id',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'to_site_id',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'order_currency_uom',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'vendor_currency_uom',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'exchange_rate',
                    'type' => 'DOUBLE',
                    'isRequired' => ,
                ],
                [
                    'name' => 'exchange_rate_date',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
                [
                    'name' => 'incoterm',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'incoterm2',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'incoterm_location_1',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'incoterm_location_2',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'submitted_date',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
                [
                    'name' => 'agreement_start_date',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
                [
                    'name' => 'agreement_end_date',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
                [
                    'name' => 'shipping_instr_code',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'payment_terms_code',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'std_terms_agreement',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'std_terms_agreement_ver',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'agreement_number',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'source',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'source_update_dttm',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
                [
                    'name' => 'source_event_id',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'db_creation_dttm',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
                [
                    'name' => 'db_updation_dttm',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
            ],
        ],
    ],
]
Example 2: Create a custom dataset
$result = $client->createDataLakeDataset([
    'name' => 'my_dataset',
    'description' => 'This is a custom dataset',
    'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
    'namespace' => 'default',
    'schema' => [
        'name' => 'MyDataset',
        'fields' => [
            [
                'name' => 'id',
                'type' => 'INT',
                'isRequired' => 1,
            ],
            [
                'name' => 'description',
                'type' => 'STRING',
                'isRequired' => 1,
            ],
            [
                'name' => 'price',
                'type' => 'DOUBLE',
                'isRequired' => ,
            ],
            [
                'name' => 'creation_time',
                'type' => 'TIMESTAMP',
                'isRequired' => ,
            ],
        ],
    ],
    'tags' => [
        'tagKey1' => 'tagValue1',
        'tagKey2' => 'tagValue2',
    ],
]);

Result syntax:

[
    'dataset' => [
        'name' => 'my_dataset',
        'arn' => 'arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/default/datasets/my_dataset',
        'createdTime' => ,
        'description' => 'This is a custom dataset',
        'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
        'lastModifiedTime' => ,
        'namespace' => 'default',
        'schema' => [
            'name' => 'MyDataset',
            'fields' => [
                [
                    'name' => 'id',
                    'type' => 'INT',
                    'isRequired' => 1,
                ],
                [
                    'name' => 'description',
                    'type' => 'STRING',
                    'isRequired' => 1,
                ],
                [
                    'name' => 'price',
                    'type' => 'DOUBLE',
                    'isRequired' => ,
                ],
                [
                    'name' => 'creation_time',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
            ],
        ],
    ],
]

CreateInstance

$result = $client->createInstance([/* ... */]);
$promise = $client->createInstanceAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->createInstance([
    'clientToken' => '<string>',
    'instanceDescription' => '<string>',
    'instanceName' => '<string>',
    'kmsKeyArn' => '<string>',
    'tags' => ['<string>', ...],
]);

Parameter Details

Members
clientToken
Type: string

The client token for idempotency.

instanceDescription
Type: string

The AWS Supply Chain instance description.

instanceName
Type: string

The AWS Supply Chain instance name.

kmsKeyArn
Type: 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
Type: Associative array of custom strings keys (TagKey) to strings

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

Result Syntax

[
    'instance' => [
        'awsAccountId' => '<string>',
        'createdTime' => <DateTime>,
        'errorMessage' => '<string>',
        'instanceDescription' => '<string>',
        'instanceId' => '<string>',
        'instanceName' => '<string>',
        'kmsKeyArn' => '<string>',
        'lastModifiedTime' => <DateTime>,
        'state' => 'Initializing|Active|CreateFailed|DeleteFailed|Deleting|Deleted',
        'versionNumber' => <float>,
        'webAppDnsDomain' => '<string>',
    ],
]

Result Details

Members
instance
Required: Yes
Type: Instance structure

The AWS Supply Chain instance resource data details.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ThrottlingException:

Request was denied due to request throttling.

ResourceNotFoundException:

Request references a resource which does not exist.

AccessDeniedException:

You do not have the required privileges to perform this action.

ValidationException:

The input does not satisfy the constraints specified by an AWS service.

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

Example 1: Successful CreateInstance request with all input data
$result = $client->createInstance([
    'instanceDescription' => 'example instance description',
    'instanceName' => 'example instance name',
    'kmsKeyArn' => 'arn:aws:kms:us-west-2:123456789012:key/b14ffc39-b7d4-45ab-991a-6257a7f0d24d',
    'tags' => [
        'tagKey1' => 'tagValue1',
    ],
]);

Result syntax:

[
    'instance' => [
        'awsAccountId' => '123456789012',
        'createdTime' => ,
        'instanceDescription' => 'example instance description',
        'instanceId' => '9e193580-7cc5-45f7-9609-c43ba0ada793',
        'instanceName' => 'example instance name',
        'kmsKeyArn' => 'arn:aws:kms:us-west-2:123456789012:key/b14ffc39-b7d4-45ab-991a-6257a7f0d24d',
        'lastModifiedTime' => ,
        'state' => 'Initializing',
        'versionNumber' => 2,
    ],
]
Example 2: Successful CreateInstance request with no input data
$result = $client->createInstance([
]);

Result syntax:

[
    'instance' => [
        'awsAccountId' => '123456789012',
        'createdTime' => ,
        'instanceDescription' => '',
        'instanceId' => '9e193580-7cc5-45f7-9609-c43ba0ada793',
        'kmsKeyArn' => 'arn:aws:kms:us-west-2:456789012345:key/7372eb6d-874c-4212-8d49-7804282d33a8',
        'lastModifiedTime' => ,
        'state' => 'Initializing',
        'versionNumber' => 2,
    ],
]

DeleteDataIntegrationFlow

$result = $client->deleteDataIntegrationFlow([/* ... */]);
$promise = $client->deleteDataIntegrationFlowAsync([/* ... */]);

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

Parameter Syntax

$result = $client->deleteDataIntegrationFlow([
    'instanceId' => '<string>', // REQUIRED
    'name' => '<string>', // REQUIRED
]);

Parameter Details

Members
instanceId
Required: Yes
Type: string

The Amazon Web Services Supply Chain instance identifier.

name
Required: Yes
Type: string

The name of the DataIntegrationFlow to be deleted.

Result Syntax

[
    'instanceId' => '<string>',
    'name' => '<string>',
]

Result Details

Members
instanceId
Required: Yes
Type: string

The Amazon Web Services Supply Chain instance identifier.

name
Required: Yes
Type: string

The name of the DataIntegrationFlow deleted.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ResourceNotFoundException:

Request references a resource which does not exist.

ThrottlingException:

Request was denied due to request throttling.

AccessDeniedException:

You do not have the required privileges to perform this action.

ValidationException:

The input does not satisfy the constraints specified by an AWS service.

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

Example 1: Successful DeleteDataIntegrationFlow
$result = $client->deleteDataIntegrationFlow([
    'name' => 'testStagingFlow',
    'instanceId' => '8850c54e-e187-4fa7-89d4-6370f165174d',
]);

Result syntax:

[
    'name' => 'testStagingFlow',
    'instanceId' => '8850c54e-e187-4fa7-89d4-6370f165174d',
]

DeleteDataLakeDataset

$result = $client->deleteDataLakeDataset([/* ... */]);
$promise = $client->deleteDataLakeDatasetAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->deleteDataLakeDataset([
    'instanceId' => '<string>', // REQUIRED
    'name' => '<string>', // REQUIRED
    'namespace' => '<string>', // REQUIRED
]);

Parameter Details

Members
instanceId
Required: Yes
Type: string

The AWS Supply Chain instance identifier.

name
Required: Yes
Type: string

The name of the dataset. If the namespace is asc, the name must be one of the supported data entities .

namespace
Required: Yes
Type: string

The namespace of the dataset. The available values are:

Result Syntax

[
    'instanceId' => '<string>',
    'name' => '<string>',
    'namespace' => '<string>',
]

Result Details

Members
instanceId
Required: Yes
Type: string

The AWS Supply Chain instance identifier.

name
Required: Yes
Type: string

The name of deleted dataset.

namespace
Required: Yes
Type: string

The namespace of deleted dataset.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ResourceNotFoundException:

Request references a resource which does not exist.

ThrottlingException:

Request was denied due to request throttling.

AccessDeniedException:

You do not have the required privileges to perform this action.

ValidationException:

The input does not satisfy the constraints specified by an AWS service.

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

Example 1: Delete an AWS Supply Chain inbound_order dataset
$result = $client->deleteDataLakeDataset([
    'name' => 'inbound_order',
    'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
    'namespace' => 'asc',
]);

Result syntax:

[
    'name' => 'inbound_order',
    'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
    'namespace' => 'asc',
]
Example 2: Delete a custom dataset
$result = $client->deleteDataLakeDataset([
    'name' => 'my_dataset',
    'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
    'namespace' => 'default',
]);

Result syntax:

[
    'name' => 'my_dataset',
    'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
    'namespace' => 'default',
]

DeleteInstance

$result = $client->deleteInstance([/* ... */]);
$promise = $client->deleteInstanceAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->deleteInstance([
    'instanceId' => '<string>', // REQUIRED
]);

Parameter Details

Members
instanceId
Required: Yes
Type: string

The AWS Supply Chain instance identifier.

Result Syntax

[
    'instance' => [
        'awsAccountId' => '<string>',
        'createdTime' => <DateTime>,
        'errorMessage' => '<string>',
        'instanceDescription' => '<string>',
        'instanceId' => '<string>',
        'instanceName' => '<string>',
        'kmsKeyArn' => '<string>',
        'lastModifiedTime' => <DateTime>,
        'state' => 'Initializing|Active|CreateFailed|DeleteFailed|Deleting|Deleted',
        'versionNumber' => <float>,
        'webAppDnsDomain' => '<string>',
    ],
]

Result Details

Members
instance
Required: Yes
Type: Instance structure

The AWS Supply Chain instance resource data details.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ResourceNotFoundException:

Request references a resource which does not exist.

ThrottlingException:

Request was denied due to request throttling.

AccessDeniedException:

You do not have the required privileges to perform this action.

ValidationException:

The input does not satisfy the constraints specified by an AWS service.

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

Example 1: Successful DeleteInstance request
$result = $client->deleteInstance([
    'instanceId' => '9e193580-7cc5-45f7-9609-c43ba0ada793',
]);

Result syntax:

[
    'instance' => [
        'awsAccountId' => '123456789012',
        'createdTime' => ,
        'instanceDescription' => 'updated example instance description',
        'instanceId' => '9e193580-7cc5-45f7-9609-c43ba0ada793',
        'instanceName' => 'updated example instance name',
        'kmsKeyArn' => 'arn:aws:kms:us-west-2:123456789012:key/b14ffc39-b7d4-45ab-991a-6257a7f0d24d',
        'lastModifiedTime' => ,
        'state' => 'Deleting',
        'versionNumber' => 2,
    ],
]

GetBillOfMaterialsImportJob

$result = $client->getBillOfMaterialsImportJob([/* ... */]);
$promise = $client->getBillOfMaterialsImportJobAsync([/* ... */]);

Get status and details of a BillOfMaterialsImportJob.

Parameter Syntax

$result = $client->getBillOfMaterialsImportJob([
    'instanceId' => '<string>', // REQUIRED
    'jobId' => '<string>', // REQUIRED
]);

Parameter Details

Members
instanceId
Required: Yes
Type: string

The AWS Supply Chain instance identifier.

jobId
Required: Yes
Type: string

The BillOfMaterialsImportJob identifier.

Result Syntax

[
    'job' => [
        'instanceId' => '<string>',
        'jobId' => '<string>',
        'message' => '<string>',
        's3uri' => '<string>',
        'status' => 'NEW|FAILED|IN_PROGRESS|QUEUED|SUCCESS',
    ],
]

Result Details

Members
job
Required: Yes
Type: BillOfMaterialsImportJob structure

The BillOfMaterialsImportJob.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ResourceNotFoundException:

Request references a resource which does not exist.

ThrottlingException:

Request was denied due to request throttling.

AccessDeniedException:

You do not have the required privileges to perform this action.

ValidationException:

The input does not satisfy the constraints specified by an AWS service.

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

Example 1: Invoke GetBillOfMaterialsImportJob for a successful job
$result = $client->getBillOfMaterialsImportJob([
    'instanceId' => '60f82bbd-71f7-4fcd-a941-472f574c5243',
    'jobId' => 'f79b359b-1515-4436-a3bf-bae7b33e47b4',
]);

Result syntax:

[
    'job' => [
        'instanceId' => '60f82bbd-71f7-4fcd-a941-472f574c5243',
        'jobId' => 'f79b359b-1515-4436-a3bf-bae7b33e47b4',
        'message' => 'Import job completed successfully.',
        's3uri' => 's3://mybucketname/pathelemene/file.csv',
        'status' => 'SUCCESS',
    ],
]
Example 2: Invoke GetBillOfMaterialsImportJob for an in-progress job
$result = $client->getBillOfMaterialsImportJob([
    'instanceId' => '60f82bbd-71f7-4fcd-a941-472f574c5243',
    'jobId' => 'f79b359b-1515-4436-a3bf-bae7b33e47b4',
]);

Result syntax:

[
    'job' => [
        'instanceId' => '60f82bbd-71f7-4fcd-a941-472f574c5243',
        'jobId' => 'f79b359b-1515-4436-a3bf-bae7b33e47b4',
        's3uri' => 's3://mybucketname/pathelemene/file.csv',
        'status' => 'IN_PROGRESS',
    ],
]

GetDataIntegrationFlow

$result = $client->getDataIntegrationFlow([/* ... */]);
$promise = $client->getDataIntegrationFlowAsync([/* ... */]);

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

Parameter Syntax

$result = $client->getDataIntegrationFlow([
    'instanceId' => '<string>', // REQUIRED
    'name' => '<string>', // REQUIRED
]);

Parameter Details

Members
instanceId
Required: Yes
Type: string

The Amazon Web Services Supply Chain instance identifier.

name
Required: Yes
Type: string

The name of the DataIntegrationFlow created.

Result Syntax

[
    'flow' => [
        'createdTime' => <DateTime>,
        'instanceId' => '<string>',
        'lastModifiedTime' => <DateTime>,
        'name' => '<string>',
        'sources' => [
            [
                'datasetSource' => [
                    'datasetIdentifier' => '<string>',
                    'options' => [
                        'dedupeRecords' => true || false,
                        'loadType' => 'INCREMENTAL|REPLACE',
                    ],
                ],
                's3Source' => [
                    'bucketName' => '<string>',
                    'options' => [
                        'fileType' => 'CSV|PARQUET|JSON',
                    ],
                    'prefix' => '<string>',
                ],
                'sourceName' => '<string>',
                'sourceType' => 'S3|DATASET',
            ],
            // ...
        ],
        'target' => [
            'datasetTarget' => [
                'datasetIdentifier' => '<string>',
                'options' => [
                    'dedupeRecords' => true || false,
                    'loadType' => 'INCREMENTAL|REPLACE',
                ],
            ],
            's3Target' => [
                'bucketName' => '<string>',
                'options' => [
                    'fileType' => 'CSV|PARQUET|JSON',
                ],
                'prefix' => '<string>',
            ],
            'targetType' => 'S3|DATASET',
        ],
        'transformation' => [
            'sqlTransformation' => [
                'query' => '<string>',
            ],
            'transformationType' => 'SQL|NONE',
        ],
    ],
]

Result Details

Members
flow
Required: Yes
Type: DataIntegrationFlow structure

The details of the DataIntegrationFlow returned.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ResourceNotFoundException:

Request references a resource which does not exist.

ThrottlingException:

Request was denied due to request throttling.

AccessDeniedException:

You do not have the required privileges to perform this action.

ValidationException:

The input does not satisfy the constraints specified by an AWS service.

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

Example 1: Successful GetDataIntegrationFlow
$result = $client->getDataIntegrationFlow([
    'name' => 'testStagingFlow',
    'instanceId' => '8850c54e-e187-4fa7-89d4-6370f165174d',
]);

Result syntax:

[
    'flow' => [
        'name' => 'testStagingFlow',
        'createdTime' => ,
        'instanceId' => '8850c54e-e187-4fa7-89d4-6370f165174d',
        'lastModifiedTime' => ,
        'sources' => [
            [
                's3Source' => [
                    'bucketName' => 'aws-supply-chain-data-b8c7bb28-a576-4334-b481-6d6e8e47371f',
                    'prefix' => 'example-prefix',
                ],
                'sourceName' => 'testSourceName',
                'sourceType' => 'S3',
            ],
        ],
        'target' => [
            'datasetTarget' => [
                'datasetIdentifier' => 'arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset',
            ],
            'targetType' => 'DATASET',
        ],
        'transformation' => [
            'sqlTransformation' => [
                'query' => 'SELECT * FROM testSourceName',
            ],
            'transformationType' => 'SQL',
        ],
    ],
]

GetDataLakeDataset

$result = $client->getDataLakeDataset([/* ... */]);
$promise = $client->getDataLakeDatasetAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->getDataLakeDataset([
    'instanceId' => '<string>', // REQUIRED
    'name' => '<string>', // REQUIRED
    'namespace' => '<string>', // REQUIRED
]);

Parameter Details

Members
instanceId
Required: Yes
Type: string

The Amazon Web Services Supply Chain instance identifier.

name
Required: Yes
Type: string

The name of the dataset. For asc name space, the name must be one of the supported data entities under https://docs.aws.amazon.com/aws-supply-chain/latest/userguide/data-model-asc.html.

namespace
Required: Yes
Type: string

The name space of the dataset. The available values are:

Result Syntax

[
    'dataset' => [
        'arn' => '<string>',
        'createdTime' => <DateTime>,
        'description' => '<string>',
        'instanceId' => '<string>',
        'lastModifiedTime' => <DateTime>,
        'name' => '<string>',
        'namespace' => '<string>',
        'schema' => [
            'fields' => [
                [
                    'isRequired' => true || false,
                    'name' => '<string>',
                    'type' => 'INT|DOUBLE|STRING|TIMESTAMP',
                ],
                // ...
            ],
            'name' => '<string>',
        ],
    ],
]

Result Details

Members
dataset
Required: Yes
Type: DataLakeDataset structure

The fetched dataset details.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ResourceNotFoundException:

Request references a resource which does not exist.

ThrottlingException:

Request was denied due to request throttling.

AccessDeniedException:

You do not have the required privileges to perform this action.

ValidationException:

The input does not satisfy the constraints specified by an AWS service.

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

Example 1: Get properties of an existing AWS Supply Chain inbound order dataset
$result = $client->getDataLakeDataset([
    'name' => 'inbound_order',
    'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
    'namespace' => 'asc',
]);

Result syntax:

[
    'dataset' => [
        'name' => 'inbound_order',
        'arn' => 'arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/asc/datasets/inbound_order',
        'createdTime' => ,
        'description' => 'This is an AWS Supply Chain inbound order dataset',
        'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
        'lastModifiedTime' => ,
        'namespace' => 'asc',
        'schema' => [
            'name' => 'InboundOrder',
            'fields' => [
                [
                    'name' => 'id',
                    'type' => 'STRING',
                    'isRequired' => 1,
                ],
                [
                    'name' => 'tpartner_id',
                    'type' => 'STRING',
                    'isRequired' => 1,
                ],
                [
                    'name' => 'connection_id',
                    'type' => 'STRING',
                    'isRequired' => 1,
                ],
                [
                    'name' => 'order_type',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'order_status',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'inbound_order_url',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'order_creation_date',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
                [
                    'name' => 'company_id',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'to_site_id',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'order_currency_uom',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'vendor_currency_uom',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'exchange_rate',
                    'type' => 'DOUBLE',
                    'isRequired' => ,
                ],
                [
                    'name' => 'exchange_rate_date',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
                [
                    'name' => 'incoterm',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'incoterm2',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'incoterm_location_1',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'incoterm_location_2',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'submitted_date',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
                [
                    'name' => 'agreement_start_date',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
                [
                    'name' => 'agreement_end_date',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
                [
                    'name' => 'shipping_instr_code',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'payment_terms_code',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'std_terms_agreement',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'std_terms_agreement_ver',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'agreement_number',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'source',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'source_update_dttm',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
                [
                    'name' => 'source_event_id',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'db_creation_dttm',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
                [
                    'name' => 'db_updation_dttm',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
            ],
        ],
    ],
]
Example 2: Get proporties of an existing custom dataset
$result = $client->getDataLakeDataset([
    'name' => 'my_dataset',
    'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
    'namespace' => 'default',
]);

Result syntax:

[
    'dataset' => [
        'name' => 'my_dataset',
        'arn' => 'arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/default/datasets/my_dataset',
        'createdTime' => ,
        'description' => 'This is a custom dataset',
        'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
        'lastModifiedTime' => ,
        'namespace' => 'default',
        'schema' => [
            'name' => 'MyDataset',
            'fields' => [
                [
                    'name' => 'id',
                    'type' => 'INT',
                    'isRequired' => 1,
                ],
                [
                    'name' => 'description',
                    'type' => 'STRING',
                    'isRequired' => 1,
                ],
                [
                    'name' => 'price',
                    'type' => 'DOUBLE',
                    'isRequired' => ,
                ],
                [
                    'name' => 'creation_time',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
            ],
        ],
    ],
]

GetInstance

$result = $client->getInstance([/* ... */]);
$promise = $client->getInstanceAsync([/* ... */]);

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

Parameter Syntax

$result = $client->getInstance([
    'instanceId' => '<string>', // REQUIRED
]);

Parameter Details

Members
instanceId
Required: Yes
Type: string

The AWS Supply Chain instance identifier

Result Syntax

[
    'instance' => [
        'awsAccountId' => '<string>',
        'createdTime' => <DateTime>,
        'errorMessage' => '<string>',
        'instanceDescription' => '<string>',
        'instanceId' => '<string>',
        'instanceName' => '<string>',
        'kmsKeyArn' => '<string>',
        'lastModifiedTime' => <DateTime>,
        'state' => 'Initializing|Active|CreateFailed|DeleteFailed|Deleting|Deleted',
        'versionNumber' => <float>,
        'webAppDnsDomain' => '<string>',
    ],
]

Result Details

Members
instance
Required: Yes
Type: Instance structure

The instance resource data details.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ResourceNotFoundException:

Request references a resource which does not exist.

ThrottlingException:

Request was denied due to request throttling.

AccessDeniedException:

You do not have the required privileges to perform this action.

ValidationException:

The input does not satisfy the constraints specified by an AWS service.

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

Example 1: Successful GetInstance request
$result = $client->getInstance([
    'instanceId' => '9e193580-7cc5-45f7-9609-c43ba0ada793',
]);

Result syntax:

[
    'instance' => [
        'awsAccountId' => '123456789012',
        'createdTime' => ,
        'instanceDescription' => 'example instance description',
        'instanceId' => '9e193580-7cc5-45f7-9609-c43ba0ada793',
        'instanceName' => 'example instance name',
        'kmsKeyArn' => 'arn:aws:kms:us-west-2:123456789012:key/b14ffc39-b7d4-45ab-991a-6257a7f0d24d',
        'lastModifiedTime' => ,
        'state' => 'Active',
        'versionNumber' => 2,
    ],
]
Example 2: Successful GetInstance request with error message
$result = $client->getInstance([
    'instanceId' => '9e193580-7cc5-45f7-9609-c43ba0ada793',
]);

Result syntax:

[
    'instance' => [
        'awsAccountId' => '123456789012',
        'createdTime' => ,
        'errorMessage' => 'Access denied when attempting to create an S3 bucket. Please correct your IAM policy and try again.',
        'instanceDescription' => 'example instance description',
        'instanceId' => '9e193580-7cc5-45f7-9609-c43ba0ada793',
        'instanceName' => 'example instance name',
        'kmsKeyArn' => 'arn:aws:kms:us-west-2:123456789012:key/b14ffc39-b7d4-45ab-991a-6257a7f0d24d',
        'lastModifiedTime' => ,
        'state' => 'CreateFailed',
        'versionNumber' => 2,
    ],
]

ListDataIntegrationFlows

$result = $client->listDataIntegrationFlows([/* ... */]);
$promise = $client->listDataIntegrationFlowsAsync([/* ... */]);

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

Parameter Syntax

$result = $client->listDataIntegrationFlows([
    'instanceId' => '<string>', // REQUIRED
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
instanceId
Required: Yes
Type: string

The Amazon Web Services Supply Chain instance identifier.

maxResults
Type: int

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

nextToken
Type: string

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

Result Syntax

[
    'flows' => [
        [
            'createdTime' => <DateTime>,
            'instanceId' => '<string>',
            'lastModifiedTime' => <DateTime>,
            'name' => '<string>',
            'sources' => [
                [
                    'datasetSource' => [
                        'datasetIdentifier' => '<string>',
                        'options' => [
                            'dedupeRecords' => true || false,
                            'loadType' => 'INCREMENTAL|REPLACE',
                        ],
                    ],
                    's3Source' => [
                        'bucketName' => '<string>',
                        'options' => [
                            'fileType' => 'CSV|PARQUET|JSON',
                        ],
                        'prefix' => '<string>',
                    ],
                    'sourceName' => '<string>',
                    'sourceType' => 'S3|DATASET',
                ],
                // ...
            ],
            'target' => [
                'datasetTarget' => [
                    'datasetIdentifier' => '<string>',
                    'options' => [
                        'dedupeRecords' => true || false,
                        'loadType' => 'INCREMENTAL|REPLACE',
                    ],
                ],
                's3Target' => [
                    'bucketName' => '<string>',
                    'options' => [
                        'fileType' => 'CSV|PARQUET|JSON',
                    ],
                    'prefix' => '<string>',
                ],
                'targetType' => 'S3|DATASET',
            ],
            'transformation' => [
                'sqlTransformation' => [
                    'query' => '<string>',
                ],
                'transformationType' => 'SQL|NONE',
            ],
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
flows
Required: Yes
Type: Array of DataIntegrationFlow structures

The response parameters for ListDataIntegrationFlows.

nextToken
Type: string

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

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ThrottlingException:

Request was denied due to request throttling.

ResourceNotFoundException:

Request references a resource which does not exist.

AccessDeniedException:

You do not have the required privileges to perform this action.

ValidationException:

The input does not satisfy the constraints specified by an AWS service.

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

Example 1: Successful ListDataIntegrationFlow
$result = $client->listDataIntegrationFlows([
    'instanceId' => '8850c54e-e187-4fa7-89d4-6370f165174d',
]);

Result syntax:

[
    'flows' => [
        [
            'name' => 'testStagingFlow',
            'createdTime' => ,
            'instanceId' => '8850c54e-e187-4fa7-89d4-6370f165174d',
            'lastModifiedTime' => ,
            'sources' => [
                [
                    's3Source' => [
                        'bucketName' => 'aws-supply-chain-data-b8c7bb28-a576-4334-b481-6d6e8e47371f',
                        'prefix' => 'example-prefix',
                    ],
                    'sourceName' => 'testSourceName',
                    'sourceType' => 'S3',
                ],
            ],
            'target' => [
                'datasetTarget' => [
                    'datasetIdentifier' => 'arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset',
                ],
                'targetType' => 'DATASET',
            ],
            'transformation' => [
                'sqlTransformation' => [
                    'query' => 'SELECT * FROM testSourceName',
                ],
                'transformationType' => 'SQL',
            ],
        ],
        [
            'name' => 'trading-partner',
            'createdTime' => ,
            'instanceId' => '8850c54e-e187-4fa7-89d4-6370f165174d',
            'lastModifiedTime' => ,
            'sources' => [
                [
                    'datasetSource' => [
                        'datasetIdentifier' => 'arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset1',
                    ],
                    'sourceName' => 'testSourceName1',
                    'sourceType' => 'DATASET',
                ],
                [
                    'datasetSource' => [
                        'datasetIdentifier' => 'arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset2',
                    ],
                    'sourceName' => 'testSourceName2',
                    'sourceType' => 'DATASET',
                ],
            ],
            'target' => [
                'datasetTarget' => [
                    'datasetIdentifier' => 'arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/asc/datasets/trading_partner',
                ],
                'targetType' => 'DATASET',
            ],
            'transformation' => [
                'sqlTransformation' => [
                    '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',
                ],
                'transformationType' => 'SQL',
            ],
        ],
    ],
]

ListDataLakeDatasets

$result = $client->listDataLakeDatasets([/* ... */]);
$promise = $client->listDataLakeDatasetsAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->listDataLakeDatasets([
    'instanceId' => '<string>', // REQUIRED
    'maxResults' => <integer>,
    'namespace' => '<string>', // REQUIRED
    'nextToken' => '<string>',
]);

Parameter Details

Members
instanceId
Required: Yes
Type: string

The Amazon Web Services Supply Chain instance identifier.

maxResults
Type: int

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

namespace
Required: Yes
Type: string

The namespace of the dataset. The available values are:

nextToken
Type: string

The pagination token to fetch next page of datasets.

Result Syntax

[
    'datasets' => [
        [
            'arn' => '<string>',
            'createdTime' => <DateTime>,
            'description' => '<string>',
            'instanceId' => '<string>',
            'lastModifiedTime' => <DateTime>,
            'name' => '<string>',
            'namespace' => '<string>',
            'schema' => [
                'fields' => [
                    [
                        'isRequired' => true || false,
                        'name' => '<string>',
                        'type' => 'INT|DOUBLE|STRING|TIMESTAMP',
                    ],
                    // ...
                ],
                'name' => '<string>',
            ],
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
datasets
Required: Yes
Type: Array of DataLakeDataset structures

The list of fetched dataset details.

nextToken
Type: string

The pagination token to fetch next page of datasets.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ResourceNotFoundException:

Request references a resource which does not exist.

ThrottlingException:

Request was denied due to request throttling.

AccessDeniedException:

You do not have the required privileges to perform this action.

ValidationException:

The input does not satisfy the constraints specified by an AWS service.

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

Example 1: List AWS Supply Chain datasets
$result = $client->listDataLakeDatasets([
    'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
    'namespace' => 'asc',
]);

Result syntax:

[
    'datasets' => [
        [
            'name' => 'inbound_order',
            'arn' => 'arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/asc/datasets/inbound_order',
            'createdTime' => ,
            'description' => 'This is an AWS Supply Chain inbound order dataset',
            'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
            'lastModifiedTime' => ,
            'namespace' => 'asc',
            'schema' => [
                'name' => 'InboundOrder',
                'fields' => [
                    [
                        'name' => 'id',
                        'type' => 'STRING',
                        'isRequired' => 1,
                    ],
                    [
                        'name' => 'tpartner_id',
                        'type' => 'STRING',
                        'isRequired' => 1,
                    ],
                    [
                        'name' => 'connection_id',
                        'type' => 'STRING',
                        'isRequired' => 1,
                    ],
                    [
                        'name' => 'order_type',
                        'type' => 'STRING',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'order_status',
                        'type' => 'STRING',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'inbound_order_url',
                        'type' => 'STRING',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'order_creation_date',
                        'type' => 'TIMESTAMP',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'company_id',
                        'type' => 'STRING',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'to_site_id',
                        'type' => 'STRING',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'order_currency_uom',
                        'type' => 'STRING',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'vendor_currency_uom',
                        'type' => 'STRING',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'exchange_rate',
                        'type' => 'DOUBLE',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'exchange_rate_date',
                        'type' => 'TIMESTAMP',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'incoterm',
                        'type' => 'STRING',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'incoterm2',
                        'type' => 'STRING',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'incoterm_location_1',
                        'type' => 'STRING',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'incoterm_location_2',
                        'type' => 'STRING',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'submitted_date',
                        'type' => 'TIMESTAMP',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'agreement_start_date',
                        'type' => 'TIMESTAMP',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'agreement_end_date',
                        'type' => 'TIMESTAMP',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'shipping_instr_code',
                        'type' => 'STRING',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'payment_terms_code',
                        'type' => 'STRING',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'std_terms_agreement',
                        'type' => 'STRING',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'std_terms_agreement_ver',
                        'type' => 'STRING',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'agreement_number',
                        'type' => 'STRING',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'source',
                        'type' => 'STRING',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'source_update_dttm',
                        'type' => 'TIMESTAMP',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'source_event_id',
                        'type' => 'STRING',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'db_creation_dttm',
                        'type' => 'TIMESTAMP',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'db_updation_dttm',
                        'type' => 'TIMESTAMP',
                        'isRequired' => ,
                    ],
                ],
            ],
        ],
    ],
]
Example 2: List custom datasets using pagination
$result = $client->listDataLakeDatasets([
    'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
    'maxResults' => 2,
    'namespace' => 'default',
    'nextToken' => 'next_token_returned_from_previous_list_request',
]);

Result syntax:

[
    'datasets' => [
        [
            'name' => 'my_dataset',
            'arn' => 'arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/default/datasets/my_dataset',
            'createdTime' => ,
            'description' => 'This is a custom dataset',
            'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
            'lastModifiedTime' => ,
            'namespace' => 'default',
            'schema' => [
                'name' => 'MyDataset',
                'fields' => [
                    [
                        'name' => 'id',
                        'type' => 'INT',
                        'isRequired' => 1,
                    ],
                    [
                        'name' => 'description',
                        'type' => 'STRING',
                        'isRequired' => 1,
                    ],
                    [
                        'name' => 'price',
                        'type' => 'DOUBLE',
                        'isRequired' => ,
                    ],
                    [
                        'name' => 'creation_time',
                        'type' => 'TIMESTAMP',
                        'isRequired' => ,
                    ],
                ],
            ],
        ],
        [
            'name' => 'my_dataset_2',
            'arn' => 'arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/default/datasets/my_dataset_2',
            'createdTime' => ,
            'description' => 'This is a custom dataset 2',
            'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
            'lastModifiedTime' => ,
            'namespace' => 'default',
            'schema' => [
                'name' => 'MyDataset2',
                'fields' => [
                    [
                        'name' => 'id',
                        'type' => 'INT',
                        'isRequired' => 1,
                    ],
                    [
                        'name' => 'description',
                        'type' => 'STRING',
                        'isRequired' => 1,
                    ],
                ],
            ],
        ],
    ],
    'nextToken' => 'next_token_for_next_list_request',
]

ListInstances

$result = $client->listInstances([/* ... */]);
$promise = $client->listInstancesAsync([/* ... */]);

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

Parameter Syntax

$result = $client->listInstances([
    'instanceNameFilter' => ['<string>', ...],
    'instanceStateFilter' => ['<string>', ...],
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
instanceNameFilter
Type: Array of strings

The filter to ListInstances based on their names.

instanceStateFilter
Type: Array of strings

The filter to ListInstances based on their state.

maxResults
Type: int

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

nextToken
Type: string

The pagination token to fetch the next page of instances.

Result Syntax

[
    'instances' => [
        [
            'awsAccountId' => '<string>',
            'createdTime' => <DateTime>,
            'errorMessage' => '<string>',
            'instanceDescription' => '<string>',
            'instanceId' => '<string>',
            'instanceName' => '<string>',
            'kmsKeyArn' => '<string>',
            'lastModifiedTime' => <DateTime>,
            'state' => 'Initializing|Active|CreateFailed|DeleteFailed|Deleting|Deleted',
            'versionNumber' => <float>,
            'webAppDnsDomain' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
instances
Required: Yes
Type: Array of Instance structures

The list of instances resource data details.

nextToken
Type: string

The pagination token to fetch the next page of instances.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ThrottlingException:

Request was denied due to request throttling.

ResourceNotFoundException:

Request references a resource which does not exist.

AccessDeniedException:

You do not have the required privileges to perform this action.

ValidationException:

The input does not satisfy the constraints specified by an AWS service.

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

Example 1: Successful ListInstance request with no input data
$result = $client->listInstances([
]);

Result syntax:

[
    'instances' => [
        [
            'awsAccountId' => '123456789012',
            'createdTime' => ,
            'instanceDescription' => 'example instance description',
            'instanceId' => '9e193580-7cc5-45f7-9609-c43ba0ada793',
            'instanceName' => 'example instance name',
            'kmsKeyArn' => 'arn:aws:kms:us-west-2:123456789012:key/b14ffc39-b7d4-45ab-991a-6257a7f0d24d',
            'lastModifiedTime' => ,
            'state' => 'Active',
            'versionNumber' => 2,
        ],
        [
            'awsAccountId' => '123456789012',
            'createdTime' => ,
            'instanceDescription' => 'example instance description',
            'instanceId' => '3ad8116a-644d-4172-8dcb-20e51d314c14',
            'kmsKeyArn' => 'arn:aws:kms:us-west-2:123456789012:key/b14ffc39-b7d4-45ab-991a-6257a7f0d24d',
            'lastModifiedTime' => ,
            'state' => 'Initializing',
            'versionNumber' => 2,
        ],
    ],
]
Example 2: Successful ListInstance request with filters
$result = $client->listInstances([
    'instanceNameFilter' => [
        'example instance name',
    ],
    'instanceStateFilter' => [
        'Active',
    ],
]);

Result syntax:

[
    'instances' => [
        [
            'awsAccountId' => '123456789012',
            'createdTime' => ,
            'instanceDescription' => 'example instance description',
            'instanceId' => '9e193580-7cc5-45f7-9609-c43ba0ada793',
            'instanceName' => 'example instance name',
            'kmsKeyArn' => 'arn:aws:kms:us-west-2:123456789012:key/b14ffc39-b7d4-45ab-991a-6257a7f0d24d',
            'lastModifiedTime' => ,
            'state' => 'Active',
            'versionNumber' => 2,
        ],
    ],
]
Example 3: Successful ListInstance request with maxResult override
$result = $client->listInstances([
    'maxResults' => 1,
]);

Result syntax:

[
    'instances' => [
        [
            'awsAccountId' => '123456789012',
            'createdTime' => ,
            'instanceDescription' => 'example instance description',
            'instanceId' => '9e193580-7cc5-45f7-9609-c43ba0ada793',
            'instanceName' => 'example instance name',
            'kmsKeyArn' => 'arn:aws:kms:us-west-2:123456789012:key/b14ffc39-b7d4-45ab-991a-6257a7f0d24d',
            'lastModifiedTime' => ,
            'state' => 'Active',
            'versionNumber' => 2,
        ],
    ],
    'nextToken' => 'AAQA-EFRSURBSGhtcng0c0dxbENwUHdnckVIbkFYNU1QVjRTZWN2ak5iMFVicC8zemlHOVF3SEpjSC9WTWJVVXBMV2Z1N3ZvZlQ0WEFBQUFmakI4QmdrcWhraUc5dzBCQndhZ2J6QnRBZ0VBTUdnR0NTcUdTSWIzRFFFSEFUQWVCZ2xnaGtnQlpRTUVBUzR3RVFRTTJibW9LemgrSWZTY0RaZEdBZ0VRZ0R2dDhsQnVGbGJ0dnFTZityWmNSWEVPbG93emJoSjhxOGNMbGQ1UGMvY0VRbWlTR3pQUFd4N2RraXY5Y0ovcS9vSmFYZVBGdWVHaU0zWmd0dz09n-rC1ejA5--7ltJxpDT2xP_i8xGqDPMOZfjpp8q6l5NuP9_bnBURvwwYhdqDriMK5_f96LuPEnPbuML-ItfgEiCcUy0p2tApvpZkZqOG5fbqP-4C5aDYPTffHLyq-MMqvfrGVJzL1nvkpZcnTkVR9VJsu5b8I0qqDW0H8EMKGgTo78U9lr4sj3Usi9VMwZxgKCBmr03HhFLYXOW--XMbIx0CTZF0fYIcRxmA_sVS6J7gpaB9yMcnzs5VUKokoA5JTcAPY5d1Y1VyE8KKxv51cfPgXw8OYCDbFQncw8mZPmE-VqxjFbksmk_FmghpPn9j2Ppoe-zr0LQ%3D',
]
Example 4: Successful ListInstance request with nextToken
$result = $client->listInstances([
    'maxResults' => 1,
    'nextToken' => 'AAQA-EFRSURBSGhtcng0c0dxbENwUHdnckVIbkFYNU1QVjRTZWN2ak5iMFVicC8zemlHOVF3SEpjSC9WTWJVVXBMV2Z1N3ZvZlQ0WEFBQUFmakI4QmdrcWhraUc5dzBCQndhZ2J6QnRBZ0VBTUdnR0NTcUdTSWIzRFFFSEFUQWVCZ2xnaGtnQlpRTUVBUzR3RVFRTTJibW9LemgrSWZTY0RaZEdBZ0VRZ0R2dDhsQnVGbGJ0dnFTZityWmNSWEVPbG93emJoSjhxOGNMbGQ1UGMvY0VRbWlTR3pQUFd4N2RraXY5Y0ovcS9vSmFYZVBGdWVHaU0zWmd0dz09n-rC1ejA5--7ltJxpDT2xP_i8xGqDPMOZfjpp8q6l5NuP9_bnBURvwwYhdqDriMK5_f96LuPEnPbuML-ItfgEiCcUy0p2tApvpZkZqOG5fbqP-4C5aDYPTffHLyq-MMqvfrGVJzL1nvkpZcnTkVR9VJsu5b8I0qqDW0H8EMKGgTo78U9lr4sj3Usi9VMwZxgKCBmr03HhFLYXOW--XMbIx0CTZF0fYIcRxmA_sVS6J7gpaB9yMcnzs5VUKokoA5JTcAPY5d1Y1VyE8KKxv51cfPgXw8OYCDbFQncw8mZPmE-VqxjFbksmk_FmghpPn9j2Ppoe-zr0LQ%3D',
]);

Result syntax:

[
    'instances' => [
        [
            'awsAccountId' => '123456789012',
            'createdTime' => ,
            'instanceDescription' => 'example instance description',
            'instanceId' => '3ad8116a-644d-4172-8dcb-20e51d314c14',
            'kmsKeyArn' => 'arn:aws:kms:us-west-2:123456789012:key/b14ffc39-b7d4-45ab-991a-6257a7f0d24d',
            'lastModifiedTime' => ,
            'state' => 'Initializing',
            'versionNumber' => 2,
        ],
    ],
]

ListTagsForResource

$result = $client->listTagsForResource([/* ... */]);
$promise = $client->listTagsForResourceAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->listTagsForResource([
    'resourceArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
resourceArn
Required: Yes
Type: string

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

Result Syntax

[
    'tags' => ['<string>', ...],
]

Result Details

Members
tags
Required: Yes
Type: Associative array of custom strings keys (TagKey) to strings

The tags added to an Amazon Web Services Supply Chain resource.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ResourceNotFoundException:

Request references a resource which does not exist.

ThrottlingException:

Request was denied due to request throttling.

AccessDeniedException:

You do not have the required privileges to perform this action.

ValidationException:

The input does not satisfy the constraints specified by an AWS service.

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

Example 1: Successful ListTagsForResource
$result = $client->listTagsForResource([
    'resourceArn' => 'arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/data-integration-flows/my_flow1',
]);

Result syntax:

[
    'tags' => [
        'tagKey1' => 'tagValue1',
    ],
]

SendDataIntegrationEvent

$result = $client->sendDataIntegrationEvent([/* ... */]);
$promise = $client->sendDataIntegrationEventAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->sendDataIntegrationEvent([
    'clientToken' => '<string>',
    'data' => '<string>', // REQUIRED
    'eventGroupId' => '<string>', // REQUIRED
    'eventTimestamp' => <integer || string || DateTime>,
    'eventType' => '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', // REQUIRED
    'instanceId' => '<string>', // REQUIRED
]);

Parameter Details

Members
clientToken
Type: string

The idempotent client token.

data
Required: Yes
Type: string

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

eventGroupId
Required: Yes
Type: string

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

eventTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The event timestamp (in epoch seconds).

eventType
Required: Yes
Type: string

The data event type.

instanceId
Required: Yes
Type: string

The AWS Supply Chain instance identifier.

Result Syntax

[
    'eventId' => '<string>',
]

Result Details

Members
eventId
Required: Yes
Type: string

The unique event identifier.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ResourceNotFoundException:

Request references a resource which does not exist.

ThrottlingException:

Request was denied due to request throttling.

AccessDeniedException:

You do not have the required privileges to perform this action.

ValidationException:

The input does not satisfy the constraints specified by an AWS service.

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

Example 1: Successful SendDataIntegrationEvent for inboundorder event type
$result = $client->sendDataIntegrationEvent([
    'data' => '{"id": "inbound-order-id-test-123", "tpartner_id": "partner-id-test-123" }',
    'eventGroupId' => 'inboundOrderId',
    'eventTimestamp' => ,
    'eventType' => 'scn.data.inboundorder',
    'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
]);

Result syntax:

[
    'eventId' => 'c4132c1d-8f60-44a2-9932-f723c4f7b8a7',
]
Example 2: Successful SendDataIntegrationEvent for inboundorderline event type
$result = $client->sendDataIntegrationEvent([
    '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" }',
    'eventGroupId' => 'inboundOrderLineId',
    'eventTimestamp' => ,
    'eventType' => 'scn.data.inboundorderline',
    'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
]);

Result syntax:

[
    'eventId' => '45d95db2-d106-40e0-aa98-f1204230a691',
]
Example 3: Successful SendDataIntegrationEvent for inboundorderlineschedule event type
$result = $client->sendDataIntegrationEvent([
    '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"}',
    'eventGroupId' => 'inboundOrderLineScheduleId',
    'eventTimestamp' => ,
    'eventType' => 'scn.data.inboundorderlineschedule',
    'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
]);

Result syntax:

[
    'eventId' => '5abba995-7735-4d1e-95c4-7cc93e48cf9f',
]
Example 4: Successful SendDataIntegrationEvent for forecast event type
$result = $client->sendDataIntegrationEvent([
    '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" }',
    'eventGroupId' => 'forecastId',
    'eventTimestamp' => ,
    'eventType' => 'scn.data.forecast',
    'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
]);

Result syntax:

[
    'eventId' => '29312d5b-f499-4dcd-b017-3dab3cd34d61',
]
Example 5: Successful SendDataIntegrationEvent for inventorylevel event type
$result = $client->sendDataIntegrationEvent([
    '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"}',
    'eventGroupId' => 'inventoryLevelId',
    'eventTimestamp' => ,
    'eventType' => 'scn.data.inventorylevel',
    'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
]);

Result syntax:

[
    'eventId' => '3aa78324-acd8-4fdd-a19e-231ea003c2b3',
]
Example 6: Successful SendDataIntegrationEvent for outboundorderline event type
$result = $client->sendDataIntegrationEvent([
    'data' => '{"id": "outbound-orderline-id-test-123", "cust_order_id": "cust-order-id-test-123", "product_id": "product-id-test-123" }',
    'eventGroupId' => 'outboundOrderLineId',
    'eventTimestamp' => ,
    'eventType' => 'scn.data.outboundorderline',
    'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
]);

Result syntax:

[
    'eventId' => '959b7ef9-5e2d-4795-b1ca-5b16a3eb6b89',
]
Example 7: Successful SendDataIntegrationEvent for outboundshipment event type
$result = $client->sendDataIntegrationEvent([
    '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" }',
    'eventGroupId' => 'outboundShipmentId',
    'eventTimestamp' => ,
    'eventType' => 'scn.data.outboundshipment',
    'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
]);

Result syntax:

[
    'eventId' => '59feded3-5e46-4126-81bf-0137ca176ee0',
]
Example 8: Successful SendDataIntegrationEvent for processheader event type
$result = $client->sendDataIntegrationEvent([
    'data' => '{"process_id": "process-id-test-123" }',
    'eventGroupId' => 'processHeaderId',
    'eventTimestamp' => ,
    'eventType' => 'scn.data.processheader',
    'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
]);

Result syntax:

[
    'eventId' => '564130eb-2d8a-4550-a768-ddf0daf7b4a9',
]
Example 9: Successful SendDataIntegrationEvent for processoperation event type
$result = $client->sendDataIntegrationEvent([
    'data' => '{"process_operation_id": "process-operation-id-test-123", "process_id": "process-id-test-123" }',
    'eventGroupId' => 'processOperationId',
    'eventTimestamp' => ,
    'eventType' => 'scn.data.processoperation',
    'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
]);

Result syntax:

[
    'eventId' => 'db5df408-89c7-4b9f-a326-016f6c2b3396',
]
Example 10: Successful SendDataIntegrationEvent for processproduct event type
$result = $client->sendDataIntegrationEvent([
    'data' => '{"process_product_id": "process-product-id-test-123", "process_id": "process-id-test-123" }',
    'eventGroupId' => 'processProductId',
    'eventTimestamp' => ,
    'eventType' => 'scn.data.processproduct',
    'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
]);

Result syntax:

[
    'eventId' => '6929b275-485e-4035-a798-99077ca6d669',
]
Example 11: Successful SendDataIntegrationEvent for reservation event type
$result = $client->sendDataIntegrationEvent([
    'data' => '{"reservation_id": "reservation-id-test-123", "reservation_detail_id": "reservation-detail-id-test-123" }',
    'eventGroupId' => 'reservationId',
    'eventTimestamp' => ,
    'eventType' => 'scn.data.reservation',
    'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
]);

Result syntax:

[
    'eventId' => 'f6c55a8b-fde2-44f6-848a-9b4336c77209',
]
Example 12: Successful SendDataIntegrationEvent for shipment event type
$result = $client->sendDataIntegrationEvent([
    '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" }',
    'eventGroupId' => 'shipmentId',
    'eventTimestamp' => ,
    'eventType' => 'scn.data.shipment',
    'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
]);

Result syntax:

[
    'eventId' => '61d079d8-3f56-49bb-b35a-c0271a4e4f0a',
]
Example 13: Successful SendDataIntegrationEvent for shipmentstop event type
$result = $client->sendDataIntegrationEvent([
    'data' => '{"shipment_stop_id": "shipment-stop-id-test-123", "shipment_id": "shipment-id-test-123" }',
    'eventGroupId' => 'shipmentStopId',
    'eventTimestamp' => ,
    'eventType' => 'scn.data.shipmentstop',
    'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
]);

Result syntax:

[
    'eventId' => '3610992a-fc2f-4da4-9beb-724994622ba1',
]
Example 14: Successful SendDataIntegrationEvent for shipmentstoporder event type
$result = $client->sendDataIntegrationEvent([
    '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" }',
    'eventGroupId' => 'shipmentStopOrderId',
    'eventTimestamp' => ,
    'eventType' => 'scn.data.shipmentstoporder',
    'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
]);

Result syntax:

[
    'eventId' => '1d550a60-9321-4d25-a132-9dd4b2d9e934',
]
Example 15: Successful SendDataIntegrationEvent for supplyplan event type
$result = $client->sendDataIntegrationEvent([
    'data' => '{"supply_plan_id": "supply-plan-id-test-123" }',
    'eventGroupId' => 'supplyPlanId',
    'eventTimestamp' => ,
    'eventType' => 'scn.data.supplyplan',
    'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
]);

Result syntax:

[
    'eventId' => '9abaee56-5dc4-4c31-8250-3206a651d8a1',
]

TagResource

$result = $client->tagResource([/* ... */]);
$promise = $client->tagResourceAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->tagResource([
    'resourceArn' => '<string>', // REQUIRED
    'tags' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
resourceArn
Required: Yes
Type: string

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

tags
Required: Yes
Type: Associative array of custom strings keys (TagKey) to strings

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

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ResourceNotFoundException:

Request references a resource which does not exist.

ThrottlingException:

Request was denied due to request throttling.

AccessDeniedException:

You do not have the required privileges to perform this action.

ValidationException:

The input does not satisfy the constraints specified by an AWS service.

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

Example 1: Successful TagResource
$result = $client->tagResource([
    'resourceArn' => 'arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/data-integration-flows/my_flow1',
    'tags' => [
        'tagKey1' => 'tagValue1',
    ],
]);

Result syntax:

[
]

UntagResource

$result = $client->untagResource([/* ... */]);
$promise = $client->untagResourceAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->untagResource([
    'resourceArn' => '<string>', // REQUIRED
    'tagKeys' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
resourceArn
Required: Yes
Type: string

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

tagKeys
Required: Yes
Type: Array of strings

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

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ResourceNotFoundException:

Request references a resource which does not exist.

ThrottlingException:

Request was denied due to request throttling.

AccessDeniedException:

You do not have the required privileges to perform this action.

ValidationException:

The input does not satisfy the constraints specified by an AWS service.

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

Example 1: Successful UntagResource
$result = $client->untagResource([
    'resourceArn' => 'arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/data-integration-flows/my_flow1',
    'tagKeys' => [
        'tagKey1',
    ],
]);

Result syntax:

[
]

UpdateDataIntegrationFlow

$result = $client->updateDataIntegrationFlow([/* ... */]);
$promise = $client->updateDataIntegrationFlowAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->updateDataIntegrationFlow([
    'instanceId' => '<string>', // REQUIRED
    'name' => '<string>', // REQUIRED
    'sources' => [
        [
            'datasetSource' => [
                'datasetIdentifier' => '<string>', // REQUIRED
                'options' => [
                    'dedupeRecords' => true || false,
                    'loadType' => 'INCREMENTAL|REPLACE',
                ],
            ],
            's3Source' => [
                'bucketName' => '<string>', // REQUIRED
                'options' => [
                    'fileType' => 'CSV|PARQUET|JSON',
                ],
                'prefix' => '<string>', // REQUIRED
            ],
            'sourceName' => '<string>', // REQUIRED
            'sourceType' => 'S3|DATASET', // REQUIRED
        ],
        // ...
    ],
    'target' => [
        'datasetTarget' => [
            'datasetIdentifier' => '<string>', // REQUIRED
            'options' => [
                'dedupeRecords' => true || false,
                'loadType' => 'INCREMENTAL|REPLACE',
            ],
        ],
        's3Target' => [
            'bucketName' => '<string>', // REQUIRED
            'options' => [
                'fileType' => 'CSV|PARQUET|JSON',
            ],
            'prefix' => '<string>', // REQUIRED
        ],
        'targetType' => 'S3|DATASET', // REQUIRED
    ],
    'transformation' => [
        'sqlTransformation' => [
            'query' => '<string>', // REQUIRED
        ],
        'transformationType' => 'SQL|NONE', // REQUIRED
    ],
]);

Parameter Details

Members
instanceId
Required: Yes
Type: string

The Amazon Web Services Supply Chain instance identifier.

name
Required: Yes
Type: string

The name of the DataIntegrationFlow to be updated.

sources
Type: Array of DataIntegrationFlowSource structures

The new source configurations for the DataIntegrationFlow.

target
Type: DataIntegrationFlowTarget structure

The new target configurations for the DataIntegrationFlow.

transformation

The new transformation configurations for the DataIntegrationFlow.

Result Syntax

[
    'flow' => [
        'createdTime' => <DateTime>,
        'instanceId' => '<string>',
        'lastModifiedTime' => <DateTime>,
        'name' => '<string>',
        'sources' => [
            [
                'datasetSource' => [
                    'datasetIdentifier' => '<string>',
                    'options' => [
                        'dedupeRecords' => true || false,
                        'loadType' => 'INCREMENTAL|REPLACE',
                    ],
                ],
                's3Source' => [
                    'bucketName' => '<string>',
                    'options' => [
                        'fileType' => 'CSV|PARQUET|JSON',
                    ],
                    'prefix' => '<string>',
                ],
                'sourceName' => '<string>',
                'sourceType' => 'S3|DATASET',
            ],
            // ...
        ],
        'target' => [
            'datasetTarget' => [
                'datasetIdentifier' => '<string>',
                'options' => [
                    'dedupeRecords' => true || false,
                    'loadType' => 'INCREMENTAL|REPLACE',
                ],
            ],
            's3Target' => [
                'bucketName' => '<string>',
                'options' => [
                    'fileType' => 'CSV|PARQUET|JSON',
                ],
                'prefix' => '<string>',
            ],
            'targetType' => 'S3|DATASET',
        ],
        'transformation' => [
            'sqlTransformation' => [
                'query' => '<string>',
            ],
            'transformationType' => 'SQL|NONE',
        ],
    ],
]

Result Details

Members
flow
Required: Yes
Type: DataIntegrationFlow structure

The details of the updated DataIntegrationFlow.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ResourceNotFoundException:

Request references a resource which does not exist.

ThrottlingException:

Request was denied due to request throttling.

AccessDeniedException:

You do not have the required privileges to perform this action.

ValidationException:

The input does not satisfy the constraints specified by an AWS service.

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

Example 1: Successful UpdateDataIntegrationFlow for s3 to dataset flow to update SQL transformation
$result = $client->updateDataIntegrationFlow([
    'name' => 'testStagingFlow',
    'instanceId' => '8850c54e-e187-4fa7-89d4-6370f165174d',
    'sources' => [
        [
            's3Source' => [
                'bucketName' => 'aws-supply-chain-data-b8c7bb28-a576-4334-b481-6d6e8e47371f',
                'prefix' => 'example-prefix',
            ],
            'sourceName' => 'testSourceName',
            'sourceType' => 'S3',
        ],
    ],
    'target' => [
        'datasetTarget' => [
            'datasetIdentifier' => 'arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset',
        ],
        'targetType' => 'DATASET',
    ],
    'transformation' => [
        'sqlTransformation' => [
            'query' => 'SELECT connection_id, bukrs AS id, txtmd AS description FROM testSourceName WHERE langu = 'E'',
        ],
        'transformationType' => 'SQL',
    ],
]);

Result syntax:

[
    'flow' => [
        'name' => 'testStagingFlow',
        'createdTime' => ,
        'instanceId' => '8850c54e-e187-4fa7-89d4-6370f165174d',
        'lastModifiedTime' => ,
        'sources' => [
            [
                's3Source' => [
                    'bucketName' => 'aws-supply-chain-data-b8c7bb28-a576-4334-b481-6d6e8e47371f',
                    'prefix' => 'example-prefix',
                ],
                'sourceName' => 'testSourceName',
                'sourceType' => 'S3',
            ],
        ],
        'target' => [
            'datasetTarget' => [
                'datasetIdentifier' => 'arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset',
            ],
            'targetType' => 'DATASET',
        ],
        'transformation' => [
            'sqlTransformation' => [
                'query' => 'SELECT connection_id, bukrs AS id, txtmd AS description FROM testSourceName WHERE langu = 'E'',
            ],
            'transformationType' => 'SQL',
        ],
    ],
]
Example 2: Successful UpdateDataIntegrationFlow for dataset to dataset flow to update sources
$result = $client->updateDataIntegrationFlow([
    'name' => 'trading-partner',
    'instanceId' => '8850c54e-e187-4fa7-89d4-6370f165174d',
    'sources' => [
        [
            'datasetSource' => [
                'datasetIdentifier' => 'arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset1',
            ],
            'sourceName' => 'testSourceName1',
            'sourceType' => 'DATASET',
        ],
        [
            'datasetSource' => [
                'datasetIdentifier' => 'arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset2_updated',
            ],
            'sourceName' => 'testSourceName2',
            'sourceType' => 'DATASET',
        ],
    ],
    'target' => [
        'datasetTarget' => [
            'datasetIdentifier' => 'arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/asc/datasets/trading_partner',
        ],
        'targetType' => 'DATASET',
    ],
    'transformation' => [
        'sqlTransformation' => [
            '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',
        ],
        'transformationType' => 'SQL',
    ],
]);

Result syntax:

[
    'flow' => [
        'name' => 'trading-partner',
        'createdTime' => ,
        'instanceId' => '8850c54e-e187-4fa7-89d4-6370f165174d',
        'lastModifiedTime' => ,
        'sources' => [
            [
                'datasetSource' => [
                    'datasetIdentifier' => 'arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset1',
                ],
                'sourceName' => 'testSourceName1',
                'sourceType' => 'DATASET',
            ],
            [
                'datasetSource' => [
                    'datasetIdentifier' => 'arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset2_updated',
                ],
                'sourceName' => 'testSourceName2',
                'sourceType' => 'DATASET',
            ],
        ],
        'target' => [
            'datasetTarget' => [
                'datasetIdentifier' => 'arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/asc/datasets/trading_partner',
            ],
            'targetType' => 'DATASET',
        ],
        'transformation' => [
            'sqlTransformation' => [
                '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',
            ],
            'transformationType' => 'SQL',
        ],
    ],
]

UpdateDataLakeDataset

$result = $client->updateDataLakeDataset([/* ... */]);
$promise = $client->updateDataLakeDatasetAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->updateDataLakeDataset([
    'description' => '<string>',
    'instanceId' => '<string>', // REQUIRED
    'name' => '<string>', // REQUIRED
    'namespace' => '<string>', // REQUIRED
]);

Parameter Details

Members
description
Type: string

The updated description of the data lake dataset.

instanceId
Required: Yes
Type: string

The Amazon Web Services Chain instance identifier.

name
Required: Yes
Type: string

The name of the dataset. For asc name space, the name must be one of the supported data entities under https://docs.aws.amazon.com/aws-supply-chain/latest/userguide/data-model-asc.html.

namespace
Required: Yes
Type: string

The name space of the dataset. The available values are:

Result Syntax

[
    'dataset' => [
        'arn' => '<string>',
        'createdTime' => <DateTime>,
        'description' => '<string>',
        'instanceId' => '<string>',
        'lastModifiedTime' => <DateTime>,
        'name' => '<string>',
        'namespace' => '<string>',
        'schema' => [
            'fields' => [
                [
                    'isRequired' => true || false,
                    'name' => '<string>',
                    'type' => 'INT|DOUBLE|STRING|TIMESTAMP',
                ],
                // ...
            ],
            'name' => '<string>',
        ],
    ],
]

Result Details

Members
dataset
Required: Yes
Type: DataLakeDataset structure

The updated dataset details.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ResourceNotFoundException:

Request references a resource which does not exist.

ThrottlingException:

Request was denied due to request throttling.

AccessDeniedException:

You do not have the required privileges to perform this action.

ValidationException:

The input does not satisfy the constraints specified by an AWS service.

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

Example 1: Update description of an existing AWS Supply Chain inbound order dataset
$result = $client->updateDataLakeDataset([
    'name' => 'inbound_order',
    'description' => 'This is an updated AWS Supply Chain inbound order dataset',
    'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
    'namespace' => 'asc',
]);

Result syntax:

[
    'dataset' => [
        'name' => 'inbound_order',
        'arn' => 'arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/asc/datasets/inbound_order',
        'createdTime' => ,
        'description' => 'This is an updated AWS Supply Chain inbound order dataset',
        'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
        'lastModifiedTime' => ,
        'namespace' => 'asc',
        'schema' => [
            'name' => 'InboundOrder',
            'fields' => [
                [
                    'name' => 'id',
                    'type' => 'STRING',
                    'isRequired' => 1,
                ],
                [
                    'name' => 'tpartner_id',
                    'type' => 'STRING',
                    'isRequired' => 1,
                ],
                [
                    'name' => 'connection_id',
                    'type' => 'STRING',
                    'isRequired' => 1,
                ],
                [
                    'name' => 'order_type',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'order_status',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'inbound_order_url',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'order_creation_date',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
                [
                    'name' => 'company_id',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'to_site_id',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'order_currency_uom',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'vendor_currency_uom',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'exchange_rate',
                    'type' => 'DOUBLE',
                    'isRequired' => ,
                ],
                [
                    'name' => 'exchange_rate_date',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
                [
                    'name' => 'incoterm',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'incoterm2',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'incoterm_location_1',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'incoterm_location_2',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'submitted_date',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
                [
                    'name' => 'agreement_start_date',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
                [
                    'name' => 'agreement_end_date',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
                [
                    'name' => 'shipping_instr_code',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'payment_terms_code',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'std_terms_agreement',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'std_terms_agreement_ver',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'agreement_number',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'source',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'source_update_dttm',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
                [
                    'name' => 'source_event_id',
                    'type' => 'STRING',
                    'isRequired' => ,
                ],
                [
                    'name' => 'db_creation_dttm',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
                [
                    'name' => 'db_updation_dttm',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
            ],
        ],
    ],
]
Example 2: Update description of an existing custom dataset
$result = $client->updateDataLakeDataset([
    'name' => 'my_dataset',
    'description' => 'This is an updated custom dataset',
    'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
    'namespace' => 'default',
]);

Result syntax:

[
    'dataset' => [
        'name' => 'my_dataset',
        'arn' => 'arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/default/datasets/my_dataset',
        'createdTime' => ,
        'description' => 'This is an updated custom dataset',
        'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
        'lastModifiedTime' => ,
        'namespace' => 'default',
        'schema' => [
            'name' => 'MyDataset',
            'fields' => [
                [
                    'name' => 'id',
                    'type' => 'INT',
                    'isRequired' => 1,
                ],
                [
                    'name' => 'description',
                    'type' => 'STRING',
                    'isRequired' => 1,
                ],
                [
                    'name' => 'price',
                    'type' => 'DOUBLE',
                    'isRequired' => ,
                ],
                [
                    'name' => 'creation_time',
                    'type' => 'TIMESTAMP',
                    'isRequired' => ,
                ],
            ],
        ],
    ],
]

UpdateInstance

$result = $client->updateInstance([/* ... */]);
$promise = $client->updateInstanceAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->updateInstance([
    'instanceDescription' => '<string>',
    'instanceId' => '<string>', // REQUIRED
    'instanceName' => '<string>',
]);

Parameter Details

Members
instanceDescription
Type: string

The AWS Supply Chain instance description.

instanceId
Required: Yes
Type: string

The AWS Supply Chain instance identifier.

instanceName
Type: string

The AWS Supply Chain instance name.

Result Syntax

[
    'instance' => [
        'awsAccountId' => '<string>',
        'createdTime' => <DateTime>,
        'errorMessage' => '<string>',
        'instanceDescription' => '<string>',
        'instanceId' => '<string>',
        'instanceName' => '<string>',
        'kmsKeyArn' => '<string>',
        'lastModifiedTime' => <DateTime>,
        'state' => 'Initializing|Active|CreateFailed|DeleteFailed|Deleting|Deleted',
        'versionNumber' => <float>,
        'webAppDnsDomain' => '<string>',
    ],
]

Result Details

Members
instance
Required: Yes
Type: Instance structure

The instance resource data details.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ResourceNotFoundException:

Request references a resource which does not exist.

ThrottlingException:

Request was denied due to request throttling.

AccessDeniedException:

You do not have the required privileges to perform this action.

ValidationException:

The input does not satisfy the constraints specified by an AWS service.

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

Example 1: Successful UpdateInstance request
$result = $client->updateInstance([
    'instanceDescription' => 'updated example instance description',
    'instanceId' => '9e193580-7cc5-45f7-9609-c43ba0ada793',
    'instanceName' => 'updated example instance name',
]);

Result syntax:

[
    'instance' => [
        'awsAccountId' => '123456789012',
        'createdTime' => ,
        'instanceDescription' => 'updated example instance description',
        'instanceId' => '9e193580-7cc5-45f7-9609-c43ba0ada793',
        'instanceName' => 'updated example instance name',
        'kmsKeyArn' => 'arn:aws:kms:us-west-2:123456789012:key/b14ffc39-b7d4-45ab-991a-6257a7f0d24d',
        'lastModifiedTime' => ,
        'state' => 'Active',
        'versionNumber' => 2,
    ],
]

Shapes

AccessDeniedException

Description

You do not have the required privileges to perform this action.

Members
message
Type: string

BillOfMaterialsImportJob

Description

The BillOfMaterialsImportJob details.

Members
instanceId
Required: Yes
Type: string

The BillOfMaterialsImportJob instanceId.

jobId
Required: Yes
Type: string

The BillOfMaterialsImportJob jobId.

message
Type: string

When the BillOfMaterialsImportJob has reached a terminal state, there will be a message.

s3uri
Required: Yes
Type: string

The S3 URI from which the CSV is read.

status
Required: Yes
Type: string

The BillOfMaterialsImportJob ConfigurationJobStatus.

ConflictException

Description

Updating or deleting a resource can cause an inconsistent state.

Members
message
Type: string

DataIntegrationFlow

Description

The DataIntegrationFlow details.

Members
createdTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The DataIntegrationFlow creation timestamp.

instanceId
Required: Yes
Type: string

The DataIntegrationFlow instance ID.

lastModifiedTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The DataIntegrationFlow last modified timestamp.

name
Required: Yes
Type: string

The DataIntegrationFlow name.

sources
Required: Yes
Type: Array of DataIntegrationFlowSource structures

The DataIntegrationFlow source configurations.

target
Required: Yes
Type: DataIntegrationFlowTarget structure

The DataIntegrationFlow target configuration.

transformation
Required: Yes
Type: DataIntegrationFlowTransformation structure

The DataIntegrationFlow transformation configurations.

DataIntegrationFlowDatasetOptions

Description

The dataset options used in dataset source and target configurations.

Members
dedupeRecords
Type: boolean

The dataset load option to remove duplicates.

loadType
Type: string

The dataset data load type in dataset options.

DataIntegrationFlowDatasetSourceConfiguration

Description

The dataset DataIntegrationFlow source configuration parameters.

Members
datasetIdentifier
Required: Yes
Type: string

The ARN of the dataset.

options

The dataset DataIntegrationFlow source options.

DataIntegrationFlowDatasetTargetConfiguration

Description

The dataset DataIntegrationFlow target configuration parameters.

Members
datasetIdentifier
Required: Yes
Type: string

The dataset ARN.

options

The dataset DataIntegrationFlow target options.

DataIntegrationFlowS3Options

Description

The Amazon S3 options used in S3 source and target configurations.

Members
fileType
Type: string

The Amazon S3 file type in S3 options.

DataIntegrationFlowS3SourceConfiguration

Description

The S3 DataIntegrationFlow source configuration parameters.

Members
bucketName
Required: Yes
Type: string

The bucketName of the S3 source objects.

options

The other options of the S3 DataIntegrationFlow source.

prefix
Required: Yes
Type: string

The prefix of the S3 source objects.

DataIntegrationFlowS3TargetConfiguration

Description

The S3 DataIntegrationFlow target configuration parameters.

Members
bucketName
Required: Yes
Type: string

The bucketName of the S3 target objects.

options

The S3 DataIntegrationFlow target options.

prefix
Required: Yes
Type: string

The prefix of the S3 target objects.

DataIntegrationFlowSQLTransformationConfiguration

Description

The SQL DataIntegrationFlow transformation configuration parameters.

Members
query
Required: Yes
Type: string

The transformation SQL query body based on SparkSQL.

DataIntegrationFlowSource

Description

The DataIntegrationFlow source parameters.

Members
datasetSource

The dataset DataIntegrationFlow source.

s3Source

The S3 DataIntegrationFlow source.

sourceName
Required: Yes
Type: string

The DataIntegrationFlow source name that can be used as table alias in SQL transformation query.

sourceType
Required: Yes
Type: string

The DataIntegrationFlow source type.

DataIntegrationFlowTransformation

Description

The DataIntegrationFlow transformation parameters.

Members
sqlTransformation

The SQL DataIntegrationFlow transformation configuration.

transformationType
Required: Yes
Type: string

The DataIntegrationFlow transformation type.

DataLakeDataset

Description

The data lake dataset details.

Members
arn
Required: Yes
Type: string

The arn of the dataset.

createdTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The creation time of the dataset.

description
Type: string

The description of the dataset.

instanceId
Required: Yes
Type: string

The Amazon Web Services Supply Chain instance identifier.

lastModifiedTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The last modified time of the dataset.

name
Required: Yes
Type: string

The name of the dataset. For asc name space, the name must be one of the supported data entities under https://docs.aws.amazon.com/aws-supply-chain/latest/userguide/data-model-asc.html.

namespace
Required: Yes
Type: string

The name space of the dataset. The available values are:

schema
Required: Yes
Type: DataLakeDatasetSchema structure

The schema of the dataset.

DataLakeDatasetSchema

Description

The schema details of the dataset.

Members
fields
Required: Yes
Type: Array of DataLakeDatasetSchemaField structures

The list of field details of the dataset schema.

name
Required: Yes
Type: string

The name of the dataset schema.

DataLakeDatasetSchemaField

Description

The dataset field details.

Members
isRequired
Required: Yes
Type: boolean

Indicate if the field is required or not.

name
Required: Yes
Type: string

The dataset field name.

type
Required: Yes
Type: string

The dataset field type.

Instance

Description

The details of the instance.

Members
awsAccountId
Required: Yes
Type: string

The Amazon Web Services account ID that owns the instance.

createdTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The instance creation timestamp.

errorMessage
Type: string

The Amazon Web Services Supply Chain instance error message. If the instance results in an unhealthy state, customers need to check the error message, delete the current instance, and recreate a new one based on the mitigation from the error message.

instanceDescription
Type: string

The Amazon Web Services Supply Chain instance description.

instanceId
Required: Yes
Type: string

The Amazon Web Services Supply Chain instance identifier.

instanceName
Type: string

The Amazon Web Services Supply Chain instance name.

kmsKeyArn
Type: string

The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you optionally provided for encryption. If you did not provide anything here, AWS Supply Chain uses the Amazon Web Services owned KMS key and nothing is returned.

lastModifiedTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The instance last modified timestamp.

state
Required: Yes
Type: string

The state of the instance.

versionNumber
Type: double

The version number of the instance.

webAppDnsDomain
Type: string

The WebApp DNS domain name of the instance.

InternalServerException

Description

Unexpected error during processing of request.

Members
message
Type: string

ResourceNotFoundException

Description

Request references a resource which does not exist.

Members
message
Type: string

ServiceQuotaExceededException

Description

Request would cause a service quota to be exceeded.

Members
message
Type: string

ThrottlingException

Description

Request was denied due to request throttling.

Members
message
Type: string

ValidationException

Description

The input does not satisfy the constraints specified by an AWS service.

Members
message
Type: string