AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the UpdateComputeEnvironment operation. Updates an AWS Batch compute environment.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.Batch.AmazonBatchRequest
      Amazon.Batch.Model.UpdateComputeEnvironmentRequest

Namespace: Amazon.Batch.Model
Assembly: AWSSDK.Batch.dll
Version: 3.x.y.z

Syntax

C#
public class UpdateComputeEnvironmentRequest : AmazonBatchRequest
         IAmazonWebServiceRequest

The UpdateComputeEnvironmentRequest type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property ComputeEnvironment System.String

Gets and sets the property ComputeEnvironment.

The name or full Amazon Resource Name (ARN) of the compute environment to update.

Public Property ComputeResources Amazon.Batch.Model.ComputeResourceUpdate

Gets and sets the property ComputeResources.

Details of the compute resources managed by the compute environment. Required for a managed compute environment.

Public Property ServiceRole System.String

Gets and sets the property ServiceRole.

The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch to make calls to other AWS services on your behalf.

If your specified role has a path other than /, then you must either specify the full role ARN (this is recommended) or prefix the role name with the path.

Depending on how you created your AWS Batch service role, its ARN may contain the service-role path prefix. When you only specify the name of the service role, AWS Batch assumes that your ARN does not use the service-role path prefix. Because of this, we recommend that you specify the full ARN of your service role when you create compute environments.

Public Property State Amazon.Batch.CEState

Gets and sets the property State.

The state of the compute environment. Compute environments in the ENABLED state can accept jobs from a queue and scale in or out automatically based on the workload demand of its associated queues.

Examples

This example disables the P2OnDemand compute environment so it can be deleted.

To update a compute environment


var response = client.UpdateComputeEnvironment(new UpdateComputeEnvironmentRequest 
{
    ComputeEnvironment = "P2OnDemand",
    State = "DISABLED"
});

string computeEnvironmentArn = response.ComputeEnvironmentArn;
string computeEnvironmentName = response.ComputeEnvironmentName;

            

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms