Batch / Client / update_service_environment
update_service_environment¶
- Batch.Client.update_service_environment(**kwargs)¶
Updates a service environment. You can update the state of a service environment from
ENABLED
toDISABLED
to prevent new service jobs from being placed in the service environment.See also: AWS API Documentation
Request Syntax
response = client.update_service_environment( serviceEnvironment='string', state='ENABLED'|'DISABLED', capacityLimits=[ { 'maxCapacity': 123, 'capacityUnit': 'string' }, ] )
- Parameters:
serviceEnvironment (string) –
[REQUIRED]
The name or ARN of the service environment to update.
state (string) – The state of the service environment.
capacityLimits (list) –
The capacity limits for the service environment. This defines the maximum resources that can be used by service jobs in this environment.
(dict) –
Defines the capacity limit for a service environment. This structure specifies the maximum amount of resources that can be used by service jobs in the environment.
maxCapacity (integer) –
The maximum capacity available for the service environment. This value represents the maximum amount of resources that can be allocated to service jobs.
For example,
maxCapacity=50
,capacityUnit=NUM_INSTANCES
. This indicates that the maximum number of instances that can be run on this service environment is 50. You could then run 5 SageMaker Training jobs that each use 10 instances. However, if you submit another job that requires 10 instances, it will wait in the queue.capacityUnit (string) –
The unit of measure for the capacity limit. This defines how the maxCapacity value should be interpreted. For
SAGEMAKER_TRAINING
jobs, useNUM_INSTANCES
.
- Return type:
dict
- Returns:
Response Syntax
{ 'serviceEnvironmentName': 'string', 'serviceEnvironmentArn': 'string' }
Response Structure
(dict) –
serviceEnvironmentName (string) –
The name of the service environment that was updated.
serviceEnvironmentArn (string) –
The Amazon Resource Name (ARN) of the service environment that was updated.
Exceptions
Batch.Client.exceptions.ClientException
Batch.Client.exceptions.ServerException