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 = [] )
Create DataIntegrationFlow to map one or more different sources to one target using the SQL transformation query.
CreateDataLakeDataset ( array $params = [] )
Create a data lake dataset.
DeleteDataIntegrationFlow ( array $params = [] )
Delete the DataIntegrationFlow.
DeleteDataLakeDataset ( array $params = [] )
Delete a data lake dataset.
GetBillOfMaterialsImportJob ( array $params = [] )
Get status and details of a BillOfMaterialsImportJob.
GetDataIntegrationFlow ( array $params = [] )
View the DataIntegrationFlow details.
GetDataLakeDataset ( array $params = [] )
Get a data lake dataset.
ListDataIntegrationFlows ( array $params = [] )
Lists all the DataIntegrationFlows in a paginated way.
ListDataLakeDatasets ( array $params = [] )
List the data lake datasets for a specific instance and name space.
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 = [] )
Create tags for an Amazon Web Services Supply chain resource.
UntagResource ( array $params = [] )
Delete tags for an Amazon Web Services Supply chain resource.
UpdateDataIntegrationFlow ( array $params = [] )
Update the DataIntegrationFlow.
UpdateDataLakeDataset ( array $params = [] )
Update a data lake dataset.

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

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([/* ... */]);

Create DataIntegrationFlow to map one or more different sources to one target using the SQL transformation query.

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([/* ... */]);

Create a data lake dataset.

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' => ,
                ],
            ],
        ],
    ],
]

DeleteDataIntegrationFlow

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

Delete the DataIntegrationFlow.

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([/* ... */]);

Delete a data lake dataset.

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',
]

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([/* ... */]);

View the DataIntegrationFlow details.

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([/* ... */]);

Get a data lake dataset.

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' => ,
                ],
            ],
        ],
    ],
]

ListDataIntegrationFlows

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

Lists all the DataIntegrationFlows in a paginated way.

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([/* ... */]);

List the data lake datasets for a specific instance and name space.

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',
]

ListTagsForResource

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

List all the tags for an Amazon Web ServicesSupply Chain resource.

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([/* ... */]);

Create tags for an Amazon Web Services Supply chain resource.

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([/* ... */]);

Delete tags for an Amazon Web Services Supply chain resource.

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([/* ... */]);

Update the DataIntegrationFlow.

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([/* ... */]);

Update a data lake dataset.

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' => ,
                ],
            ],
        ],
    ],
]

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.

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