# SharingStrategyProperty

- Source: Generated at build time
- Type last changed: v2.276.0 · 10 Nov 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
const sharingStrategyProperty: ecs.CfnTaskDefinition.SharingStrategyProperty = {
  nvidiaMps: {
    memory: 123,

    // the properties below are optional
    maxComputePercent: 123,
  },
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecs as ecs

sharing_strategy_property = ecs.CfnTaskDefinition.SharingStrategyProperty(
    nvidia_mps=ecs.CfnTaskDefinition.NvidiaMpsAllocationProperty(
        memory=123,

        # the properties below are optional
        max_compute_percent=123
    )
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ecs.*;

SharingStrategyProperty sharingStrategyProperty = SharingStrategyProperty.builder()
        .nvidiaMps(NvidiaMpsAllocationProperty.builder()
                .memory(123)

                // the properties below are optional
                .maxComputePercent(123)
                .build())
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;

var sharingStrategyProperty = new SharingStrategyProperty {
    NvidiaMps = new NvidiaMpsAllocationProperty {
        Memory = 123,

        // the properties below are optional
        MaxComputePercent = 123
    }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

sharingStrategyProperty := &SharingStrategyProperty{
	NvidiaMps: &NvidiaMpsAllocationProperty{
		Memory: jsii.Number(123),

		// the properties below are optional
		MaxComputePercent: jsii.Number(123),
	},
}
```

## Properties

- `nvidiaMps`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTaskDefinition.NvidiaMpsAllocationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.CfnTaskDefinition.NvidiaMpsAllocationProperty.html) (required)
