SDK for PHP 3.x

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

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

Operation Summary

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

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

CreateBillOfMaterialsImportJob ( array $params = [] )
CreateBillOfMaterialsImportJob creates an import job for the Product Bill Of Materials (BOM) entity.
CreateDataIntegrationFlow ( array $params = [] )
Enables you to programmatically create a data pipeline to ingest data from source systems such as Amazon S3 buckets, to a predefined Amazon Web Services Supply Chain dataset (product, inbound_order) or a temporary dataset along with the data transformation query provided with the API.
CreateDataLakeDataset ( array $params = [] )
Enables you to programmatically create an Amazon Web Services Supply Chain data lake dataset.
CreateDataLakeNamespace ( array $params = [] )
Enables you to programmatically create an Amazon Web Services Supply Chain data lake namespace.
CreateInstance ( array $params = [] )
Enables you to programmatically create an Amazon Web Services Supply Chain instance by applying KMS keys and relevant information associated with the API without using the Amazon Web Services console.
DeleteDataIntegrationFlow ( array $params = [] )
Enable you to programmatically delete an existing data pipeline for the provided Amazon Web Services Supply Chain instance and DataIntegrationFlow name.
DeleteDataLakeDataset ( array $params = [] )
Enables you to programmatically delete an Amazon Web Services Supply Chain data lake dataset.
DeleteDataLakeNamespace ( array $params = [] )
Enables you to programmatically delete an Amazon Web Services Supply Chain data lake namespace and its underling datasets.
DeleteInstance ( array $params = [] )
Enables you to programmatically delete an Amazon Web Services Supply Chain instance by deleting the KMS keys and relevant information associated with the API without using the Amazon Web Services console.
GetBillOfMaterialsImportJob ( array $params = [] )
Get status and details of a BillOfMaterialsImportJob.
GetDataIntegrationEvent ( array $params = [] )
Enables you to programmatically view an Amazon Web Services Supply Chain Data Integration Event.
GetDataIntegrationFlow ( array $params = [] )
Enables you to programmatically view a specific data pipeline for the provided Amazon Web Services Supply Chain instance and DataIntegrationFlow name.
GetDataIntegrationFlowExecution ( array $params = [] )
Get the flow execution.
GetDataLakeDataset ( array $params = [] )
Enables you to programmatically view an Amazon Web Services Supply Chain data lake dataset.
GetDataLakeNamespace ( array $params = [] )
Enables you to programmatically view an Amazon Web Services Supply Chain data lake namespace.
GetInstance ( array $params = [] )
Enables you to programmatically retrieve the information related to an Amazon Web Services Supply Chain instance ID.
ListDataIntegrationEvents ( array $params = [] )
Enables you to programmatically list all data integration events for the provided Amazon Web Services Supply Chain instance.
ListDataIntegrationFlowExecutions ( array $params = [] )
List flow executions.
ListDataIntegrationFlows ( array $params = [] )
Enables you to programmatically list all data pipelines for the provided Amazon Web Services Supply Chain instance.
ListDataLakeDatasets ( array $params = [] )
Enables you to programmatically view the list of Amazon Web Services Supply Chain data lake datasets.
ListDataLakeNamespaces ( array $params = [] )
Enables you to programmatically view the list of Amazon Web Services Supply Chain data lake namespaces.
ListInstances ( array $params = [] )
List all Amazon Web Services Supply Chain instances for a specific account.
ListTagsForResource ( array $params = [] )
List all the tags for an Amazon Web ServicesSupply Chain resource.
SendDataIntegrationEvent ( array $params = [] )
Send the data payload for the event with real-time data for analysis or monitoring.
TagResource ( array $params = [] )
You can create tags during or after creating a resource such as instance, data flow, or dataset in AWS Supply chain.
UntagResource ( array $params = [] )
You can delete tags for an Amazon Web Services Supply chain resource such as instance, data flow, or dataset in AWS Supply Chain.
UpdateDataIntegrationFlow ( array $params = [] )
Enables you to programmatically update an existing data pipeline to ingest data from the source systems such as, Amazon S3 buckets, to a predefined Amazon Web Services Supply Chain dataset (product, inbound_order) or a temporary dataset along with the data transformation query provided with the API.
UpdateDataLakeDataset ( array $params = [] )
Enables you to programmatically update an Amazon Web Services Supply Chain data lake dataset.
UpdateDataLakeNamespace ( array $params = [] )
Enables you to programmatically update an Amazon Web Services Supply Chain data lake namespace.
UpdateInstance ( array $params = [] )
Enables you to programmatically update an Amazon Web Services Supply Chain instance description by providing all the relevant information such as account ID, instance ID and so on without using the AWS console.

Paginators

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

ListDataIntegrationEvents
ListDataIntegrationFlowExecutions
ListDataIntegrationFlows
ListDataLakeDatasets
ListDataLakeNamespaces
ListInstances

Operations

CreateBillOfMaterialsImportJob

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

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

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

Parameter Syntax

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

Parameter Details

Members
clientToken
Type: string

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

instanceId
Required: Yes
Type: string

The AWS Supply Chain instance identifier.

s3uri
Required: Yes
Type: string

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

Result Syntax

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

Result Details

Members
jobId
Required: Yes
Type: string

The new BillOfMaterialsImportJob identifier.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ThrottlingException:

Request was denied due to request throttling.

ResourceNotFoundException:

Request references a resource which does not exist.

AccessDeniedException:

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

ValidationException:

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

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

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

Result syntax:

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

CreateDataIntegrationFlow

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

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

Parameter Syntax

$result = $client->createDataIntegrationFlow([
    'instanceId' => '<string>', // REQUIRED
    'name' => '<string>', // REQUIRED
    'sources' => [ // REQUIRED
        [
            'datasetSource' => [
                'datasetIdentifier' => '<string>', // REQUIRED
                'options' => [
                    'dedupeRecords' => true || false,
                    'dedupeStrategy' => [
                        'fieldPriority' => [
                            'fields' => [ // REQUIRED
                                [
                                    'name' => '<string>', // REQUIRED
                                    'sortOrder' => 'ASC|DESC', // REQUIRED
                                ],
                                // ...
                            ],
                        ],
                        'type' => 'FIELD_PRIORITY', // REQUIRED
                    ],
                    '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,
                'dedupeStrategy' => [
                    'fieldPriority' => [
                        'fields' => [ // REQUIRED
                            [
                                'name' => '<string>', // REQUIRED
                                'sortOrder' => 'ASC|DESC', // REQUIRED
                            ],
                            // ...
                        ],
                    ],
                    'type' => 'FIELD_PRIORITY', // REQUIRED
                ],
                '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',
            'options' => [
                'dedupeRecords' => 1,
                'dedupeStrategy' => [
                    'type' => 'FIELD_PRIORITY',
                    'fieldPriority' => [
                        'fields' => [
                            [
                                'name' => 'eff_start_date',
                                'sortOrder' => 'DESC',
                            ],
                        ],
                    ],
                ],
                'loadType' => 'REPLACE',
            ],
        ],
        'targetType' => 'DATASET',
    ],
    'transformation' => [
        'sqlTransformation' => [
            'query' => 'SELECT S1.id AS id, S1.poc_org_unit_description AS description, S1.company_id AS company_id, S1.tpartner_type AS tpartner_type, S1.geo_id AS geo_id, S1.eff_start_date AS eff_start_date, S1.eff_end_date AS eff_end_date FROM testSourceName1 AS S1 LEFT JOIN testSourceName2 as S2 ON S1.id=S2.id',
        ],
        'transformationType' => 'SQL',
    ],
]);

Result syntax:

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

CreateDataLakeDataset

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

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

Parameter Syntax

$result = $client->createDataLakeDataset([
    'description' => '<string>',
    'instanceId' => '<string>', // REQUIRED
    'name' => '<string>', // REQUIRED
    'namespace' => '<string>', // REQUIRED
    'partitionSpec' => [
        'fields' => [ // REQUIRED
            [
                'name' => '<string>', // REQUIRED
                'transform' => [ // REQUIRED
                    'type' => 'YEAR|MONTH|DAY|HOUR|IDENTITY', // REQUIRED
                ],
            ],
            // ...
        ],
    ],
    'schema' => [
        'fields' => [ // REQUIRED
            [
                'isRequired' => true || false, // REQUIRED
                'name' => '<string>', // REQUIRED
                'type' => 'INT|DOUBLE|STRING|TIMESTAMP|LONG', // REQUIRED
            ],
            // ...
        ],
        'name' => '<string>', // REQUIRED
        'primaryKeys' => [
            [
                '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 namespace of the dataset, besides the custom defined namespace, every instance comes with below pre-defined namespaces:

partitionSpec

The partition specification of the dataset. Partitioning can effectively improve the dataset query performance by reducing the amount of data scanned during query execution. But partitioning or not will affect how data get ingested by data ingestion methods, such as SendDataIntegrationEvent's dataset UPSERT will upsert records within partition (instead of within whole dataset). For more details, refer to those data ingestion documentations.

schema
Type: DataLakeDatasetSchema structure

The custom schema of the data lake dataset and required for dataset in default and custom namespaces.

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>',
        'partitionSpec' => [
            'fields' => [
                [
                    'name' => '<string>',
                    'transform' => [
                        'type' => 'YEAR|MONTH|DAY|HOUR|IDENTITY',
                    ],
                ],
                // ...
            ],
        ],
        'schema' => [
            'fields' => [
                [
                    'isRequired' => true || false,
                    'name' => '<string>',
                    'type' => 'INT|DOUBLE|STRING|TIMESTAMP|LONG',
                ],
                // ...
            ],
            'name' => '<string>',
            'primaryKeys' => [
                [
                    '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.

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: 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',
    'partitionSpec' => [
        'fields' => [
            [
                'name' => 'creation_time',
                'transform' => [
                    'type' => 'DAY',
                ],
            ],
            [
                'name' => 'description',
                'transform' => [
                    'type' => 'IDENTITY',
                ],
            ],
        ],
    ],
    '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' => 'quantity',
                'type' => 'LONG',
                'isRequired' => ,
            ],
        ],
        'primaryKeys' => [
            [
                'name' => 'id',
            ],
        ],
    ],
    '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',
        'partitionSpec' => [
            'fields' => [
                [
                    'name' => 'creation_time',
                    'transform' => [
                        'type' => 'DAY',
                    ],
                ],
                [
                    'name' => 'description',
                    'transform' => [
                        'type' => 'IDENTITY',
                    ],
                ],
            ],
        ],
        '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' => 'quantity',
                    'type' => 'LONG',
                    'isRequired' => ,
                ],
            ],
            'primaryKeys' => [
                [
                    'name' => 'id',
                ],
            ],
        ],
    ],
]

CreateDataLakeNamespace

$result = $client->createDataLakeNamespace([/* ... */]);
$promise = $client->createDataLakeNamespaceAsync([/* ... */]);

Enables you to programmatically create an Amazon Web Services Supply Chain data lake namespace. Developers can create the namespaces for a given instance ID.

Parameter Syntax

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

Parameter Details

Members
description
Type: string

The description of the namespace.

instanceId
Required: Yes
Type: string

The Amazon Web Services Supply Chain instance identifier.

name
Required: Yes
Type: string

The name of the namespace. Noted you cannot create namespace with name starting with asc, default, scn, aws, amazon, amzn

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

The tags of the namespace.

Result Syntax

[
    'namespace' => [
        'arn' => '<string>',
        'createdTime' => <DateTime>,
        'description' => '<string>',
        'instanceId' => '<string>',
        'lastModifiedTime' => <DateTime>,
        'name' => '<string>',
    ],
]

Result Details

Members
namespace
Required: Yes
Type: DataLakeNamespace structure

The detail of created namespace.

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 a data lake namespace
$result = $client->createDataLakeNamespace([
    'name' => 'my_namespace',
    'description' => 'This is my AWS Supply Chain namespace',
    'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
    'tags' => [
        'tagKey1' => 'tagValue1',
        'tagKey2' => 'tagValue2',
    ],
]);

Result syntax:

[
    'namespace' => [
        'name' => 'my_namespace',
        'arn' => 'arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/my_namespace',
        'createdTime' => ,
        'description' => 'This is my AWS Supply Chain namespace',
        'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
        'lastModifiedTime' => ,
    ],
]

CreateInstance

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

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

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

Parameter Syntax

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

Parameter Details

Members
clientToken
Type: string

The client token for idempotency.

instanceDescription
Type: string

The AWS Supply Chain instance description.

instanceName
Type: string

The AWS Supply Chain instance name.

kmsKeyArn
Type: string

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

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

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

webAppDnsDomain
Type: string

The DNS subdomain of the web app. This would be "example" in the URL "example.scn.global.on.aws". You can set this to a custom value, as long as the domain isn't already being used by someone else. The name may only include alphanumeric characters and hyphens.

Result Syntax

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

Result Details

Members
instance
Required: Yes
Type: Instance structure

The AWS Supply Chain instance resource data details.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ThrottlingException:

Request was denied due to request throttling.

ResourceNotFoundException:

Request references a resource which does not exist.

AccessDeniedException:

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

ValidationException:

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

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

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

Result syntax:

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

Result syntax:

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

DeleteDataIntegrationFlow

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

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

Parameter Syntax

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

Parameter Details

Members
instanceId
Required: Yes
Type: string

The Amazon Web Services Supply Chain instance identifier.

name
Required: Yes
Type: string

The name of the DataIntegrationFlow to be deleted.

Result Syntax

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

Result Details

Members
instanceId
Required: Yes
Type: string

The Amazon Web Services Supply Chain instance identifier.

name
Required: Yes
Type: string

The name of the DataIntegrationFlow deleted.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ResourceNotFoundException:

Request references a resource which does not exist.

ThrottlingException:

Request was denied due to request throttling.

AccessDeniedException:

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

ValidationException:

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

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

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

Result syntax:

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

DeleteDataLakeDataset

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

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

Parameter Syntax

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

Parameter Details

Members
instanceId
Required: Yes
Type: string

The AWS Supply Chain instance identifier.

name
Required: Yes
Type: string

The name of the dataset. For asc namespace, 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 namespace of the dataset, besides the custom defined namespace, every instance comes with below pre-defined namespaces:

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

DeleteDataLakeNamespace

$result = $client->deleteDataLakeNamespace([/* ... */]);
$promise = $client->deleteDataLakeNamespaceAsync([/* ... */]);

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

Parameter Syntax

$result = $client->deleteDataLakeNamespace([
    'instanceId' => '<string>', // REQUIRED
    'name' => '<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 namespace. Noted you cannot delete pre-defined namespace like asc, default which are only deleted through instance deletion.

Result Syntax

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

Result Details

Members
instanceId
Required: Yes
Type: string

The AWS Supply Chain instance identifier.

name
Required: Yes
Type: string

The name of deleted namespace.

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 namespace
$result = $client->deleteDataLakeNamespace([
    'name' => 'my_namespace',
    'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
]);

Result syntax:

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

DeleteInstance

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

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

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

Parameter Syntax

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

Parameter Details

Members
instanceId
Required: Yes
Type: string

The AWS Supply Chain instance identifier.

Result Syntax

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

Result Details

Members
instance
Required: Yes
Type: Instance structure

The AWS Supply Chain instance resource data details.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ResourceNotFoundException:

Request references a resource which does not exist.

ThrottlingException:

Request was denied due to request throttling.

AccessDeniedException:

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

ValidationException:

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

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

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

Result syntax:

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

GetBillOfMaterialsImportJob

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

Get status and details of a BillOfMaterialsImportJob.

Parameter Syntax

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

Parameter Details

Members
instanceId
Required: Yes
Type: string

The AWS Supply Chain instance identifier.

jobId
Required: Yes
Type: string

The BillOfMaterialsImportJob identifier.

Result Syntax

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

Result Details

Members
job
Required: Yes
Type: BillOfMaterialsImportJob structure

The BillOfMaterialsImportJob.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ResourceNotFoundException:

Request references a resource which does not exist.

ThrottlingException:

Request was denied due to request throttling.

AccessDeniedException:

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

ValidationException:

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

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

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

Result syntax:

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

Result syntax:

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

GetDataIntegrationEvent

$result = $client->getDataIntegrationEvent([/* ... */]);
$promise = $client->getDataIntegrationEventAsync([/* ... */]);

Enables you to programmatically view an Amazon Web Services Supply Chain Data Integration Event. Developers can view the eventType, eventGroupId, eventTimestamp, datasetTarget, datasetLoadExecution.

Parameter Syntax

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

Parameter Details

Members
eventId
Required: Yes
Type: string

The unique event identifier.

instanceId
Required: Yes
Type: string

The Amazon Web Services Supply Chain instance identifier.

Result Syntax

[
    'event' => [
        'datasetTargetDetails' => [
            'datasetIdentifier' => '<string>',
            'datasetLoadExecution' => [
                'message' => '<string>',
                'status' => 'SUCCEEDED|IN_PROGRESS|FAILED',
            ],
            'operationType' => 'APPEND|UPSERT|DELETE',
        ],
        'eventGroupId' => '<string>',
        'eventId' => '<string>',
        'eventTimestamp' => <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|scn.data.dataset',
        'instanceId' => '<string>',
    ],
]

Result Details

Members
event
Required: Yes
Type: DataIntegrationEvent structure

The details of the DataIntegrationEvent 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 GetDataIntegrationEvent
$result = $client->getDataIntegrationEvent([
    'eventId' => '19739c8e-cd2e-4cbc-a2f7-0dc43239f042',
    'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
]);

Result syntax:

[
    'event' => [
        'datasetTargetDetails' => [
            'datasetIdentifier' => 'arn:aws:scn:us-west-2:135808960812:instance/8928ae12-15e5-4441-825d-ec2184f0a43a/namespaces/asc/datasets/product',
            'datasetLoadExecution' => [
                'status' => 'SUCCEEDED',
            ],
            'operationType' => 'APPEND',
        ],
        'eventGroupId' => 'datasetId',
        'eventId' => '19739c8e-cd2e-4cbc-a2f7-0dc43239f042',
        'eventTimestamp' => ,
        'eventType' => 'scn.data.dataset',
        'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
    ],
]

GetDataIntegrationFlow

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

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

Parameter Syntax

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

Parameter Details

Members
instanceId
Required: Yes
Type: string

The Amazon Web Services Supply Chain instance identifier.

name
Required: Yes
Type: string

The name of the DataIntegrationFlow created.

Result Syntax

[
    'flow' => [
        'createdTime' => <DateTime>,
        'instanceId' => '<string>',
        'lastModifiedTime' => <DateTime>,
        'name' => '<string>',
        'sources' => [
            [
                'datasetSource' => [
                    'datasetIdentifier' => '<string>',
                    'options' => [
                        'dedupeRecords' => true || false,
                        'dedupeStrategy' => [
                            'fieldPriority' => [
                                'fields' => [
                                    [
                                        'name' => '<string>',
                                        'sortOrder' => 'ASC|DESC',
                                    ],
                                    // ...
                                ],
                            ],
                            'type' => 'FIELD_PRIORITY',
                        ],
                        '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,
                    'dedupeStrategy' => [
                        'fieldPriority' => [
                            'fields' => [
                                [
                                    'name' => '<string>',
                                    'sortOrder' => 'ASC|DESC',
                                ],
                                // ...
                            ],
                        ],
                        'type' => 'FIELD_PRIORITY',
                    ],
                    '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',
        ],
    ],
]

GetDataIntegrationFlowExecution

$result = $client->getDataIntegrationFlowExecution([/* ... */]);
$promise = $client->getDataIntegrationFlowExecutionAsync([/* ... */]);

Get the flow execution.

Parameter Syntax

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

Parameter Details

Members
executionId
Required: Yes
Type: string

The flow execution identifier.

flowName
Required: Yes
Type: string

The flow name.

instanceId
Required: Yes
Type: string

The AWS Supply Chain instance identifier.

Result Syntax

[
    'flowExecution' => [
        'endTime' => <DateTime>,
        'executionId' => '<string>',
        'flowName' => '<string>',
        'instanceId' => '<string>',
        'message' => '<string>',
        'outputMetadata' => [
            'diagnosticReportsRootS3URI' => '<string>',
        ],
        'sourceInfo' => [
            'datasetSource' => [
                'datasetIdentifier' => '<string>',
            ],
            's3Source' => [
                'bucketName' => '<string>',
                'key' => '<string>',
            ],
            'sourceType' => 'S3|DATASET',
        ],
        'startTime' => <DateTime>,
        'status' => 'SUCCEEDED|IN_PROGRESS|FAILED',
    ],
]

Result Details

Members
flowExecution
Required: Yes
Type: DataIntegrationFlowExecution structure

The flow execution details.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ResourceNotFoundException:

Request references a resource which does not exist.

ThrottlingException:

Request was denied due to request throttling.

AccessDeniedException:

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

ValidationException:

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

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

Example 1: Successful GetDataIntegrationFlowExecution for S3 source
$result = $client->getDataIntegrationFlowExecution([
    'executionId' => 'edbbdd3f-c0f9-49d9-ab01-f64542f803b7',
    'flowName' => 'source-product',
    'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
]);

Result syntax:

[
    'flowExecution' => [
        'endTime' => ,
        'executionId' => 'edbbdd3f-c0f9-49d9-ab01-f64542f803b7',
        'flowName' => 'source-product',
        'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
        'sourceInfo' => [
            's3Source' => [
                'key' => 'sources/product-sources.csv',
                'bucketName' => 'galaxy-raw-input-test-data-prod-pdx-1',
            ],
            'sourceType' => 'S3',
        ],
        'startTime' => ,
        'status' => 'SUCCEEDED',
    ],
]
Example 2: Successful GetDataIntegrationFlowExecution for DATASET source
$result = $client->getDataIntegrationFlowExecution([
    'executionId' => '9daf6071-d12c-4eef-864c-73cea2557825',
    'flowName' => 'target-product',
    'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
]);

Result syntax:

[
    'flowExecution' => [
        'endTime' => ,
        'executionId' => '9daf6071-d12c-4eef-864c-73cea2557825',
        'flowName' => 'target-product',
        'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
        'sourceInfo' => [
            'datasetSource' => [
                'datasetIdentifier' => 'arn:aws:scn:us-west-2:135808960812:instance/8928ae12-15e5-4441-825d-ec2184f0a43a/namespaces/default/datasets/product',
            ],
            'sourceType' => 'DATASET',
        ],
        'startTime' => ,
        'status' => 'SUCCEEDED',
    ],
]

GetDataLakeDataset

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

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

Parameter Syntax

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

Parameter Details

Members
instanceId
Required: Yes
Type: string

The Amazon Web Services Supply Chain instance identifier.

name
Required: Yes
Type: string

The name of the dataset. For asc namespace, 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 namespace of the dataset, besides the custom defined namespace, every instance comes with below pre-defined namespaces:

Result Syntax

[
    'dataset' => [
        'arn' => '<string>',
        'createdTime' => <DateTime>,
        'description' => '<string>',
        'instanceId' => '<string>',
        'lastModifiedTime' => <DateTime>,
        'name' => '<string>',
        'namespace' => '<string>',
        'partitionSpec' => [
            'fields' => [
                [
                    'name' => '<string>',
                    'transform' => [
                        'type' => 'YEAR|MONTH|DAY|HOUR|IDENTITY',
                    ],
                ],
                // ...
            ],
        ],
        'schema' => [
            'fields' => [
                [
                    'isRequired' => true || false,
                    'name' => '<string>',
                    'type' => 'INT|DOUBLE|STRING|TIMESTAMP|LONG',
                ],
                // ...
            ],
            'name' => '<string>',
            'primaryKeys' => [
                [
                    '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',
        'partitionSpec' => [
            'fields' => [
                [
                    'name' => 'creation_time',
                    'transform' => [
                        'type' => 'DAY',
                    ],
                ],
                [
                    'name' => 'description',
                    'transform' => [
                        'type' => 'IDENTITY',
                    ],
                ],
            ],
        ],
        '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' => 'quantity',
                    'type' => 'LONG',
                    'isRequired' => ,
                ],
            ],
            'primaryKeys' => [
                [
                    'name' => 'id',
                ],
            ],
        ],
    ],
]

GetDataLakeNamespace

$result = $client->getDataLakeNamespace([/* ... */]);
$promise = $client->getDataLakeNamespaceAsync([/* ... */]);

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

Parameter Syntax

$result = $client->getDataLakeNamespace([
    '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 namespace. Besides the namespaces user created, you can also specify the pre-defined namespaces:

Result Syntax

[
    'namespace' => [
        'arn' => '<string>',
        'createdTime' => <DateTime>,
        'description' => '<string>',
        'instanceId' => '<string>',
        'lastModifiedTime' => <DateTime>,
        'name' => '<string>',
    ],
]

Result Details

Members
namespace
Required: Yes
Type: DataLakeNamespace structure

The fetched namespace 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 namespace
$result = $client->getDataLakeNamespace([
    'name' => 'my_namespace',
    'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
]);

Result syntax:

[
    'namespace' => [
        'name' => 'my_namespace',
        'arn' => 'arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/my_namespace',
        'createdTime' => ,
        'description' => 'This is my AWS Supply Chain namespace',
        'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
        'lastModifiedTime' => ,
    ],
]
Example 2: Get proporties of an existing pre-defined AWS Supply Chain namespace
$result = $client->getDataLakeNamespace([
    'name' => 'asc',
    'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
]);

Result syntax:

[
    'namespace' => [
        'name' => 'asc',
        'arn' => 'arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/asc',
        'createdTime' => ,
        'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
        'lastModifiedTime' => ,
    ],
]

GetInstance

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

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

Parameter Syntax

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

Parameter Details

Members
instanceId
Required: Yes
Type: string

The AWS Supply Chain instance identifier

Result Syntax

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

Result Details

Members
instance
Required: Yes
Type: Instance structure

The instance resource data details.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ResourceNotFoundException:

Request references a resource which does not exist.

ThrottlingException:

Request was denied due to request throttling.

AccessDeniedException:

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

ValidationException:

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

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

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

Result syntax:

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

Result syntax:

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

ListDataIntegrationEvents

$result = $client->listDataIntegrationEvents([/* ... */]);
$promise = $client->listDataIntegrationEventsAsync([/* ... */]);

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

Parameter Syntax

$result = $client->listDataIntegrationEvents([
    '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|scn.data.dataset',
    'instanceId' => '<string>', // REQUIRED
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
eventType
Type: string

List data integration events for the specified eventType.

instanceId
Required: Yes
Type: string

The Amazon Web Services Supply Chain instance identifier.

maxResults
Type: int

Specify the maximum number of data integration events to fetch in one paginated request.

nextToken
Type: string

The pagination token to fetch the next page of the data integration events.

Result Syntax

[
    'events' => [
        [
            'datasetTargetDetails' => [
                'datasetIdentifier' => '<string>',
                'datasetLoadExecution' => [
                    'message' => '<string>',
                    'status' => 'SUCCEEDED|IN_PROGRESS|FAILED',
                ],
                'operationType' => 'APPEND|UPSERT|DELETE',
            ],
            'eventGroupId' => '<string>',
            'eventId' => '<string>',
            'eventTimestamp' => <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|scn.data.dataset',
            'instanceId' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
events
Required: Yes
Type: Array of DataIntegrationEvent structures

The list of data integration events.

nextToken
Type: string

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

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 ListDataIntegrationEvents
$result = $client->listDataIntegrationEvents([
    'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
]);

Result syntax:

[
    'events' => [
        [
            'datasetTargetDetails' => [
                'datasetIdentifier' => 'arn:aws:scn:us-west-2:135808960812:instance/8928ae12-15e5-4441-825d-ec2184f0a43a/namespaces/asc/datasets/product',
                'datasetLoadExecution' => [
                    'status' => 'SUCCEEDED',
                ],
                'operationType' => 'APPEND',
            ],
            'eventGroupId' => 'datasetId',
            'eventId' => '19739c8e-cd2e-4cbc-a2f7-0dc43239f042',
            'eventTimestamp' => ,
            'eventType' => 'scn.data.dataset',
            'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
        ],
    ],
]

ListDataIntegrationFlowExecutions

$result = $client->listDataIntegrationFlowExecutions([/* ... */]);
$promise = $client->listDataIntegrationFlowExecutionsAsync([/* ... */]);

List flow executions.

Parameter Syntax

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

Parameter Details

Members
flowName
Required: Yes
Type: string

The flow name.

instanceId
Required: Yes
Type: string

The AWS Supply Chain instance identifier.

maxResults
Type: int

The number to specify the max number of flow executions to fetch in this paginated request.

nextToken
Type: string

The pagination token to fetch next page of flow executions.

Result Syntax

[
    'flowExecutions' => [
        [
            'endTime' => <DateTime>,
            'executionId' => '<string>',
            'flowName' => '<string>',
            'instanceId' => '<string>',
            'message' => '<string>',
            'outputMetadata' => [
                'diagnosticReportsRootS3URI' => '<string>',
            ],
            'sourceInfo' => [
                'datasetSource' => [
                    'datasetIdentifier' => '<string>',
                ],
                's3Source' => [
                    'bucketName' => '<string>',
                    'key' => '<string>',
                ],
                'sourceType' => 'S3|DATASET',
            ],
            'startTime' => <DateTime>,
            'status' => 'SUCCEEDED|IN_PROGRESS|FAILED',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
flowExecutions
Required: Yes
Type: Array of DataIntegrationFlowExecution structures

The list of flow executions.

nextToken
Type: string

The pagination token to fetch next page of flow executions.

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 ListDataIntegrationFlowExecutions
$result = $client->listDataIntegrationFlowExecutions([
    'flowName' => 'source-product',
    'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
]);

Result syntax:

[
    'flowExecutions' => [
        [
            'endTime' => ,
            'executionId' => 'edbbdd3f-c0f9-49d9-ab01-f64542f803b7',
            'flowName' => 'source-product',
            'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
            'sourceInfo' => [
                's3Source' => [
                    'key' => 'sources/product-sources.csv',
                    'bucketName' => 'galaxy-raw-input-test-data-prod-pdx-1',
                ],
                'sourceType' => 'S3',
            ],
            'startTime' => ,
            'status' => 'SUCCEEDED',
        ],
    ],
]

ListDataIntegrationFlows

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

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

Parameter Syntax

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

Parameter Details

Members
instanceId
Required: Yes
Type: string

The Amazon Web Services Supply Chain instance identifier.

maxResults
Type: int

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

nextToken
Type: string

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

Result Syntax

[
    'flows' => [
        [
            'createdTime' => <DateTime>,
            'instanceId' => '<string>',
            'lastModifiedTime' => <DateTime>,
            'name' => '<string>',
            'sources' => [
                [
                    'datasetSource' => [
                        'datasetIdentifier' => '<string>',
                        'options' => [
                            'dedupeRecords' => true || false,
                            'dedupeStrategy' => [
                                'fieldPriority' => [
                                    'fields' => [
                                        [
                                            'name' => '<string>',
                                            'sortOrder' => 'ASC|DESC',
                                        ],
                                        // ...
                                    ],
                                ],
                                'type' => 'FIELD_PRIORITY',
                            ],
                            '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,
                        'dedupeStrategy' => [
                            'fieldPriority' => [
                                'fields' => [
                                    [
                                        'name' => '<string>',
                                        'sortOrder' => 'ASC|DESC',
                                    ],
                                    // ...
                                ],
                            ],
                            'type' => 'FIELD_PRIORITY',
                        ],
                        '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',
                    'options' => [
                        'dedupeRecords' => 1,
                        'dedupeStrategy' => [
                            'type' => 'FIELD_PRIORITY',
                            'fieldPriority' => [
                                'fields' => [
                                    [
                                        'name' => 'eff_start_date',
                                        'sortOrder' => 'DESC',
                                    ],
                                ],
                            ],
                        ],
                        'loadType' => 'REPLACE',
                    ],
                ],
                'targetType' => 'DATASET',
            ],
            'transformation' => [
                'sqlTransformation' => [
                    'query' => 'SELECT S1.id AS id, S1.poc_org_unit_description AS description, S1.company_id AS company_id, S1.tpartner_type AS tpartner_type, S1.geo_id AS geo_id, S1.eff_start_date AS eff_start_date, S1.eff_end_date AS eff_end_date FROM testSourceName1 AS S1 LEFT JOIN testSourceName2 as S2 ON S1.id=S2.id',
                ],
                'transformationType' => 'SQL',
            ],
        ],
    ],
]

ListDataLakeDatasets

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

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

Parameter Syntax

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

Parameter Details

Members
instanceId
Required: Yes
Type: string

The Amazon Web Services Supply Chain instance identifier.

maxResults
Type: int

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

namespace
Required: Yes
Type: string

The namespace of the dataset, besides the custom defined namespace, every instance comes with below pre-defined namespaces:

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>',
            'partitionSpec' => [
                'fields' => [
                    [
                        'name' => '<string>',
                        'transform' => [
                            'type' => 'YEAR|MONTH|DAY|HOUR|IDENTITY',
                        ],
                    ],
                    // ...
                ],
            ],
            'schema' => [
                'fields' => [
                    [
                        'isRequired' => true || false,
                        'name' => '<string>',
                        'type' => 'INT|DOUBLE|STRING|TIMESTAMP|LONG',
                    ],
                    // ...
                ],
                'name' => '<string>',
                'primaryKeys' => [
                    [
                        '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',
            'partitionSpec' => [
                'fields' => [
                    [
                        'name' => 'creation_time',
                        'transform' => [
                            'type' => 'DAY',
                        ],
                    ],
                    [
                        'name' => 'description',
                        'transform' => [
                            'type' => 'IDENTITY',
                        ],
                    ],
                ],
            ],
            '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' => 'quantity',
                        'type' => 'LONG',
                        'isRequired' => ,
                    ],
                ],
                'primaryKeys' => [
                    [
                        'name' => 'id',
                    ],
                ],
            ],
        ],
        [
            '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',
]

ListDataLakeNamespaces

$result = $client->listDataLakeNamespaces([/* ... */]);
$promise = $client->listDataLakeNamespacesAsync([/* ... */]);

Enables you to programmatically view the list of Amazon Web Services Supply Chain data lake namespaces. Developers can view the namespaces and the corresponding information such as description for a given instance ID. Note that this API only return custom namespaces, instance pre-defined namespaces are not included.

Parameter Syntax

$result = $client->listDataLakeNamespaces([
    '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

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

nextToken
Type: string

The pagination token to fetch next page of namespaces.

Result Syntax

[
    'namespaces' => [
        [
            'arn' => '<string>',
            'createdTime' => <DateTime>,
            'description' => '<string>',
            'instanceId' => '<string>',
            'lastModifiedTime' => <DateTime>,
            'name' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
namespaces
Required: Yes
Type: Array of DataLakeNamespace structures

The list of fetched namespace details. Noted it only contains custom namespaces, pre-defined namespaces are not included.

nextToken
Type: string

The pagination token to fetch next page of namespaces.

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: List AWS Supply Chain namespaces
$result = $client->listDataLakeNamespaces([
    'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
]);

Result syntax:

[
    'namespaces' => [
        [
            'name' => 'custom_namespace',
            'arn' => 'arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/custom_namespace',
            'createdTime' => ,
            'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
            'lastModifiedTime' => ,
        ],
        [
            'name' => 'my_namespace',
            'arn' => 'arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/my_namespace',
            'createdTime' => ,
            'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
            'lastModifiedTime' => ,
        ],
    ],
]
Example 2: List AWS Supply Chain namespaces using pagination
$result = $client->listDataLakeNamespaces([
    'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
    'maxResults' => 1,
    'nextToken' => 'next_token_returned_from_previous_list_request',
]);

Result syntax:

[
    'namespaces' => [
        [
            'name' => 'my_namespace',
            'arn' => 'arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/my_namespace',
            'createdTime' => ,
            'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
            'lastModifiedTime' => ,
        ],
    ],
    'nextToken' => 'next_token_for_next_list_request',
]

ListInstances

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

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

Parameter Syntax

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

Parameter Details

Members
instanceNameFilter
Type: Array of strings

The filter to ListInstances based on their names.

instanceStateFilter
Type: Array of strings

The filter to ListInstances based on their state.

maxResults
Type: int

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

nextToken
Type: string

The pagination token to fetch the next page of instances.

Result Syntax

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

Result Details

Members
instances
Required: Yes
Type: Array of Instance structures

The list of instances resource data details.

nextToken
Type: string

The pagination token to fetch the next page of instances.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ThrottlingException:

Request was denied due to request throttling.

ResourceNotFoundException:

Request references a resource which does not exist.

AccessDeniedException:

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

ValidationException:

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

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

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

Result syntax:

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

Result syntax:

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

Result syntax:

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

Result syntax:

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

ListTagsForResource

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

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

Parameter Syntax

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

Parameter Details

Members
resourceArn
Required: Yes
Type: string

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

Result Syntax

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

Result Details

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

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

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ResourceNotFoundException:

Request references a resource which does not exist.

ThrottlingException:

Request was denied due to request throttling.

AccessDeniedException:

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

ValidationException:

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

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

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

Result syntax:

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

SendDataIntegrationEvent

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

Send the 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.

Parameter Syntax

$result = $client->sendDataIntegrationEvent([
    'clientToken' => '<string>',
    'data' => '<string>', // REQUIRED
    'datasetTarget' => [
        'datasetIdentifier' => '<string>', // REQUIRED
        'operationType' => 'APPEND|UPSERT|DELETE', // 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|scn.data.dataset', // REQUIRED
    'instanceId' => '<string>', // REQUIRED
]);

Parameter Details

Members
clientToken
Type: string

The idempotent client token. The token is active for 8 hours, and within its lifetime, it ensures the request completes only once upon retry with same client token. If omitted, the AWS SDK generates a unique value so that AWS SDK can safely retry the request upon network errors.

data
Required: Yes
Type: string

The data payload of the event, should follow the data schema of the target dataset, or see Data entities supported in AWS Supply Chain. To send single data record, use JsonObject format; to send multiple data records, use JsonArray format.

Note that for AWS Supply Chain dataset under asc namespace, it has a connection_id internal field that is not allowed to be provided by client directly, they will be auto populated.

datasetTarget

The target dataset configuration for scn.data.dataset event type.

eventGroupId
Required: Yes
Type: string

Event identifier (for example, orderId for InboundOrder) used for data sharding or partitioning. Noted under one eventGroupId of same eventType and instanceId, events are processed sequentially in the order they are received by the server.

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

The timestamp (in epoch seconds) associated with the event. If not provided, it will be assigned with current timestamp.

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',
]
Example 16: Successful SendDataIntegrationEvent for dataset event type
$result = $client->sendDataIntegrationEvent([
    'data' => '{"dataset_id": "datset-id-test-123" }',
    'datasetTarget' => [
        'datasetIdentifier' => 'arn:aws:scn:us-west-2:135808960812:instance/8928ae12-15e5-4441-825d-ec2184f0a43a/namespaces/asc/datasets/product',
        'operationType' => 'APPEND',
    ],
    'eventGroupId' => 'datasetId',
    'eventTimestamp' => ,
    'eventType' => 'scn.data.dataset',
    'instanceId' => '8928ae12-15e5-4441-825d-ec2184f0a43a',
]);

Result syntax:

[
    'eventId' => '19739c8e-cd2e-4cbc-a2f7-0dc43239f042',
]

TagResource

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

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

Parameter Syntax

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

Parameter Details

Members
resourceArn
Required: Yes
Type: string

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

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

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

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ResourceNotFoundException:

Request references a resource which does not exist.

ThrottlingException:

Request was denied due to request throttling.

AccessDeniedException:

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

ValidationException:

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

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

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

Result syntax:

[
]

UntagResource

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

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

Parameter Syntax

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

Parameter Details

Members
resourceArn
Required: Yes
Type: string

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

tagKeys
Required: Yes
Type: Array of strings

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

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ResourceNotFoundException:

Request references a resource which does not exist.

ThrottlingException:

Request was denied due to request throttling.

AccessDeniedException:

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

ValidationException:

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

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

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

Result syntax:

[
]

UpdateDataIntegrationFlow

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

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

Parameter Syntax

$result = $client->updateDataIntegrationFlow([
    'instanceId' => '<string>', // REQUIRED
    'name' => '<string>', // REQUIRED
    'sources' => [
        [
            'datasetSource' => [
                'datasetIdentifier' => '<string>', // REQUIRED
                'options' => [
                    'dedupeRecords' => true || false,
                    'dedupeStrategy' => [
                        'fieldPriority' => [
                            'fields' => [ // REQUIRED
                                [
                                    'name' => '<string>', // REQUIRED
                                    'sortOrder' => 'ASC|DESC', // REQUIRED
                                ],
                                // ...
                            ],
                        ],
                        'type' => 'FIELD_PRIORITY', // REQUIRED
                    ],
                    '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,
                'dedupeStrategy' => [
                    'fieldPriority' => [
                        'fields' => [ // REQUIRED
                            [
                                'name' => '<string>', // REQUIRED
                                'sortOrder' => 'ASC|DESC', // REQUIRED
                            ],
                            // ...
                        ],
                    ],
                    'type' => 'FIELD_PRIORITY', // REQUIRED
                ],
                '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,
                        'dedupeStrategy' => [
                            'fieldPriority' => [
                                'fields' => [
                                    [
                                        'name' => '<string>',
                                        'sortOrder' => 'ASC|DESC',
                                    ],
                                    // ...
                                ],
                            ],
                            'type' => 'FIELD_PRIORITY',
                        ],
                        '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,
                    'dedupeStrategy' => [
                        'fieldPriority' => [
                            'fields' => [
                                [
                                    'name' => '<string>',
                                    'sortOrder' => 'ASC|DESC',
                                ],
                                // ...
                            ],
                        ],
                        'type' => 'FIELD_PRIORITY',
                    ],
                    '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',
            'options' => [
                'dedupeRecords' => 1,
                'dedupeStrategy' => [
                    'type' => 'FIELD_PRIORITY',
                    'fieldPriority' => [
                        'fields' => [
                            [
                                'name' => 'eff_start_date',
                                'sortOrder' => 'ASC',
                            ],
                        ],
                    ],
                ],
                'loadType' => 'REPLACE',
            ],
        ],
        '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',
                'options' => [
                    'dedupeRecords' => 1,
                    'dedupeStrategy' => [
                        'type' => 'FIELD_PRIORITY',
                        'fieldPriority' => [
                            'fields' => [
                                [
                                    'name' => 'eff_start_date',
                                    'sortOrder' => 'ASC',
                                ],
                            ],
                        ],
                    ],
                    'loadType' => 'REPLACE',
                ],
            ],
            'targetType' => 'DATASET',
        ],
        'transformation' => [
            'sqlTransformation' => [
                'query' => 'SELECT S1.id AS id, S1.poc_org_unit_description AS description, S1.company_id AS company_id, S1.tpartner_type AS tpartner_type, S1.geo_id AS geo_id, S1.eff_start_date AS eff_start_date, S1.eff_end_date AS eff_end_date FROM testSourceName1 AS S1 LEFT JOIN testSourceName2 as S2 ON S1.id=S2.id',
            ],
            'transformationType' => 'SQL',
        ],
    ],
]

UpdateDataLakeDataset

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

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

Parameter Syntax

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

Parameter Details

Members
description
Type: string

The updated description of the data lake dataset.

instanceId
Required: Yes
Type: string

The Amazon Web Services Chain instance identifier.

name
Required: Yes
Type: string

The name of the dataset. For asc namespace, 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 namespace of the dataset, besides the custom defined namespace, every instance comes with below pre-defined namespaces:

Result Syntax

[
    'dataset' => [
        'arn' => '<string>',
        'createdTime' => <DateTime>,
        'description' => '<string>',
        'instanceId' => '<string>',
        'lastModifiedTime' => <DateTime>,
        'name' => '<string>',
        'namespace' => '<string>',
        'partitionSpec' => [
            'fields' => [
                [
                    'name' => '<string>',
                    'transform' => [
                        'type' => 'YEAR|MONTH|DAY|HOUR|IDENTITY',
                    ],
                ],
                // ...
            ],
        ],
        'schema' => [
            'fields' => [
                [
                    'isRequired' => true || false,
                    'name' => '<string>',
                    'type' => 'INT|DOUBLE|STRING|TIMESTAMP|LONG',
                ],
                // ...
            ],
            'name' => '<string>',
            'primaryKeys' => [
                [
                    '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',
        'partitionSpec' => [
            'fields' => [
                [
                    'name' => 'creation_time',
                    'transform' => [
                        'type' => 'DAY',
                    ],
                ],
                [
                    'name' => 'description',
                    'transform' => [
                        'type' => 'IDENTITY',
                    ],
                ],
            ],
        ],
        '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' => 'quantity',
                    'type' => 'LONG',
                    'isRequired' => ,
                ],
            ],
            'primaryKeys' => [
                [
                    'name' => 'id',
                ],
            ],
        ],
    ],
]

UpdateDataLakeNamespace

$result = $client->updateDataLakeNamespace([/* ... */]);
$promise = $client->updateDataLakeNamespaceAsync([/* ... */]);

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

Parameter Syntax

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

Parameter Details

Members
description
Type: string

The updated description of the data lake namespace.

instanceId
Required: Yes
Type: string

The Amazon Web Services Chain instance identifier.

name
Required: Yes
Type: string

The name of the namespace. Noted you cannot update namespace with name starting with asc, default, scn, aws, amazon, amzn

Result Syntax

[
    'namespace' => [
        'arn' => '<string>',
        'createdTime' => <DateTime>,
        'description' => '<string>',
        'instanceId' => '<string>',
        'lastModifiedTime' => <DateTime>,
        'name' => '<string>',
    ],
]

Result Details

Members
namespace
Required: Yes
Type: DataLakeNamespace structure

The updated namespace 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 namespace
$result = $client->updateDataLakeNamespace([
    'name' => 'my_namespace',
    'description' => 'This is an updated AWS Supply Chain namespace',
    'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
]);

Result syntax:

[
    'namespace' => [
        'name' => 'my_namespace',
        'arn' => 'arn:aws:scn:us-east-1:012345678910:instance/1877dd20-dee9-4639-8e99-cb67acf21fe5/namespaces/my_namespace',
        'createdTime' => ,
        'description' => 'This is an updated AWS Supply Chain namespace',
        'instanceId' => '1877dd20-dee9-4639-8e99-cb67acf21fe5',
        'lastModifiedTime' => ,
    ],
]

UpdateInstance

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

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

Parameter Syntax

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

Parameter Details

Members
instanceDescription
Type: string

The AWS Supply Chain instance description.

instanceId
Required: Yes
Type: string

The AWS Supply Chain instance identifier.

instanceName
Type: string

The AWS Supply Chain instance name.

Result Syntax

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

Result Details

Members
instance
Required: Yes
Type: Instance structure

The instance resource data details.

Errors

ServiceQuotaExceededException:

Request would cause a service quota to be exceeded.

ResourceNotFoundException:

Request references a resource which does not exist.

ThrottlingException:

Request was denied due to request throttling.

AccessDeniedException:

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

ValidationException:

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

InternalServerException:

Unexpected error during processing of request.

ConflictException:

Updating or deleting a resource can cause an inconsistent state.

Examples

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

Result syntax:

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

Shapes

AccessDeniedException

Description

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

Members
message
Type: string

BillOfMaterialsImportJob

Description

The BillOfMaterialsImportJob details.

Members
instanceId
Required: Yes
Type: string

The BillOfMaterialsImportJob instanceId.

jobId
Required: Yes
Type: string

The BillOfMaterialsImportJob jobId.

message
Type: string

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

s3uri
Required: Yes
Type: string

The S3 URI from which the CSV is read.

status
Required: Yes
Type: string

The BillOfMaterialsImportJob ConfigurationJobStatus.

ConflictException

Description

Updating or deleting a resource can cause an inconsistent state.

Members
message
Type: string

DataIntegrationEvent

Description

The data integration event details.

Members
datasetTargetDetails

The target dataset details for a DATASET event type.

eventGroupId
Required: Yes
Type: string

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

eventId
Required: Yes
Type: string

The unique event identifier.

eventTimestamp
Required: Yes
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.

DataIntegrationEventDatasetLoadExecutionDetails

Description

The target dataset load execution details.

Members
message
Type: string

The failure message (if any) of failed event load execution to dataset.

status
Required: Yes
Type: string

The event load execution status to target dataset.

DataIntegrationEventDatasetTargetConfiguration

Description

The target dataset configuration for a DATASET event type.

Members
datasetIdentifier
Required: Yes
Type: string

The datalake dataset ARN identifier.

operationType
Required: Yes
Type: string

The target dataset load operation type.

DataIntegrationEventDatasetTargetDetails

Description

The target dataset details for a DATASET event type.

Members
datasetIdentifier
Required: Yes
Type: string

The datalake dataset ARN identifier.

datasetLoadExecution
Required: Yes
Type: DataIntegrationEventDatasetLoadExecutionDetails structure

The target dataset load execution.

operationType
Required: Yes
Type: string

The target dataset load operation type. The available options are:

  • APPEND - Add new records to the dataset. Noted that this operation type will just try to append records as-is without any primary key or partition constraints.

  • UPSERT - Modify existing records in the dataset with primary key configured, events for datasets without primary keys are not allowed. If event data contains primary keys that match records in the dataset within same partition, then those existing records (in that partition) will be updated. If primary keys do not match, new records will be added. Note that if dataset contain records with duplicate primary key values in the same partition, those duplicate records will be deduped into one updated record.

  • DELETE - Remove existing records in the dataset with primary key configured, events for datasets without primary keys are not allowed. If event data contains primary keys that match records in the dataset within same partition, then those existing records (in that partition) will be deleted. If primary keys do not match, no actions will be done. Note that if dataset contain records with duplicate primary key values in the same partition, all those duplicates will be removed.

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 option to perform deduplication on data records sharing same primary key values. If disabled, transformed data with duplicate primary key values will ingest into dataset, for datasets within asc namespace, such duplicates will cause ingestion fail. If enabled without dedupeStrategy, deduplication is done by retaining a random data record among those sharing the same primary key values. If enabled with dedupeStragtegy, the deduplication is done following the strategy.

Note that target dataset may have partition configured, when dedupe is enabled, it only dedupe against primary keys and retain only one record out of those duplicates regardless of its partition status.

dedupeStrategy

The deduplication strategy to dedupe the data records sharing same primary key values of the target dataset. This strategy only applies to target dataset with primary keys and with dedupeRecords option enabled. If transformed data still got duplicates after the dedupeStrategy evaluation, a random data record is chosen to be retained.

loadType
Type: string

The target dataset's data load type. This only affects how source S3 files are selected in the S3-to-dataset flow.

  • REPLACE - Target dataset will get replaced with the new file added under the source s3 prefix.

  • INCREMENTAL - Target dataset will get updated with the up-to-date content under S3 prefix incorporating any file additions or removals there.

DataIntegrationFlowDatasetSource

Description

The details of a flow execution with dataset source.

Members
datasetIdentifier
Required: Yes
Type: string

The ARN of the dataset source.

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.

DataIntegrationFlowDedupeStrategy

Description

The deduplication strategy details.

Members
fieldPriority

The field priority deduplication strategy.

type
Required: Yes
Type: string

The type of the deduplication strategy.

  • FIELD_PRIORITY - Field priority configuration for the deduplication strategy specifies an ordered list of fields used to tie-break the data records sharing the same primary key values. Fields earlier in the list have higher priority for evaluation. For each field, the sort order determines whether to retain data record with larger or smaller field value.

DataIntegrationFlowExecution

Description

The flow execution details.

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

The flow execution end timestamp.

executionId
Required: Yes
Type: string

The flow executionId.

flowName
Required: Yes
Type: string

The flow execution's flowName.

instanceId
Required: Yes
Type: string

The flow execution's instanceId.

message
Type: string

The failure message (if any) of failed flow execution.

outputMetadata

The flow execution output metadata.

sourceInfo

The source information for a flow execution.

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

The flow execution start timestamp.

status
Type: string

The status of flow execution.

DataIntegrationFlowExecutionOutputMetadata

Description

The output metadata of the flow execution.

Members
diagnosticReportsRootS3URI
Type: string

The S3 URI under which all diagnostic files (such as deduped records if any) are stored.

DataIntegrationFlowExecutionSourceInfo

Description

The source information of a flow execution.

Members
datasetSource

The source details of a flow execution with dataset source.

s3Source
Type: DataIntegrationFlowS3Source structure

The source details of a flow execution with S3 source.

sourceType
Required: Yes
Type: string

The data integration flow execution source type.

DataIntegrationFlowFieldPriorityDedupeField

Description

The field used in the field priority deduplication strategy.

Members
name
Required: Yes
Type: string

The name of the deduplication field. Must exist in the dataset and not be a primary key.

sortOrder
Required: Yes
Type: string

The sort order for the deduplication field.

DataIntegrationFlowFieldPriorityDedupeStrategyConfiguration

Description

The field priority deduplication strategy details.

Members
fields
Required: Yes
Type: Array of DataIntegrationFlowFieldPriorityDedupeField structures

The list of field names and their sort order for deduplication, arranged in descending priority from highest to lowest.

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.

DataIntegrationFlowS3Source

Description

The details of a flow execution with S3 source.

Members
bucketName
Required: Yes
Type: string

The S3 bucket name of the S3 source.

key
Required: Yes
Type: string

The S3 object key of the S3 source.

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. To trigger data ingestion, S3 files need to be put under s3://bucketName/prefix/.

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.

DataIntegrationFlowTarget

Description

The DataIntegrationFlow target parameters.

Members
datasetTarget

The dataset DataIntegrationFlow target. Note that for AWS Supply Chain dataset under asc namespace, it has a connection_id internal field that is not allowed to be provided by client directly, they will be auto populated.

s3Target

The S3 DataIntegrationFlow target.

targetType
Required: Yes
Type: string

The DataIntegrationFlow target 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 namespace, 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 namespace of the dataset, besides the custom defined namespace, every instance comes with below pre-defined namespaces:

partitionSpec

The partition specification for a dataset.

schema
Required: Yes
Type: DataLakeDatasetSchema structure

The schema of the dataset.

DataLakeDatasetPartitionField

Description

The detail of the partition field.

Members
name
Required: Yes
Type: string

The name of the partition field.

transform
Required: Yes
Type: DataLakeDatasetPartitionFieldTransform structure

The transformation of the partition field. A transformation specifies how to partition on a given field. For example, with timestamp you can specify that you'd like to partition fields by day, e.g. data record with value 2025-01-03T00:00:00Z in partition field is in 2025-01-03 partition. Also noted that data record without any value in optional partition field is in NULL partition.

DataLakeDatasetPartitionFieldTransform

Description

The detail of the partition field transformation.

Members
type
Required: Yes
Type: string

The type of partitioning transformation for this field. The available options are:

  • IDENTITY - Partitions data on a given field by its exact values.

  • YEAR - Partitions data on a timestamp field using year granularity.

  • MONTH - Partitions data on a timestamp field using month granularity.

  • DAY - Partitions data on a timestamp field using day granularity.

  • HOUR - Partitions data on a timestamp field using hour granularity.

DataLakeDatasetPartitionSpec

Description

The partition specification for a dataset.

Members
fields
Required: Yes
Type: Array of DataLakeDatasetPartitionField structures

The fields on which to partition a dataset. The partitions will be applied hierarchically based on the order of this list.

DataLakeDatasetPrimaryKeyField

Description

The detail of the primary key field.

Members
name
Required: Yes
Type: string

The name of the primary key field.

DataLakeDatasetSchema

Description

The schema details of the dataset. Note that for AWS Supply Chain dataset under asc namespace, it may have internal fields like connection_id that will be auto populated by data ingestion methods.

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.

primaryKeys
Type: Array of DataLakeDatasetPrimaryKeyField structures

The list of primary key fields for the dataset. Primary keys defined can help data ingestion methods to ensure data uniqueness: CreateDataIntegrationFlow's dedupe strategy will leverage primary keys to perform records deduplication before write to dataset; SendDataIntegrationEvent's UPSERT and DELETE can only work with dataset with primary keys. For more details, refer to those data ingestion documentations.

Note that defining primary keys does not necessarily mean the dataset cannot have duplicate records, duplicate records can still be ingested if CreateDataIntegrationFlow's dedupe disabled or through SendDataIntegrationEvent's APPEND operation.

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.

DataLakeNamespace

Description

The data lake namespace details.

Members
arn
Required: Yes
Type: string

The arn of the namespace.

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

The creation time of the namespace.

description
Type: string

The description of the namespace.

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

name
Required: Yes
Type: string

The name of the namespace.

Instance

Description

The details of the instance.

Members
awsAccountId
Required: Yes
Type: string

The Amazon Web Services account ID that owns the instance.

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

The instance creation timestamp.

errorMessage
Type: string

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

instanceDescription
Type: string

The Amazon Web Services Supply Chain instance description.

instanceId
Required: Yes
Type: string

The Amazon Web Services Supply Chain instance identifier.

instanceName
Type: string

The Amazon Web Services Supply Chain instance name.

kmsKeyArn
Type: string

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

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

The instance last modified timestamp.

state
Required: Yes
Type: string

The state of the instance.

versionNumber
Type: double

The version number of the instance.

webAppDnsDomain
Type: string

The WebApp DNS domain name of the instance.

InternalServerException

Description

Unexpected error during processing of request.

Members
message
Type: string

ResourceNotFoundException

Description

Request references a resource which does not exist.

Members
message
Type: string

ServiceQuotaExceededException

Description

Request would cause a service quota to be exceeded.

Members
message
Type: string

ThrottlingException

Description

Request was denied due to request throttling.

Members
message
Type: string

ValidationException

Description

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

Members
message
Type: string