- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
AssociateInstanceStorageConfigCommand
This API is in preview release for Amazon Connect and is subject to change.
Associates a storage resource type for the first time. You can only associate one type of storage configuration in a single call. This means, for example, that you can't define an instance with multiple S3 buckets for storing chat transcripts.
This API does not create a resource that doesn't exist. It only associates it to the instance. Ensure that the resource being specified in the storage configuration, like an S3 bucket, exists when being used for association.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ConnectClient, AssociateInstanceStorageConfigCommand } from "@aws-sdk/client-connect"; // ES Modules import
// const { ConnectClient, AssociateInstanceStorageConfigCommand } = require("@aws-sdk/client-connect"); // CommonJS import
const client = new ConnectClient(config);
const input = { // AssociateInstanceStorageConfigRequest
InstanceId: "STRING_VALUE", // required
ResourceType: "CHAT_TRANSCRIPTS" || "CALL_RECORDINGS" || "SCHEDULED_REPORTS" || "MEDIA_STREAMS" || "CONTACT_TRACE_RECORDS" || "AGENT_EVENTS" || "REAL_TIME_CONTACT_ANALYSIS_SEGMENTS" || "ATTACHMENTS" || "CONTACT_EVALUATIONS" || "SCREEN_RECORDINGS" || "REAL_TIME_CONTACT_ANALYSIS_CHAT_SEGMENTS" || "REAL_TIME_CONTACT_ANALYSIS_VOICE_SEGMENTS" || "EMAIL_MESSAGES", // required
StorageConfig: { // InstanceStorageConfig
AssociationId: "STRING_VALUE",
StorageType: "S3" || "KINESIS_VIDEO_STREAM" || "KINESIS_STREAM" || "KINESIS_FIREHOSE", // required
S3Config: { // S3Config
BucketName: "STRING_VALUE", // required
BucketPrefix: "STRING_VALUE", // required
EncryptionConfig: { // EncryptionConfig
EncryptionType: "KMS", // required
KeyId: "STRING_VALUE", // required
},
},
KinesisVideoStreamConfig: { // KinesisVideoStreamConfig
Prefix: "STRING_VALUE", // required
RetentionPeriodHours: Number("int"), // required
EncryptionConfig: {
EncryptionType: "KMS", // required
KeyId: "STRING_VALUE", // required
},
},
KinesisStreamConfig: { // KinesisStreamConfig
StreamArn: "STRING_VALUE", // required
},
KinesisFirehoseConfig: { // KinesisFirehoseConfig
FirehoseArn: "STRING_VALUE", // required
},
},
ClientToken: "STRING_VALUE",
};
const command = new AssociateInstanceStorageConfigCommand(input);
const response = await client.send(command);
// { // AssociateInstanceStorageConfigResponse
// AssociationId: "STRING_VALUE",
// };
AssociateInstanceStorageConfigCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
InstanceId Required | string | undefined | The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance. |
ResourceType Required | InstanceStorageResourceType | undefined | A valid resource type. To enable streaming for real-time analysis of contacts , use the following types:
If you have previously associated a stream with |
StorageConfig Required | InstanceStorageConfig | undefined | A valid storage type. |
ClientToken | string | undefined | A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs . |
AssociateInstanceStorageConfigCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
AssociationId | string | undefined | The existing association identifier that uniquely identifies the resource type and storage config for the given instance ID. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServiceException | server | Request processing failed because of an error or failure with the service. |
InvalidParameterException | client | One or more of the specified parameters are not valid. |
InvalidRequestException | client | The request is not valid. |
ResourceConflictException | client | A resource already has that name. |
ResourceNotFoundException | client | The specified resource was not found. |
ThrottlingException | client | The throttling limit has been exceeded. |
ConnectServiceException | Base exception class for all service exceptions from Connect service. |