CfnComputeQuotaProps Struct Added in v2.276.0
Properties for defining a CfnComputeQuota.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sagemaker as sagemaker } from 'aws-cdk-lib';
const cfnComputeQuotaProps: sagemaker.CfnComputeQuotaProps = {
clusterArn: 'clusterArn',
computeQuotaConfig: {
computeQuotaResources: [{
instanceType: 'instanceType',
// the properties below are optional
acceleratorPartition: {
count: 123,
type: 'type',
},
accelerators: 123,
count: 123,
memoryInGiB: 123,
vCpu: 123,
}],
preemptTeamTasks: 'preemptTeamTasks',
resourceSharingConfig: {
strategy: 'strategy',
// the properties below are optional
absoluteBorrowLimits: [{
instanceType: 'instanceType',
// the properties below are optional
acceleratorPartition: {
count: 123,
type: 'type',
},
accelerators: 123,
count: 123,
memoryInGiB: 123,
vCpu: 123,
}],
borrowLimit: 123,
},
},
computeQuotaTarget: {
teamName: 'teamName',
// the properties below are optional
fairShareWeight: 123,
},
name: 'name',
// the properties below are optional
activationState: 'activationState',
description: 'description',
tags: [{
key: 'key',
value: 'value',
}],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sagemaker as sagemaker
cfn_compute_quota_props = sagemaker.CfnComputeQuotaProps(
cluster_arn="clusterArn",
compute_quota_config=sagemaker.CfnComputeQuota.ComputeQuotaConfigProperty(
compute_quota_resources=[sagemaker.CfnComputeQuota.ComputeQuotaResourceConfigProperty(
instance_type="instanceType",
# the properties below are optional
accelerator_partition=sagemaker.CfnComputeQuota.AcceleratorPartitionConfigProperty(
count=123,
type="type"
),
accelerators=123,
count=123,
memory_in_gi_b=123,
v_cpu=123
)],
preempt_team_tasks="preemptTeamTasks",
resource_sharing_config=sagemaker.CfnComputeQuota.ResourceSharingConfigProperty(
strategy="strategy",
# the properties below are optional
absolute_borrow_limits=[sagemaker.CfnComputeQuota.ComputeQuotaResourceConfigProperty(
instance_type="instanceType",
# the properties below are optional
accelerator_partition=sagemaker.CfnComputeQuota.AcceleratorPartitionConfigProperty(
count=123,
type="type"
),
accelerators=123,
count=123,
memory_in_gi_b=123,
v_cpu=123
)],
borrow_limit=123
)
),
compute_quota_target=sagemaker.CfnComputeQuota.ComputeQuotaTargetProperty(
team_name="teamName",
# the properties below are optional
fair_share_weight=123
),
name="name",
# the properties below are optional
activation_state="activationState",
description="description",
tags=[CfnTag(
key="key",
value="value"
)]
)
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.sagemaker.*;
CfnComputeQuotaProps cfnComputeQuotaProps = CfnComputeQuotaProps.builder()
.clusterArn("clusterArn")
.computeQuotaConfig(ComputeQuotaConfigProperty.builder()
.computeQuotaResources(List.of(ComputeQuotaResourceConfigProperty.builder()
.instanceType("instanceType")
// the properties below are optional
.acceleratorPartition(AcceleratorPartitionConfigProperty.builder()
.count(123)
.type("type")
.build())
.accelerators(123)
.count(123)
.memoryInGiB(123)
.vCpu(123)
.build()))
.preemptTeamTasks("preemptTeamTasks")
.resourceSharingConfig(ResourceSharingConfigProperty.builder()
.strategy("strategy")
// the properties below are optional
.absoluteBorrowLimits(List.of(ComputeQuotaResourceConfigProperty.builder()
.instanceType("instanceType")
// the properties below are optional
.acceleratorPartition(AcceleratorPartitionConfigProperty.builder()
.count(123)
.type("type")
.build())
.accelerators(123)
.count(123)
.memoryInGiB(123)
.vCpu(123)
.build()))
.borrowLimit(123)
.build())
.build())
.computeQuotaTarget(ComputeQuotaTargetProperty.builder()
.teamName("teamName")
// the properties below are optional
.fairShareWeight(123)
.build())
.name("name")
// the properties below are optional
.activationState("activationState")
.description("description")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
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.Sagemaker;
var cfnComputeQuotaProps = new CfnComputeQuotaProps {
ClusterArn = "clusterArn",
ComputeQuotaConfig = new ComputeQuotaConfigProperty {
ComputeQuotaResources = new [] { new ComputeQuotaResourceConfigProperty {
InstanceType = "instanceType",
// the properties below are optional
AcceleratorPartition = new AcceleratorPartitionConfigProperty {
Count = 123,
Type = "type"
},
Accelerators = 123,
Count = 123,
MemoryInGiB = 123,
VCpu = 123
} },
PreemptTeamTasks = "preemptTeamTasks",
ResourceSharingConfig = new ResourceSharingConfigProperty {
Strategy = "strategy",
// the properties below are optional
AbsoluteBorrowLimits = new [] { new ComputeQuotaResourceConfigProperty {
InstanceType = "instanceType",
// the properties below are optional
AcceleratorPartition = new AcceleratorPartitionConfigProperty {
Count = 123,
Type = "type"
},
Accelerators = 123,
Count = 123,
MemoryInGiB = 123,
VCpu = 123
} },
BorrowLimit = 123
}
},
ComputeQuotaTarget = new ComputeQuotaTargetProperty {
TeamName = "teamName",
// the properties below are optional
FairShareWeight = 123
},
Name = "name",
// the properties below are optional
ActivationState = "activationState",
Description = "description",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
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"
cfnComputeQuotaProps := &CfnComputeQuotaProps{
ClusterArn: jsii.String("clusterArn"),
ComputeQuotaConfig: &ComputeQuotaConfigProperty{
ComputeQuotaResources: []interface{}{
&ComputeQuotaResourceConfigProperty{
InstanceType: jsii.String("instanceType"),
// the properties below are optional
AcceleratorPartition: &AcceleratorPartitionConfigProperty{
Count: jsii.Number(123),
Type: jsii.String("type"),
},
Accelerators: jsii.Number(123),
Count: jsii.Number(123),
MemoryInGiB: jsii.Number(123),
VCpu: jsii.Number(123),
},
},
PreemptTeamTasks: jsii.String("preemptTeamTasks"),
ResourceSharingConfig: &ResourceSharingConfigProperty{
Strategy: jsii.String("strategy"),
// the properties below are optional
AbsoluteBorrowLimits: []interface{}{
&ComputeQuotaResourceConfigProperty{
InstanceType: jsii.String("instanceType"),
// the properties below are optional
AcceleratorPartition: &AcceleratorPartitionConfigProperty{
Count: jsii.Number(123),
Type: jsii.String("type"),
},
Accelerators: jsii.Number(123),
Count: jsii.Number(123),
MemoryInGiB: jsii.Number(123),
VCpu: jsii.Number(123),
},
},
BorrowLimit: jsii.Number(123),
},
},
ComputeQuotaTarget: &ComputeQuotaTargetProperty{
TeamName: jsii.String("teamName"),
// the properties below are optional
FairShareWeight: jsii.Number(123),
},
Name: jsii.String("name"),
// the properties below are optional
ActivationState: jsii.String("activationState"),
Description: jsii.String("description"),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
activationStateoptionalstringactivation_stateoptionalstractivationStateoptionalStringActivationStateoptionalstringActivationStateoptional*string#Whether the compute allocation rule is active.
Defaults service-side to 'Enabled' when omitted on Create.
The ARN of the EKS-orchestrated SageMaker HyperPod cluster the compute allocation definition is bound to.
Slurm-orchestrated clusters are rejected by the service.
computeQuotaConfigIResolvable | CfnComputeQuota.ComputeQuotaConfigPropertycompute_quota_configtyping.Union[IResolvable, ComputeQuotaConfigProperty]computeQuotaConfigIResolvableComputeQuotaConfigIResolvableComputeQuotaConfiginterface{}required#Compute allocation rules: per-resource quotas, idle-borrowing strategy, and team-task preemption policy.
computeQuotaTargetIResolvable | CfnComputeQuota.ComputeQuotaTargetPropertycompute_quota_targettyping.Union[IResolvable, ComputeQuotaTargetProperty]computeQuotaTargetIResolvableComputeQuotaTargetIResolvableComputeQuotaTargetinterface{}required#The team this compute allocation rule applies to.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#A free-form description of the compute allocation definition.
The name of the compute allocation definition.