2023/11/15 - AWS S3 Control - 8 new 2 updated api methods
Changes Add 5 APIs to create, update, get, list, delete S3 Storage Lens group(eg. CreateStorageLensGroup), 3 APIs for tagging(TagResource,UntagResource,ListTagsForResource), and update to StorageLensConfiguration to allow metrics to be aggregated on Storage Lens groups.
Retrieves the Storage Lens group configuration details.
To use this operation, you must have the permission to perform the s3:GetStorageLensGroup action. For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups .
For information about Storage Lens groups errors, see List of Amazon S3 Storage Lens error codes .
See also: AWS API Documentation
Request Syntax
client.get_storage_lens_group( Name='string', AccountId='string' )
string
[REQUIRED]
The name of the Storage Lens group that you're trying to retrieve the configuration details for.
string
[REQUIRED]
The Amazon Web Services account ID associated with the Storage Lens group that you're trying to retrieve the details for.
dict
Response Syntax
{ 'StorageLensGroup': { 'Name': 'string', 'Filter': { 'MatchAnyPrefix': [ 'string', ], 'MatchAnySuffix': [ 'string', ], 'MatchAnyTag': [ { 'Key': 'string', 'Value': 'string' }, ], 'MatchObjectAge': { 'DaysGreaterThan': 123, 'DaysLessThan': 123 }, 'MatchObjectSize': { 'BytesGreaterThan': 123, 'BytesLessThan': 123 }, 'And': { 'MatchAnyPrefix': [ 'string', ], 'MatchAnySuffix': [ 'string', ], 'MatchAnyTag': [ { 'Key': 'string', 'Value': 'string' }, ], 'MatchObjectAge': { 'DaysGreaterThan': 123, 'DaysLessThan': 123 }, 'MatchObjectSize': { 'BytesGreaterThan': 123, 'BytesLessThan': 123 } }, 'Or': { 'MatchAnyPrefix': [ 'string', ], 'MatchAnySuffix': [ 'string', ], 'MatchAnyTag': [ { 'Key': 'string', 'Value': 'string' }, ], 'MatchObjectAge': { 'DaysGreaterThan': 123, 'DaysLessThan': 123 }, 'MatchObjectSize': { 'BytesGreaterThan': 123, 'BytesLessThan': 123 } } }, 'StorageLensGroupArn': 'string' } }
Response Structure
(dict) --
StorageLensGroup (dict) --
The name of the Storage Lens group that you're trying to retrieve the configuration details for.
Name (string) --
Contains the name of the Storage Lens group.
Filter (dict) --
Sets the criteria for the Storage Lens group data that is displayed. For multiple filter conditions, the AND or OR logical operator is used.
MatchAnyPrefix (list) --
Contains a list of prefixes. At least one prefix must be specified. Up to 10 prefixes are allowed.
(string) --
MatchAnySuffix (list) --
Contains a list of suffixes. At least one suffix must be specified. Up to 10 suffixes are allowed.
(string) --
MatchAnyTag (list) --
Contains the list of S3 object tags. At least one object tag must be specified. Up to 10 object tags are allowed.
(dict) --
A container for a key-value name pair.
Key (string) --
Key of the tag
Value (string) --
Value of the tag
MatchObjectAge (dict) --
Contains DaysGreaterThan and DaysLessThan to define the object age range (minimum and maximum number of days).
DaysGreaterThan (integer) --
Specifies the maximum object age in days. Must be a positive whole number, greater than the minimum object age and less than or equal to 2,147,483,647.
DaysLessThan (integer) --
Specifies the minimum object age in days. The value must be a positive whole number, greater than 0 and less than or equal to 2,147,483,647.
MatchObjectSize (dict) --
Contains BytesGreaterThan and BytesLessThan to define the object size range (minimum and maximum number of Bytes).
BytesGreaterThan (integer) --
Specifies the minimum object size in Bytes. The value must be a positive number, greater than 0 and less than 5 TB.
BytesLessThan (integer) --
Specifies the maximum object size in Bytes. The value must be a positive number, greater than the minimum object size and less than 5 TB.
And (dict) --
A logical operator that allows multiple filter conditions to be joined for more complex comparisons of Storage Lens group data. Objects must match all of the listed filter conditions that are joined by the And logical operator. Only one of each filter condition is allowed.
MatchAnyPrefix (list) --
Contains a list of prefixes. At least one prefix must be specified. Up to 10 prefixes are allowed.
(string) --
MatchAnySuffix (list) --
Contains a list of suffixes. At least one suffix must be specified. Up to 10 suffixes are allowed.
(string) --
MatchAnyTag (list) --
Contains the list of object tags. At least one object tag must be specified. Up to 10 object tags are allowed.
(dict) --
A container for a key-value name pair.
Key (string) --
Key of the tag
Value (string) --
Value of the tag
MatchObjectAge (dict) --
Contains DaysGreaterThan and DaysLessThan to define the object age range (minimum and maximum number of days).
DaysGreaterThan (integer) --
Specifies the maximum object age in days. Must be a positive whole number, greater than the minimum object age and less than or equal to 2,147,483,647.
DaysLessThan (integer) --
Specifies the minimum object age in days. The value must be a positive whole number, greater than 0 and less than or equal to 2,147,483,647.
MatchObjectSize (dict) --
Contains BytesGreaterThan and BytesLessThan to define the object size range (minimum and maximum number of Bytes).
BytesGreaterThan (integer) --
Specifies the minimum object size in Bytes. The value must be a positive number, greater than 0 and less than 5 TB.
BytesLessThan (integer) --
Specifies the maximum object size in Bytes. The value must be a positive number, greater than the minimum object size and less than 5 TB.
Or (dict) --
A single logical operator that allows multiple filter conditions to be joined. Objects can match any of the listed filter conditions, which are joined by the Or logical operator. Only one of each filter condition is allowed.
MatchAnyPrefix (list) --
Filters objects that match any of the specified prefixes.
(string) --
MatchAnySuffix (list) --
Filters objects that match any of the specified suffixes.
(string) --
MatchAnyTag (list) --
Filters objects that match any of the specified S3 object tags.
(dict) --
A container for a key-value name pair.
Key (string) --
Key of the tag
Value (string) --
Value of the tag
MatchObjectAge (dict) --
Filters objects that match the specified object age range.
DaysGreaterThan (integer) --
Specifies the maximum object age in days. Must be a positive whole number, greater than the minimum object age and less than or equal to 2,147,483,647.
DaysLessThan (integer) --
Specifies the minimum object age in days. The value must be a positive whole number, greater than 0 and less than or equal to 2,147,483,647.
MatchObjectSize (dict) --
Filters objects that match the specified object size range.
BytesGreaterThan (integer) --
Specifies the minimum object size in Bytes. The value must be a positive number, greater than 0 and less than 5 TB.
BytesLessThan (integer) --
Specifies the maximum object size in Bytes. The value must be a positive number, greater than the minimum object size and less than 5 TB.
StorageLensGroupArn (string) --
Contains the Amazon Resource Name (ARN) of the Storage Lens group. This property is read-only.
Lists all the Storage Lens groups in the specified home Region.
To use this operation, you must have the permission to perform the s3:ListStorageLensGroups action. For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups .
For information about Storage Lens groups errors, see List of Amazon S3 Storage Lens error codes .
See also: AWS API Documentation
Request Syntax
client.list_storage_lens_groups( AccountId='string', NextToken='string' )
string
[REQUIRED]
The Amazon Web Services account ID that owns the Storage Lens groups.
string
The token for the next set of results, or null if there are no more results.
dict
Response Syntax
{ 'NextToken': 'string', 'StorageLensGroupList': [ { 'Name': 'string', 'StorageLensGroupArn': 'string', 'HomeRegion': 'string' }, ] }
Response Structure
(dict) --
NextToken (string) --
If NextToken is returned, there are more Storage Lens groups results available. The value of NextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours.
StorageLensGroupList (list) --
The list of Storage Lens groups that exist in the specified home Region.
(dict) --
Each entry contains a Storage Lens group that exists in the specified home Region.
Name (string) --
Contains the name of the Storage Lens group that exists in the specified home Region.
StorageLensGroupArn (string) --
Contains the Amazon Resource Name (ARN) of the Storage Lens group. This property is read-only.
HomeRegion (string) --
Contains the Amazon Web Services Region where the Storage Lens group was created.
Updates the existing Storage Lens group.
To use this operation, you must have the permission to perform the s3:UpdateStorageLensGroup action. For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups .
For information about Storage Lens groups errors, see List of Amazon S3 Storage Lens error codes .
See also: AWS API Documentation
Request Syntax
client.update_storage_lens_group( Name='string', AccountId='string', StorageLensGroup={ 'Name': 'string', 'Filter': { 'MatchAnyPrefix': [ 'string', ], 'MatchAnySuffix': [ 'string', ], 'MatchAnyTag': [ { 'Key': 'string', 'Value': 'string' }, ], 'MatchObjectAge': { 'DaysGreaterThan': 123, 'DaysLessThan': 123 }, 'MatchObjectSize': { 'BytesGreaterThan': 123, 'BytesLessThan': 123 }, 'And': { 'MatchAnyPrefix': [ 'string', ], 'MatchAnySuffix': [ 'string', ], 'MatchAnyTag': [ { 'Key': 'string', 'Value': 'string' }, ], 'MatchObjectAge': { 'DaysGreaterThan': 123, 'DaysLessThan': 123 }, 'MatchObjectSize': { 'BytesGreaterThan': 123, 'BytesLessThan': 123 } }, 'Or': { 'MatchAnyPrefix': [ 'string', ], 'MatchAnySuffix': [ 'string', ], 'MatchAnyTag': [ { 'Key': 'string', 'Value': 'string' }, ], 'MatchObjectAge': { 'DaysGreaterThan': 123, 'DaysLessThan': 123 }, 'MatchObjectSize': { 'BytesGreaterThan': 123, 'BytesLessThan': 123 } } }, 'StorageLensGroupArn': 'string' } )
string
[REQUIRED]
The name of the Storage Lens group that you want to update.
string
[REQUIRED]
The Amazon Web Services account ID of the Storage Lens group owner.
dict
[REQUIRED]
The JSON file that contains the Storage Lens group configuration.
Name (string) -- [REQUIRED]
Contains the name of the Storage Lens group.
Filter (dict) -- [REQUIRED]
Sets the criteria for the Storage Lens group data that is displayed. For multiple filter conditions, the AND or OR logical operator is used.
MatchAnyPrefix (list) --
Contains a list of prefixes. At least one prefix must be specified. Up to 10 prefixes are allowed.
(string) --
MatchAnySuffix (list) --
Contains a list of suffixes. At least one suffix must be specified. Up to 10 suffixes are allowed.
(string) --
MatchAnyTag (list) --
Contains the list of S3 object tags. At least one object tag must be specified. Up to 10 object tags are allowed.
(dict) --
A container for a key-value name pair.
Key (string) -- [REQUIRED]
Key of the tag
Value (string) -- [REQUIRED]
Value of the tag
MatchObjectAge (dict) --
Contains DaysGreaterThan and DaysLessThan to define the object age range (minimum and maximum number of days).
DaysGreaterThan (integer) --
Specifies the maximum object age in days. Must be a positive whole number, greater than the minimum object age and less than or equal to 2,147,483,647.
DaysLessThan (integer) --
Specifies the minimum object age in days. The value must be a positive whole number, greater than 0 and less than or equal to 2,147,483,647.
MatchObjectSize (dict) --
Contains BytesGreaterThan and BytesLessThan to define the object size range (minimum and maximum number of Bytes).
BytesGreaterThan (integer) --
Specifies the minimum object size in Bytes. The value must be a positive number, greater than 0 and less than 5 TB.
BytesLessThan (integer) --
Specifies the maximum object size in Bytes. The value must be a positive number, greater than the minimum object size and less than 5 TB.
And (dict) --
A logical operator that allows multiple filter conditions to be joined for more complex comparisons of Storage Lens group data. Objects must match all of the listed filter conditions that are joined by the And logical operator. Only one of each filter condition is allowed.
MatchAnyPrefix (list) --
Contains a list of prefixes. At least one prefix must be specified. Up to 10 prefixes are allowed.
(string) --
MatchAnySuffix (list) --
Contains a list of suffixes. At least one suffix must be specified. Up to 10 suffixes are allowed.
(string) --
MatchAnyTag (list) --
Contains the list of object tags. At least one object tag must be specified. Up to 10 object tags are allowed.
(dict) --
A container for a key-value name pair.
Key (string) -- [REQUIRED]
Key of the tag
Value (string) -- [REQUIRED]
Value of the tag
MatchObjectAge (dict) --
Contains DaysGreaterThan and DaysLessThan to define the object age range (minimum and maximum number of days).
DaysGreaterThan (integer) --
Specifies the maximum object age in days. Must be a positive whole number, greater than the minimum object age and less than or equal to 2,147,483,647.
DaysLessThan (integer) --
Specifies the minimum object age in days. The value must be a positive whole number, greater than 0 and less than or equal to 2,147,483,647.
MatchObjectSize (dict) --
Contains BytesGreaterThan and BytesLessThan to define the object size range (minimum and maximum number of Bytes).
BytesGreaterThan (integer) --
Specifies the minimum object size in Bytes. The value must be a positive number, greater than 0 and less than 5 TB.
BytesLessThan (integer) --
Specifies the maximum object size in Bytes. The value must be a positive number, greater than the minimum object size and less than 5 TB.
Or (dict) --
A single logical operator that allows multiple filter conditions to be joined. Objects can match any of the listed filter conditions, which are joined by the Or logical operator. Only one of each filter condition is allowed.
MatchAnyPrefix (list) --
Filters objects that match any of the specified prefixes.
(string) --
MatchAnySuffix (list) --
Filters objects that match any of the specified suffixes.
(string) --
MatchAnyTag (list) --
Filters objects that match any of the specified S3 object tags.
(dict) --
A container for a key-value name pair.
Key (string) -- [REQUIRED]
Key of the tag
Value (string) -- [REQUIRED]
Value of the tag
MatchObjectAge (dict) --
Filters objects that match the specified object age range.
DaysGreaterThan (integer) --
Specifies the maximum object age in days. Must be a positive whole number, greater than the minimum object age and less than or equal to 2,147,483,647.
DaysLessThan (integer) --
Specifies the minimum object age in days. The value must be a positive whole number, greater than 0 and less than or equal to 2,147,483,647.
MatchObjectSize (dict) --
Filters objects that match the specified object size range.
BytesGreaterThan (integer) --
Specifies the minimum object size in Bytes. The value must be a positive number, greater than 0 and less than 5 TB.
BytesLessThan (integer) --
Specifies the maximum object size in Bytes. The value must be a positive number, greater than the minimum object size and less than 5 TB.
StorageLensGroupArn (string) --
Contains the Amazon Resource Name (ARN) of the Storage Lens group. This property is read-only.
None
Creates a new Amazon Web Services resource tag or updates an existing resource tag. You can add up to 50 Amazon Web Services resource tags for each S3 resource.
To use this operation, you must have the permission to perform the s3:TagResource action. For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups .
For information about S3 Tagging errors, see List of Amazon S3 Tagging error codes .
Note
This operation is only supported for S3 Storage Lens groups .
See also: AWS API Documentation
Request Syntax
client.tag_resource( AccountId='string', ResourceArn='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
string
[REQUIRED]
The Amazon Web Services account ID that created the S3 resource that you're trying to add tags to.
string
[REQUIRED]
The Amazon Resource Name (ARN) of the S3 resource that you're trying to add tags to.
list
[REQUIRED]
The Amazon Web Services resource tags that you want to add to the specified S3 resource.
(dict) --
An Amazon Web Services resource tag that's associated with your S3 resource. You can add tags to new objects when you upload them, or you can add object tags to existing objects.
Note
This data type is only supported for S3 Storage Lens groups .
Key (string) -- [REQUIRED]
The tag key for your Amazon Web Services resource. A tag key can be up to 128 Unicode characters in length and is case-sensitive. System created tags that begin with aws: aren’t supported.
Value (string) -- [REQUIRED]
The tag value for your Amazon Web Services resource. A tag value can be up to 256 Unicode characters in length and is case-sensitive.
dict
Response Syntax
{}
Response Structure
(dict) --
Creates a new S3 Storage Lens group and associates it with the specified Amazon Web Services account ID. An S3 Storage Lens group is a custom grouping of objects based on prefix, suffix, object tags, object size, object age, or a combination of these filters. For each Storage Lens group that you’ve created, you can also optionally add Amazon Web Services resource tags. For more information about S3 Storage Lens groups, see Working with S3 Storage Lens groups .
To use this operation, you must have the permission to perform the s3:CreateStorageLensGroup action. If you’re trying to create a Storage Lens group with Amazon Web Services resource tags, you must also have permission to perform the s3:TagResource action. For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups .
For information about Storage Lens groups errors, see List of Amazon S3 Storage Lens error codes .
See also: AWS API Documentation
Request Syntax
client.create_storage_lens_group( AccountId='string', StorageLensGroup={ 'Name': 'string', 'Filter': { 'MatchAnyPrefix': [ 'string', ], 'MatchAnySuffix': [ 'string', ], 'MatchAnyTag': [ { 'Key': 'string', 'Value': 'string' }, ], 'MatchObjectAge': { 'DaysGreaterThan': 123, 'DaysLessThan': 123 }, 'MatchObjectSize': { 'BytesGreaterThan': 123, 'BytesLessThan': 123 }, 'And': { 'MatchAnyPrefix': [ 'string', ], 'MatchAnySuffix': [ 'string', ], 'MatchAnyTag': [ { 'Key': 'string', 'Value': 'string' }, ], 'MatchObjectAge': { 'DaysGreaterThan': 123, 'DaysLessThan': 123 }, 'MatchObjectSize': { 'BytesGreaterThan': 123, 'BytesLessThan': 123 } }, 'Or': { 'MatchAnyPrefix': [ 'string', ], 'MatchAnySuffix': [ 'string', ], 'MatchAnyTag': [ { 'Key': 'string', 'Value': 'string' }, ], 'MatchObjectAge': { 'DaysGreaterThan': 123, 'DaysLessThan': 123 }, 'MatchObjectSize': { 'BytesGreaterThan': 123, 'BytesLessThan': 123 } } }, 'StorageLensGroupArn': 'string' }, Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
string
[REQUIRED]
The Amazon Web Services account ID that the Storage Lens group is created from and associated with.
dict
[REQUIRED]
The Storage Lens group configuration.
Name (string) -- [REQUIRED]
Contains the name of the Storage Lens group.
Filter (dict) -- [REQUIRED]
Sets the criteria for the Storage Lens group data that is displayed. For multiple filter conditions, the AND or OR logical operator is used.
MatchAnyPrefix (list) --
Contains a list of prefixes. At least one prefix must be specified. Up to 10 prefixes are allowed.
(string) --
MatchAnySuffix (list) --
Contains a list of suffixes. At least one suffix must be specified. Up to 10 suffixes are allowed.
(string) --
MatchAnyTag (list) --
Contains the list of S3 object tags. At least one object tag must be specified. Up to 10 object tags are allowed.
(dict) --
A container for a key-value name pair.
Key (string) -- [REQUIRED]
Key of the tag
Value (string) -- [REQUIRED]
Value of the tag
MatchObjectAge (dict) --
Contains DaysGreaterThan and DaysLessThan to define the object age range (minimum and maximum number of days).
DaysGreaterThan (integer) --
Specifies the maximum object age in days. Must be a positive whole number, greater than the minimum object age and less than or equal to 2,147,483,647.
DaysLessThan (integer) --
Specifies the minimum object age in days. The value must be a positive whole number, greater than 0 and less than or equal to 2,147,483,647.
MatchObjectSize (dict) --
Contains BytesGreaterThan and BytesLessThan to define the object size range (minimum and maximum number of Bytes).
BytesGreaterThan (integer) --
Specifies the minimum object size in Bytes. The value must be a positive number, greater than 0 and less than 5 TB.
BytesLessThan (integer) --
Specifies the maximum object size in Bytes. The value must be a positive number, greater than the minimum object size and less than 5 TB.
And (dict) --
A logical operator that allows multiple filter conditions to be joined for more complex comparisons of Storage Lens group data. Objects must match all of the listed filter conditions that are joined by the And logical operator. Only one of each filter condition is allowed.
MatchAnyPrefix (list) --
Contains a list of prefixes. At least one prefix must be specified. Up to 10 prefixes are allowed.
(string) --
MatchAnySuffix (list) --
Contains a list of suffixes. At least one suffix must be specified. Up to 10 suffixes are allowed.
(string) --
MatchAnyTag (list) --
Contains the list of object tags. At least one object tag must be specified. Up to 10 object tags are allowed.
(dict) --
A container for a key-value name pair.
Key (string) -- [REQUIRED]
Key of the tag
Value (string) -- [REQUIRED]
Value of the tag
MatchObjectAge (dict) --
Contains DaysGreaterThan and DaysLessThan to define the object age range (minimum and maximum number of days).
DaysGreaterThan (integer) --
Specifies the maximum object age in days. Must be a positive whole number, greater than the minimum object age and less than or equal to 2,147,483,647.
DaysLessThan (integer) --
Specifies the minimum object age in days. The value must be a positive whole number, greater than 0 and less than or equal to 2,147,483,647.
MatchObjectSize (dict) --
Contains BytesGreaterThan and BytesLessThan to define the object size range (minimum and maximum number of Bytes).
BytesGreaterThan (integer) --
Specifies the minimum object size in Bytes. The value must be a positive number, greater than 0 and less than 5 TB.
BytesLessThan (integer) --
Specifies the maximum object size in Bytes. The value must be a positive number, greater than the minimum object size and less than 5 TB.
Or (dict) --
A single logical operator that allows multiple filter conditions to be joined. Objects can match any of the listed filter conditions, which are joined by the Or logical operator. Only one of each filter condition is allowed.
MatchAnyPrefix (list) --
Filters objects that match any of the specified prefixes.
(string) --
MatchAnySuffix (list) --
Filters objects that match any of the specified suffixes.
(string) --
MatchAnyTag (list) --
Filters objects that match any of the specified S3 object tags.
(dict) --
A container for a key-value name pair.
Key (string) -- [REQUIRED]
Key of the tag
Value (string) -- [REQUIRED]
Value of the tag
MatchObjectAge (dict) --
Filters objects that match the specified object age range.
DaysGreaterThan (integer) --
Specifies the maximum object age in days. Must be a positive whole number, greater than the minimum object age and less than or equal to 2,147,483,647.
DaysLessThan (integer) --
Specifies the minimum object age in days. The value must be a positive whole number, greater than 0 and less than or equal to 2,147,483,647.
MatchObjectSize (dict) --
Filters objects that match the specified object size range.
BytesGreaterThan (integer) --
Specifies the minimum object size in Bytes. The value must be a positive number, greater than 0 and less than 5 TB.
BytesLessThan (integer) --
Specifies the maximum object size in Bytes. The value must be a positive number, greater than the minimum object size and less than 5 TB.
StorageLensGroupArn (string) --
Contains the Amazon Resource Name (ARN) of the Storage Lens group. This property is read-only.
list
The Amazon Web Services resource tags that you're adding to your Storage Lens group. This parameter is optional.
(dict) --
An Amazon Web Services resource tag that's associated with your S3 resource. You can add tags to new objects when you upload them, or you can add object tags to existing objects.
Note
This data type is only supported for S3 Storage Lens groups .
Key (string) -- [REQUIRED]
The tag key for your Amazon Web Services resource. A tag key can be up to 128 Unicode characters in length and is case-sensitive. System created tags that begin with aws: aren’t supported.
Value (string) -- [REQUIRED]
The tag value for your Amazon Web Services resource. A tag value can be up to 256 Unicode characters in length and is case-sensitive.
None
Deletes an existing S3 Storage Lens group.
To use this operation, you must have the permission to perform the s3:DeleteStorageLensGroup action. For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups .
For information about Storage Lens groups errors, see List of Amazon S3 Storage Lens error codes .
See also: AWS API Documentation
Request Syntax
client.delete_storage_lens_group( Name='string', AccountId='string' )
string
[REQUIRED]
The name of the Storage Lens group that you're trying to delete.
string
[REQUIRED]
The Amazon Web Services account ID used to create the Storage Lens group that you're trying to delete.
None
This operation removes the specified Amazon Web Services resource tags from an S3 resource.
To use this operation, you must have the permission to perform the s3:UntagResource action. For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups .
For information about S3 Tagging errors, see List of Amazon S3 Tagging error codes .
Note
This operation is only supported for S3 Storage Lens groups .
See also: AWS API Documentation
Request Syntax
client.untag_resource( AccountId='string', ResourceArn='string', TagKeys=[ 'string', ] )
string
[REQUIRED]
The Amazon Web Services account ID that owns the resource that you're trying to remove the tags from.
string
[REQUIRED]
The Amazon Resource Name (ARN) of the S3 resource that you want to remove the resource tags from.
list
[REQUIRED]
The tag key pair of the S3 resource tag that you're trying to remove.
(string) --
dict
Response Syntax
{}
Response Structure
(dict) --
This operation allows you to list all the Amazon Web Services resource tags for the specified resource.
To use this operation, you must have the permission to perform the s3:ListTagsForResource action. For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups .
For information about S3 Tagging errors, see List of Amazon S3 Tagging error codes .
Note
This operation is only supported for S3 Storage Lens groups .
See also: AWS API Documentation
Request Syntax
client.list_tags_for_resource( AccountId='string', ResourceArn='string' )
string
[REQUIRED]
The Amazon Web Services account ID of the resource owner.
string
[REQUIRED]
The Amazon Resource Name (ARN) of the S3 resource that you want to list the tags for.
dict
Response Syntax
{ 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }
Response Structure
(dict) --
Tags (list) --
The Amazon Web Services resource tags that are associated with the resource.
(dict) --
An Amazon Web Services resource tag that's associated with your S3 resource. You can add tags to new objects when you upload them, or you can add object tags to existing objects.
Note
This data type is only supported for S3 Storage Lens groups .
Key (string) --
The tag key for your Amazon Web Services resource. A tag key can be up to 128 Unicode characters in length and is case-sensitive. System created tags that begin with aws: aren’t supported.
Value (string) --
The tag value for your Amazon Web Services resource. A tag value can be up to 256 Unicode characters in length and is case-sensitive.
{'StorageLensConfiguration': {'AccountLevel': {'StorageLensGroupLevel': {'SelectionCriteria': {'Exclude': ['string'], 'Include': ['string']}}}}}
Gets the Amazon S3 Storage Lens configuration. For more information, see Assessing your storage activity and usage with Amazon S3 Storage Lens in the Amazon S3 User Guide . For a complete list of S3 Storage Lens metrics, see S3 Storage Lens metrics glossary in the Amazon S3 User Guide .
Note
To use this action, you must have permission to perform the s3:GetStorageLensConfiguration action. For more information, see Setting permissions to use Amazon S3 Storage Lens in the Amazon S3 User Guide .
See also: AWS API Documentation
Request Syntax
client.get_storage_lens_configuration( ConfigId='string', AccountId='string' )
string
[REQUIRED]
The ID of the Amazon S3 Storage Lens configuration.
string
[REQUIRED]
The account ID of the requester.
dict
Response Syntax
{ 'StorageLensConfiguration': { 'Id': 'string', 'AccountLevel': { 'ActivityMetrics': { 'IsEnabled': True|False }, 'BucketLevel': { 'ActivityMetrics': { 'IsEnabled': True|False }, 'PrefixLevel': { 'StorageMetrics': { 'IsEnabled': True|False, 'SelectionCriteria': { 'Delimiter': 'string', 'MaxDepth': 123, 'MinStorageBytesPercentage': 123.0 } } }, 'AdvancedCostOptimizationMetrics': { 'IsEnabled': True|False }, 'AdvancedDataProtectionMetrics': { 'IsEnabled': True|False }, 'DetailedStatusCodesMetrics': { 'IsEnabled': True|False } }, 'AdvancedCostOptimizationMetrics': { 'IsEnabled': True|False }, 'AdvancedDataProtectionMetrics': { 'IsEnabled': True|False }, 'DetailedStatusCodesMetrics': { 'IsEnabled': True|False }, 'StorageLensGroupLevel': { 'SelectionCriteria': { 'Include': [ 'string', ], 'Exclude': [ 'string', ] } } }, 'Include': { 'Buckets': [ 'string', ], 'Regions': [ 'string', ] }, 'Exclude': { 'Buckets': [ 'string', ], 'Regions': [ 'string', ] }, 'DataExport': { 'S3BucketDestination': { 'Format': 'CSV'|'Parquet', 'OutputSchemaVersion': 'V_1', 'AccountId': 'string', 'Arn': 'string', 'Prefix': 'string', 'Encryption': { 'SSES3': {}, 'SSEKMS': { 'KeyId': 'string' } } }, 'CloudWatchMetrics': { 'IsEnabled': True|False } }, 'IsEnabled': True|False, 'AwsOrg': { 'Arn': 'string' }, 'StorageLensArn': 'string' } }
Response Structure
(dict) --
StorageLensConfiguration (dict) --
The S3 Storage Lens configuration requested.
Id (string) --
A container for the Amazon S3 Storage Lens configuration ID.
AccountLevel (dict) --
A container for all the account-level configurations of your S3 Storage Lens configuration.
ActivityMetrics (dict) --
A container element for S3 Storage Lens activity metrics.
IsEnabled (boolean) --
A container that indicates whether activity metrics are enabled.
BucketLevel (dict) --
A container element for the S3 Storage Lens bucket-level configuration.
ActivityMetrics (dict) --
A container for the bucket-level activity metrics for S3 Storage Lens.
IsEnabled (boolean) --
A container that indicates whether activity metrics are enabled.
PrefixLevel (dict) --
A container for the prefix-level metrics for S3 Storage Lens.
StorageMetrics (dict) --
A container for the prefix-level storage metrics for S3 Storage Lens.
IsEnabled (boolean) --
A container for whether prefix-level storage metrics are enabled.
SelectionCriteria (dict) --
Delimiter (string) --
A container for the delimiter of the selection criteria being used.
MaxDepth (integer) --
The max depth of the selection criteria
MinStorageBytesPercentage (float) --
The minimum number of storage bytes percentage whose metrics will be selected.
Note
You must choose a value greater than or equal to 1.0 .
AdvancedCostOptimizationMetrics (dict) --
A container for bucket-level advanced cost-optimization metrics for S3 Storage Lens.
IsEnabled (boolean) --
A container that indicates whether advanced cost-optimization metrics are enabled.
AdvancedDataProtectionMetrics (dict) --
A container for bucket-level advanced data-protection metrics for S3 Storage Lens.
IsEnabled (boolean) --
A container that indicates whether advanced data-protection metrics are enabled.
DetailedStatusCodesMetrics (dict) --
A container for bucket-level detailed status code metrics for S3 Storage Lens.
IsEnabled (boolean) --
A container that indicates whether detailed status code metrics are enabled.
AdvancedCostOptimizationMetrics (dict) --
A container element for S3 Storage Lens advanced cost-optimization metrics.
IsEnabled (boolean) --
A container that indicates whether advanced cost-optimization metrics are enabled.
AdvancedDataProtectionMetrics (dict) --
A container element for S3 Storage Lens advanced data-protection metrics.
IsEnabled (boolean) --
A container that indicates whether advanced data-protection metrics are enabled.
DetailedStatusCodesMetrics (dict) --
A container element for detailed status code metrics.
IsEnabled (boolean) --
A container that indicates whether detailed status code metrics are enabled.
StorageLensGroupLevel (dict) --
A container element for S3 Storage Lens groups metrics.
SelectionCriteria (dict) --
Indicates which Storage Lens group ARNs to include or exclude in the Storage Lens group aggregation. If this value is left null, then all Storage Lens groups are selected.
Include (list) --
Indicates which Storage Lens group ARNs to include in the Storage Lens group aggregation.
(string) --
Exclude (list) --
Indicates which Storage Lens group ARNs to exclude from the Storage Lens group aggregation.
(string) --
Include (dict) --
A container for what is included in this configuration. This container can only be valid if there is no Exclude container submitted, and it's not empty.
Buckets (list) --
A container for the S3 Storage Lens bucket includes.
(string) --
Regions (list) --
A container for the S3 Storage Lens Region includes.
(string) --
Exclude (dict) --
A container for what is excluded in this configuration. This container can only be valid if there is no Include container submitted, and it's not empty.
Buckets (list) --
A container for the S3 Storage Lens bucket excludes.
(string) --
Regions (list) --
A container for the S3 Storage Lens Region excludes.
(string) --
DataExport (dict) --
A container to specify the properties of your S3 Storage Lens metrics export including, the destination, schema and format.
S3BucketDestination (dict) --
A container for the bucket where the S3 Storage Lens metrics export will be located.
Note
This bucket must be located in the same Region as the storage lens configuration.
Format (string) --
OutputSchemaVersion (string) --
The schema version of the export file.
AccountId (string) --
The account ID of the owner of the S3 Storage Lens metrics export bucket.
Arn (string) --
The Amazon Resource Name (ARN) of the bucket. This property is read-only and follows the following format: ``arn:aws:s3:us-east-1 :example-account-id :bucket/your-destination-bucket-name ``
Prefix (string) --
The prefix of the destination bucket where the metrics export will be delivered.
Encryption (dict) --
The container for the type encryption of the metrics exports in this bucket.
SSES3 (dict) --
SSEKMS (dict) --
KeyId (string) --
A container for the ARN of the SSE-KMS encryption. This property is read-only and follows the following format: ``arn:aws:kms:us-east-1 :example-account-id :key/example-9a73-4afc-8d29-8f5900cef44e ``
CloudWatchMetrics (dict) --
A container for enabling Amazon CloudWatch publishing for S3 Storage Lens metrics.
IsEnabled (boolean) --
A container that indicates whether CloudWatch publishing for S3 Storage Lens metrics is enabled. A value of true indicates that CloudWatch publishing for S3 Storage Lens metrics is enabled.
IsEnabled (boolean) --
A container for whether the S3 Storage Lens configuration is enabled.
AwsOrg (dict) --
A container for the Amazon Web Services organization for this S3 Storage Lens configuration.
Arn (string) --
A container for the Amazon Resource Name (ARN) of the Amazon Web Services organization. This property is read-only and follows the following format: ``arn:aws:organizations:us-east-1 :example-account-id :organization/o-ex2l495dck ``
StorageLensArn (string) --
The Amazon Resource Name (ARN) of the S3 Storage Lens configuration. This property is read-only and follows the following format: ``arn:aws:s3:us-east-1 :example-account-id :storage-lens/your-dashboard-name ``
{'StorageLensConfiguration': {'AccountLevel': {'StorageLensGroupLevel': {'SelectionCriteria': {'Exclude': ['string'], 'Include': ['string']}}}}}
Puts an Amazon S3 Storage Lens configuration. For more information about S3 Storage Lens, see Working with Amazon S3 Storage Lens in the Amazon S3 User Guide . For a complete list of S3 Storage Lens metrics, see S3 Storage Lens metrics glossary in the Amazon S3 User Guide .
Note
To use this action, you must have permission to perform the s3:PutStorageLensConfiguration action. For more information, see Setting permissions to use Amazon S3 Storage Lens in the Amazon S3 User Guide .
See also: AWS API Documentation
Request Syntax
client.put_storage_lens_configuration( ConfigId='string', AccountId='string', StorageLensConfiguration={ 'Id': 'string', 'AccountLevel': { 'ActivityMetrics': { 'IsEnabled': True|False }, 'BucketLevel': { 'ActivityMetrics': { 'IsEnabled': True|False }, 'PrefixLevel': { 'StorageMetrics': { 'IsEnabled': True|False, 'SelectionCriteria': { 'Delimiter': 'string', 'MaxDepth': 123, 'MinStorageBytesPercentage': 123.0 } } }, 'AdvancedCostOptimizationMetrics': { 'IsEnabled': True|False }, 'AdvancedDataProtectionMetrics': { 'IsEnabled': True|False }, 'DetailedStatusCodesMetrics': { 'IsEnabled': True|False } }, 'AdvancedCostOptimizationMetrics': { 'IsEnabled': True|False }, 'AdvancedDataProtectionMetrics': { 'IsEnabled': True|False }, 'DetailedStatusCodesMetrics': { 'IsEnabled': True|False }, 'StorageLensGroupLevel': { 'SelectionCriteria': { 'Include': [ 'string', ], 'Exclude': [ 'string', ] } } }, 'Include': { 'Buckets': [ 'string', ], 'Regions': [ 'string', ] }, 'Exclude': { 'Buckets': [ 'string', ], 'Regions': [ 'string', ] }, 'DataExport': { 'S3BucketDestination': { 'Format': 'CSV'|'Parquet', 'OutputSchemaVersion': 'V_1', 'AccountId': 'string', 'Arn': 'string', 'Prefix': 'string', 'Encryption': { 'SSES3': {} , 'SSEKMS': { 'KeyId': 'string' } } }, 'CloudWatchMetrics': { 'IsEnabled': True|False } }, 'IsEnabled': True|False, 'AwsOrg': { 'Arn': 'string' }, 'StorageLensArn': 'string' }, Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
string
[REQUIRED]
The ID of the S3 Storage Lens configuration.
string
[REQUIRED]
The account ID of the requester.
dict
[REQUIRED]
The S3 Storage Lens configuration.
Id (string) -- [REQUIRED]
A container for the Amazon S3 Storage Lens configuration ID.
AccountLevel (dict) -- [REQUIRED]
A container for all the account-level configurations of your S3 Storage Lens configuration.
ActivityMetrics (dict) --
A container element for S3 Storage Lens activity metrics.
IsEnabled (boolean) --
A container that indicates whether activity metrics are enabled.
BucketLevel (dict) -- [REQUIRED]
A container element for the S3 Storage Lens bucket-level configuration.
ActivityMetrics (dict) --
A container for the bucket-level activity metrics for S3 Storage Lens.
IsEnabled (boolean) --
A container that indicates whether activity metrics are enabled.
PrefixLevel (dict) --
A container for the prefix-level metrics for S3 Storage Lens.
StorageMetrics (dict) -- [REQUIRED]
A container for the prefix-level storage metrics for S3 Storage Lens.
IsEnabled (boolean) --
A container for whether prefix-level storage metrics are enabled.
SelectionCriteria (dict) --
Delimiter (string) --
A container for the delimiter of the selection criteria being used.
MaxDepth (integer) --
The max depth of the selection criteria
MinStorageBytesPercentage (float) --
The minimum number of storage bytes percentage whose metrics will be selected.
Note
You must choose a value greater than or equal to 1.0 .
AdvancedCostOptimizationMetrics (dict) --
A container for bucket-level advanced cost-optimization metrics for S3 Storage Lens.
IsEnabled (boolean) --
A container that indicates whether advanced cost-optimization metrics are enabled.
AdvancedDataProtectionMetrics (dict) --
A container for bucket-level advanced data-protection metrics for S3 Storage Lens.
IsEnabled (boolean) --
A container that indicates whether advanced data-protection metrics are enabled.
DetailedStatusCodesMetrics (dict) --
A container for bucket-level detailed status code metrics for S3 Storage Lens.
IsEnabled (boolean) --
A container that indicates whether detailed status code metrics are enabled.
AdvancedCostOptimizationMetrics (dict) --
A container element for S3 Storage Lens advanced cost-optimization metrics.
IsEnabled (boolean) --
A container that indicates whether advanced cost-optimization metrics are enabled.
AdvancedDataProtectionMetrics (dict) --
A container element for S3 Storage Lens advanced data-protection metrics.
IsEnabled (boolean) --
A container that indicates whether advanced data-protection metrics are enabled.
DetailedStatusCodesMetrics (dict) --
A container element for detailed status code metrics.
IsEnabled (boolean) --
A container that indicates whether detailed status code metrics are enabled.
StorageLensGroupLevel (dict) --
A container element for S3 Storage Lens groups metrics.
SelectionCriteria (dict) --
Indicates which Storage Lens group ARNs to include or exclude in the Storage Lens group aggregation. If this value is left null, then all Storage Lens groups are selected.
Include (list) --
Indicates which Storage Lens group ARNs to include in the Storage Lens group aggregation.
(string) --
Exclude (list) --
Indicates which Storage Lens group ARNs to exclude from the Storage Lens group aggregation.
(string) --
Include (dict) --
A container for what is included in this configuration. This container can only be valid if there is no Exclude container submitted, and it's not empty.
Buckets (list) --
A container for the S3 Storage Lens bucket includes.
(string) --
Regions (list) --
A container for the S3 Storage Lens Region includes.
(string) --
Exclude (dict) --
A container for what is excluded in this configuration. This container can only be valid if there is no Include container submitted, and it's not empty.
Buckets (list) --
A container for the S3 Storage Lens bucket excludes.
(string) --
Regions (list) --
A container for the S3 Storage Lens Region excludes.
(string) --
DataExport (dict) --
A container to specify the properties of your S3 Storage Lens metrics export including, the destination, schema and format.
S3BucketDestination (dict) --
A container for the bucket where the S3 Storage Lens metrics export will be located.
Note
This bucket must be located in the same Region as the storage lens configuration.
Format (string) -- [REQUIRED]
OutputSchemaVersion (string) -- [REQUIRED]
The schema version of the export file.
AccountId (string) -- [REQUIRED]
The account ID of the owner of the S3 Storage Lens metrics export bucket.
Arn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the bucket. This property is read-only and follows the following format: ``arn:aws:s3:us-east-1 :example-account-id :bucket/your-destination-bucket-name ``
Prefix (string) --
The prefix of the destination bucket where the metrics export will be delivered.
Encryption (dict) --
The container for the type encryption of the metrics exports in this bucket.
SSES3 (dict) --
SSEKMS (dict) --
KeyId (string) -- [REQUIRED]
A container for the ARN of the SSE-KMS encryption. This property is read-only and follows the following format: ``arn:aws:kms:us-east-1 :example-account-id :key/example-9a73-4afc-8d29-8f5900cef44e ``
CloudWatchMetrics (dict) --
A container for enabling Amazon CloudWatch publishing for S3 Storage Lens metrics.
IsEnabled (boolean) -- [REQUIRED]
A container that indicates whether CloudWatch publishing for S3 Storage Lens metrics is enabled. A value of true indicates that CloudWatch publishing for S3 Storage Lens metrics is enabled.
IsEnabled (boolean) -- [REQUIRED]
A container for whether the S3 Storage Lens configuration is enabled.
AwsOrg (dict) --
A container for the Amazon Web Services organization for this S3 Storage Lens configuration.
Arn (string) -- [REQUIRED]
A container for the Amazon Resource Name (ARN) of the Amazon Web Services organization. This property is read-only and follows the following format: ``arn:aws:organizations:us-east-1 :example-account-id :organization/o-ex2l495dck ``
StorageLensArn (string) --
The Amazon Resource Name (ARN) of the S3 Storage Lens configuration. This property is read-only and follows the following format: ``arn:aws:s3:us-east-1 :example-account-id :storage-lens/your-dashboard-name ``
list
The tag set of the S3 Storage Lens configuration.
Note
You can set up to a maximum of 50 tags.
(dict) --
Key (string) -- [REQUIRED]
Value (string) -- [REQUIRED]
None