Table of Contents
A low-level client representing AWS MediaConnect:
import boto3
client = boto3.client('mediaconnect')
These are the available methods:
Adds outputs to an existing flow. You can create up to 20 outputs per flow.
See also: AWS API Documentation
Request Syntax
response = client.add_flow_outputs(
FlowArn='string',
Outputs=[
{
'Description': 'string',
'Destination': 'string',
'Encryption': {
'Algorithm': 'aes128'|'aes192'|'aes256',
'KeyType': 'static-key',
'RoleArn': 'string',
'SecretArn': 'string'
},
'MaxLatency': 123,
'Name': 'string',
'Port': 123,
'Protocol': 'zixi-push'|'rtp-fec'|'rtp',
'SmoothingLatency': 123,
'StreamId': 'string'
},
]
)
[REQUIRED] A list of outputs that you want to add.
dict
Response Syntax
{
'FlowArn': 'string',
'Outputs': [
{
'Description': 'string',
'Destination': 'string',
'Encryption': {
'Algorithm': 'aes128'|'aes192'|'aes256',
'KeyType': 'static-key',
'RoleArn': 'string',
'SecretArn': 'string'
},
'EntitlementArn': 'string',
'MediaLiveInputArn': 'string',
'Name': 'string',
'OutputArn': 'string',
'Port': 123,
'Transport': {
'MaxBitrate': 123,
'MaxLatency': 123,
'Protocol': 'zixi-push'|'rtp-fec'|'rtp',
'SmoothingLatency': 123,
'StreamId': 'string'
}
},
]
}
Response Structure
Check if an operation can be paginated.
Creates a new flow. The request must include one source. The request optionally can include outputs (up to 20) and entitlements (up to 50).
See also: AWS API Documentation
Request Syntax
response = client.create_flow(
AvailabilityZone='string',
Entitlements=[
{
'Description': 'string',
'Encryption': {
'Algorithm': 'aes128'|'aes192'|'aes256',
'KeyType': 'static-key',
'RoleArn': 'string',
'SecretArn': 'string'
},
'Name': 'string',
'Subscribers': [
'string',
]
},
],
Name='string',
Outputs=[
{
'Description': 'string',
'Destination': 'string',
'Encryption': {
'Algorithm': 'aes128'|'aes192'|'aes256',
'KeyType': 'static-key',
'RoleArn': 'string',
'SecretArn': 'string'
},
'MaxLatency': 123,
'Name': 'string',
'Port': 123,
'Protocol': 'zixi-push'|'rtp-fec'|'rtp',
'SmoothingLatency': 123,
'StreamId': 'string'
},
],
Source={
'Decryption': {
'Algorithm': 'aes128'|'aes192'|'aes256',
'KeyType': 'static-key',
'RoleArn': 'string',
'SecretArn': 'string'
},
'Description': 'string',
'EntitlementArn': 'string',
'IngestPort': 123,
'MaxBitrate': 123,
'MaxLatency': 123,
'Name': 'string',
'Protocol': 'zixi-push'|'rtp-fec'|'rtp',
'StreamId': 'string',
'WhitelistCidr': 'string'
}
)
The entitlements that you want to grant on a flow.
The outputs that you want to add to this flow.
[REQUIRED] The settings for the source of the flow.
dict
Response Syntax
{
'Flow': {
'AvailabilityZone': 'string',
'Description': 'string',
'EgressIp': 'string',
'Entitlements': [
{
'Description': 'string',
'Encryption': {
'Algorithm': 'aes128'|'aes192'|'aes256',
'KeyType': 'static-key',
'RoleArn': 'string',
'SecretArn': 'string'
},
'EntitlementArn': 'string',
'Name': 'string',
'Subscribers': [
'string',
]
},
],
'FlowArn': 'string',
'Name': 'string',
'Outputs': [
{
'Description': 'string',
'Destination': 'string',
'Encryption': {
'Algorithm': 'aes128'|'aes192'|'aes256',
'KeyType': 'static-key',
'RoleArn': 'string',
'SecretArn': 'string'
},
'EntitlementArn': 'string',
'MediaLiveInputArn': 'string',
'Name': 'string',
'OutputArn': 'string',
'Port': 123,
'Transport': {
'MaxBitrate': 123,
'MaxLatency': 123,
'Protocol': 'zixi-push'|'rtp-fec'|'rtp',
'SmoothingLatency': 123,
'StreamId': 'string'
}
},
],
'Source': {
'Decryption': {
'Algorithm': 'aes128'|'aes192'|'aes256',
'KeyType': 'static-key',
'RoleArn': 'string',
'SecretArn': 'string'
},
'Description': 'string',
'EntitlementArn': 'string',
'IngestIp': 'string',
'IngestPort': 123,
'Name': 'string',
'SourceArn': 'string',
'Transport': {
'MaxBitrate': 123,
'MaxLatency': 123,
'Protocol': 'zixi-push'|'rtp-fec'|'rtp',
'SmoothingLatency': 123,
'StreamId': 'string'
},
'WhitelistCidr': 'string'
},
'Status': 'STANDBY'|'ACTIVE'|'UPDATING'|'DELETING'|'STARTING'|'STOPPING'|'ERROR'
}
}
Response Structure
Deletes a flow. Before you can delete a flow, you must stop the flow.
See also: AWS API Documentation
Request Syntax
response = client.delete_flow(
FlowArn='string'
)
{
'FlowArn': 'string',
'Status': 'STANDBY'|'ACTIVE'|'UPDATING'|'DELETING'|'STARTING'|'STOPPING'|'ERROR'
}
Response Structure
Displays the details of a flow. The response includes the flow ARN, name, and Availability Zone, as well as details about the source, outputs, and entitlements.
See also: AWS API Documentation
Request Syntax
response = client.describe_flow(
FlowArn='string'
)
{
'Flow': {
'AvailabilityZone': 'string',
'Description': 'string',
'EgressIp': 'string',
'Entitlements': [
{
'Description': 'string',
'Encryption': {
'Algorithm': 'aes128'|'aes192'|'aes256',
'KeyType': 'static-key',
'RoleArn': 'string',
'SecretArn': 'string'
},
'EntitlementArn': 'string',
'Name': 'string',
'Subscribers': [
'string',
]
},
],
'FlowArn': 'string',
'Name': 'string',
'Outputs': [
{
'Description': 'string',
'Destination': 'string',
'Encryption': {
'Algorithm': 'aes128'|'aes192'|'aes256',
'KeyType': 'static-key',
'RoleArn': 'string',
'SecretArn': 'string'
},
'EntitlementArn': 'string',
'MediaLiveInputArn': 'string',
'Name': 'string',
'OutputArn': 'string',
'Port': 123,
'Transport': {
'MaxBitrate': 123,
'MaxLatency': 123,
'Protocol': 'zixi-push'|'rtp-fec'|'rtp',
'SmoothingLatency': 123,
'StreamId': 'string'
}
},
],
'Source': {
'Decryption': {
'Algorithm': 'aes128'|'aes192'|'aes256',
'KeyType': 'static-key',
'RoleArn': 'string',
'SecretArn': 'string'
},
'Description': 'string',
'EntitlementArn': 'string',
'IngestIp': 'string',
'IngestPort': 123,
'Name': 'string',
'SourceArn': 'string',
'Transport': {
'MaxBitrate': 123,
'MaxLatency': 123,
'Protocol': 'zixi-push'|'rtp-fec'|'rtp',
'SmoothingLatency': 123,
'StreamId': 'string'
},
'WhitelistCidr': 'string'
},
'Status': 'STANDBY'|'ACTIVE'|'UPDATING'|'DELETING'|'STARTING'|'STOPPING'|'ERROR'
},
'Messages': {
'Errors': [
'string',
]
}
}
Response Structure
Generate a presigned url given a client, its method, and arguments
The presigned url
Create a paginator for an operation.
Returns an object that can wait for some condition.
Grants entitlements to an existing flow.
See also: AWS API Documentation
Request Syntax
response = client.grant_flow_entitlements(
Entitlements=[
{
'Description': 'string',
'Encryption': {
'Algorithm': 'aes128'|'aes192'|'aes256',
'KeyType': 'static-key',
'RoleArn': 'string',
'SecretArn': 'string'
},
'Name': 'string',
'Subscribers': [
'string',
]
},
],
FlowArn='string'
)
[REQUIRED] The list of entitlements that you want to grant.
dict
Response Syntax
{
'Entitlements': [
{
'Description': 'string',
'Encryption': {
'Algorithm': 'aes128'|'aes192'|'aes256',
'KeyType': 'static-key',
'RoleArn': 'string',
'SecretArn': 'string'
},
'EntitlementArn': 'string',
'Name': 'string',
'Subscribers': [
'string',
]
},
],
'FlowArn': 'string'
}
Response Structure
Displays a list of all entitlements that have been granted to this account. This request returns 20 results per page.
See also: AWS API Documentation
Request Syntax
response = client.list_entitlements(
MaxResults=123,
NextToken='string'
)
dict
Response Syntax
{
'Entitlements': [
{
'EntitlementArn': 'string',
'EntitlementName': 'string'
},
],
'NextToken': 'string'
}
Response Structure
Displays a list of flows that are associated with this account. This request returns a paginated result.
See also: AWS API Documentation
Request Syntax
response = client.list_flows(
MaxResults=123,
NextToken='string'
)
dict
Response Syntax
{
'Flows': [
{
'AvailabilityZone': 'string',
'Description': 'string',
'FlowArn': 'string',
'Name': 'string',
'SourceType': 'OWNED'|'ENTITLED',
'Status': 'STANDBY'|'ACTIVE'|'UPDATING'|'DELETING'|'STARTING'|'STOPPING'|'ERROR'
},
],
'NextToken': 'string'
}
Response Structure
Removes an output from an existing flow. This request can be made only on an output that does not have an entitlement associated with it. If the output has an entitlement, you must revoke the entitlement instead. When an entitlement is revoked from a flow, the service automatically removes the associated output.
See also: AWS API Documentation
Request Syntax
response = client.remove_flow_output(
FlowArn='string',
OutputArn='string'
)
dict
Response Syntax
{
'FlowArn': 'string',
'OutputArn': 'string'
}
Response Structure
Revokes an entitlement from a flow. Once an entitlement is revoked, the content becomes unavailable to the subscriber and the associated output is removed.
See also: AWS API Documentation
Request Syntax
response = client.revoke_flow_entitlement(
EntitlementArn='string',
FlowArn='string'
)
dict
Response Syntax
{
'EntitlementArn': 'string',
'FlowArn': 'string'
}
Response Structure
Starts a flow.
See also: AWS API Documentation
Request Syntax
response = client.start_flow(
FlowArn='string'
)
{
'FlowArn': 'string',
'Status': 'STANDBY'|'ACTIVE'|'UPDATING'|'DELETING'|'STARTING'|'STOPPING'|'ERROR'
}
Response Structure
Stops a flow.
See also: AWS API Documentation
Request Syntax
response = client.stop_flow(
FlowArn='string'
)
{
'FlowArn': 'string',
'Status': 'STANDBY'|'ACTIVE'|'UPDATING'|'DELETING'|'STARTING'|'STOPPING'|'ERROR'
}
Response Structure
You can change an entitlement's description, subscribers, and encryption. If you change the subscribers, the service will remove the outputs that are are used by the subscribers that are removed.
See also: AWS API Documentation
Request Syntax
response = client.update_flow_entitlement(
Description='string',
Encryption={
'Algorithm': 'aes128'|'aes192'|'aes256',
'KeyType': 'static-key',
'RoleArn': 'string',
'SecretArn': 'string'
},
EntitlementArn='string',
FlowArn='string',
Subscribers=[
'string',
]
)
The type of encryption that will be used on the output associated with this entitlement.
The AWS account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source.
dict
Response Syntax
{
'Entitlement': {
'Description': 'string',
'Encryption': {
'Algorithm': 'aes128'|'aes192'|'aes256',
'KeyType': 'static-key',
'RoleArn': 'string',
'SecretArn': 'string'
},
'EntitlementArn': 'string',
'Name': 'string',
'Subscribers': [
'string',
]
},
'FlowArn': 'string'
}
Response Structure
Updates an existing flow output.
See also: AWS API Documentation
Request Syntax
response = client.update_flow_output(
Description='string',
Destination='string',
Encryption={
'Algorithm': 'aes128'|'aes192'|'aes256',
'KeyType': 'static-key',
'RoleArn': 'string',
'SecretArn': 'string'
},
FlowArn='string',
MaxLatency=123,
OutputArn='string',
Port=123,
Protocol='zixi-push'|'rtp-fec'|'rtp',
SmoothingLatency=123,
StreamId='string'
)
The type of key used for the encryption. If no keyType is provided, the service will use the default setting (static-key).
dict
Response Syntax
{
'FlowArn': 'string',
'Output': {
'Description': 'string',
'Destination': 'string',
'Encryption': {
'Algorithm': 'aes128'|'aes192'|'aes256',
'KeyType': 'static-key',
'RoleArn': 'string',
'SecretArn': 'string'
},
'EntitlementArn': 'string',
'MediaLiveInputArn': 'string',
'Name': 'string',
'OutputArn': 'string',
'Port': 123,
'Transport': {
'MaxBitrate': 123,
'MaxLatency': 123,
'Protocol': 'zixi-push'|'rtp-fec'|'rtp',
'SmoothingLatency': 123,
'StreamId': 'string'
}
}
}
Response Structure
Updates the source of a flow.
See also: AWS API Documentation
Request Syntax
response = client.update_flow_source(
Decryption={
'Algorithm': 'aes128'|'aes192'|'aes256',
'KeyType': 'static-key',
'RoleArn': 'string',
'SecretArn': 'string'
},
Description='string',
EntitlementArn='string',
FlowArn='string',
IngestPort=123,
MaxBitrate=123,
MaxLatency=123,
Protocol='zixi-push'|'rtp-fec'|'rtp',
SourceArn='string',
StreamId='string',
WhitelistCidr='string'
)
The type of encryption used on the content ingested from this source.
dict
Response Syntax
{
'FlowArn': 'string',
'Source': {
'Decryption': {
'Algorithm': 'aes128'|'aes192'|'aes256',
'KeyType': 'static-key',
'RoleArn': 'string',
'SecretArn': 'string'
},
'Description': 'string',
'EntitlementArn': 'string',
'IngestIp': 'string',
'IngestPort': 123,
'Name': 'string',
'SourceArn': 'string',
'Transport': {
'MaxBitrate': 123,
'MaxLatency': 123,
'Protocol': 'zixi-push'|'rtp-fec'|'rtp',
'SmoothingLatency': 123,
'StreamId': 'string'
},
'WhitelistCidr': 'string'
}
}
Response Structure
The available paginators are:
paginator = client.get_paginator('list_flows')
Creates an iterator that will paginate through responses from MediaConnect.Client.list_flows().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'Flows': [
{
'AvailabilityZone': 'string',
'Description': 'string',
'FlowArn': 'string',
'Name': 'string',
'SourceType': 'OWNED'|'ENTITLED',
'Status': 'STANDBY'|'ACTIVE'|'UPDATING'|'DELETING'|'STARTING'|'STOPPING'|'ERROR'
},
],
}
Response Structure