Skip to main content

containers

Creates, updates, deletes, gets or lists a containers resource.

Overview

Namecontainers
TypeResource
Idaws.mediastore.containers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the container. The ARN has the following format: arn:aws:<region>:<account that owns this container>:container/<name of container> For example: arn:aws:mediastore:us-west-2:111122223333:container/movies (pattern: <code>arn:aws:mediastore:[a-z]+-[a-z]+-\d:\d{12}:container/[\w-]{1,255}</code>)
access_logging_enabledbooleanThe state of access logging on the container. This value is false by default, indicating that AWS Elemental MediaStore does not send access logs to Amazon CloudWatch Logs. When you enable access logging on the container, MediaStore changes this value to true, indicating that the service delivers access logs for objects stored in that container to CloudWatch Logs.
creation_timestring (date-time)Unix timestamp.
endpointstringThe DNS endpoint of the container. Use the endpoint to identify the specific container when sending requests to the data plane. The service assigns this value when the container is created. Once the value has been assigned, it does not change. (pattern: <code>[\u0009\u000A\u000D\u0020-\u00FF]+</code>)
namestringThe name of the container. (pattern: <code>[\w-]+</code>)
statusstringThe status of container creation or deletion. The status is one of the following: CREATING, ACTIVE, or DELETING. While the service is creating the container, the status is CREATING. When the endpoint is available, the status changes to ACTIVE. (ACTIVE, CREATING, DELETING)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_containerselectregionRetrieves the properties of the requested container. This request is commonly used to retrieve the endpoint of a container. An endpoint is a value assigned by the service when a new container is created. A container's endpoint does not change after it has been assigned. The DescribeContainer request returns a single Container object based on ContainerName. To return all Container objects that are associated with a specified AWS account, use ListContainers.
list_containersselectregionLists the properties of all containers in AWS Elemental MediaStore. You can query to receive all the containers in one response. Or you can include the MaxResults parameter to receive a limited number of containers in each response. In this case, the response includes a token. To get the next set of containers, send the command again, this time with the NextToken parameter (with the returned token as its value). The next set of responses appears, with a token if there are still more containers to receive. See also DescribeContainer, which gets the properties of one container.
create_containerinsertregion, ContainerNameCreates a storage container to hold objects. A container is similar to a bucket in the Amazon S3 service.
delete_containerdeleteregionDeletes the specified container. Before you make a DeleteContainer request, delete any objects in the container or in any folders in the container. You can delete only empty containers.
start_access_loggingexecregion, ContainerNameStarts access logging on the specified container. When you enable access logging on a container, MediaStore delivers access logs for objects stored in that container to Amazon CloudWatch Logs.
stop_access_loggingexecregion, ContainerNameStops access logging on the specified container. When you stop access logging on a container, MediaStore stops sending access logs to Amazon CloudWatch Logs. These access logs are not saved and are not retrievable.

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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Retrieves the properties of the requested container. This request is commonly used to retrieve the endpoint of a container. An endpoint is a value assigned by the service when a new container is created. A container's endpoint does not change after it has been assigned. The DescribeContainer request returns a single Container object based on ContainerName. To return all Container objects that are associated with a specified AWS account, use ListContainers.

SELECT
arn,
access_logging_enabled,
creation_time,
endpoint,
name,
status
FROM aws.mediastore.containers
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a storage container to hold objects. A container is similar to a bucket in the Amazon S3 service.

INSERT INTO aws.mediastore.containers (
ContainerName,
Tags,
region
)
SELECT
'{{ ContainerName }}' /* required */,
'{{ Tags }}',
'{{ region }}'
RETURNING
container
;

DELETE examples

Deletes the specified container. Before you make a DeleteContainer request, delete any objects in the container or in any folders in the container. You can delete only empty containers.

DELETE FROM aws.mediastore.containers
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Starts access logging on the specified container. When you enable access logging on a container, MediaStore delivers access logs for objects stored in that container to Amazon CloudWatch Logs.

EXEC aws.mediastore.containers.start_access_logging
@region='{{ region }}' --required
@@json=
'{
"ContainerName": "{{ ContainerName }}"
}'
;