ivsrealtime / Client / create_stage

create_stage#

ivsrealtime.Client.create_stage(**kwargs)#

Creates a new stage (and optionally participant tokens).

See also: AWS API Documentation

Request Syntax

response = client.create_stage(
    name='string',
    participantTokenConfigurations=[
        {
            'duration': 123,
            'userId': 'string',
            'attributes': {
                'string': 'string'
            },
            'capabilities': [
                'PUBLISH'|'SUBSCRIBE',
            ]
        },
    ],
    tags={
        'string': 'string'
    },
    autoParticipantRecordingConfiguration={
        'storageConfigurationArn': 'string',
        'mediaTypes': [
            'AUDIO_VIDEO'|'AUDIO_ONLY',
        ]
    }
)
Parameters:
  • name (string) – Optional name that can be specified for the stage being created.

  • participantTokenConfigurations (list) –

    Array of participant token configuration objects to attach to the new stage.

    • (dict) –

      Object specifying a participant token configuration in a stage.

      • duration (integer) –

        Duration (in minutes), after which the corresponding participant token expires. Default: 720 (12 hours).

      • userId (string) –

        Customer-assigned name to help identify the token; this can be used to link a participant to a user in the customer’s own systems. This can be any UTF-8 encoded text. This field is exposed to all stage participants and should not be used for personally identifying, confidential, or sensitive information.

      • attributes (dict) –

        Application-provided attributes to encode into the corresponding participant token and attach to a stage. Map keys and values can contain UTF-8 encoded text. The maximum length of this field is 1 KB total. This field is exposed to all stage participants and should not be used for personally identifying, confidential, or sensitive information.

        • (string) –

          • (string) –

      • capabilities (list) –

        Set of capabilities that the user is allowed to perform in the stage.

        • (string) –

  • tags (dict) –

    Tags attached to the resource. Array of maps, each of the form string:string (key:value). See Best practices and strategies in Tagging AWS Resources and Tag Editor for details, including restrictions that apply to tags and “Tag naming limits and requirements”; Amazon IVS has no constraints on tags beyond what is documented there.

    • (string) –

      • (string) –

  • autoParticipantRecordingConfiguration (dict) –

    Configuration object for individual participant recording, to attach to the new stage.

    • storageConfigurationArn (string) – [REQUIRED]

      ARN of the StorageConfiguration resource to use for individual participant recording. Default: "" (empty string, no storage configuration is specified). Individual participant recording cannot be started unless a storage configuration is specified, when a Stage is created or updated.

    • mediaTypes (list) –

      Types of media to be recorded. Default: AUDIO_VIDEO.

      • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'stage': {
        'arn': 'string',
        'name': 'string',
        'activeSessionId': 'string',
        'tags': {
            'string': 'string'
        },
        'autoParticipantRecordingConfiguration': {
            'storageConfigurationArn': 'string',
            'mediaTypes': [
                'AUDIO_VIDEO'|'AUDIO_ONLY',
            ]
        },
        'endpoints': {
            'events': 'string',
            'whip': 'string',
            'rtmp': 'string',
            'rtmps': 'string'
        }
    },
    'participantTokens': [
        {
            'participantId': 'string',
            'token': 'string',
            'userId': 'string',
            'attributes': {
                'string': 'string'
            },
            'duration': 123,
            'capabilities': [
                'PUBLISH'|'SUBSCRIBE',
            ],
            'expirationTime': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) –

    • stage (dict) –

      The stage that was created.

      • arn (string) –

        Stage ARN.

      • name (string) –

        Stage name.

      • activeSessionId (string) –

        ID of the active session within the stage.

      • tags (dict) –

        Tags attached to the resource. Array of maps, each of the form string:string (key:value). See Best practices and strategies in Tagging AWS Resources and Tag Editor for details, including restrictions that apply to tags and “Tag naming limits and requirements”; Amazon IVS has no constraints on tags beyond what is documented there.

        • (string) –

          • (string) –

      • autoParticipantRecordingConfiguration (dict) –

        Configuration object for individual participant recording, attached to the stage.

        • storageConfigurationArn (string) –

          ARN of the StorageConfiguration resource to use for individual participant recording. Default: "" (empty string, no storage configuration is specified). Individual participant recording cannot be started unless a storage configuration is specified, when a Stage is created or updated.

        • mediaTypes (list) –

          Types of media to be recorded. Default: AUDIO_VIDEO.

          • (string) –

      • endpoints (dict) –

        Summary information about various endpoints for a stage.

        • events (string) –

          Events endpoint.

        • whip (string) –

          The endpoint to be used for IVS real-time streaming using the WHIP protocol.

        • rtmp (string) –

          The endpoint to be used for IVS real-time streaming using the RTMP protocol.

        • rtmps (string) –

          The endpoint to be used for IVS real-time streaming using the RTMPS protocol.

    • participantTokens (list) –

      Participant tokens attached to the stage. These correspond to the participants in the request.

      • (dict) –

        Object specifying a participant token in a stage.

        Important: Treat tokens as opaque; i.e., do not build functionality based on token contents. The format of tokens could change in the future.

        • participantId (string) –

          Unique identifier for this participant token, assigned by IVS.

        • token (string) –

          The issued client token, encrypted.

        • userId (string) –

          Customer-assigned name to help identify the token; this can be used to link a participant to a user in the customer’s own systems. This can be any UTF-8 encoded text. This field is exposed to all stage participants and should not be used for personally identifying, confidential, or sensitive information.

        • attributes (dict) –

          Application-provided attributes to encode into the token and attach to a stage. This field is exposed to all stage participants and should not be used for personally identifying, confidential, or sensitive information.

          • (string) –

            • (string) –

        • duration (integer) –

          Duration (in minutes), after which the participant token expires. Default: 720 (12 hours).

        • capabilities (list) –

          Set of capabilities that the user is allowed to perform in the stage.

          • (string) –

        • expirationTime (datetime) –

          ISO 8601 timestamp (returned as a string) for when this token expires.

Exceptions