WellArchitected / Client / create_agent_context

create_agent_context

WellArchitected.Client.create_agent_context(**kwargs)

Creates a context associated with an optimization profile. Contexts provide application and environment information used during recommendation generation.

See also: AWS API Documentation

Request Syntax

response = client.create_agent_context(
    clientToken='string',
    profileArn='string',
    title='string',
    contextType='APPLICATION',
    content={
        'accountIds': [
            'string',
        ],
        'regions': [
            'string',
        ],
        'awsServices': [
            'string',
        ],
        'resourceTypes': [
            'string',
        ],
        'resourceTags': [
            {
                'key': 'string',
                'value': 'string'
            },
        ],
        'applicationOverview': 'string',
        'industry': 'string',
        'applicationType': 'SAS'|'DESKTOP_APPLICATION'|'OTHER',
        'criticality': 'MISSION_CRITICAL'|'BUSINESS_CRITICAL'|'NON_CRITICAL'|'TEST_DEVELOPMENT',
        'architectureOverview': 'string',
        'additionalContext': 'string'
    }
)
Parameters:
  • clientToken (string) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

    This field is autopopulated if not provided.

  • profileArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the profile to associate the context with.

  • title (string) –

    [REQUIRED]

    The title of the context.

  • contextType (string) –

    [REQUIRED]

    The type of the context.

  • content (dict) –

    [REQUIRED]

    The typed content of the context. The structure contains application-specific fields such as account IDs, Regions, services, and resource types.

    • accountIds (list) –

      The Amazon Web Services account IDs associated with this application context.

      • (string) –

    • regions (list) –

      The Amazon Web Services Regions where this application operates.

      • (string) –

    • awsServices (list) –

      The Amazon Web Services services used by this application.

      • (string) –

    • resourceTypes (list) –

      The Amazon Web Services resource types relevant to this application.

      • (string) –

    • resourceTags (list) –

      Resource tags used to scope this application context.

      • (dict) –

        A key-value pair representing a resource tag used to scope context content.

        • key (string) – [REQUIRED]

          The tag key.

        • value (string) – [REQUIRED]

          The tag value.

    • applicationOverview (string) –

      A free-form overview of the application.

    • industry (string) –

      The industry vertical for this application.

    • applicationType (string) –

      The type of the application.

    • criticality (string) –

      The business criticality of the application.

    • architectureOverview (string) –

      A free-form description of the application architecture.

    • additionalContext (string) –

      Additional context not captured by other fields.

Return type:

dict

Returns:

Response Syntax

{
    'context': {
        'id': 'string',
        'profileArn': 'string',
        'title': 'string',
        'contextType': 'APPLICATION',
        'content': {
            'accountIds': [
                'string',
            ],
            'regions': [
                'string',
            ],
            'awsServices': [
                'string',
            ],
            'resourceTypes': [
                'string',
            ],
            'resourceTags': [
                {
                    'key': 'string',
                    'value': 'string'
                },
            ],
            'applicationOverview': 'string',
            'industry': 'string',
            'applicationType': 'SAS'|'DESKTOP_APPLICATION'|'OTHER',
            'criticality': 'MISSION_CRITICAL'|'BUSINESS_CRITICAL'|'NON_CRITICAL'|'TEST_DEVELOPMENT',
            'architectureOverview': 'string',
            'additionalContext': 'string'
        },
        'applicationType': 'SAS'|'DESKTOP_APPLICATION'|'OTHER',
        'criticality': 'MISSION_CRITICAL'|'BUSINESS_CRITICAL'|'NON_CRITICAL'|'TEST_DEVELOPMENT',
        'createdBy': 'string',
        'createdAt': datetime(2015, 1, 1),
        'lastModifiedBy': 'string',
        'lastModifiedAt': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) –

    • context (dict) –

      The created context summary.

      • id (string) –

        The unique identifier of the context.

      • profileArn (string) –

        The Amazon Resource Name (ARN) of the associated profile.

      • title (string) –

        The title of the context.

      • contextType (string) –

        The type of the context.

      • content (dict) –

        The typed content of the context, containing application-specific fields such as account IDs, Regions, services, and resource types.

        • accountIds (list) –

          The Amazon Web Services account IDs associated with this application context.

          • (string) –

        • regions (list) –

          The Amazon Web Services Regions where this application operates.

          • (string) –

        • awsServices (list) –

          The Amazon Web Services services used by this application.

          • (string) –

        • resourceTypes (list) –

          The Amazon Web Services resource types relevant to this application.

          • (string) –

        • resourceTags (list) –

          Resource tags used to scope this application context.

          • (dict) –

            A key-value pair representing a resource tag used to scope context content.

            • key (string) –

              The tag key.

            • value (string) –

              The tag value.

        • applicationOverview (string) –

          A free-form overview of the application.

        • industry (string) –

          The industry vertical for this application.

        • applicationType (string) –

          The type of the application.

        • criticality (string) –

          The business criticality of the application.

        • architectureOverview (string) –

          A free-form description of the application architecture.

        • additionalContext (string) –

          Additional context not captured by other fields.

      • applicationType (string) –

        The type of application described by this context.

      • criticality (string) –

        The business criticality of the application described by this context.

      • createdBy (string) –

        The identifier of the user or system that created this context.

      • createdAt (datetime) –

        The timestamp when the context was created.

      • lastModifiedBy (string) –

        The identifier of the user or system that last modified this context.

      • lastModifiedAt (datetime) –

        The timestamp when the context was last modified.

Exceptions

  • WellArchitected.Client.exceptions.AccessDeniedException

  • WellArchitected.Client.exceptions.ValidationException

  • WellArchitected.Client.exceptions.InternalServerException

  • WellArchitected.Client.exceptions.ConflictException

  • WellArchitected.Client.exceptions.ServiceQuotaExceededException

  • WellArchitected.Client.exceptions.ResourceNotFoundException

  • WellArchitected.Client.exceptions.ThrottlingException