Table of Contents
Macie.
Client
¶A low-level client representing Amazon Macie
Amazon Macie Classic has been discontinued and is no longer available.
A new Amazon Macie is now available with significant design improvements and additional features, at a lower price and in most Amazon Web Services Regions. We encourage you to take advantage of the new and improved features, and benefit from the reduced cost. To learn about features and pricing for the new Macie, see Amazon Macie. To learn how to use the new Macie, see the Amazon Macie User Guide.
import boto3
client = boto3.client('macie')
These are the available methods:
associate_member_account()
associate_s3_resources()
can_paginate()
close()
disassociate_member_account()
disassociate_s3_resources()
get_paginator()
get_waiter()
list_member_accounts()
list_s3_resources()
update_s3_resources()
associate_member_account
(**kwargs)¶(Discontinued) Associates a specified Amazon Web Services account with Amazon Macie Classic as a member account.
See also: AWS API Documentation
Request Syntax
response = client.associate_member_account(
memberAccountId='string'
)
[REQUIRED]
(Discontinued) The ID of the Amazon Web Services account that you want to associate with Amazon Macie Classic as a member account.
Exceptions
Macie.Client.exceptions.InvalidInputException
Macie.Client.exceptions.LimitExceededException
Macie.Client.exceptions.InternalException
associate_s3_resources
(**kwargs)¶(Discontinued) 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.
See also: AWS API Documentation
Request Syntax
response = client.associate_s3_resources(
memberAccountId='string',
s3Resources=[
{
'bucketName': 'string',
'prefix': 'string',
'classificationType': {
'oneTime': 'FULL'|'NONE',
'continuous': 'FULL'
}
},
]
)
[REQUIRED]
(Discontinued) The S3 resources that you want to associate with Amazon Macie Classic for monitoring and data classification.
(Discontinued) The S3 resources that you want to associate with Amazon Macie Classic for monitoring and data classification. This data type is used as a request parameter in the AssociateS3Resources
action and a response parameter in the ListS3Resources
action.
(Discontinued) The name of the S3 bucket that you want to associate with Amazon Macie Classic.
(Discontinued) The prefix of the S3 bucket that you want to associate with Amazon Macie Classic.
(Discontinued) The classification type that you want to specify for the resource associated with Amazon Macie Classic.
(Discontinued) A one-time classification of all of the existing objects in a specified S3 bucket.
(Discontinued) A continuous classification of the objects that are added to a specified S3 bucket. Amazon Macie Classic begins performing continuous classification after a bucket is successfully associated with Macie Classic.
dict
Response Syntax
{
'failedS3Resources': [
{
'failedItem': {
'bucketName': 'string',
'prefix': 'string'
},
'errorCode': 'string',
'errorMessage': 'string'
},
]
}
Response Structure
(dict) --
failedS3Resources (list) --
(Discontinued) S3 resources that couldn't be associated with Amazon Macie Classic. An error code and an error message are provided for each failed item.
(dict) --
(Discontinued) Includes details about the failed S3 resources.
failedItem (dict) --
(Discontinued) The failed S3 resources.
bucketName (string) --
(Discontinued) The name of the S3 bucket.
prefix (string) --
(Discontinued) The prefix of the S3 bucket.
errorCode (string) --
(Discontinued) The status code of a failed item.
errorMessage (string) --
(Discontinued) The error message of a failed item.
Exceptions
Macie.Client.exceptions.InvalidInputException
Macie.Client.exceptions.AccessDeniedException
Macie.Client.exceptions.LimitExceededException
Macie.Client.exceptions.InternalException
can_paginate
(operation_name)¶Check if an operation can be paginated.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.True
if the operation can be paginated,
False
otherwise.close
()¶Closes underlying endpoint connections.
disassociate_member_account
(**kwargs)¶(Discontinued) Removes the specified member account from Amazon Macie Classic.
See also: AWS API Documentation
Request Syntax
response = client.disassociate_member_account(
memberAccountId='string'
)
[REQUIRED]
(Discontinued) The ID of the member account that you want to remove from Amazon Macie Classic.
Exceptions
Macie.Client.exceptions.InvalidInputException
Macie.Client.exceptions.InternalException
disassociate_s3_resources
(**kwargs)¶(Discontinued) Removes specified S3 resources from being monitored by Amazon Macie Classic. If memberAccountId
isn't specified, the action removes specified S3 resources from Macie Classic for the current Macie Classic administrator account. If memberAccountId
is specified, the action removes specified S3 resources from Macie Classic for the specified member account.
See also: AWS API Documentation
Request Syntax
response = client.disassociate_s3_resources(
memberAccountId='string',
associatedS3Resources=[
{
'bucketName': 'string',
'prefix': 'string'
},
]
)
[REQUIRED]
(Discontinued) The S3 resources (buckets or prefixes) that you want to remove from being monitored and classified by Amazon Macie Classic.
(Discontinued) Contains information about the S3 resource. This data type is used as a request parameter in the DisassociateS3Resources
action and can be used as a response parameter in the AssociateS3Resources
and UpdateS3Resources
actions.
(Discontinued) The name of the S3 bucket.
(Discontinued) The prefix of the S3 bucket.
dict
Response Syntax
{
'failedS3Resources': [
{
'failedItem': {
'bucketName': 'string',
'prefix': 'string'
},
'errorCode': 'string',
'errorMessage': 'string'
},
]
}
Response Structure
(dict) --
failedS3Resources (list) --
(Discontinued) S3 resources that couldn't be removed from being monitored and classified by Amazon Macie Classic. An error code and an error message are provided for each failed item.
(dict) --
(Discontinued) Includes details about the failed S3 resources.
failedItem (dict) --
(Discontinued) The failed S3 resources.
bucketName (string) --
(Discontinued) The name of the S3 bucket.
prefix (string) --
(Discontinued) The prefix of the S3 bucket.
errorCode (string) --
(Discontinued) The status code of a failed item.
errorMessage (string) --
(Discontinued) The error message of a failed item.
Exceptions
Macie.Client.exceptions.InvalidInputException
Macie.Client.exceptions.AccessDeniedException
Macie.Client.exceptions.InternalException
get_paginator
(operation_name)¶Create a paginator for an operation.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.client.can_paginate
method to
check if an operation is pageable.get_waiter
(waiter_name)¶Returns an object that can wait for some condition.
list_member_accounts
(**kwargs)¶(Discontinued) Lists all Amazon Macie Classic member accounts for the current Macie Classic administrator account.
See also: AWS API Documentation
Request Syntax
response = client.list_member_accounts(
nextToken='string',
maxResults=123
)
ListMemberAccounts
action. Subsequent calls to the action fill nextToken
in the request with the value of nextToken
from the previous response to continue listing data.dict
Response Syntax
{
'memberAccounts': [
{
'accountId': 'string'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
memberAccounts (list) --
(Discontinued) A list of the Amazon Macie Classic member accounts returned by the action. The current Macie Classic administrator account is also included in this list.
(dict) --
(Discontinued) Contains information about the Amazon Macie Classic member account.
accountId (string) --
(Discontinued) The Amazon Web Services account ID of the Amazon Macie Classic member account.
nextToken (string) --
(Discontinued) When a response is generated, if there is more data to be listed, this parameter is present in the response and contains the value to use for the nextToken
parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.
Exceptions
Macie.Client.exceptions.InternalException
Macie.Client.exceptions.InvalidInputException
list_s3_resources
(**kwargs)¶(Discontinued) Lists all the S3 resources associated with Amazon Macie Classic. If memberAccountId
isn't specified, the action lists the S3 resources associated with Macie Classic for the current Macie Classic administrator account. If memberAccountId
is specified, the action lists the S3 resources associated with Macie Classic for the specified member account.
See also: AWS API Documentation
Request Syntax
response = client.list_s3_resources(
memberAccountId='string',
nextToken='string',
maxResults=123
)
ListS3Resources
action. Subsequent calls to the action fill nextToken
in the request with the value of nextToken
from the previous response to continue listing data.dict
Response Syntax
{
's3Resources': [
{
'bucketName': 'string',
'prefix': 'string',
'classificationType': {
'oneTime': 'FULL'|'NONE',
'continuous': 'FULL'
}
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
s3Resources (list) --
(Discontinued) A list of the associated S3 resources returned by the action.
(dict) --
(Discontinued) The S3 resources that you want to associate with Amazon Macie Classic for monitoring and data classification. This data type is used as a request parameter in the AssociateS3Resources
action and a response parameter in the ListS3Resources
action.
bucketName (string) --
(Discontinued) The name of the S3 bucket that you want to associate with Amazon Macie Classic.
prefix (string) --
(Discontinued) The prefix of the S3 bucket that you want to associate with Amazon Macie Classic.
classificationType (dict) --
(Discontinued) The classification type that you want to specify for the resource associated with Amazon Macie Classic.
oneTime (string) --
(Discontinued) A one-time classification of all of the existing objects in a specified S3 bucket.
continuous (string) --
(Discontinued) A continuous classification of the objects that are added to a specified S3 bucket. Amazon Macie Classic begins performing continuous classification after a bucket is successfully associated with Macie Classic.
nextToken (string) --
(Discontinued) When a response is generated, if there is more data to be listed, this parameter is present in the response and contains the value to use for the nextToken
parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.
Exceptions
Macie.Client.exceptions.InvalidInputException
Macie.Client.exceptions.AccessDeniedException
Macie.Client.exceptions.InternalException
update_s3_resources
(**kwargs)¶(Discontinued) Updates the classification types for the specified S3 resources. If memberAccountId
isn't specified, the action updates the classification types of the S3 resources associated with Amazon Macie Classic for the current Macie Classic administrator account. If memberAccountId
is specified, the action updates the classification types of the S3 resources associated with Macie Classic for the specified member account.
See also: AWS API Documentation
Request Syntax
response = client.update_s3_resources(
memberAccountId='string',
s3ResourcesUpdate=[
{
'bucketName': 'string',
'prefix': 'string',
'classificationTypeUpdate': {
'oneTime': 'FULL'|'NONE',
'continuous': 'FULL'
}
},
]
)
[REQUIRED]
(Discontinued) The S3 resources whose classification types you want to update.
(Discontinued) The S3 resources whose classification types you want to update. This data type is used as a request parameter in the UpdateS3Resources
action.
(Discontinued) The name of the S3 bucket whose classification types you want to update.
(Discontinued) The prefix of the S3 bucket whose classification types you want to update.
(Discontinued) The classification type that you want to update for the resource associated with Amazon Macie Classic.
(Discontinued) A one-time classification of all of the existing objects in a specified S3 bucket.
(Discontinued) A continuous classification of the objects that are added to a specified S3 bucket. Amazon Macie Classic begins performing continuous classification after a bucket is successfully associated with Macie Classic.
dict
Response Syntax
{
'failedS3Resources': [
{
'failedItem': {
'bucketName': 'string',
'prefix': 'string'
},
'errorCode': 'string',
'errorMessage': 'string'
},
]
}
Response Structure
(dict) --
failedS3Resources (list) --
(Discontinued) The S3 resources whose classification types can't be updated. An error code and an error message are provided for each failed item.
(dict) --
(Discontinued) Includes details about the failed S3 resources.
failedItem (dict) --
(Discontinued) The failed S3 resources.
bucketName (string) --
(Discontinued) The name of the S3 bucket.
prefix (string) --
(Discontinued) The prefix of the S3 bucket.
errorCode (string) --
(Discontinued) The status code of a failed item.
errorMessage (string) --
(Discontinued) The error message of a failed item.
Exceptions
Macie.Client.exceptions.InvalidInputException
Macie.Client.exceptions.AccessDeniedException
Macie.Client.exceptions.InternalException
The available paginators are:
Macie.Paginator.
ListMemberAccounts
¶paginator = client.get_paginator('list_member_accounts')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from Macie.Client.list_member_accounts()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
{
'memberAccounts': [
{
'accountId': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(Discontinued) A list of the Amazon Macie Classic member accounts returned by the action. The current Macie Classic administrator account is also included in this list.
(Discontinued) Contains information about the Amazon Macie Classic member account.
(Discontinued) The Amazon Web Services account ID of the Amazon Macie Classic member account.
A token to resume pagination.
Macie.Paginator.
ListS3Resources
¶paginator = client.get_paginator('list_s3_resources')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from Macie.Client.list_s3_resources()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
memberAccountId='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
dict
Response Syntax
{
's3Resources': [
{
'bucketName': 'string',
'prefix': 'string',
'classificationType': {
'oneTime': 'FULL'|'NONE',
'continuous': 'FULL'
}
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
s3Resources (list) --
(Discontinued) A list of the associated S3 resources returned by the action.
(dict) --
(Discontinued) The S3 resources that you want to associate with Amazon Macie Classic for monitoring and data classification. This data type is used as a request parameter in the AssociateS3Resources
action and a response parameter in the ListS3Resources
action.
bucketName (string) --
(Discontinued) The name of the S3 bucket that you want to associate with Amazon Macie Classic.
prefix (string) --
(Discontinued) The prefix of the S3 bucket that you want to associate with Amazon Macie Classic.
classificationType (dict) --
(Discontinued) The classification type that you want to specify for the resource associated with Amazon Macie Classic.
oneTime (string) --
(Discontinued) A one-time classification of all of the existing objects in a specified S3 bucket.
continuous (string) --
(Discontinued) A continuous classification of the objects that are added to a specified S3 bucket. Amazon Macie Classic begins performing continuous classification after a bucket is successfully associated with Macie Classic.
NextToken (string) --
A token to resume pagination.