Skip to main content

flows

Creates, updates, deletes, gets or lists a flows resource.

Overview

Nameflows
TypeResource
Idaws.mediaconnect.flows

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
flowobjectThe flow that you requested a description of.
messagesobjectAny errors that apply currently to the flow. If there are no errors, MediaConnect will not include this field in the response.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_flowselectflow_arn, regionDisplays the details of a flow. The response includes the flow Amazon Resource Name (ARN), name, and Availability Zone, as well as details about the source, outputs, and entitlements.
list_flowsselectregionmaxResults, nextTokenDisplays a list of flows that are associated with this account. This request returns a paginated result.
create_flowinsertregionCreates a new flow. The request must include one source. The request optionally can include outputs (up to 50) and entitlements (up to 50).
add_flow_media_streamsupdateflow_arn, region, MediaStreamsAdds media streams to an existing flow. After you add a media stream to a flow, you can associate it with a source and/or an output that uses the ST 2110 JPEG XS or CDI protocol.
add_flow_vpc_interfacesupdateflow_arn, region, VpcInterfacesAdds VPC interfaces to a flow.
remove_flow_media_streamupdateflow_arn, media_stream_name, regionRemoves a media stream from a flow. This action is only available if the media stream is not associated with a source or output.
remove_flow_outputupdateflow_arn, output_arn, regionRemoves 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.
remove_flow_sourceupdateflow_arn, source_arn, regionRemoves a source from an existing flow. This request can be made only if there is more than one source on the flow.
remove_flow_vpc_interfaceupdateflow_arn, vpc_interface_name, regionRemoves a VPC Interface from an existing flow. This request can be made only on a VPC interface that does not have a Source or Output associated with it. If the VPC interface is referenced by a Source or Output, you must first delete or update the Source or Output to no longer reference the VPC interface.
update_flowupdateflow_arn, regionUpdates an existing flow. Because UpdateFlowSources and UpdateFlow are separate operations, you can't change both the source type AND the flow size in a single request. If you have a MEDIUM flow and you want to change the flow source to NDI®: First, use the UpdateFlow operation to upgrade the flow size to LARGE. After that, you can then use the UpdateFlowSource operation to configure the NDI source. If you're switching from an NDI source to a transport stream (TS) source and want to downgrade the flow size: First, use the UpdateFlowSource operation to change the flow source type. After that, you can then use the UpdateFlow operation to downgrade the flow size to MEDIUM.
delete_flowdeleteflow_arn, regionDeletes a flow. Before you can delete a flow, you must stop the flow.
add_flow_outputsexecflow_arn, regionAdds outputs to an existing flow. You can create up to 50 outputs per flow.
add_flow_sourcesexecflow_arn, regionAdds sources to a flow.
update_flow_media_streamexecflow_arn, media_stream_name, regionUpdates an existing media stream.
update_flow_outputexecflow_arn, output_arn, regionUpdates an existing flow output.
update_flow_sourceexecflow_arn, source_arn, regionUpdates the source of a flow. Because UpdateFlowSources and UpdateFlow are separate operations, you can't change both the source type AND the flow size in a single request. If you have a MEDIUM flow and you want to change the flow source to NDI®: First, use the UpdateFlow operation to upgrade the flow size to LARGE. After that, you can then use the UpdateFlowSource operation to configure the NDI source. If you're switching from an NDI source to a transport stream (TS) source and want to downgrade the flow size: First, use the UpdateFlowSource operation to change the flow source type. After that, you can then use the UpdateFlow operation to downgrade the flow size to MEDIUM.
start_flowexecflow_arn, regionStarts a flow.
stop_flowexecflow_arn, regionStops a flow.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
flow_arnstringThe Amazon Resource Name (ARN) of the flow that you want to stop.
media_stream_namestringThe media stream that you updated.
output_arnstringThe ARN of the output that you want to update.
regionstringAWS region (default: us-east-1)
source_arnstringThe ARN of the source that you want to update.
vpc_interface_namestringThe name of the VPC interface that you want to remove.
maxResultsintegerThe maximum number of results to return per API request. For example, you submit a ListFlows request with MaxResults set at 5. Although 20 items match your request, the service returns no more than the first 5 items. (The service also returns a NextToken value that you can use to fetch the next batch of results.) The service might return fewer results than the MaxResults value. If MaxResults is not included in the request, the service defaults to pagination with a maximum of 10 results per page.
nextTokenstringThe token that identifies the batch of results that you want to see. For example, you submit a ListFlows request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListFlows request a second time and specify the NextToken value.

SELECT examples

Displays the details of a flow. The response includes the flow Amazon Resource Name (ARN), name, and Availability Zone, as well as details about the source, outputs, and entitlements.

SELECT
flow,
messages
FROM aws.mediaconnect.flows
WHERE flow_arn = '{{ flow_arn }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a new flow. The request must include one source. The request optionally can include outputs (up to 50) and entitlements (up to 50).

INSERT INTO aws.mediaconnect.flows (
AvailabilityZone,
Entitlements,
MediaStreams,
Name,
Outputs,
Source,
SourceFailoverConfig,
Sources,
VpcInterfaces,
Maintenance,
SourceMonitoringConfig,
FlowSize,
NdiConfig,
EncodingConfig,
FlowTags,
region
)
SELECT
'{{ AvailabilityZone }}',
'{{ Entitlements }}',
'{{ MediaStreams }}',
'{{ Name }}',
'{{ Outputs }}',
'{{ Source }}',
'{{ SourceFailoverConfig }}',
'{{ Sources }}',
'{{ VpcInterfaces }}',
'{{ Maintenance }}',
'{{ SourceMonitoringConfig }}',
'{{ FlowSize }}',
'{{ NdiConfig }}',
'{{ EncodingConfig }}',
'{{ FlowTags }}',
'{{ region }}'
RETURNING
flow
;

UPDATE examples

Adds media streams to an existing flow. After you add a media stream to a flow, you can associate it with a source and/or an output that uses the ST 2110 JPEG XS or CDI protocol.

UPDATE aws.mediaconnect.flows
SET
MediaStreams = '{{ MediaStreams }}'
WHERE
flow_arn = '{{ flow_arn }}' --required
AND region = '{{ region }}' --required
AND MediaStreams = '{{ MediaStreams }}' --required
RETURNING
flow_arn,
media_streams;

DELETE examples

Deletes a flow. Before you can delete a flow, you must stop the flow.

DELETE FROM aws.mediaconnect.flows
WHERE flow_arn = '{{ flow_arn }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Adds outputs to an existing flow. You can create up to 50 outputs per flow.

EXEC aws.mediaconnect.flows.add_flow_outputs
@flow_arn='{{ flow_arn }}' --required,
@region='{{ region }}' --required
@@json=
'{
"Outputs": "{{ Outputs }}"
}'
;