Class: Aws::MediaPackageV2::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::MediaPackageV2::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-mediapackagev2/client.rb
Overview
An API client for MediaPackageV2. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::MediaPackageV2::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
-
#cancel_harvest_job(params = {}) ⇒ Struct
Cancels an in-progress harvest job.
-
#create_channel(params = {}) ⇒ Types::CreateChannelResponse
Create a channel to start receiving content streams.
-
#create_channel_group(params = {}) ⇒ Types::CreateChannelGroupResponse
Create a channel group to group your channels and origin endpoints.
-
#create_harvest_job(params = {}) ⇒ Types::CreateHarvestJobResponse
Creates a new harvest job to export content from a MediaPackage v2 channel to an S3 bucket.
-
#create_origin_endpoint(params = {}) ⇒ Types::CreateOriginEndpointResponse
The endpoint is attached to a channel, and represents the output of the live content.
-
#delete_channel(params = {}) ⇒ Struct
Delete a channel to stop AWS Elemental MediaPackage from receiving further content.
-
#delete_channel_group(params = {}) ⇒ Struct
Delete a channel group.
-
#delete_channel_policy(params = {}) ⇒ Struct
Delete a channel policy.
-
#delete_origin_endpoint(params = {}) ⇒ Struct
Origin endpoints can serve content until they’re deleted.
-
#delete_origin_endpoint_policy(params = {}) ⇒ Struct
Delete an origin endpoint policy.
-
#get_channel(params = {}) ⇒ Types::GetChannelResponse
Retrieves the specified channel that’s configured in AWS Elemental MediaPackage, including the origin endpoints that are associated with it.
-
#get_channel_group(params = {}) ⇒ Types::GetChannelGroupResponse
Retrieves the specified channel group that’s configured in AWS Elemental MediaPackage, including the channels and origin endpoints that are associated with it.
-
#get_channel_policy(params = {}) ⇒ Types::GetChannelPolicyResponse
Retrieves the specified channel policy that’s configured in AWS Elemental MediaPackage.
-
#get_harvest_job(params = {}) ⇒ Types::GetHarvestJobResponse
Retrieves the details of a specific harvest job.
-
#get_origin_endpoint(params = {}) ⇒ Types::GetOriginEndpointResponse
Retrieves the specified origin endpoint that’s configured in AWS Elemental MediaPackage to obtain its playback URL and to view the packaging settings that it’s currently using.
-
#get_origin_endpoint_policy(params = {}) ⇒ Types::GetOriginEndpointPolicyResponse
Retrieves the specified origin endpoint policy that’s configured in AWS Elemental MediaPackage.
-
#list_channel_groups(params = {}) ⇒ Types::ListChannelGroupsResponse
Retrieves all channel groups that are configured in AWS Elemental MediaPackage, including the channels and origin endpoints that are associated with it.
-
#list_channels(params = {}) ⇒ Types::ListChannelsResponse
Retrieves all channels in a specific channel group that are configured in AWS Elemental MediaPackage, including the origin endpoints that are associated with it.
-
#list_harvest_jobs(params = {}) ⇒ Types::ListHarvestJobsResponse
Retrieves a list of harvest jobs that match the specified criteria.
-
#list_origin_endpoints(params = {}) ⇒ Types::ListOriginEndpointsResponse
Retrieves all origin endpoints in a specific channel that are configured in AWS Elemental MediaPackage.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists the tags assigned to a resource.
-
#put_channel_policy(params = {}) ⇒ Struct
Attaches an IAM policy to the specified channel.
-
#put_origin_endpoint_policy(params = {}) ⇒ Struct
Attaches an IAM policy to the specified origin endpoint.
-
#tag_resource(params = {}) ⇒ Struct
Assigns one of more tags (key-value pairs) to the specified MediaPackage resource.
-
#untag_resource(params = {}) ⇒ Struct
Removes one or more tags from the specified resource.
-
#update_channel(params = {}) ⇒ Types::UpdateChannelResponse
Update the specified channel.
-
#update_channel_group(params = {}) ⇒ Types::UpdateChannelGroupResponse
Update the specified channel group.
-
#update_origin_endpoint(params = {}) ⇒ Types::UpdateOriginEndpointResponse
Update the specified origin endpoint.
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.
-
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
467 468 469 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 467 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.
4150 4151 4152 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 4150 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.
4153 4154 4155 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 4153 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.
4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 4010 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::MediaPackageV2') ) 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-mediapackagev2' context[:gem_version] = '1.36.0' Seahorse::Client::Request.new(handlers, context) end |
#cancel_harvest_job(params = {}) ⇒ Struct
Cancels an in-progress harvest job.
524 525 526 527 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 524 def cancel_harvest_job(params = {}, = {}) req = build_request(:cancel_harvest_job, params) req.send_request() end |
#create_channel(params = {}) ⇒ Types::CreateChannelResponse
Create a channel to start receiving content streams. The channel represents the input to MediaPackage for incoming live content from an encoder such as AWS Elemental MediaLive. The channel receives content, and after packaging it, outputs it through an origin endpoint to downstream devices (such as video players or CDNs) that request the content. You can create only one channel with each request. We recommend that you spread out channels between channel groups, such as putting redundant channels in the same AWS Region in different channel groups.
687 688 689 690 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 687 def create_channel(params = {}, = {}) req = build_request(:create_channel, params) req.send_request() end |
#create_channel_group(params = {}) ⇒ Types::CreateChannelGroupResponse
Create a channel group to group your channels and origin endpoints. A channel group is the top-level resource that consists of channels and origin endpoints that are associated with it and that provides predictable URLs for stream delivery. All channels and origin endpoints within the channel group are guaranteed to share the DNS. You can create only one channel group with each request.
789 790 791 792 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 789 def create_channel_group(params = {}, = {}) req = build_request(:create_channel_group, params) req.send_request() end |
#create_harvest_job(params = {}) ⇒ Types::CreateHarvestJobResponse
Creates a new harvest job to export content from a MediaPackage v2 channel to an S3 bucket.
1005 1006 1007 1008 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 1005 def create_harvest_job(params = {}, = {}) req = build_request(:create_harvest_job, params) req.send_request() end |
#create_origin_endpoint(params = {}) ⇒ Types::CreateOriginEndpointResponse
The endpoint is attached to a channel, and represents the output of the live content. You can associate multiple endpoints to a single channel. Each endpoint gives players and downstream CDNs (such as Amazon CloudFront) access to the content for playback. Content can’t be served from a channel until it has an endpoint. You can create only one endpoint with each request.
1764 1765 1766 1767 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 1764 def create_origin_endpoint(params = {}, = {}) req = build_request(:create_origin_endpoint, params) req.send_request() end |
#delete_channel(params = {}) ⇒ Struct
Delete a channel to stop AWS Elemental MediaPackage from receiving further content. You must delete the channel’s origin endpoints before you can delete the channel.
1808 1809 1810 1811 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 1808 def delete_channel(params = {}, = {}) req = build_request(:delete_channel, params) req.send_request() end |
#delete_channel_group(params = {}) ⇒ Struct
Delete a channel group. You must delete the channel group’s channels and origin endpoints before you can delete the channel group. If you delete a channel group, you’ll lose access to the egress domain and will have to create a new channel group to replace it.
1846 1847 1848 1849 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 1846 def delete_channel_group(params = {}, = {}) req = build_request(:delete_channel_group, params) req.send_request() end |
#delete_channel_policy(params = {}) ⇒ Struct
Delete a channel policy.
1888 1889 1890 1891 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 1888 def delete_channel_policy(params = {}, = {}) req = build_request(:delete_channel_policy, params) req.send_request() end |
#delete_origin_endpoint(params = {}) ⇒ Struct
Origin endpoints can serve content until they’re deleted. Delete the endpoint if it should no longer respond to playback requests. You must delete all endpoints from a channel before you can delete the channel.
1939 1940 1941 1942 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 1939 def delete_origin_endpoint(params = {}, = {}) req = build_request(:delete_origin_endpoint, params) req.send_request() end |
#delete_origin_endpoint_policy(params = {}) ⇒ Struct
Delete an origin endpoint policy.
1988 1989 1990 1991 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 1988 def delete_origin_endpoint_policy(params = {}, = {}) req = build_request(:delete_origin_endpoint_policy, params) req.send_request() end |
#get_channel(params = {}) ⇒ Types::GetChannelResponse
Retrieves the specified channel that’s configured in AWS Elemental MediaPackage, including the origin endpoints that are associated with it.
2085 2086 2087 2088 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 2085 def get_channel(params = {}, = {}) req = build_request(:get_channel, params) req.send_request() end |
#get_channel_group(params = {}) ⇒ Types::GetChannelGroupResponse
Retrieves the specified channel group that’s configured in AWS Elemental MediaPackage, including the channels and origin endpoints that are associated with it.
2154 2155 2156 2157 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 2154 def get_channel_group(params = {}, = {}) req = build_request(:get_channel_group, params) req.send_request() end |
#get_channel_policy(params = {}) ⇒ Types::GetChannelPolicyResponse
Retrieves the specified channel policy that’s configured in AWS Elemental MediaPackage. With policies, you can specify who has access to AWS resources and what actions they can perform on those resources.
2211 2212 2213 2214 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 2211 def get_channel_policy(params = {}, = {}) req = build_request(:get_channel_policy, params) req.send_request() end |
#get_harvest_job(params = {}) ⇒ Types::GetHarvestJobResponse
Retrieves the details of a specific harvest job.
The following waiters are defined for this operation (see #wait_until for detailed usage):
* harvest_job_finished
2348 2349 2350 2351 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 2348 def get_harvest_job(params = {}, = {}) req = build_request(:get_harvest_job, params) req.send_request() end |
#get_origin_endpoint(params = {}) ⇒ Types::GetOriginEndpointResponse
Retrieves the specified origin endpoint that’s configured in AWS Elemental MediaPackage to obtain its playback URL and to view the packaging settings that it’s currently using.
2596 2597 2598 2599 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 2596 def get_origin_endpoint(params = {}, = {}) req = build_request(:get_origin_endpoint, params) req.send_request() end |
#get_origin_endpoint_policy(params = {}) ⇒ Types::GetOriginEndpointPolicyResponse
Retrieves the specified origin endpoint policy that’s configured in AWS Elemental MediaPackage.
2662 2663 2664 2665 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 2662 def get_origin_endpoint_policy(params = {}, = {}) req = build_request(:get_origin_endpoint_policy, params) req.send_request() end |
#list_channel_groups(params = {}) ⇒ Types::ListChannelGroupsResponse
Retrieves all channel groups that are configured in AWS Elemental MediaPackage, including the channels and origin endpoints that are associated with it.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2731 2732 2733 2734 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 2731 def list_channel_groups(params = {}, = {}) req = build_request(:list_channel_groups, params) req.send_request() end |
#list_channels(params = {}) ⇒ Types::ListChannelsResponse
Retrieves all channels in a specific channel group that are configured in AWS Elemental MediaPackage, including the origin endpoints that are associated with it.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2811 2812 2813 2814 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 2811 def list_channels(params = {}, = {}) req = build_request(:list_channels, params) req.send_request() end |
#list_harvest_jobs(params = {}) ⇒ Types::ListHarvestJobsResponse
Retrieves a list of harvest jobs that match the specified criteria.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2892 2893 2894 2895 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 2892 def list_harvest_jobs(params = {}, = {}) req = build_request(:list_harvest_jobs, params) req.send_request() end |
#list_origin_endpoints(params = {}) ⇒ Types::ListOriginEndpointsResponse
Retrieves all origin endpoints in a specific channel that are configured in AWS Elemental MediaPackage.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
3070 3071 3072 3073 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 3070 def list_origin_endpoints(params = {}, = {}) req = build_request(:list_origin_endpoints, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists the tags assigned to a resource.
3114 3115 3116 3117 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 3114 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#put_channel_policy(params = {}) ⇒ Struct
Attaches an IAM policy to the specified channel. With policies, you can specify who has access to AWS resources and what actions they can perform on those resources. You can attach only one policy with each request.
3164 3165 3166 3167 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 3164 def put_channel_policy(params = {}, = {}) req = build_request(:put_channel_policy, params) req.send_request() end |
#put_origin_endpoint_policy(params = {}) ⇒ Struct
Attaches an IAM policy to the specified origin endpoint. You can attach only one policy with each request.
3219 3220 3221 3222 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 3219 def put_origin_endpoint_policy(params = {}, = {}) req = build_request(:put_origin_endpoint_policy, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Assigns one of more tags (key-value pairs) to the specified MediaPackage resource.
Tags can help you organize and categorize your resources. You can also use them to scope user permissions, by granting a user permission to access or change only resources with certain tag values. You can use the TagResource operation with a resource that already has tags. If you specify a new tag key for the resource, this tag is appended to the list of tags associated with the resource. If you specify a tag key that is already associated with the resource, the new tag value that you specify replaces the previous value for that tag.
3273 3274 3275 3276 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 3273 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes one or more tags from the specified resource.
3314 3315 3316 3317 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 3314 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_channel(params = {}) ⇒ Types::UpdateChannelResponse
Update the specified channel. You can edit if MediaPackage sends ingest or egress access logs to the CloudWatch log group, if content will be encrypted, the description on a channel, and your channel’s policy settings. You can’t edit the name of the channel or CloudFront distribution details.
Any edits you make that impact the video output may not be reflected for a few minutes.
3444 3445 3446 3447 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 3444 def update_channel(params = {}, = {}) req = build_request(:update_channel, params) req.send_request() end |
#update_channel_group(params = {}) ⇒ Types::UpdateChannelGroupResponse
Update the specified channel group. You can edit the description on a channel group for easier identification later from the AWS Elemental MediaPackage console. You can’t edit the name of the channel group.
Any edits you make that impact the video output may not be reflected for a few minutes.
3528 3529 3530 3531 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 3528 def update_channel_group(params = {}, = {}) req = build_request(:update_channel_group, params) req.send_request() end |
#update_origin_endpoint(params = {}) ⇒ Types::UpdateOriginEndpointResponse
Update the specified origin endpoint. Edit the packaging preferences on an endpoint to optimize the viewing experience. You can’t edit the name of the endpoint.
Any edits you make that impact the video output may not be reflected for a few minutes.
4001 4002 4003 4004 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 4001 def update_origin_endpoint(params = {}, = {}) req = build_request(:update_origin_endpoint, params) req.send_request() end |
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
## Basic Usage
A waiter will call an API operation until:
-
It is successful
-
It enters a terminal state
-
It makes the maximum number of attempts
In between attempts, the waiter will sleep.
# polls in a loop, sleeping between attempts
client.wait_until(waiter_name, params)
## Configuration
You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.
# poll for ~25 seconds
client.wait_until(waiter_name, params, {
max_attempts: 5,
delay: 5,
})
## Callbacks
You can be notified before each polling attempt and before each delay. If you throw ‘:success` or `:failure` from these callbacks, it will terminate the waiter.
started_at = Time.now
client.wait_until(waiter_name, params, {
# disable max attempts
max_attempts: nil,
# poll for 1 hour, instead of a number of attempts
before_wait: -> (attempts, response) do
throw :failure if Time.now - started_at > 3600
end
})
## Handling Errors
When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.
begin
client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
## Valid Waiters
The following table lists the valid waiter names, the operations they call, and the default ‘:delay` and `:max_attempts` values.
| waiter_name | params | :delay | :max_attempts | | ——————– | ———————— | ——– | ————- | | harvest_job_finished | #get_harvest_job | 2 | 60 |
4116 4117 4118 4119 4120 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 4116 def wait_until(waiter_name, params = {}, = {}) w = waiter(waiter_name, ) yield(w.waiter) if block_given? # deprecated w.wait(params) 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.
4124 4125 4126 |
# File 'lib/aws-sdk-mediapackagev2/client.rb', line 4124 def waiter_names waiters.keys end |