AppConfig / Client / get_experiment_definition

get_experiment_definition

AppConfig.Client.get_experiment_definition(**kwargs)

Retrieves information about an experiment definition.

See also: AWS API Documentation

Request Syntax

response = client.get_experiment_definition(
    ApplicationIdentifier='string',
    ExperimentDefinitionIdentifier='string'
)
Parameters:
  • ApplicationIdentifier (string) –

    [REQUIRED]

    The application ID or name.

  • ExperimentDefinitionIdentifier (string) –

    [REQUIRED]

    The experiment definition ID or name.

Return type:

dict

Returns:

Response Syntax

{
    'ApplicationId': 'string',
    'Id': 'string',
    'Name': 'string',
    'Hypothesis': 'string',
    'Status': 'ACTIVE'|'IDLE'|'ARCHIVED',
    'ConfigurationProfileId': 'string',
    'EnvironmentId': 'string',
    'FlagKey': 'string',
    'AudienceRule': 'string',
    'AudienceDescription': 'string',
    'LaunchCriteria': 'string',
    'Treatments': [
        {
            'Key': 'string',
            'Weight': ...,
            'Description': 'string',
            'FlagValue': {
                'Enabled': True|False,
                'AttributeValues': {
                    'string': {
                        'StringValue': 'string',
                        'NumberValue': 123.0,
                        'BooleanValue': True|False,
                        'StringArray': [
                            'string',
                        ],
                        'NumberArray': [
                            123.0,
                        ]
                    }
                }
            }
        },
    ],
    'Control': {
        'Key': 'string',
        'Weight': ...,
        'Description': 'string',
        'FlagValue': {
            'Enabled': True|False,
            'AttributeValues': {
                'string': {
                    'StringValue': 'string',
                    'NumberValue': 123.0,
                    'BooleanValue': True|False,
                    'StringArray': [
                        'string',
                    ],
                    'NumberArray': [
                        123.0,
                    ]
                }
            }
        }
    },
    'CreatedAt': datetime(2015, 1, 1),
    'UpdatedAt': datetime(2015, 1, 1),
    'KmsKeyIdentifier': 'string'
}

Response Structure

  • (dict) –

    Describes an experiment definition, including the target audience, feature flag, treatments, and current status.

    • ApplicationId (string) –

      The application ID.

    • Id (string) –

      The experiment definition ID.

    • Name (string) –

      The name of the experiment definition.

    • Hypothesis (string) –

      The hypothesis that the experiment is designed to validate.

    • Status (string) –

      The current status of the experiment definition. Valid values: ACTIVE, IDLE, ARCHIVED.

    • ConfigurationProfileId (string) –

      The configuration profile ID associated with the experiment.

    • EnvironmentId (string) –

      The environment ID where the experiment runs.

    • FlagKey (string) –

      The key of the feature flag used by the experiment.

    • AudienceRule (string) –

      The rule that defines which users are eligible to be assigned to treatments.

    • AudienceDescription (string) –

      A description of the intended audience for the experiment.

    • LaunchCriteria (string) –

      The conditions under which the winning treatment should be launched.

    • Treatments (list) –

      The list of treatments defined for the experiment.

      • (dict) –

        Describes a treatment in an experiment, including its traffic allocation weight and feature flag value.

        • Key (string) –

          The unique key that identifies this treatment.

        • Weight (float) –

          The traffic allocation weight for this treatment.

        • Description (string) –

          A description of the treatment.

        • FlagValue (dict) –

          The feature flag value served to users assigned to this treatment.

          • Enabled (boolean) –

            Whether the feature flag is enabled for this treatment.

          • AttributeValues (dict) –

            The attribute values associated with this flag value.

            • (string) –

              • (dict) –

                A value for a feature flag attribute. Only one of the members can be set.

                Note

                This is a Tagged Union structure. Only one of the following top level keys will be set: StringValue, NumberValue, BooleanValue, StringArray, NumberArray. 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'}
                
                • StringValue (string) –

                  A string value for the attribute.

                • NumberValue (float) –

                  A numeric value for the attribute.

                • BooleanValue (boolean) –

                  A Boolean value for the attribute.

                • StringArray (list) –

                  An array of string values for the attribute.

                  • (string) –

                • NumberArray (list) –

                  An array of numeric values for the attribute.

                  • (float) –

    • Control (dict) –

      The control treatment used as the baseline for comparison.

      • Key (string) –

        The unique key that identifies this treatment.

      • Weight (float) –

        The traffic allocation weight for this treatment.

      • Description (string) –

        A description of the treatment.

      • FlagValue (dict) –

        The feature flag value served to users assigned to this treatment.

        • Enabled (boolean) –

          Whether the feature flag is enabled for this treatment.

        • AttributeValues (dict) –

          The attribute values associated with this flag value.

          • (string) –

            • (dict) –

              A value for a feature flag attribute. Only one of the members can be set.

              Note

              This is a Tagged Union structure. Only one of the following top level keys will be set: StringValue, NumberValue, BooleanValue, StringArray, NumberArray. 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'}
              
              • StringValue (string) –

                A string value for the attribute.

              • NumberValue (float) –

                A numeric value for the attribute.

              • BooleanValue (boolean) –

                A Boolean value for the attribute.

              • StringArray (list) –

                An array of string values for the attribute.

                • (string) –

              • NumberArray (list) –

                An array of numeric values for the attribute.

                • (float) –

    • CreatedAt (datetime) –

      The date and time the experiment definition was created, in ISO 8601 format.

    • UpdatedAt (datetime) –

      The date and time the experiment definition was last updated, in ISO 8601 format.

    • KmsKeyIdentifier (string) –

      The Amazon Resource Name (ARN) of the KMS key used to encrypt experiment data.

Exceptions

  • AppConfig.Client.exceptions.BadRequestException

  • AppConfig.Client.exceptions.ResourceNotFoundException

  • AppConfig.Client.exceptions.InternalServerException