AWS S3 Control

2020/03/16 - AWS S3 Control - 3 new 1 updated api methods

Changes  Amazon S3 now supports Batch Operations job tagging.

DeleteJobTagging (new) Link ¶

Delete the tags on a Amazon S3 batch operations job, if any.

See also: AWS API Documentation

Request Syntax

client.delete_job_tagging(
    AccountId='string',
    JobId='string'
)
type AccountId

string

param AccountId

[REQUIRED]

The account ID for the Amazon Web Services account associated with the Amazon S3 batch operations job you want to remove tags from.

type JobId

string

param JobId

[REQUIRED]

The ID for the job whose tags you want to delete.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

GetJobTagging (new) Link ¶

Retrieve the tags on a Amazon S3 batch operations job.

See also: AWS API Documentation

Request Syntax

client.get_job_tagging(
    AccountId='string',
    JobId='string'
)
type AccountId

string

param AccountId

[REQUIRED]

The account ID for the Amazon Web Services account associated with the Amazon S3 batch operations job you want to retrieve tags for.

type JobId

string

param JobId

[REQUIRED]

The ID for the job whose tags you want to retrieve.

rtype

dict

returns

Response Syntax

{
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Tags (list) --

      The set of tags associated with the job.

      • (dict) --

        • Key (string) --

        • Value (string) --

PutJobTagging (new) Link ¶

Replace the set of tags on a Amazon S3 batch operations job.

See also: AWS API Documentation

Request Syntax

client.put_job_tagging(
    AccountId='string',
    JobId='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type AccountId

string

param AccountId

[REQUIRED]

The account ID for the Amazon Web Services account associated with the Amazon S3 batch operations job you want to replace tags on.

type JobId

string

param JobId

[REQUIRED]

The ID for the job whose tags you want to replace.

type Tags

list

param Tags

[REQUIRED]

The set of tags to associate with the job.

  • (dict) --

    • Key (string) -- [REQUIRED]

    • Value (string) -- [REQUIRED]

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

CreateJob (updated) Link ¶
Changes (request)
{'Tags': [{'Key': 'string', 'Value': 'string'}]}

Creates an Amazon S3 batch operations job.

See also: AWS API Documentation

Request Syntax

client.create_job(
    AccountId='string',
    ConfirmationRequired=True|False,
    Operation={
        'LambdaInvoke': {
            'FunctionArn': 'string'
        },
        'S3PutObjectCopy': {
            'TargetResource': 'string',
            'CannedAccessControlList': 'private'|'public-read'|'public-read-write'|'aws-exec-read'|'authenticated-read'|'bucket-owner-read'|'bucket-owner-full-control',
            'AccessControlGrants': [
                {
                    'Grantee': {
                        'TypeIdentifier': 'id'|'emailAddress'|'uri',
                        'Identifier': 'string',
                        'DisplayName': 'string'
                    },
                    'Permission': 'FULL_CONTROL'|'READ'|'WRITE'|'READ_ACP'|'WRITE_ACP'
                },
            ],
            'MetadataDirective': 'COPY'|'REPLACE',
            'ModifiedSinceConstraint': datetime(2015, 1, 1),
            'NewObjectMetadata': {
                'CacheControl': 'string',
                'ContentDisposition': 'string',
                'ContentEncoding': 'string',
                'ContentLanguage': 'string',
                'UserMetadata': {
                    'string': 'string'
                },
                'ContentLength': 123,
                'ContentMD5': 'string',
                'ContentType': 'string',
                'HttpExpiresDate': datetime(2015, 1, 1),
                'RequesterCharged': True|False,
                'SSEAlgorithm': 'AES256'|'KMS'
            },
            'NewObjectTagging': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'RedirectLocation': 'string',
            'RequesterPays': True|False,
            'StorageClass': 'STANDARD'|'STANDARD_IA'|'ONEZONE_IA'|'GLACIER'|'INTELLIGENT_TIERING'|'DEEP_ARCHIVE',
            'UnModifiedSinceConstraint': datetime(2015, 1, 1),
            'SSEAwsKmsKeyId': 'string',
            'TargetKeyPrefix': 'string',
            'ObjectLockLegalHoldStatus': 'OFF'|'ON',
            'ObjectLockMode': 'COMPLIANCE'|'GOVERNANCE',
            'ObjectLockRetainUntilDate': datetime(2015, 1, 1)
        },
        'S3PutObjectAcl': {
            'AccessControlPolicy': {
                'AccessControlList': {
                    'Owner': {
                        'ID': 'string',
                        'DisplayName': 'string'
                    },
                    'Grants': [
                        {
                            'Grantee': {
                                'TypeIdentifier': 'id'|'emailAddress'|'uri',
                                'Identifier': 'string',
                                'DisplayName': 'string'
                            },
                            'Permission': 'FULL_CONTROL'|'READ'|'WRITE'|'READ_ACP'|'WRITE_ACP'
                        },
                    ]
                },
                'CannedAccessControlList': 'private'|'public-read'|'public-read-write'|'aws-exec-read'|'authenticated-read'|'bucket-owner-read'|'bucket-owner-full-control'
            }
        },
        'S3PutObjectTagging': {
            'TagSet': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
        'S3InitiateRestoreObject': {
            'ExpirationInDays': 123,
            'GlacierJobTier': 'BULK'|'STANDARD'
        }
    },
    Report={
        'Bucket': 'string',
        'Format': 'Report_CSV_20180820',
        'Enabled': True|False,
        'Prefix': 'string',
        'ReportScope': 'AllTasks'|'FailedTasksOnly'
    },
    ClientRequestToken='string',
    Manifest={
        'Spec': {
            'Format': 'S3BatchOperations_CSV_20180820'|'S3InventoryReport_CSV_20161130',
            'Fields': [
                'Ignore'|'Bucket'|'Key'|'VersionId',
            ]
        },
        'Location': {
            'ObjectArn': 'string',
            'ObjectVersionId': 'string',
            'ETag': 'string'
        }
    },
    Description='string',
    Priority=123,
    RoleArn='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type AccountId

string

param AccountId

[REQUIRED]

type ConfirmationRequired

boolean

param ConfirmationRequired

Indicates whether confirmation is required before Amazon S3 runs the job. Confirmation is only required for jobs created through the Amazon S3 console.

type Operation

dict

param Operation

[REQUIRED]

The operation that you want this job to perform on each object listed in the manifest. For more information about the available operations, see Available Operations in the Amazon Simple Storage Service Developer Guide .

  • LambdaInvoke (dict) --

    Directs the specified job to invoke an AWS Lambda function on each object in the manifest.

    • FunctionArn (string) --

      The Amazon Resource Name (ARN) for the AWS Lambda function that the specified job will invoke for each object in the manifest.

  • S3PutObjectCopy (dict) --

    Directs the specified job to execute a PUT Copy object call on each object in the manifest.

    • TargetResource (string) --

    • CannedAccessControlList (string) --

    • AccessControlGrants (list) --

      • (dict) --

        • Grantee (dict) --

          • TypeIdentifier (string) --

          • Identifier (string) --

          • DisplayName (string) --

        • Permission (string) --

    • MetadataDirective (string) --

    • ModifiedSinceConstraint (datetime) --

    • NewObjectMetadata (dict) --

      • CacheControl (string) --

      • ContentDisposition (string) --

      • ContentEncoding (string) --

      • ContentLanguage (string) --

      • UserMetadata (dict) --

        • (string) --

          • (string) --

      • ContentLength (integer) --

      • ContentMD5 (string) --

      • ContentType (string) --

      • HttpExpiresDate (datetime) --

      • RequesterCharged (boolean) --

      • SSEAlgorithm (string) --

    • NewObjectTagging (list) --

      • (dict) --

        • Key (string) -- [REQUIRED]

        • Value (string) -- [REQUIRED]

    • RedirectLocation (string) --

    • RequesterPays (boolean) --

    • StorageClass (string) --

    • UnModifiedSinceConstraint (datetime) --

    • SSEAwsKmsKeyId (string) --

    • TargetKeyPrefix (string) --

    • ObjectLockLegalHoldStatus (string) --

    • ObjectLockMode (string) --

    • ObjectLockRetainUntilDate (datetime) --

  • S3PutObjectAcl (dict) --

    Directs the specified job to execute a PUT Object acl call on each object in the manifest.

    • AccessControlPolicy (dict) --

      • AccessControlList (dict) --

        • Owner (dict) -- [REQUIRED]

          • ID (string) --

          • DisplayName (string) --

        • Grants (list) --

          • (dict) --

            • Grantee (dict) --

              • TypeIdentifier (string) --

              • Identifier (string) --

              • DisplayName (string) --

            • Permission (string) --

      • CannedAccessControlList (string) --

  • S3PutObjectTagging (dict) --

    Directs the specified job to execute a PUT Object tagging call on each object in the manifest.

    • TagSet (list) --

      • (dict) --

        • Key (string) -- [REQUIRED]

        • Value (string) -- [REQUIRED]

  • S3InitiateRestoreObject (dict) --

    Directs the specified job to execute an Initiate Glacier Restore call on each object in the manifest.

    • ExpirationInDays (integer) --

    • GlacierJobTier (string) --

type Report

dict

param Report

[REQUIRED]

Configuration parameters for the optional job-completion report.

  • Bucket (string) --

    The Amazon Resource Name (ARN) for the bucket where specified job-completion report will be stored.

  • Format (string) --

    The format of the specified job-completion report.

  • Enabled (boolean) -- [REQUIRED]

    Indicates whether the specified job will generate a job-completion report.

  • Prefix (string) --

    An optional prefix to describe where in the specified bucket the job-completion report will be stored. Amazon S3 will store the job-completion report at <prefix>/job-<job-id>/report.json.

  • ReportScope (string) --

    Indicates whether the job-completion report will include details of all tasks or only failed tasks.

type ClientRequestToken

string

param ClientRequestToken

[REQUIRED]

An idempotency token to ensure that you don't accidentally submit the same request twice. You can use any string up to the maximum length.

This field is autopopulated if not provided.

type Manifest

dict

param Manifest

[REQUIRED]

Configuration parameters for the manifest.

  • Spec (dict) -- [REQUIRED]

    Describes the format of the specified job's manifest. If the manifest is in CSV format, also describes the columns contained within the manifest.

    • Format (string) -- [REQUIRED]

      Indicates which of the available formats the specified manifest uses.

    • Fields (list) --

      If the specified manifest object is in the S3BatchOperations_CSV_20180820 format, this element describes which columns contain the required data.

      • (string) --

  • Location (dict) -- [REQUIRED]

    Contains the information required to locate the specified job's manifest.

    • ObjectArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) for a manifest object.

    • ObjectVersionId (string) --

      The optional version ID to identify a specific version of the manifest object.

    • ETag (string) -- [REQUIRED]

      The ETag for the specified manifest object.

type Description

string

param Description

A description for this job. You can use any string within the permitted length. Descriptions don't need to be unique and can be used for multiple jobs.

type Priority

integer

param Priority

[REQUIRED]

The numerical priority for this job. Higher numbers indicate higher priority.

type RoleArn

string

param RoleArn

[REQUIRED]

The Amazon Resource Name (ARN) for the Identity and Access Management (IAM) Role that batch operations will use to execute this job's operation on each object in the manifest.

type Tags

list

param Tags

An optional set of tags to associate with the job when it is created.

  • (dict) --

    • Key (string) -- [REQUIRED]

    • Value (string) -- [REQUIRED]

rtype

dict

returns

Response Syntax

{
    'JobId': 'string'
}

Response Structure

  • (dict) --

    • JobId (string) --

      The ID for this job. Amazon S3 generates this ID automatically and returns it after a successful Create Job request.