Class CfnCapacityProvider
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.lambda.CfnCapacityProvider
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,ICapacityProviderRef,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.125.0 (build fdbe357)",
date="2026-01-19T12:03:56.754Z")
@Stability(Stable)
public class CfnCapacityProvider
extends CfnResource
implements IInspectable, ICapacityProviderRef, ITaggableV2
Creates a capacity provider that manages compute resources for Lambda functions.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.lambda.*;
CfnCapacityProvider cfnCapacityProvider = CfnCapacityProvider.Builder.create(this, "MyCfnCapacityProvider")
.permissionsConfig(CapacityProviderPermissionsConfigProperty.builder()
.capacityProviderOperatorRoleArn("capacityProviderOperatorRoleArn")
.build())
.vpcConfig(CapacityProviderVpcConfigProperty.builder()
.securityGroupIds(List.of("securityGroupIds"))
.subnetIds(List.of("subnetIds"))
.build())
// the properties below are optional
.capacityProviderName("capacityProviderName")
.capacityProviderScalingConfig(CapacityProviderScalingConfigProperty.builder()
.maxVCpuCount(123)
.scalingMode("scalingMode")
.scalingPolicies(List.of(TargetTrackingScalingPolicyProperty.builder()
.predefinedMetricType("predefinedMetricType")
.targetValue(123)
.build()))
.build())
.instanceRequirements(InstanceRequirementsProperty.builder()
.allowedInstanceTypes(List.of("allowedInstanceTypes"))
.architectures(List.of("architectures"))
.excludedInstanceTypes(List.of("excludedInstanceTypes"))
.build())
.kmsKeyArn("kmsKeyArn")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnCapacityProvider.static interfaceConfiguration that specifies the permissions required for the capacity provider to manage compute resources.static interfaceConfiguration that defines how the capacity provider scales compute instances based on demand and policies.static interfaceVPC configuration that specifies the network settings for compute instances managed by the capacity provider.static interfaceSpecifications that define the characteristics and constraints for compute instances used by the capacity provider.static interfaceA scaling policy for the capacity provider that automatically adjusts capacity to maintain a target value for a specific metric.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.lambda.ICapacityProviderRef
ICapacityProviderRef.Jsii$Default, ICapacityProviderRef.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnCapacityProvider(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnCapacityProvider(software.amazon.jsii.JsiiObjectRef objRef) CfnCapacityProvider(software.constructs.Construct scope, String id, CfnCapacityProviderProps props) Create a newAWS::Lambda::CapacityProvider. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForCapacityProvider(ICapacityProviderRef resource) static ICapacityProviderReffromCapacityProviderArn(software.constructs.Construct scope, String id, String arn) Creates a new ICapacityProviderRef from an ARN.static ICapacityProviderReffromCapacityProviderName(software.constructs.Construct scope, String id, String capacityProviderName) Creates a new ICapacityProviderRef from a capacityProviderName.The Amazon Resource Name (ARN) of the capacity provider.The current state of the capacity provider.The name of the capacity provider.A reference to a CapacityProvider resource.The scaling configuration for the capacity provider.Tag Manager which manages the tags for this resource.The instance requirements for compute resources managed by the capacity provider.The ARN of the KMS key used to encrypt the capacity provider's resources.The permissions configuration for the capacity provider.getTags()A key-value pair that provides metadata for the capacity provider.The VPC configuration for the capacity provider.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnCapacityProvider.renderProperties(Map<String, Object> props) voidsetCapacityProviderName(String value) The name of the capacity provider.voidThe scaling configuration for the capacity provider.voidThe scaling configuration for the capacity provider.voidThe instance requirements for compute resources managed by the capacity provider.voidThe instance requirements for compute resources managed by the capacity provider.voidsetKmsKeyArn(String value) The ARN of the KMS key used to encrypt the capacity provider's resources.voidsetPermissionsConfig(IResolvable value) The permissions configuration for the capacity provider.voidThe permissions configuration for the capacity provider.voidA key-value pair that provides metadata for the capacity provider.voidsetVpcConfig(IResolvable value) The VPC configuration for the capacity provider.voidThe VPC configuration for the capacity provider.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnCapacityProvider
protected CfnCapacityProvider(software.amazon.jsii.JsiiObjectRef objRef) -
CfnCapacityProvider
protected CfnCapacityProvider(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnCapacityProvider
@Stability(Stable) public CfnCapacityProvider(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnCapacityProviderProps props) Create a newAWS::Lambda::CapacityProvider.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
arnForCapacityProvider
@Stability(Stable) @NotNull public static String arnForCapacityProvider(@NotNull ICapacityProviderRef resource) - Parameters:
resource- This parameter is required.
-
fromCapacityProviderArn
@Stability(Stable) @NotNull public static ICapacityProviderRef fromCapacityProviderArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String arn) Creates a new ICapacityProviderRef from an ARN.- Parameters:
scope- This parameter is required.id- This parameter is required.arn- This parameter is required.
-
fromCapacityProviderName
@Stability(Stable) @NotNull public static ICapacityProviderRef fromCapacityProviderName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String capacityProviderName) Creates a new ICapacityProviderRef from a capacityProviderName.- Parameters:
scope- This parameter is required.id- This parameter is required.capacityProviderName- This parameter is required.
-
isCfnCapacityProvider
Checks whether the given object is a CfnCapacityProvider.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
The Amazon Resource Name (ARN) of the capacity provider.This is a read-only property that is automatically generated when the capacity provider is created.
-
getAttrState
The current state of the capacity provider. -
getCapacityProviderRef
A reference to a CapacityProvider resource.- Specified by:
getCapacityProviderRefin interfaceICapacityProviderRef
-
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getPermissionsConfig
The permissions configuration for the capacity provider.Returns union: either
IResolvableorCfnCapacityProvider.CapacityProviderPermissionsConfigProperty -
setPermissionsConfig
The permissions configuration for the capacity provider. -
setPermissionsConfig
@Stability(Stable) public void setPermissionsConfig(@NotNull CfnCapacityProvider.CapacityProviderPermissionsConfigProperty value) The permissions configuration for the capacity provider. -
getVpcConfig
The VPC configuration for the capacity provider.Returns union: either
IResolvableorCfnCapacityProvider.CapacityProviderVpcConfigProperty -
setVpcConfig
The VPC configuration for the capacity provider. -
setVpcConfig
@Stability(Stable) public void setVpcConfig(@NotNull CfnCapacityProvider.CapacityProviderVpcConfigProperty value) The VPC configuration for the capacity provider. -
getCapacityProviderName
The name of the capacity provider. -
setCapacityProviderName
The name of the capacity provider. -
getCapacityProviderScalingConfig
The scaling configuration for the capacity provider.Returns union: either
IResolvableorCfnCapacityProvider.CapacityProviderScalingConfigProperty -
setCapacityProviderScalingConfig
The scaling configuration for the capacity provider. -
setCapacityProviderScalingConfig
@Stability(Stable) public void setCapacityProviderScalingConfig(@Nullable CfnCapacityProvider.CapacityProviderScalingConfigProperty value) The scaling configuration for the capacity provider. -
getInstanceRequirements
The instance requirements for compute resources managed by the capacity provider.Returns union: either
IResolvableorCfnCapacityProvider.InstanceRequirementsProperty -
setInstanceRequirements
The instance requirements for compute resources managed by the capacity provider. -
setInstanceRequirements
@Stability(Stable) public void setInstanceRequirements(@Nullable CfnCapacityProvider.InstanceRequirementsProperty value) The instance requirements for compute resources managed by the capacity provider. -
getKmsKeyArn
The ARN of the KMS key used to encrypt the capacity provider's resources. -
setKmsKeyArn
The ARN of the KMS key used to encrypt the capacity provider's resources. -
getTags
A key-value pair that provides metadata for the capacity provider. -
setTags
A key-value pair that provides metadata for the capacity provider.
-