Continuum / Client / create_environment

create_environment

Continuum.Client.create_environment(**kwargs)

Creates an environment and starts its validation and any requested provisioning. Storage provisioning and dependency checks may continue after the initial 201 response; use GetEnvironment to observe completion.

See also: AWS API Documentation

Request Syntax

response = client.create_environment(
    name='string',
    configuration={
        'codeConfiguration': {
            'sourceConfiguration': {
                's3Sources': [
                    {
                        'integrationId': 'string',
                        'codePrefix': 'string',
                        'contextPrefix': 'string'
                    },
                ],
                'repositorySources': [
                    {
                        'integrationId': 'string',
                        'repository': 'string',
                        'defaultBranch': 'string'
                    },
                ]
            },
            'environmentConfiguration': {
                'network': {
                    'allowedDomains': [
                        'string',
                    ]
                },
                'scanFrequency': 'string',
                'patchCreationPolicy': 'ENABLED'|'DISABLED'
            }
        }
    }
)
Parameters:
  • name (string) –

    [REQUIRED]

    The customer-visible name of the environment.

  • configuration (dict) –

    Type-specific configuration. Omission creates a code environment with the default operating policy and no sources.

    • codeConfiguration (dict) –

      Configuration for a code-scanning environment.

      • sourceConfiguration (dict) –

        Source configuration for the environment.

        • s3Sources (list) –

          S3 sources backed by previously-created S3 integrations.

          • (dict) –

            An S3 source for one environment, backed by a previously-created S3 integration.

            • integrationId (string) – [REQUIRED]

              Identifier of an S3 integration in the caller’s account. The integration supplies the bucket, the read role, and the external ID Continuum uses to read the prefixes.

            • codePrefix (string) –

              Prefix containing source code. Defaults to code/ when omitted.

            • contextPrefix (string) –

              Prefix containing customer-authored context. Defaults to context/ when omitted.

        • repositorySources (list) –

          Explicit repository selections from previously-created integrations.

          • (dict) –

            One repository selected from a previously-created integration.

            • integrationId (string) – [REQUIRED]

              Integration that provides the selected repository.

            • repository (string) – [REQUIRED]

              Repository selected from that integration in owner/repository form.

            • defaultBranch (string) –

              Branch used when a scan does not choose a more specific revision.

      • environmentConfiguration (dict) –

        Environment-level operating policy.

        • network (dict) –

          Network policy for agent execution.

          • allowedDomains (list) –

            Domains that an environment’s agent execution may contact.

            • (string) –

              A domain name permitted for build-time dependency resolution.

        • scanFrequency (string) –

          Recurring scan interval: P1D (1 day), P2D (2 days), or P7D (7 days). PT0H disables recurring scans. Defaults to P1D when creating an environment.

        • patchCreationPolicy (string) –

          Whether Continuum creates a patch for a proposed remediation. Defaults to DISABLED.

Return type:

dict

Returns:

Response Syntax

{
    'environmentId': 'string',
    'environmentArn': 'string',
    'status': 'ACTIVE',
    'createdAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) –

    Contains the identifier and ARN of the newly created environment.

    • environmentId (string) –

      The unique identifier assigned to the environment.

    • environmentArn (string) –

      The ARN of the created environment.

    • status (string) –

      The initial status of the environment. Always ACTIVE on successful creation.

    • createdAt (datetime) –

      The timestamp when the environment was created.

Exceptions