AmplifyGen3 / Client / update_alias_routing

update_alias_routing

AmplifyGen3.Client.update_alias_routing(**kwargs)

Updates the traffic routing for an alias of an environment.

See also: AWS API Documentation

Request Syntax

response = client.update_alias_routing(
    AppName='string',
    EnvironmentName='string',
    AliasName='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'
        }
    }
)
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.

  • RoutingConfig (list) –

    [REQUIRED]

    The traffic routing configuration to apply to the alias.

    • (dict) –

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

      • DeploymentId (string) – [REQUIRED]

        The ID of the deployment that receives the traffic.

      • Weight (integer) – [REQUIRED]

        The percentage of traffic to route to the deployment.

  • GradualRolloutConfig (dict) –

    The gradual rollout settings to apply to the alias.

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: PresetConfig.

    • PresetConfig (dict) –

      The predefined gradual rollout schedule.

      • Preset (string) – [REQUIRED]

        The predefined gradual rollout schedule to use.

Return type:

dict

Returns:

Response Syntax

{
    '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)
    }
}

Response Structure

  • (dict) –

    • 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.

Exceptions

  • AmplifyGen3.Client.exceptions.ThrottlingException

  • AmplifyGen3.Client.exceptions.AccessDeniedException

  • AmplifyGen3.Client.exceptions.ResourceNotFoundException

  • AmplifyGen3.Client.exceptions.ValidationException

  • AmplifyGen3.Client.exceptions.ConflictException

  • AmplifyGen3.Client.exceptions.InternalServerException