AssociateS3Resources - Amazon Macie Classic

This is the API Reference for Amazon Macie Classic. For information about the new Amazon Macie and Amazon Macie API, see the new Amazon Macie documentation.

AssociateS3Resources

Associates specified S3 resources with Amazon Macie Classic for monitoring and data classification. If memberAccountId isn't specified, the action associates specified S3 resources with Macie Classic for the current Macie Classic administrator account. If memberAccountId is specified, the action associates specified S3 resources with Macie Classic for the specified member account.

Request Syntax

{ "memberAccountId": "string", "s3Resources": [ { "bucketName": "string", "classificationType": { "continuous": "string", "oneTime": "string" }, "prefix": "string" } ] }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

memberAccountId

The ID of the Amazon Macie Classic member account whose resources you want to associate with Macie Classic.

Type: String

Pattern: [0-9]{12}

Required: No

s3Resources

The S3 resources that you want to associate with Amazon Macie Classic for monitoring and data classification.

Type: Array of S3ResourceClassification objects

Required: Yes

Response Syntax

{ "failedS3Resources": [ { "errorCode": "string", "errorMessage": "string", "failedItem": { "bucketName": "string", "prefix": "string" } } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

failedS3Resources

S3 resources that couldn't be associated with Amazon Macie Classic. An error code and an error message are provided for each failed item.

Type: Array of FailedS3Resource objects

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

You do not have required permissions to access the requested resource.

HTTP Status Code: 400

InternalException

Internal server error.

HTTP Status Code: 500

InvalidInputException

The request was rejected because an invalid or out-of-range value was supplied for an input parameter.

HTTP Status Code: 400

LimitExceededException

The request was rejected because it attempted to create resources beyond the current AWS account limits. The error code describes the limit exceeded.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: