Skip to content

create_feed async

create_feed(
    name: ResourceName,
    outputs: CreateOutputList,
    *,
    config_overrides: Optional[AsyncElementalInferenceClientConfig] = None,
    access_role_arn: Optional[IamRoleArn] = None,
    tags: Optional[TagMap] = None,
) -> CreateFeedResponse

Creates a feed. The feed is the target for the live media stream that is being sent by the calling application. An example of a calling application is AWS Elemental MediaLive.

The key contents of the feed is an array of outputs. Each output represents an Elemental Inference feature. After you create the feed, you must associate a resource with the feed. At that point, you will have a useable feed: resource - feed - output or outputs.

Parameters:

  • name (ResourceName) –

    A user-friendly name for this feed.

  • access_role_arn (Optional[IamRoleArn], default: None ) –

    The ARN of an IAM role that Elemental Inference assumes to access resources in your account on your behalf. For example, the smart crop feature uses this role to read graphics-compositing templates from your Amazon S3 bucket. You specify one access role for each feed.

  • outputs (CreateOutputList) –

    An array of outputs for this feed. Each output represents a specific Elemental Inference feature. For example, there is one output type for the smart crop feature. You must specify at least one output, but you can later add outputs using AssociateFeed, or add, modify, and delete outputs using UpdateFeed.

  • tags (Optional[TagMap], default: None ) –

    Optional tags. You can also add tags later, using TagResource.

Raises:

  • AccessDeniedException –

    You do not have sufficient access to perform this action.

  • ConflictException –

    The request could not be completed due to a conflict.

  • InternalServerErrorException –

    An internal server error occurred. This is a temporary condition and the request can be retried. If the problem persists, contact AWS Support.

  • ServiceQuotaExceededException –

    The request was rejected because it would exceed one or more service quotas for your account. Review your service quotas and either delete unused resources or request a quota increase.

  • TooManyRequestException –

    The request was denied due to request throttling. Too many requests have been made within a given time period. Reduce the frequency of requests and use exponential backoff when retrying.

  • ValidationException –

    The input fails to satisfy the constraints specified by the service. Check the error message for details about which parameter or field is invalid and correct the request before retrying.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_elementalinference/_services/async_elemental_inference.py
async def create_feed(
    self,
    name: "capo_elementalinference.types.resource_name.ResourceName",
    outputs: "capo_elementalinference.types.create_output_list.CreateOutputList",
    *,
    config_overrides: Optional[AsyncElementalInferenceClientConfig] = None,
    access_role_arn: Optional[
        "capo_elementalinference.types.iam_role_arn.IamRoleArn"
    ] = None,
    tags: Optional["capo_elementalinference.types.tag_map.TagMap"] = None,
) -> "capo_elementalinference.types.create_feed_response.CreateFeedResponse":
    """<p>Creates a feed. The feed is the target for the live media stream that is being sent by the calling application. An example of a calling application is AWS Elemental MediaLive. </p> <p>The key contents of the feed is an array of outputs. Each output represents an Elemental Inference feature. After you create the feed, you must associate a resource with the feed. At that point, you will have a useable feed: resource - feed - output or outputs. </p>

    Args:
        name: <p>A user-friendly name for this feed.</p>
        access_role_arn: <p>The ARN of an IAM role that Elemental Inference assumes to access resources in your account on your behalf. For example, the smart crop feature uses this role to read graphics-compositing templates from your Amazon S3 bucket. You specify one access role for each feed. </p>
        outputs: <p>An array of outputs for this feed. Each output represents a specific Elemental Inference feature. For example, there is one output type for the smart crop feature. You must specify at least one output, but you can later add outputs using AssociateFeed, or add, modify, and delete outputs using UpdateFeed. </p>
        tags: <p>Optional tags. You can also add tags later, using TagResource.</p>

    Raises:
        capo_elementalinference.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_elementalinference.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict.</p>
        capo_elementalinference.errors.internal_server_error_exception.InternalServerErrorException: <p>An internal server error occurred. This is a temporary condition and the request can be retried. If the problem persists, contact AWS Support. </p>
        capo_elementalinference.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request was rejected because it would exceed one or more service quotas for your account. Review your service quotas and either delete unused resources or request a quota increase. </p>
        capo_elementalinference.errors.too_many_request_exception.TooManyRequestException: <p>The request was denied due to request throttling. Too many requests have been made within a given time period. Reduce the frequency of requests and use exponential backoff when retrying. </p>
        capo_elementalinference.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service. Check the error message for details about which parameter or field is invalid and correct the request before retrying. </p>
        capo_elementalinference.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_elementalinference.types.create_feed_request.CreateFeedRequest]",
    ) -> AsyncOperationResponse[
        "capo_elementalinference.types.create_feed_response.CreateFeedResponse"
    ]:
        import capo_elementalinference._operations.elemental_inference.create_feed

        (
            output,
            http_response,
        ) = await capo_elementalinference._operations.elemental_inference.create_feed.async_create_feed(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateFeed")
    )
    input_: capo_elementalinference.types.create_feed_request.CreateFeedRequest = {
        "name": name,
        "outputs": outputs,
    }
    if access_role_arn is not None:
        input_["access_role_arn"] = access_role_arn
    if tags is not None:
        input_["tags"] = tags

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output