Class: Aws::MediaStore::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::MediaStore::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-mediastore/client.rb
Overview
An API client for MediaStore. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::MediaStore::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#create_container(params = {}) ⇒ Types::CreateContainerOutput
Creates a storage container to hold objects.
-
#delete_container(params = {}) ⇒ Struct
Deletes the specified container.
-
#delete_container_policy(params = {}) ⇒ Struct
Deletes the access policy that is associated with the specified container.
-
#delete_cors_policy(params = {}) ⇒ Struct
Deletes the cross-origin resource sharing (CORS) configuration information that is set for the container.
-
#delete_lifecycle_policy(params = {}) ⇒ Struct
Removes an object lifecycle policy from a container.
-
#delete_metric_policy(params = {}) ⇒ Struct
Deletes the metric policy that is associated with the specified container.
-
#describe_container(params = {}) ⇒ Types::DescribeContainerOutput
Retrieves the properties of the requested container.
-
#get_container_policy(params = {}) ⇒ Types::GetContainerPolicyOutput
Retrieves the access policy for the specified container.
-
#get_cors_policy(params = {}) ⇒ Types::GetCorsPolicyOutput
Returns the cross-origin resource sharing (CORS) configuration information that is set for the container.
-
#get_lifecycle_policy(params = {}) ⇒ Types::GetLifecyclePolicyOutput
Retrieves the object lifecycle policy that is assigned to a container.
-
#get_metric_policy(params = {}) ⇒ Types::GetMetricPolicyOutput
Returns the metric policy for the specified container.
-
#list_containers(params = {}) ⇒ Types::ListContainersOutput
Lists the properties of all containers in AWS Elemental MediaStore.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceOutput
Returns a list of the tags assigned to the specified container.
-
#put_container_policy(params = {}) ⇒ Struct
Creates an access policy for the specified container to restrict the users and clients that can access it.
-
#put_cors_policy(params = {}) ⇒ Struct
Sets the cross-origin resource sharing (CORS) configuration on a container so that the container can service cross-origin requests.
-
#put_lifecycle_policy(params = {}) ⇒ Struct
Writes an object lifecycle policy to a container.
-
#put_metric_policy(params = {}) ⇒ Struct
The metric policy that you want to add to the container.
-
#start_access_logging(params = {}) ⇒ Struct
Starts access logging on the specified container.
-
#stop_access_logging(params = {}) ⇒ Struct
Stops access logging on the specified container.
-
#tag_resource(params = {}) ⇒ Struct
Adds tags to the specified AWS Elemental MediaStore container.
-
#untag_resource(params = {}) ⇒ Struct
Removes tags from the specified container.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
451 452 453 |
# File 'lib/aws-sdk-mediastore/client.rb', line 451 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1241 1242 1243 |
# File 'lib/aws-sdk-mediastore/client.rb', line 1241 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1244 1245 1246 |
# File 'lib/aws-sdk-mediastore/client.rb', line 1244 def errors_module Errors end |
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 |
# File 'lib/aws-sdk-mediastore/client.rb', line 1214 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::MediaStore') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-mediastore' context[:gem_version] = '1.66.0' Seahorse::Client::Request.new(handlers, context) end |
#create_container(params = {}) ⇒ Types::CreateContainerOutput
Creates a storage container to hold objects. A container is similar to a bucket in the Amazon S3 service.
509 510 511 512 |
# File 'lib/aws-sdk-mediastore/client.rb', line 509 def create_container(params = {}, = {}) req = build_request(:create_container, params) req.send_request() end |
#delete_container(params = {}) ⇒ Struct
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.
533 534 535 536 |
# File 'lib/aws-sdk-mediastore/client.rb', line 533 def delete_container(params = {}, = {}) req = build_request(:delete_container, params) req.send_request() end |
#delete_container_policy(params = {}) ⇒ Struct
Deletes the access policy that is associated with the specified container.
556 557 558 559 |
# File 'lib/aws-sdk-mediastore/client.rb', line 556 def delete_container_policy(params = {}, = {}) req = build_request(:delete_container_policy, params) req.send_request() end |
#delete_cors_policy(params = {}) ⇒ Struct
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.
583 584 585 586 |
# File 'lib/aws-sdk-mediastore/client.rb', line 583 def delete_cors_policy(params = {}, = {}) req = build_request(:delete_cors_policy, params) req.send_request() end |
#delete_lifecycle_policy(params = {}) ⇒ Struct
Removes an object lifecycle policy from a container. It takes up to 20 minutes for the change to take effect.
606 607 608 609 |
# File 'lib/aws-sdk-mediastore/client.rb', line 606 def delete_lifecycle_policy(params = {}, = {}) req = build_request(:delete_lifecycle_policy, params) req.send_request() end |
#delete_metric_policy(params = {}) ⇒ Struct
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.
631 632 633 634 |
# File 'lib/aws-sdk-mediastore/client.rb', line 631 def delete_metric_policy(params = {}, = {}) req = build_request(:delete_metric_policy, params) req.send_request() end |
#describe_container(params = {}) ⇒ Types::DescribeContainerOutput
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.
670 671 672 673 |
# File 'lib/aws-sdk-mediastore/client.rb', line 670 def describe_container(params = {}, = {}) req = build_request(:describe_container, params) req.send_request() end |
#get_container_policy(params = {}) ⇒ Types::GetContainerPolicyOutput
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].
704 705 706 707 |
# File 'lib/aws-sdk-mediastore/client.rb', line 704 def get_container_policy(params = {}, = {}) req = build_request(:get_container_policy, params) req.send_request() end |
#get_cors_policy(params = {}) ⇒ Types::GetCorsPolicyOutput
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.
746 747 748 749 |
# File 'lib/aws-sdk-mediastore/client.rb', line 746 def get_cors_policy(params = {}, = {}) req = build_request(:get_cors_policy, params) req.send_request() end |
#get_lifecycle_policy(params = {}) ⇒ Types::GetLifecyclePolicyOutput
Retrieves the object lifecycle policy that is assigned to a container.
775 776 777 778 |
# File 'lib/aws-sdk-mediastore/client.rb', line 775 def get_lifecycle_policy(params = {}, = {}) req = build_request(:get_lifecycle_policy, params) req.send_request() end |
#get_metric_policy(params = {}) ⇒ Types::GetMetricPolicyOutput
Returns the metric policy for the specified container.
806 807 808 809 |
# File 'lib/aws-sdk-mediastore/client.rb', line 806 def get_metric_policy(params = {}, = {}) req = build_request(:get_metric_policy, params) req.send_request() end |
#list_containers(params = {}) ⇒ Types::ListContainersOutput
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.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
863 864 865 866 |
# File 'lib/aws-sdk-mediastore/client.rb', line 863 def list_containers(params = {}, = {}) req = build_request(:list_containers, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceOutput
Returns a list of the tags assigned to the specified container.
893 894 895 896 |
# File 'lib/aws-sdk-mediastore/client.rb', line 893 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#put_container_policy(params = {}) ⇒ Struct
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.
934 935 936 937 |
# File 'lib/aws-sdk-mediastore/client.rb', line 934 def put_container_policy(params = {}, = {}) req = build_request(:put_container_policy, params) req.send_request() end |
#put_cors_policy(params = {}) ⇒ Struct
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 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].
[1]: docs.aws.amazon.com/mediastore/latest/ug/cors-policy.html
987 988 989 990 |
# File 'lib/aws-sdk-mediastore/client.rb', line 987 def put_cors_policy(params = {}, = {}) req = build_request(:put_cors_policy, params) req.send_request() end |
#put_lifecycle_policy(params = {}) ⇒ Struct
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].
[1]: docs.aws.amazon.com/mediastore/latest/ug/policies-object-lifecycle-components.html
1024 1025 1026 1027 |
# File 'lib/aws-sdk-mediastore/client.rb', line 1024 def put_lifecycle_policy(params = {}, = {}) req = build_request(:put_lifecycle_policy, params) req.send_request() end |
#put_metric_policy(params = {}) ⇒ Struct
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.
1077 1078 1079 1080 |
# File 'lib/aws-sdk-mediastore/client.rb', line 1077 def put_metric_policy(params = {}, = {}) req = build_request(:put_metric_policy, params) req.send_request() end |
#start_access_logging(params = {}) ⇒ Struct
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.
1101 1102 1103 1104 |
# File 'lib/aws-sdk-mediastore/client.rb', line 1101 def start_access_logging(params = {}, = {}) req = build_request(:start_access_logging, params) req.send_request() end |
#stop_access_logging(params = {}) ⇒ Struct
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.
1126 1127 1128 1129 |
# File 'lib/aws-sdk-mediastore/client.rb', line 1126 def stop_access_logging(params = {}, = {}) req = build_request(:stop_access_logging, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
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].
1174 1175 1176 1177 |
# File 'lib/aws-sdk-mediastore/client.rb', line 1174 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes tags from the specified container. You can specify one or more tags to remove.
1205 1206 1207 1208 |
# File 'lib/aws-sdk-mediastore/client.rb', line 1205 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1234 1235 1236 |
# File 'lib/aws-sdk-mediastore/client.rb', line 1234 def waiter_names [] end |