create_launch

create_launch(**kwargs)

Creates a launch of a given feature. Before you create a launch, you must create the feature to use for the launch.

You can use a launch to safely validate new features by serving them to a specified percentage of your users while you roll out the feature. You can monitor the performance of the new feature to help you decide when to ramp up traffic to more users. This helps you reduce risk and identify unintended consequences before you fully launch the feature.

Don't use this operation to update an existing launch. Instead, use UpdateLaunch.

See also: AWS API Documentation

Request Syntax

response = client.create_launch(
    description='string',
    groups=[
        {
            'description': 'string',
            'feature': 'string',
            'name': 'string',
            'variation': 'string'
        },
    ],
    metricMonitors=[
        {
            'metricDefinition': {
                'entityIdKey': 'string',
                'eventPattern': 'string',
                'name': 'string',
                'unitLabel': 'string',
                'valueKey': 'string'
            }
        },
    ],
    name='string',
    project='string',
    randomizationSalt='string',
    scheduledSplitsConfig={
        'steps': [
            {
                'groupWeights': {
                    'string': 123
                },
                'segmentOverrides': [
                    {
                        'evaluationOrder': 123,
                        'segment': 'string',
                        'weights': {
                            'string': 123
                        }
                    },
                ],
                'startTime': datetime(2015, 1, 1)
            },
        ]
    },
    tags={
        'string': 'string'
    }
)
Parameters
  • description (string) -- An optional description for the launch.
  • groups (list) --

    [REQUIRED]

    An array of structures that contains the feature and variations that are to be used for the launch.

    • (dict) --

      A structure that defines one launch group in a launch. A launch group is a variation of the feature that you are including in the launch.

      • description (string) --

        A description of the launch group.

      • feature (string) -- [REQUIRED]

        The feature that this launch is using.

      • name (string) -- [REQUIRED]

        A name for this launch group.

      • variation (string) -- [REQUIRED]

        The feature variation to use for this launch group.

  • metricMonitors (list) --

    An array of structures that define the metrics that will be used to monitor the launch performance.

    • (dict) --

      A structure that defines a metric to be used to monitor performance of the variations during a launch.

      • metricDefinition (dict) -- [REQUIRED]

        A structure that defines the metric.

        • entityIdKey (string) -- [REQUIRED]

          The entity, such as a user or session, that does an action that causes a metric value to be recorded. An example is userDetails.userID .

        • eventPattern (string) --

          The EventBridge event pattern that defines how the metric is recorded.

          For more information about EventBridge event patterns, see Amazon EventBridge event patterns.

        • name (string) -- [REQUIRED]

          A name for the metric.

        • unitLabel (string) --

          A label for the units that the metric is measuring.

        • valueKey (string) -- [REQUIRED]

          The value that is tracked to produce the metric.

  • name (string) --

    [REQUIRED]

    The name for the new launch.

  • project (string) --

    [REQUIRED]

    The name or ARN of the project that you want to create the launch in.

  • randomizationSalt (string) -- When Evidently assigns a particular user session to a launch, it must use a randomization ID to determine which variation the user session is served. This randomization ID is a combination of the entity ID and randomizationSalt . If you omit randomizationSalt , Evidently uses the launch name as the randomizationSalt .
  • scheduledSplitsConfig (dict) --

    An array of structures that define the traffic allocation percentages among the feature variations during each step of the launch.

    • steps (list) -- [REQUIRED]

      An array of structures that define the traffic allocation percentages among the feature variations during each step of the launch. This also defines the start time of each step.

      • (dict) --

        This structure defines the traffic allocation percentages among the feature variations during one step of a launch, and the start time of that step.

        • groupWeights (dict) -- [REQUIRED]

          The traffic allocation percentages among the feature variations during one step of a launch. This is a set of key-value pairs. The keys are variation names. The values represent the percentage of traffic to allocate to that variation during this step.

          The values is expressed in thousandths of a percent, so assigning a weight of 50000 assigns 50% of traffic to that variation.

          If the sum of the weights for all the variations in a segment override does not add up to 100,000, then the remaining traffic that matches this segment is not assigned by this segment override, and instead moves on to the next segment override or the default traffic split.

          • (string) --
            • (integer) --
        • segmentOverrides (list) --

          Use this parameter to specify different traffic splits for one or more audience segments . A segment is a portion of your audience that share one or more characteristics. Examples could be Chrome browser users, users in Europe, or Firefox browser users in Europe who also fit other criteria that your application collects, such as age.

          This parameter is an array of up to six segment override objects. Each of these objects specifies a segment that you have already created, and defines the traffic split for that segment.

          • (dict) --

            This structure specifies a segment that you have already created, and defines the traffic split for that segment to be used in a launch.

            • evaluationOrder (integer) -- [REQUIRED]

              A number indicating the order to use to evaluate segment overrides, if there are more than one. Segment overrides with lower numbers are evaluated first.

            • segment (string) -- [REQUIRED]

              The ARN of the segment to use.

            • weights (dict) -- [REQUIRED]

              The traffic allocation percentages among the feature variations to assign to this segment. This is a set of key-value pairs. The keys are variation names. The values represent the amount of traffic to allocate to that variation for this segment. This is expressed in thousandths of a percent, so a weight of 50000 represents 50% of traffic.

              • (string) --
                • (integer) --
        • startTime (datetime) -- [REQUIRED]

          The date and time that this step of the launch starts.

  • tags (dict) --

    Assigns one or more tags (key-value pairs) to the launch.

    Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.

    Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.

    You can associate as many as 50 tags with a launch.

    For more information, see Tagging Amazon Web Services resources.

    • (string) --
      • (string) --
Return type

dict

Returns

Response Syntax

{
    'launch': {
        'arn': 'string',
        'createdTime': datetime(2015, 1, 1),
        'description': 'string',
        'execution': {
            'endedTime': datetime(2015, 1, 1),
            'startedTime': datetime(2015, 1, 1)
        },
        'groups': [
            {
                'description': 'string',
                'featureVariations': {
                    'string': 'string'
                },
                'name': 'string'
            },
        ],
        'lastUpdatedTime': datetime(2015, 1, 1),
        'metricMonitors': [
            {
                'metricDefinition': {
                    'entityIdKey': 'string',
                    'eventPattern': 'string',
                    'name': 'string',
                    'unitLabel': 'string',
                    'valueKey': 'string'
                }
            },
        ],
        'name': 'string',
        'project': 'string',
        'randomizationSalt': 'string',
        'scheduledSplitsDefinition': {
            'steps': [
                {
                    'groupWeights': {
                        'string': 123
                    },
                    'segmentOverrides': [
                        {
                            'evaluationOrder': 123,
                            'segment': 'string',
                            'weights': {
                                'string': 123
                            }
                        },
                    ],
                    'startTime': datetime(2015, 1, 1)
                },
            ]
        },
        'status': 'CREATED'|'UPDATING'|'RUNNING'|'COMPLETED'|'CANCELLED',
        'statusReason': 'string',
        'tags': {
            'string': 'string'
        },
        'type': 'aws.evidently.splits'
    }
}

Response Structure

  • (dict) --

    • launch (dict) --

      A structure that contains the configuration of the launch that was created.

      • arn (string) --

        The ARN of the launch.

      • createdTime (datetime) --

        The date and time that the launch is created.

      • description (string) --

        The description of the launch.

      • execution (dict) --

        A structure that contains information about the start and end times of the launch.

        • endedTime (datetime) --

          The date and time that the launch ended.

        • startedTime (datetime) --

          The date and time that the launch started.

      • groups (list) --

        An array of structures that define the feature variations that are being used in the launch.

        • (dict) --

          A structure that defines one launch group in a launch. A launch group is a variation of the feature that you are including in the launch.

          • description (string) --

            A description of the launch group.

          • featureVariations (dict) --

            The feature variation for this launch group. This is a key-value pair.

            • (string) --
              • (string) --
          • name (string) --

            The name of the launch group.

      • lastUpdatedTime (datetime) --

        The date and time that the launch was most recently updated.

      • metricMonitors (list) --

        An array of structures that define the metrics that are being used to monitor the launch performance.

        • (dict) --

          A structure that defines a metric to be used to monitor performance of the variations during a launch.

          • metricDefinition (dict) --

            A structure that defines the metric.

            • entityIdKey (string) --

              The entity, such as a user or session, that does an action that causes a metric value to be recorded.

            • eventPattern (string) --

              The EventBridge event pattern that defines how the metric is recorded.

              For more information about EventBridge event patterns, see Amazon EventBridge event patterns.

            • name (string) --

              The name of the metric.

            • unitLabel (string) --

              The label for the units that the metric is measuring.

            • valueKey (string) --

              The value that is tracked to produce the metric.

      • name (string) --

        The name of the launch.

      • project (string) --

        The name or ARN of the project that contains the launch.

      • randomizationSalt (string) --

        This value is used when Evidently assigns a particular user session to the launch, to help create a randomization ID to determine which variation the user session is served. This randomization ID is a combination of the entity ID and randomizationSalt .

      • scheduledSplitsDefinition (dict) --

        An array of structures that define the traffic allocation percentages among the feature variations during each step of the launch.

        • steps (list) --

          An array of structures that define the traffic allocation percentages among the feature variations during each step of the launch. This also defines the start time of each step.

          • (dict) --

            This structure defines the traffic allocation percentages among the feature variations during one step of a launch, and the start time of that step.

            • groupWeights (dict) --

              The traffic allocation percentages among the feature variations during one step of a launch. This is a set of key-value pairs. The keys are variation names. The values represent the percentage of traffic to allocate to that variation during this step.

              The values is expressed in thousandths of a percent, so assigning a weight of 50000 assigns 50% of traffic to that variation.

              If the sum of the weights for all the variations in a segment override does not add up to 100,000, then the remaining traffic that matches this segment is not assigned by this segment override, and instead moves on to the next segment override or the default traffic split.

              • (string) --
                • (integer) --
            • segmentOverrides (list) --

              Use this parameter to specify different traffic splits for one or more audience segments . A segment is a portion of your audience that share one or more characteristics. Examples could be Chrome browser users, users in Europe, or Firefox browser users in Europe who also fit other criteria that your application collects, such as age.

              This parameter is an array of up to six segment override objects. Each of these objects specifies a segment that you have already created, and defines the traffic split for that segment.

              • (dict) --

                This structure specifies a segment that you have already created, and defines the traffic split for that segment to be used in a launch.

                • evaluationOrder (integer) --

                  A number indicating the order to use to evaluate segment overrides, if there are more than one. Segment overrides with lower numbers are evaluated first.

                • segment (string) --

                  The ARN of the segment to use.

                • weights (dict) --

                  The traffic allocation percentages among the feature variations to assign to this segment. This is a set of key-value pairs. The keys are variation names. The values represent the amount of traffic to allocate to that variation for this segment. This is expressed in thousandths of a percent, so a weight of 50000 represents 50% of traffic.

                  • (string) --
                    • (integer) --
            • startTime (datetime) --

              The date and time that this step of the launch starts.

      • status (string) --

        The current state of the launch.

      • statusReason (string) --

        If the launch was stopped, this is the string that was entered by the person who stopped the launch, to explain why it was stopped.

      • tags (dict) --

        The list of tag keys and values associated with this launch.

        • (string) --
          • (string) --
      • type (string) --

        The type of launch.

Exceptions

  • CloudWatchEvidently.Client.exceptions.ValidationException
  • CloudWatchEvidently.Client.exceptions.ConflictException
  • CloudWatchEvidently.Client.exceptions.ServiceQuotaExceededException
  • CloudWatchEvidently.Client.exceptions.ResourceNotFoundException
  • CloudWatchEvidently.Client.exceptions.AccessDeniedException