AmplifyGen3 / Client / get_alias

get_alias

AmplifyGen3.Client.get_alias(**kwargs)

Retrieves an alias for an environment of a Gen 3 app.

See also: AWS API Documentation

Request Syntax

response = client.get_alias(
    AppName='string',
    EnvironmentName='string',
    AliasName='string'
)
Parameters:
  • AppName (string) –

    [REQUIRED]

    The name of the app.

  • EnvironmentName (string) –

    [REQUIRED]

    The name of the environment.

  • AliasName (string) –

    [REQUIRED]

    The name of the alias.

Return type:

dict

Returns:

Response Syntax

{
    'AliasName': 'string',
    'AliasArn': 'string',
    'Type': 'ENVIRONMENT'|'BRANCH'|'PULL_REQUEST',
    'Url': 'string',
    'RoutingConfig': [
        {
            'DeploymentId': 'string',
            'Weight': 123
        },
    ],
    'GradualRolloutConfig': {
        'PresetConfig': {
            'Preset': 'ALL_AT_ONCE'|'CANARY_10_PERCENT_5_MINUTES'|'CANARY_10_PERCENT_15_MINUTES'|'CANARY_10_PERCENT_30_MINUTES'|'LINEAR_10_PERCENT_EVERY_1_MINUTE'|'LINEAR_10_PERCENT_EVERY_3_MINUTES'|'LINEAR_10_PERCENT_EVERY_10_MINUTES'
        }
    },
    'GradualRolloutState': {
        'Status': 'IN_PROGRESS'|'COMPLETED'|'CANCELLED',
        'SourceRoutingConfig': [
            {
                'DeploymentId': 'string',
                'Weight': 123
            },
        ],
        'TargetRoutingConfig': [
            {
                'DeploymentId': 'string',
                'Weight': 123
            },
        ],
        'Schedule': [
            {
                'Weight': 123,
                'EffectiveAt': datetime(2015, 1, 1)
            },
        ],
        'CurrentStageIndex': 123,
        'StartedAt': datetime(2015, 1, 1),
        'EndedAt': datetime(2015, 1, 1)
    },
    'CreatedAt': datetime(2015, 1, 1),
    'UpdatedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) –

    • AliasName (string) –

      The name of the alias.

    • AliasArn (string) –

      The Amazon Resource Name (ARN) of the alias.

    • Type (string) –

      The type of the alias.

    • Url (string) –

      The URL of the alias.

    • RoutingConfig (list) –

      The traffic routing configuration.

      • (dict) –

        An entry that maps a portion of traffic to a deployment.

        • DeploymentId (string) –

          The ID of the deployment that receives the traffic.

        • Weight (integer) –

          The percentage of traffic to route to the deployment.

    • GradualRolloutConfig (dict) –

      The gradual rollout settings.

      Note

      This is a Tagged Union structure. Only one of the following top level keys will be set: PresetConfig. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

      'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
      
      • PresetConfig (dict) –

        The predefined gradual rollout schedule.

        • Preset (string) –

          The predefined gradual rollout schedule to use.

    • GradualRolloutState (dict) –

      The current state of the gradual rollout.

      • Status (string) –

        The status of the resource.

      • SourceRoutingConfig (list) –

        The traffic routing at the start of the gradual rollout.

        • (dict) –

          An entry that maps a portion of traffic to a deployment.

          • DeploymentId (string) –

            The ID of the deployment that receives the traffic.

          • Weight (integer) –

            The percentage of traffic to route to the deployment.

      • TargetRoutingConfig (list) –

        The traffic routing at the end of the gradual rollout.

        • (dict) –

          An entry that maps a portion of traffic to a deployment.

          • DeploymentId (string) –

            The ID of the deployment that receives the traffic.

          • Weight (integer) –

            The percentage of traffic to route to the deployment.

      • Schedule (list) –

        The stages of the gradual rollout.

        • (dict) –

          A stage in a gradual rollout schedule.

          • Weight (integer) –

            The percentage of traffic shifted to the new deployment at this stage.

          • EffectiveAt (datetime) –

            The time at which this rollout stage takes effect. The value is in ISO-8601 format.

      • CurrentStageIndex (integer) –

        The index of the current gradual rollout stage.

      • StartedAt (datetime) –

        The time at which processing started. The value is in ISO-8601 format.

      • EndedAt (datetime) –

        The time at which processing ended. The value is in ISO-8601 format.

    • CreatedAt (datetime) –

      The time at which the alias was created. The value is in ISO-8601 format.

    • UpdatedAt (datetime) –

      The time at which the alias was last updated. The value is in ISO-8601 format.

Exceptions

  • AmplifyGen3.Client.exceptions.ThrottlingException

  • AmplifyGen3.Client.exceptions.AccessDeniedException

  • AmplifyGen3.Client.exceptions.ResourceNotFoundException

  • AmplifyGen3.Client.exceptions.ValidationException

  • AmplifyGen3.Client.exceptions.InternalServerException