/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the mediastore-2017-09-01.normal.json service model.
*/
using System;
using System.Runtime.ExceptionServices;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Net;
using Amazon.MediaStore.Model;
using Amazon.MediaStore.Model.Internal.MarshallTransformations;
using Amazon.MediaStore.Internal;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Auth;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.MediaStore
{
///
/// Implementation for accessing MediaStore
///
/// An AWS Elemental MediaStore container is a namespace that holds folders and objects.
/// You use a container endpoint to create, read, and delete objects.
///
public partial class AmazonMediaStoreClient : AmazonServiceClient, IAmazonMediaStore
{
private static IServiceMetadata serviceMetadata = new AmazonMediaStoreMetadata();
#region Constructors
///
/// Constructs AmazonMediaStoreClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
///
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
///
///
///
public AmazonMediaStoreClient()
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonMediaStoreConfig()) { }
///
/// Constructs AmazonMediaStoreClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
///
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
///
///
///
/// The region to connect.
public AmazonMediaStoreClient(RegionEndpoint region)
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonMediaStoreConfig{RegionEndpoint = region}) { }
///
/// Constructs AmazonMediaStoreClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
///
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
///
///
///
/// The AmazonMediaStoreClient Configuration Object
public AmazonMediaStoreClient(AmazonMediaStoreConfig config)
: base(FallbackCredentialsFactory.GetCredentials(config), config){}
///
/// Constructs AmazonMediaStoreClient with AWS Credentials
///
/// AWS Credentials
public AmazonMediaStoreClient(AWSCredentials credentials)
: this(credentials, new AmazonMediaStoreConfig())
{
}
///
/// Constructs AmazonMediaStoreClient with AWS Credentials
///
/// AWS Credentials
/// The region to connect.
public AmazonMediaStoreClient(AWSCredentials credentials, RegionEndpoint region)
: this(credentials, new AmazonMediaStoreConfig{RegionEndpoint = region})
{
}
///
/// Constructs AmazonMediaStoreClient with AWS Credentials and an
/// AmazonMediaStoreClient Configuration object.
///
/// AWS Credentials
/// The AmazonMediaStoreClient Configuration Object
public AmazonMediaStoreClient(AWSCredentials credentials, AmazonMediaStoreConfig clientConfig)
: base(credentials, clientConfig)
{
}
///
/// Constructs AmazonMediaStoreClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
public AmazonMediaStoreClient(string awsAccessKeyId, string awsSecretAccessKey)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonMediaStoreConfig())
{
}
///
/// Constructs AmazonMediaStoreClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// The region to connect.
public AmazonMediaStoreClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonMediaStoreConfig() {RegionEndpoint=region})
{
}
///
/// Constructs AmazonMediaStoreClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonMediaStoreClient Configuration object.
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// The AmazonMediaStoreClient Configuration Object
public AmazonMediaStoreClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonMediaStoreConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, clientConfig)
{
}
///
/// Constructs AmazonMediaStoreClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
public AmazonMediaStoreClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonMediaStoreConfig())
{
}
///
/// Constructs AmazonMediaStoreClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
/// The region to connect.
public AmazonMediaStoreClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonMediaStoreConfig{RegionEndpoint = region})
{
}
///
/// Constructs AmazonMediaStoreClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonMediaStoreClient Configuration object.
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
/// The AmazonMediaStoreClient Configuration Object
public AmazonMediaStoreClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonMediaStoreConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig)
{
}
#endregion
#if AWS_ASYNC_ENUMERABLES_API
private IMediaStorePaginatorFactory _paginators;
///
/// Paginators for the service
///
public IMediaStorePaginatorFactory Paginators
{
get
{
if (this._paginators == null)
{
this._paginators = new MediaStorePaginatorFactory(this);
}
return this._paginators;
}
}
#endif
#region Overrides
///
/// Creates the signer for the service.
///
protected override AbstractAWSSigner CreateSigner()
{
return new AWS4Signer();
}
///
/// Customizes the runtime pipeline.
///
/// Runtime pipeline for the current client.
protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
{
pipeline.RemoveHandler();
pipeline.AddHandlerAfter(new AmazonMediaStoreEndpointResolver());
}
///
/// Capture metadata for the service.
///
protected override IServiceMetadata ServiceMetadata
{
get
{
return serviceMetadata;
}
}
#endregion
#region Dispose
///
/// Disposes the service client.
///
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
}
#endregion
#region CreateContainer
internal virtual CreateContainerResponse CreateContainer(CreateContainerRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateContainerRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateContainerResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Creates a storage container to hold objects. A container is similar to a bucket in
/// the Amazon S3 service.
///
/// Container for the necessary parameters to execute the CreateContainer service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the CreateContainer service method, as returned by MediaStore.
///
/// The container that you specified in the request already exists or is being updated.
///
///
/// The service is temporarily unavailable.
///
///
/// A service limit has been exceeded.
///
/// REST API Reference for CreateContainer Operation
public virtual Task CreateContainerAsync(CreateContainerRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateContainerRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateContainerResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region DeleteContainer
internal virtual DeleteContainerResponse DeleteContainer(DeleteContainerRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteContainerRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteContainerResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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.
///
/// Container for the necessary parameters to execute the DeleteContainer service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the DeleteContainer service method, as returned by MediaStore.
///
/// The container that you specified in the request already exists or is being updated.
///
///
/// The container that you specified in the request does not exist.
///
///
/// The service is temporarily unavailable.
///
/// REST API Reference for DeleteContainer Operation
public virtual Task DeleteContainerAsync(DeleteContainerRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteContainerRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteContainerResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region DeleteContainerPolicy
internal virtual DeleteContainerPolicyResponse DeleteContainerPolicy(DeleteContainerPolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteContainerPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteContainerPolicyResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Deletes the access policy that is associated with the specified container.
///
/// Container for the necessary parameters to execute the DeleteContainerPolicy service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the DeleteContainerPolicy service method, as returned by MediaStore.
///
/// The container that you specified in the request already exists or is being updated.
///
///
/// The container that you specified in the request does not exist.
///
///
/// The service is temporarily unavailable.
///
///
/// The policy that you specified in the request does not exist.
///
/// REST API Reference for DeleteContainerPolicy Operation
public virtual Task DeleteContainerPolicyAsync(DeleteContainerPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteContainerPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteContainerPolicyResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region DeleteCorsPolicy
internal virtual DeleteCorsPolicyResponse DeleteCorsPolicy(DeleteCorsPolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteCorsPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteCorsPolicyResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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.
///
///
/// Container for the necessary parameters to execute the DeleteCorsPolicy service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the DeleteCorsPolicy service method, as returned by MediaStore.
///
/// The container that you specified in the request already exists or is being updated.
///
///
/// The container that you specified in the request does not exist.
///
///
/// The CORS policy that you specified in the request does not exist.
///
///
/// The service is temporarily unavailable.
///
/// REST API Reference for DeleteCorsPolicy Operation
public virtual Task DeleteCorsPolicyAsync(DeleteCorsPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteCorsPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteCorsPolicyResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region DeleteLifecyclePolicy
internal virtual DeleteLifecyclePolicyResponse DeleteLifecyclePolicy(DeleteLifecyclePolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteLifecyclePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteLifecyclePolicyResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Removes an object lifecycle policy from a container. It takes up to 20 minutes for
/// the change to take effect.
///
/// Container for the necessary parameters to execute the DeleteLifecyclePolicy service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the DeleteLifecyclePolicy service method, as returned by MediaStore.
///
/// The container that you specified in the request already exists or is being updated.
///
///
/// The container that you specified in the request does not exist.
///
///
/// The service is temporarily unavailable.
///
///
/// The policy that you specified in the request does not exist.
///
/// REST API Reference for DeleteLifecyclePolicy Operation
public virtual Task DeleteLifecyclePolicyAsync(DeleteLifecyclePolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteLifecyclePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteLifecyclePolicyResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region DeleteMetricPolicy
internal virtual DeleteMetricPolicyResponse DeleteMetricPolicy(DeleteMetricPolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteMetricPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteMetricPolicyResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Deletes the metric policy that is associated with the specified container. If there
/// is no metric policy associated with the container, MediaStore doesn't send metrics
/// to CloudWatch.
///
/// Container for the necessary parameters to execute the DeleteMetricPolicy service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the DeleteMetricPolicy service method, as returned by MediaStore.
///
/// The container that you specified in the request already exists or is being updated.
///
///
/// The container that you specified in the request does not exist.
///
///
/// The service is temporarily unavailable.
///
///
/// The policy that you specified in the request does not exist.
///
/// REST API Reference for DeleteMetricPolicy Operation
public virtual Task DeleteMetricPolicyAsync(DeleteMetricPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteMetricPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteMetricPolicyResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region DescribeContainer
internal virtual DescribeContainerResponse DescribeContainer(DescribeContainerRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeContainerRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeContainerResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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.
///
/// Container for the necessary parameters to execute the DescribeContainer service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the DescribeContainer service method, as returned by MediaStore.
///
/// The container that you specified in the request does not exist.
///
///
/// The service is temporarily unavailable.
///
/// REST API Reference for DescribeContainer Operation
public virtual Task DescribeContainerAsync(DescribeContainerRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeContainerRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeContainerResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region GetContainerPolicy
internal virtual GetContainerPolicyResponse GetContainerPolicy(GetContainerPolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetContainerPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetContainerPolicyResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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.
///
/// Container for the necessary parameters to execute the GetContainerPolicy service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the GetContainerPolicy service method, as returned by MediaStore.
///
/// The container that you specified in the request already exists or is being updated.
///
///
/// The container that you specified in the request does not exist.
///
///
/// The service is temporarily unavailable.
///
///
/// The policy that you specified in the request does not exist.
///
/// REST API Reference for GetContainerPolicy Operation
public virtual Task GetContainerPolicyAsync(GetContainerPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetContainerPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetContainerPolicyResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region GetCorsPolicy
internal virtual GetCorsPolicyResponse GetCorsPolicy(GetCorsPolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetCorsPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetCorsPolicyResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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.
///
///
/// Container for the necessary parameters to execute the GetCorsPolicy service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the GetCorsPolicy service method, as returned by MediaStore.
///
/// The container that you specified in the request already exists or is being updated.
///
///
/// The container that you specified in the request does not exist.
///
///
/// The CORS policy that you specified in the request does not exist.
///
///
/// The service is temporarily unavailable.
///
/// REST API Reference for GetCorsPolicy Operation
public virtual Task GetCorsPolicyAsync(GetCorsPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetCorsPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetCorsPolicyResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region GetLifecyclePolicy
internal virtual GetLifecyclePolicyResponse GetLifecyclePolicy(GetLifecyclePolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetLifecyclePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetLifecyclePolicyResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Retrieves the object lifecycle policy that is assigned to a container.
///
/// Container for the necessary parameters to execute the GetLifecyclePolicy service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the GetLifecyclePolicy service method, as returned by MediaStore.
///
/// The container that you specified in the request already exists or is being updated.
///
///
/// The container that you specified in the request does not exist.
///
///
/// The service is temporarily unavailable.
///
///
/// The policy that you specified in the request does not exist.
///
/// REST API Reference for GetLifecyclePolicy Operation
public virtual Task GetLifecyclePolicyAsync(GetLifecyclePolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetLifecyclePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetLifecyclePolicyResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region GetMetricPolicy
internal virtual GetMetricPolicyResponse GetMetricPolicy(GetMetricPolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetMetricPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetMetricPolicyResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Returns the metric policy for the specified container.
///
/// Container for the necessary parameters to execute the GetMetricPolicy service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the GetMetricPolicy service method, as returned by MediaStore.
///
/// The container that you specified in the request already exists or is being updated.
///
///
/// The container that you specified in the request does not exist.
///
///
/// The service is temporarily unavailable.
///
///
/// The policy that you specified in the request does not exist.
///
/// REST API Reference for GetMetricPolicy Operation
public virtual Task GetMetricPolicyAsync(GetMetricPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetMetricPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetMetricPolicyResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ListContainers
internal virtual ListContainersResponse ListContainers(ListContainersRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListContainersRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListContainersResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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.
///
///
/// Container for the necessary parameters to execute the ListContainers service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ListContainers service method, as returned by MediaStore.
///
/// The service is temporarily unavailable.
///
/// REST API Reference for ListContainers Operation
public virtual Task ListContainersAsync(ListContainersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListContainersRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListContainersResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ListTagsForResource
internal virtual ListTagsForResourceResponse ListTagsForResource(ListTagsForResourceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTagsForResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTagsForResourceResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Returns a list of the tags assigned to the specified container.
///
/// Container for the necessary parameters to execute the ListTagsForResource service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ListTagsForResource service method, as returned by MediaStore.
///
/// The container that you specified in the request already exists or is being updated.
///
///
/// The container that you specified in the request does not exist.
///
///
/// The service is temporarily unavailable.
///
/// REST API Reference for ListTagsForResource Operation
public virtual Task ListTagsForResourceAsync(ListTagsForResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTagsForResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTagsForResourceResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region PutContainerPolicy
internal virtual PutContainerPolicyResponse PutContainerPolicy(PutContainerPolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutContainerPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutContainerPolicyResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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.
///
///
/// Container for the necessary parameters to execute the PutContainerPolicy service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the PutContainerPolicy service method, as returned by MediaStore.
///
/// The container that you specified in the request already exists or is being updated.
///
///
/// The container that you specified in the request does not exist.
///
///
/// The service is temporarily unavailable.
///
/// REST API Reference for PutContainerPolicy Operation
public virtual Task PutContainerPolicyAsync(PutContainerPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = PutContainerPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutContainerPolicyResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region PutCorsPolicy
internal virtual PutCorsPolicyResponse PutCorsPolicy(PutCorsPolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutCorsPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutCorsPolicyResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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.
///
///
/// Container for the necessary parameters to execute the PutCorsPolicy service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the PutCorsPolicy service method, as returned by MediaStore.
///
/// The container that you specified in the request already exists or is being updated.
///
///
/// The container that you specified in the request does not exist.
///
///
/// The service is temporarily unavailable.
///
/// REST API Reference for PutCorsPolicy Operation
public virtual Task PutCorsPolicyAsync(PutCorsPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = PutCorsPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutCorsPolicyResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region PutLifecyclePolicy
internal virtual PutLifecyclePolicyResponse PutLifecyclePolicy(PutLifecyclePolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutLifecyclePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutLifecyclePolicyResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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.
///
///
/// Container for the necessary parameters to execute the PutLifecyclePolicy service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the PutLifecyclePolicy service method, as returned by MediaStore.
///
/// The container that you specified in the request already exists or is being updated.
///
///
/// The container that you specified in the request does not exist.
///
///
/// The service is temporarily unavailable.
///
/// REST API Reference for PutLifecyclePolicy Operation
public virtual Task PutLifecyclePolicyAsync(PutLifecyclePolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = PutLifecyclePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutLifecyclePolicyResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region PutMetricPolicy
internal virtual PutMetricPolicyResponse PutMetricPolicy(PutMetricPolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutMetricPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutMetricPolicyResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// The metric policy that you want to add to the container. A metric policy allows AWS
/// Elemental MediaStore to send metrics to Amazon CloudWatch. It takes up to 20 minutes
/// for the new policy to take effect.
///
/// Container for the necessary parameters to execute the PutMetricPolicy service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the PutMetricPolicy service method, as returned by MediaStore.
///
/// The container that you specified in the request already exists or is being updated.
///
///
/// The container that you specified in the request does not exist.
///
///
/// The service is temporarily unavailable.
///
/// REST API Reference for PutMetricPolicy Operation
public virtual Task PutMetricPolicyAsync(PutMetricPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = PutMetricPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutMetricPolicyResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region StartAccessLogging
internal virtual StartAccessLoggingResponse StartAccessLogging(StartAccessLoggingRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartAccessLoggingRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartAccessLoggingResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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.
///
/// Container for the necessary parameters to execute the StartAccessLogging service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the StartAccessLogging service method, as returned by MediaStore.
///
/// The container that you specified in the request already exists or is being updated.
///
///
/// The container that you specified in the request does not exist.
///
///
/// The service is temporarily unavailable.
///
/// REST API Reference for StartAccessLogging Operation
public virtual Task StartAccessLoggingAsync(StartAccessLoggingRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StartAccessLoggingRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartAccessLoggingResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region StopAccessLogging
internal virtual StopAccessLoggingResponse StopAccessLogging(StopAccessLoggingRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StopAccessLoggingRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopAccessLoggingResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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.
///
/// Container for the necessary parameters to execute the StopAccessLogging service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the StopAccessLogging service method, as returned by MediaStore.
///
/// The container that you specified in the request already exists or is being updated.
///
///
/// The container that you specified in the request does not exist.
///
///
/// The service is temporarily unavailable.
///
/// REST API Reference for StopAccessLogging Operation
public virtual Task StopAccessLoggingAsync(StopAccessLoggingRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StopAccessLoggingRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopAccessLoggingResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region TagResource
internal virtual TagResourceResponse TagResource(TagResourceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = TagResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = TagResourceResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Adds tags to the specified AWS Elemental MediaStore container. Tags are key:value
/// pairs that you can associate with AWS resources. For example, the tag key might be
/// "customer" and the tag value might be "companyA." You can specify one or more tags
/// to add to each container. You can add up to 50 tags to each container. For more information
/// about tagging, including naming and usage conventions, see Tagging
/// Resources in MediaStore.
///
/// Container for the necessary parameters to execute the TagResource service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the TagResource service method, as returned by MediaStore.
///
/// The container that you specified in the request already exists or is being updated.
///
///
/// The container that you specified in the request does not exist.
///
///
/// The service is temporarily unavailable.
///
/// REST API Reference for TagResource Operation
public virtual Task TagResourceAsync(TagResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = TagResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = TagResourceResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region UntagResource
internal virtual UntagResourceResponse UntagResource(UntagResourceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UntagResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = UntagResourceResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Removes tags from the specified container. You can specify one or more tags to remove.
///
/// Container for the necessary parameters to execute the UntagResource service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the UntagResource service method, as returned by MediaStore.
///
/// The container that you specified in the request already exists or is being updated.
///
///
/// The container that you specified in the request does not exist.
///
///
/// The service is temporarily unavailable.
///
/// REST API Reference for UntagResource Operation
public virtual Task UntagResourceAsync(UntagResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = UntagResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = UntagResourceResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
}
}