openapi: 3.1.0 info: title: Amazon S3 Metrics (bucket-level) description: '3 operations from the Amazon S3 REST API, generated from the authoritative service model. S3 identifies these operations by the `metrics` query subresource, which is declared as a required query parameter on each one because an OpenAPI path cannot carry a query string. 1 further operation(s) share a method, path and subresource with one described here and are recorded in `x-s3-sibling-operations`: S3 separates them by a request header or an id parameter, which OpenAPI cannot express. Generated from boto/botocore `service-2.json` at `aeb03fc4ae530e0b3f47d588b6021581db870c8c` (Apache-2.0). Responses are XML.' version: '2006-03-01' contact: name: AWS Support url: https://aws.amazon.com/premiumsupport/ externalDocs: description: Amazon S3 API Reference url: https://docs.aws.amazon.com/AmazonS3/latest/API/ servers: - url: https://s3.{region}.amazonaws.com variables: region: default: us-east-1 tags: - name: metrics paths: /{Bucket}: delete: operationId: DeleteBucketMetricsConfiguration summary: Deletes a metrics configuration for the Amazon CloudWatch request metrics (specified by the metrics configuration ID) fr description: Deletes a metrics configuration for the Amazon CloudWatch request metrics (specified by the metrics configuration ID) from the bucket. Note that this doesn't include the daily storage metrics. Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the Amazon S3 User Guide. Permissions To use this operation, you must have permissions to perform the s3:PutMetricsConfiguration action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources. General purpose bucket permissions - The s3:PutMet tags: - metrics parameters: - name: metrics in: query required: true description: Selects this operation. S3 identifies it by the `metrics` subresource. schema: type: string - name: Bucket in: path required: true description: The name of the bucket containing the metrics configuration to delete. Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s schema: type: string - name: id in: query required: true description: The ID used to identify the metrics configuration. The ID has a 64 character limit and can only contain letters, numbers, periods, dashes, and underscores. schema: type: string - name: x-amz-expected-bucket-owner in: header required: false description: The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied) schema: type: string responses: '200': description: Success. S3 answers in XML, not JSON. '403': description: AccessDenied. S3 validates the signature before it routes the operation, so this does not distinguish an unsupported operation from an unauthorised one. get: operationId: GetBucketMetricsConfiguration summary: Gets a metrics configuration (specified by the metrics configuration ID) from the bucket. Note that this doesn't include description: Gets a metrics configuration (specified by the metrics configuration ID) from the bucket. Note that this doesn't include the daily storage metrics. Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the Amazon S3 User Guide. Permissions To use this operation, you must have permissions to perform the s3:GetMetricsConfiguration action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources. General purpose bucket permissions - The s3:GetMetricsConfiguration permission is required in a tags: - metrics parameters: - name: metrics in: query required: true description: Selects this operation. S3 identifies it by the `metrics` subresource. schema: type: string - name: Bucket in: path required: true description: The name of the bucket containing the metrics configuration to retrieve. Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https:/ schema: type: string - name: id in: query required: true description: The ID used to identify the metrics configuration. The ID has a 64 character limit and can only contain letters, numbers, periods, dashes, and underscores. schema: type: string - name: x-amz-expected-bucket-owner in: header required: false description: The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied) schema: type: string responses: '200': description: Success. S3 answers in XML, not JSON. x-output-shape: GetBucketMetricsConfigurationOutput '403': description: AccessDenied. S3 validates the signature before it routes the operation, so this does not distinguish an unsupported operation from an unauthorised one. put: operationId: PutBucketMetricsConfiguration summary: Sets a metrics configuration (specified by the metrics configuration ID) for the bucket. You can have up to 1,000 metric description: Sets a metrics configuration (specified by the metrics configuration ID) for the bucket. You can have up to 1,000 metrics configurations per bucket. If you're updating an existing metrics configuration, note that this is a full replacement of the existing metrics configuration. If you don't include the elements you want to keep, they are erased. Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the Amazon S3 User Guide. Permissions To use this operation, you must have permissions to perform the s3:PutMetricsConfiguration action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see Permissio tags: - metrics parameters: - name: metrics in: query required: true description: Selects this operation. S3 identifies it by the `metrics` subresource. schema: type: string - name: Bucket in: path required: true description: The name of the bucket for which the metrics configuration is set. Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3exp schema: type: string - name: id in: query required: true description: The ID used to identify the metrics configuration. The ID has a 64 character limit and can only contain letters, numbers, periods, dashes, and underscores. schema: type: string - name: x-amz-expected-bucket-owner in: header required: false description: The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied) schema: type: string responses: '200': description: Success. S3 answers in XML, not JSON. '403': description: AccessDenied. S3 validates the signature before it routes the operation, so this does not distinguish an unsupported operation from an unauthorised one. x-s3-sibling-operations: - operation: ListBucketMetricsConfigurations shadows: GetBucketMetricsConfiguration summary: Lists the metrics configurations for the bucket. The metrics configurations are only for the request metrics of the bucket and do not provide information on daily storage metrics. You can have up to 1 why: Same method, path and query subresource as the operation above. S3 separates them by a request header or by the presence of an id parameter, neither of which an OpenAPI path can express.