Class: AWS.MediaStore

Inherits:
AWS.Service show all
Identifier:
mediastore
API Version:
2017-09-01
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

An AWS Elemental MediaStore container is a namespace that holds folders and objects. You use a container endpoint to create, read, and delete objects.

Sending a Request Using MediaStore

var mediastore = new AWS.MediaStore();
mediastore.createContainer(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the MediaStore object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var mediastore = new AWS.MediaStore({apiVersion: '2017-09-01'});

You can also set the API version globally in AWS.config.apiVersions using the mediastore service identifier:

AWS.config.apiVersions = {
  mediastore: '2017-09-01',
  // other service API versions
};

var mediastore = new AWS.MediaStore();

Version:

  • 2017-09-01

Constructor Summary

Property Summary

Properties inherited from AWS.Service

apiVersions

Method Summary

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.MediaStore(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a MediaStore object

var mediastore = new AWS.MediaStore({apiVersion: '2017-09-01'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com'.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.MediaStore.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.MediaStore.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.MediaStore.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and returns the amount of time to delay in milliseconds. The base option will be ignored if this option is supplied.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean)

    whether to enable endpoint discovery for operations that allow optionally using an endpoint returned by the service. Defaults to 'false'

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

createContainer(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the createContainer operation

var params = {
  ContainerName: 'STRING_VALUE' /* required */
};
mediastore.createContainer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ContainerName — (String)

      The name for the container. The name must be from 1 to 255 characters. Container names must be unique to your AWS account within a specific region. As an example, you could create a container named movies in every region, as long as you don’t have an existing container with that name.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Container — (map)

        ContainerARN: The Amazon Resource Name (ARN) of the newly created 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

        ContainerName: The container name as specified in the request.

        CreationTime: Unix time stamp.

        Status: The 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 an endpoint is available, the status changes to ACTIVE.

        The return value does not include the container's endpoint. To make downstream requests, you must obtain this value by using DescribeContainer or ListContainers.

        • Endpoint — (String)

          The 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.

        • CreationTime — (Date)

          Unix timestamp.

        • ARN — (String)

          The 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

        • Name — (String)

          The name of the container.

        • Status — (String)

          The 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.

          Possible values include:
          • "ACTIVE"
          • "CREATING"
          • "DELETING"
        • AccessLoggingEnabled — (Boolean)

          The 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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteContainer(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the deleteContainer operation

var params = {
  ContainerName: 'STRING_VALUE' /* required */
};
mediastore.deleteContainer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ContainerName — (String)

      The name of the container to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteContainerPolicy(params = {}, callback) ⇒ AWS.Request

Deletes the access policy that is associated with the specified container.

Service Reference:

Examples:

Calling the deleteContainerPolicy operation

var params = {
  ContainerName: 'STRING_VALUE' /* required */
};
mediastore.deleteContainerPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ContainerName — (String)

      The name of the container that holds the policy.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteCorsPolicy(params = {}, callback) ⇒ AWS.Request

Deletes the cross-origin resource sharing (CORS) configuration information that is set for the container.

To use this operation, you must have permission to perform the MediaStore:DeleteCorsPolicy action. The container owner has this permission by default and can grant this permission to others.

Service Reference:

Examples:

Calling the deleteCorsPolicy operation

var params = {
  ContainerName: 'STRING_VALUE' /* required */
};
mediastore.deleteCorsPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ContainerName — (String)

      The name of the container to remove the policy from.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteLifecyclePolicy(params = {}, callback) ⇒ AWS.Request

Removes an object lifecycle policy from a container. It takes up to 20 minutes for the change to take effect.

Service Reference:

Examples:

Calling the deleteLifecyclePolicy operation

var params = {
  ContainerName: 'STRING_VALUE' /* required */
};
mediastore.deleteLifecyclePolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ContainerName — (String)

      The name of the container that holds the object lifecycle policy.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeContainer(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the describeContainer operation

var params = {
  ContainerName: 'STRING_VALUE'
};
mediastore.describeContainer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ContainerName — (String)

      The name of the container to query.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Container — (map)

        The name of the queried container.

        • Endpoint — (String)

          The 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.

        • CreationTime — (Date)

          Unix timestamp.

        • ARN — (String)

          The 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

        • Name — (String)

          The name of the container.

        • Status — (String)

          The 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.

          Possible values include:
          • "ACTIVE"
          • "CREATING"
          • "DELETING"
        • AccessLoggingEnabled — (Boolean)

          The 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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getContainerPolicy(params = {}, callback) ⇒ AWS.Request

Retrieves the access policy for the specified container. For information about the data that is included in an access policy, see the AWS Identity and Access Management User Guide.

Service Reference:

Examples:

Calling the getContainerPolicy operation

var params = {
  ContainerName: 'STRING_VALUE' /* required */
};
mediastore.getContainerPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ContainerName — (String)

      The name of the container.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Policy — (String)

        The contents of the access policy.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getCorsPolicy(params = {}, callback) ⇒ AWS.Request

Returns the cross-origin resource sharing (CORS) configuration information that is set for the container.

To use this operation, you must have permission to perform the MediaStore:GetCorsPolicy action. By default, the container owner has this permission and can grant it to others.

Service Reference:

Examples:

Calling the getCorsPolicy operation

var params = {
  ContainerName: 'STRING_VALUE' /* required */
};
mediastore.getCorsPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ContainerName — (String)

      The name of the container that the policy is assigned to.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CorsPolicy — (Array<map>)

        The CORS policy assigned to the container.

        • AllowedOriginsrequired — (Array<String>)

          One or more response headers that you want users to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object).

          Each CORS rule must have at least one AllowedOrigins element. The string value can include only one wildcard character (*), for example, http://*.example.com. Additionally, you can specify only one wildcard character to allow cross-origin access for all origins.

        • AllowedMethods — (Array<String>)

          Identifies an HTTP method that the origin that is specified in the rule is allowed to execute.

          Each CORS rule must contain at least one AllowedMethods and one AllowedOrigins element.

        • AllowedHeadersrequired — (Array<String>)

          Specifies which headers are allowed in a preflight OPTIONS request through the Access-Control-Request-Headers header. Each header name that is specified in Access-Control-Request-Headers must have a corresponding entry in the rule. Only the headers that were requested are sent back.

          This element can contain only one wildcard character (*).

        • MaxAgeSeconds — (Integer)

          The time in seconds that your browser caches the preflight response for the specified resource.

          A CORS rule can have only one MaxAgeSeconds element.

        • ExposeHeaders — (Array<String>)

          One or more headers in the response that you want users to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object).

          This element is optional for each rule.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getLifecyclePolicy(params = {}, callback) ⇒ AWS.Request

Retrieves the object lifecycle policy that is assigned to a container.

Service Reference:

Examples:

Calling the getLifecyclePolicy operation

var params = {
  ContainerName: 'STRING_VALUE' /* required */
};
mediastore.getLifecyclePolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ContainerName — (String)

      The name of the container that the object lifecycle policy is assigned to.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • LifecyclePolicy — (String)

        The object lifecycle policy that is assigned to the container.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listContainers(params = {}, callback) ⇒ AWS.Request

Lists 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.

Service Reference:

Examples:

Calling the listContainers operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
mediastore.listContainers(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NextToken — (String)

      Only if you used MaxResults in the first command, enter the token (which was included in the previous response) to obtain the next set of containers. This token is included in a response only if there actually are more containers to list.

    • MaxResults — (Integer)

      Enter the maximum number of containers in the response. Use from 1 to 255 characters.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Containers — (Array<map>)

        The names of the containers.

        • Endpoint — (String)

          The 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.

        • CreationTime — (Date)

          Unix timestamp.

        • ARN — (String)

          The 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

        • Name — (String)

          The name of the container.

        • Status — (String)

          The 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.

          Possible values include:
          • "ACTIVE"
          • "CREATING"
          • "DELETING"
        • AccessLoggingEnabled — (Boolean)

          The 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.

      • NextToken — (String)

        NextToken is the token to use in the next call to ListContainers. This token is returned only if you included the MaxResults tag in the original command, and only if there are still containers to return.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

putContainerPolicy(params = {}, callback) ⇒ AWS.Request

Creates an access policy for the specified container to restrict the users and clients that can access it. For information about the data that is included in an access policy, see the AWS Identity and Access Management User Guide.

For this release of the REST API, you can create only one policy for a container. If you enter PutContainerPolicy twice, the second command modifies the existing policy.

Service Reference:

Examples:

Calling the putContainerPolicy operation

var params = {
  ContainerName: 'STRING_VALUE', /* required */
  Policy: 'STRING_VALUE' /* required */
};
mediastore.putContainerPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ContainerName — (String)

      The name of the container.

    • Policy — (String)

      The contents of the policy, which includes the following:

      • One Version tag

      • One Statement tag that contains the standard tags for the policy.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

putCorsPolicy(params = {}, callback) ⇒ AWS.Request

Sets the cross-origin resource sharing (CORS) configuration on a container so that the container can service cross-origin requests. For example, you might want to enable a request whose origin is http://www.example.com to access your AWS Elemental MediaStore container at my.example.container.com by using the browser's XMLHttpRequest capability.

To enable CORS on a container, you attach a CORS policy to the container. In the CORS policy, you configure rules that identify origins and the HTTP methods that can be executed on your container. The policy can contain up to 398,000 characters. You can add up to 100 rules to a CORS policy. If more than one rule applies, the service uses the first applicable rule listed.

To learn more about CORS, see Cross-Origin Resource Sharing (CORS) in AWS Elemental MediaStore.

Service Reference:

Examples:

Calling the putCorsPolicy operation

var params = {
  ContainerName: 'STRING_VALUE', /* required */
  CorsPolicy: [ /* required */
    {
      AllowedHeaders: [ /* required */
        'STRING_VALUE',
        /* more items */
      ],
      AllowedOrigins: [ /* required */
        'STRING_VALUE',
        /* more items */
      ],
      AllowedMethods: [
        PUT | GET | DELETE | HEAD,
        /* more items */
      ],
      ExposeHeaders: [
        'STRING_VALUE',
        /* more items */
      ],
      MaxAgeSeconds: 'NUMBER_VALUE'
    },
    /* more items */
  ]
};
mediastore.putCorsPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ContainerName — (String)

      The name of the container that you want to assign the CORS policy to.

    • CorsPolicy — (Array<map>)

      The CORS policy to apply to the container.

      • AllowedOriginsrequired — (Array<String>)

        One or more response headers that you want users to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object).

        Each CORS rule must have at least one AllowedOrigins element. The string value can include only one wildcard character (*), for example, http://*.example.com. Additionally, you can specify only one wildcard character to allow cross-origin access for all origins.

      • AllowedMethods — (Array<String>)

        Identifies an HTTP method that the origin that is specified in the rule is allowed to execute.

        Each CORS rule must contain at least one AllowedMethods and one AllowedOrigins element.

      • AllowedHeadersrequired — (Array<String>)

        Specifies which headers are allowed in a preflight OPTIONS request through the Access-Control-Request-Headers header. Each header name that is specified in Access-Control-Request-Headers must have a corresponding entry in the rule. Only the headers that were requested are sent back.

        This element can contain only one wildcard character (*).

      • MaxAgeSeconds — (Integer)

        The time in seconds that your browser caches the preflight response for the specified resource.

        A CORS rule can have only one MaxAgeSeconds element.

      • ExposeHeaders — (Array<String>)

        One or more headers in the response that you want users to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object).

        This element is optional for each rule.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

putLifecyclePolicy(params = {}, callback) ⇒ AWS.Request

Writes an object lifecycle policy to a container. If the container already has an object lifecycle policy, the service replaces the existing policy with the new policy. It takes up to 20 minutes for the change to take effect.

For information about how to construct an object lifecycle policy, see Components of an Object Lifecycle Policy.

Service Reference:

Examples:

Calling the putLifecyclePolicy operation

var params = {
  ContainerName: 'STRING_VALUE', /* required */
  LifecyclePolicy: 'STRING_VALUE' /* required */
};
mediastore.putLifecyclePolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ContainerName — (String)

      The name of the container that you want to assign the object lifecycle policy to.

    • LifecyclePolicy — (String)

      The object lifecycle policy to apply to the container.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startAccessLogging(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the startAccessLogging operation

var params = {
  ContainerName: 'STRING_VALUE' /* required */
};
mediastore.startAccessLogging(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ContainerName — (String)

      The name of the container that you want to start access logging on.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

stopAccessLogging(params = {}, callback) ⇒ AWS.Request

Stops 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.

Service Reference:

Examples:

Calling the stopAccessLogging operation

var params = {
  ContainerName: 'STRING_VALUE' /* required */
};
mediastore.stopAccessLogging(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ContainerName — (String)

      The name of the container that you want to stop access logging on.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.