storage_lens_groups
Creates, updates, deletes, gets or lists a storage_lens_groups resource.
Overview
| Name | storage_lens_groups |
| Type | Resource |
| Id | aws.s3control.storage_lens_groups |
Fields
The following fields are returned by SELECT queries:
- get_storage_lens_group
- list_storage_lens_groups
| Name | Datatype | Description |
|---|---|---|
filter | string | Sets the criteria for the Storage Lens group data that is displayed. For multiple filter conditions, the AND or OR logical operator is used. |
name | string | Contains the name of the Storage Lens group. |
storage_lens_group_arn | string | Contains the Amazon Resource Name (ARN) of the Storage Lens group. This property is read-only. |
| Name | Datatype | Description |
|---|---|---|
home_region | string | Contains the Amazon Web Services Region where the Storage Lens group was created. |
name | string | Contains the name of the Storage Lens group that exists in the specified home Region. |
storage_lens_group_arn | string | Contains the Amazon Resource Name (ARN) of the Storage Lens group. This property is read-only. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_storage_lens_group | select | name, x-amz-account-id, region | 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. | |
list_storage_lens_groups | select | x-amz-account-id, region | nextToken | 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. |
create_storage_lens_group | insert | x-amz-account-id, region, StorageLensGroup | 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. | |
update_storage_lens_group | update | name, x-amz-account-id, region, StorageLensGroup | 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. | |
delete_storage_lens_group | delete | name, x-amz-account-id, region | 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. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the Storage Lens group that you're trying to delete. |
region | string | AWS region (default: us-east-1) |
x-amz-account-id | string | The Amazon Web Services account ID used to create the Storage Lens group that you're trying to delete. |
nextToken | string | The token for the next set of results, or null if there are no more results. |
SELECT examples
- get_storage_lens_group
- list_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.
SELECT
filter,
name,
storage_lens_group_arn
FROM aws.s3control.storage_lens_groups
WHERE name = '{{ name }}' -- required
AND `x-amz-account-id` = '{{ x-amz-account-id }}' -- required
AND region = '{{ region }}' -- required
;
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.
SELECT
home_region,
name,
storage_lens_group_arn
FROM aws.s3control.storage_lens_groups
WHERE `x-amz-account-id` = '{{ x-amz-account-id }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_storage_lens_group
- Manifest
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.
INSERT INTO aws.s3control.storage_lens_groups (
StorageLensGroup,
Tags,
`x-amz-account-id`,
region
)
SELECT
'{{ StorageLensGroup }}' /* required */,
'{{ Tags }}',
'{{ x-amz-account-id }}',
'{{ region }}'
;
# Description fields are for documentation purposes
- name: storage_lens_groups
props:
- name: x-amz-account-id
value: "{{ x-amz-account-id }}"
description: Required parameter for the storage_lens_groups resource.
- name: region
value: "{{ region }}"
description: Required parameter for the storage_lens_groups resource.
- name: StorageLensGroup
description: |
A custom grouping of objects that include filters for prefixes, suffixes, object tags, object size, or object age. You can create an S3 Storage Lens group that includes a single filter or multiple filter conditions. To specify multiple filter conditions, you use AND or OR logical operators.
value:
Name: "{{ Name }}"
Filter:
MatchAnyPrefix:
- "{{ MatchAnyPrefix }}"
MatchAnySuffix:
- "{{ MatchAnySuffix }}"
MatchAnyTag:
- Key: "{{ Key }}"
Value: "{{ Value }}"
MatchObjectAge:
DaysGreaterThan: {{ DaysGreaterThan }}
DaysLessThan: {{ DaysLessThan }}
MatchObjectSize:
BytesGreaterThan: {{ BytesGreaterThan }}
BytesLessThan: {{ BytesLessThan }}
And:
MatchAnyPrefix:
- "{{ MatchAnyPrefix }}"
MatchAnySuffix:
- "{{ MatchAnySuffix }}"
MatchAnyTag:
- Key: "{{ Key }}"
Value: "{{ Value }}"
MatchObjectAge:
DaysGreaterThan: {{ DaysGreaterThan }}
DaysLessThan: {{ DaysLessThan }}
MatchObjectSize:
BytesGreaterThan: {{ BytesGreaterThan }}
BytesLessThan: {{ BytesLessThan }}
Or:
MatchAnyPrefix:
- "{{ MatchAnyPrefix }}"
MatchAnySuffix:
- "{{ MatchAnySuffix }}"
MatchAnyTag:
- Key: "{{ Key }}"
Value: "{{ Value }}"
MatchObjectAge:
DaysGreaterThan: {{ DaysGreaterThan }}
DaysLessThan: {{ DaysLessThan }}
MatchObjectSize:
BytesGreaterThan: {{ BytesGreaterThan }}
BytesLessThan: {{ BytesLessThan }}
StorageLensGroupArn: "{{ StorageLensGroupArn }}"
- name: Tags
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- update_storage_lens_group
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.
UPDATE aws.s3control.storage_lens_groups
SET
StorageLensGroup = '{{ StorageLensGroup }}'
WHERE
name = '{{ name }}' --required
AND `x-amz-account-id` = '{{ x-amz-account-id }}' --required
AND region = '{{ region }}' --required
AND StorageLensGroup = '{{ StorageLensGroup }}' --required;
DELETE examples
- delete_storage_lens_group
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.
DELETE FROM aws.s3control.storage_lens_groups
WHERE name = '{{ name }}' --required
AND `x-amz-account-id` = '{{ x-amz-account-id }}' --required
AND region = '{{ region }}' --required
;