Continuum / Client / update_environment
update_environment¶
- Continuum.Client.update_environment(**kwargs)¶
Updates the customer-controlled mutable properties of an environment. Only the name, the environment’s S3 integration source and repository selections, its scan frequency, its network policy, and its patch creation policy can be changed.
See also: AWS API Documentation
Request Syntax
response = client.update_environment( environmentId='string', 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:
environmentId (string) –
[REQUIRED]
The unique identifier of the environment to update.
name (string) – The new customer-visible name.
configuration (dict) –
Type-specific configuration changes. Omission preserves the configuration.
codeConfiguration (dict) –
Changes to a code-scanning environment.
sourceConfiguration (dict) –
Source changes. s3Sources replaces the environment’s S3 source, and repositorySources replaces its repository selections.
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) –
Operating-policy changes. network replaces the environment’s network policy; a network without allowedDomains allows no domains. Builds accepted before the change keep the domains they were accepted with. patchCreationPolicy replaces the patch creation policy. scanFrequency updates scan cadence. Omitted members preserve their stored values.
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', 'name': 'string', 'status': 'ACTIVE', 'statusMessage': 'string', 'statusUpdatedAt': datetime(2015, 1, 1), 'createdAt': datetime(2015, 1, 1), 'configuration': { 'codeConfiguration': { 'collectorDetails': { 'collectorDataAccessRoleArn': 'string' }, 'sourceConfiguration': { 's3Sources': [ { 'integrationId': 'string', 'codePrefix': 'string', 'contextPrefix': 'string' }, ], 'repositorySources': [ { 'integrationId': 'string', 'repository': 'string', 'defaultBranch': 'string' }, ] }, 'environmentConfiguration': { 'network': { 'allowedDomains': [ 'string', ] }, 'scanFrequency': 'string', 'patchCreationPolicy': 'ENABLED'|'DISABLED' }, 'latestScan': { 'scanRunId': 'string', 'status': 'SUBMITTED'|'WAITING_FOR_BUILD'|'BUILDING'|'WAITING_FOR_SCAN'|'SCANNING'|'SUCCEEDED'|'FAILED', 'origin': 'MANUAL'|'SCHEDULED', 'createdAt': datetime(2015, 1, 1), 'completedAt': datetime(2015, 1, 1), 'failureMessage': 'string', 'failureStage': 'SUBMITTED'|'WAITING_FOR_BUILD'|'BUILDING'|'WAITING_FOR_SCAN'|'SCANNING' } } } }
Response Structure
(dict) –
Contains the current state of the updated environment. Use GetEnvironment to read its source and environment configuration.
environmentId (string) –
The unique identifier of the updated environment.
environmentArn (string) –
The ARN of the updated environment.
name (string) –
The current customer-visible name of the environment.
status (string) –
The current operational status of the environment.
statusMessage (string) –
Human-readable details about the current status.
statusUpdatedAt (datetime) –
The timestamp when the status last transitioned. Uses the existing GetEnvironment/ListEnvironments ISO-8601 wire format for this field.
createdAt (datetime) –
The timestamp when the environment was created. Uses the existing GetEnvironment/ListEnvironments ISO-8601 wire format for this field.
configuration (dict) –
Type-specific state, including Collector details and the latest scan. Read source and operating-policy settings through GetEnvironment.
codeConfiguration (dict) –
Configuration and scan state for a code-scanning environment.
collectorDetails (dict) –
Collector data access configuration. Omitted when no Collector data access role is configured.
collectorDataAccessRoleArn (string) –
IAM role that Continuum assumes to authorize its access to associated Collector inventory. Required for nonempty Collector inventory resolution, in the same account or across accounts. This is independent from any S3 source role.
sourceConfiguration (dict) –
Sources in the shape accepted by CreateEnvironment and UpdateEnvironment.
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) –
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) –
Integration that provides the selected repository.
repository (string) –
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) –
Operating policy in the shape accepted by CreateEnvironment and UpdateEnvironment.
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.
latestScan (dict) –
The newest scan requested for this environment, if one exists.
scanRunId (string) –
The unique scan identifier.
status (string) –
Current customer-visible status.
origin (string) –
Why the scan was created. Always present.
createdAt (datetime) –
Time at which Continuum accepted the scan request.
completedAt (datetime) –
Time at which a terminal result was recorded.
failureMessage (string) –
Failure detail present for unsuccessful scans.
failureStage (string) –
Phase this scan failed in. Present only when
statusis FAILED, and absent for a scan that failed before this field existed.
Exceptions
Continuum.Client.exceptions.ValidationExceptionContinuum.Client.exceptions.InternalServerExceptionContinuum.Client.exceptions.ResourceNotFoundExceptionContinuum.Client.exceptions.ThrottlingExceptionContinuum.Client.exceptions.AccessDeniedExceptionContinuum.Client.exceptions.ConflictException