Amazon S3 Tagging API

Operations for managing bucket and object tags

Documentation

Specifications

Code Examples

Schemas & Data

Other Resources

OpenAPI Specification

amazon-s3-tagging-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon S3 Control Access Control Tagging API
  description: Amazon S3 Control provides API operations for managing S3 account-level settings, access points, Batch Operations jobs, S3 Access Grants, Multi-Region Access Points, and Storage Lens configurations. The S3 Control API uses a separate endpoint from the standard S3 API and requires an account ID in the host header.
  version: '2018-08-20'
  contact:
    name: AWS Support
    url: https://aws.amazon.com/premiumsupport/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: https://aws.amazon.com/service-terms/
  x-logo:
    url: https://a0.awsstatic.com/libra-css/images/logos/aws_logo_smile_1200x630.png
servers:
- url: https://s3-control.{region}.amazonaws.com
  description: Amazon S3 Control regional endpoint
  variables:
    region:
      default: us-east-1
      description: AWS region
      enum:
      - us-east-1
      - us-east-2
      - us-west-1
      - us-west-2
      - eu-west-1
      - eu-west-2
      - eu-west-3
      - eu-central-1
      - eu-north-1
      - ap-northeast-1
      - ap-northeast-2
      - ap-southeast-1
      - ap-southeast-2
      - ap-south-1
      - sa-east-1
      - ca-central-1
security:
- sigv4: []
tags:
- name: Tagging
  description: Operations for managing bucket and object tags
paths:
  /{Bucket}?tagging:
    get:
      operationId: GetBucketTagging
      summary: Amazon S3 Get Bucket Tagging
      description: Returns the tag set associated with the bucket. To use this operation, you must have permission to perform the s3:GetBucketTagging action.
      tags:
      - Tagging
      parameters:
      - $ref: '#/components/parameters/BucketName'
      - name: x-amz-expected-bucket-owner
        in: header
        description: The account ID of the expected bucket owner.
        schema:
          type: string
        example: example_value
      responses:
        '200':
          description: Successfully returned bucket tagging.
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/Tagging'
              examples:
                Getbuckettagging200Example:
                  summary: Default GetBucketTagging 200 response
                  x-microcks-default: true
                  value:
                    TagSet:
                      Tag:
                      - {}
        '403':
          description: Access denied.
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Getbuckettagging403Example:
                  summary: Default GetBucketTagging 403 response
                  x-microcks-default: true
                  value:
                    Code: example_value
                    Message: example_value
                    Resource: example_value
                    RequestId: '500123'
                    HostId: '500123'
        '404':
          description: No tag set associated with the bucket.
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Getbuckettagging404Example:
                  summary: Default GetBucketTagging 404 response
                  x-microcks-default: true
                  value:
                    Code: example_value
                    Message: example_value
                    Resource: example_value
                    RequestId: '500123'
                    HostId: '500123'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    put:
      operationId: PutBucketTagging
      summary: Amazon S3 Put Bucket Tagging
      description: Sets the tags for a bucket. Use tags to organize your AWS bill to reflect your own cost structure. To use this operation, you must have permission to perform the s3:PutBucketTagging action.
      tags:
      - Tagging
      parameters:
      - $ref: '#/components/parameters/BucketName'
      - name: Content-MD5
        in: header
        description: The base64-encoded 128-bit MD5 digest of the data.
        schema:
          type: string
        example: example_value
      - name: x-amz-expected-bucket-owner
        in: header
        description: The account ID of the expected bucket owner.
        schema:
          type: string
        example: example_value
      - name: x-amz-checksum-algorithm
        in: header
        description: Algorithm used to create the checksum.
        schema:
          type: string
          enum:
          - CRC32
          - CRC32C
          - SHA1
          - SHA256
        example: CRC32
      requestBody:
        required: true
        content:
          application/xml:
            schema:
              $ref: '#/components/schemas/Tagging'
            examples:
              PutbuckettaggingRequestExample:
                summary: Default PutBucketTagging request
                x-microcks-default: true
                value:
                  TagSet:
                    Tag:
                    - {}
      responses:
        '204':
          description: Bucket tags updated successfully.
        '403':
          description: Access denied.
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Putbuckettagging403Example:
                  summary: Default PutBucketTagging 403 response
                  x-microcks-default: true
                  value:
                    Code: example_value
                    Message: example_value
                    Resource: example_value
                    RequestId: '500123'
                    HostId: '500123'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      operationId: DeleteBucketTagging
      summary: Amazon S3 Delete Bucket Tagging
      description: Deletes the tags from the bucket. To use this operation, you must have permission to perform the s3:PutBucketTagging action.
      tags:
      - Tagging
      parameters:
      - $ref: '#/components/parameters/BucketName'
      - name: x-amz-expected-bucket-owner
        in: header
        description: The account ID of the expected bucket owner.
        schema:
          type: string
        example: example_value
      responses:
        '204':
          description: Bucket tags deleted successfully.
        '403':
          description: Access denied.
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Deletebuckettagging403Example:
                  summary: Default DeleteBucketTagging 403 response
                  x-microcks-default: true
                  value:
                    Code: example_value
                    Message: example_value
                    Resource: example_value
                    RequestId: '500123'
                    HostId: '500123'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    Tagging:
      type: object
      description: Container for TagSet elements.
      xml:
        name: Tagging
        namespace: http://s3.amazonaws.com/doc/2006-03-01/
      required:
      - TagSet
      properties:
        TagSet:
          type: object
          properties:
            Tag:
              type: array
              items:
                $ref: '#/components/schemas/Tag'
          example: example_value
    Error:
      type: object
      description: Container for all error elements.
      xml:
        name: Error
      properties:
        Code:
          type: string
          description: The error code is a string that uniquely identifies an error condition. Examples include NoSuchBucket, NoSuchKey, AccessDenied, InvalidBucketName, etc.
          example: example_value
        Message:
          type: string
          description: A human-readable description of the error.
          example: example_value
        Resource:
          type: string
          description: The bucket or object that is involved in the error.
          example: example_value
        RequestId:
          type: string
          description: Unique identifier for the request.
          example: '500123'
        HostId:
          type: string
          description: A special token to help AWS troubleshoot problems.
          example: '500123'
    Tag:
      type: object
      description: A container of a key value name pair.
      required:
      - Key
      - Value
      properties:
        Key:
          type: string
          description: Name of the object key.
          minLength: 1
          maxLength: 128
          example: example_value
        Value:
          type: string
          description: Value of the tag.
          maxLength: 256
          example: example_value
  parameters:
    BucketName:
      name: Bucket
      in: path
      required: true
      description: The name of the bucket. Bucket names must be between 3 and 63 characters long, consist only of lowercase letters, numbers, hyphens, and periods, and must begin and end with a letter or number.
      schema:
        type: string
        minLength: 3
        maxLength: 63
        pattern: ^[a-z0-9][a-z0-9.\-]{1,61}[a-z0-9]$
  securitySchemes:
    sigv4:
      type: apiKey
      name: Authorization
      in: header
      description: AWS Signature Version 4 authentication. The S3 Control API uses the service name s3 for signing.
externalDocs:
  description: Amazon S3 Control API Reference
  url: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Types_AWS_S3_Control.html