Skip to content
v2.278.0

CfnCapacityProviderProps Struct ​

Properties for defining a CfnCapacityProvider.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrockagentcore as bedrockagentcore } from 'aws-cdk-lib';
const cfnCapacityProviderProps: bedrockagentcore.CfnCapacityProviderProps = {
  computeConfiguration: {
    ec2Configuration: {
      launchTemplateSource: {
        launchParameters: {
          instanceRequirements: {
            allowedInstanceTypes: ['allowedInstanceTypes'],
          },
          operatingSystem: 'operatingSystem',

          // the properties below are optional
          capacityReservationSpecification: {
            capacityReservationPreference: 'capacityReservationPreference',
            capacityReservationTarget: {
              capacityReservationId: 'capacityReservationId',
              capacityReservationResourceGroupArn: 'capacityReservationResourceGroupArn',
            },
          },
          ephemeralVolumes: [{
            deviceName: 'deviceName',
            ebs: {
              ebsCardIndex: 123,
              encrypted: false,
              iops: 123,
              kmsKeyId: 'kmsKeyId',
              snapshotId: 'snapshotId',
              throughput: 123,
              volumeInitializationRate: 123,
              volumeSize: 123,
              volumeType: 'volumeType',
            },
            virtualName: 'virtualName',
          }],
          instanceProfileArn: 'instanceProfileArn',
          licenseSpecifications: [{
            licenseConfigurationArn: 'licenseConfigurationArn',
          }],
          monitoring: 'monitoring',
          propagatedTags: {
            propagatedTagsKey: 'propagatedTags',
          },
          sshKeyName: 'sshKeyName',
        },
      },
      vpcConfiguration: {
        securityGroups: ['securityGroups'],
        subnets: ['subnets'],
      },

      // the properties below are optional
      lifecycleConfiguration: {
        idleInstanceTimeout: 123,
        maxLifetime: 123,
      },
      rootVolume: {
        encrypted: false,
        freeSpaceGiB: 123,
        iops: 123,
        kmsKeyId: 'kmsKeyId',
        throughput: 123,
        volumeType: 'volumeType',
      },
      volumes: [{
        ebsConfiguration: {
          name: 'name',
          sizeGiB: 123,

          // the properties below are optional
          encrypted: false,
          iops: 123,
          kmsKeyId: 'kmsKeyId',
          snapshotId: 'snapshotId',
          throughput: 123,
          volumeType: 'volumeType',
        },
      }],
    },
  },
  name: 'name',
  permissionsConfiguration: {
    capacityProviderOperatorRoleArn: 'capacityProviderOperatorRoleArn',
  },

  // the properties below are optional
  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_bedrockagentcore as bedrockagentcore

cfn_capacity_provider_props = bedrockagentcore.CfnCapacityProviderProps(
    compute_configuration=bedrockagentcore.CfnCapacityProvider.ComputeConfigurationProperty(
        ec2_configuration=bedrockagentcore.CfnCapacityProvider.Ec2ConfigurationProperty(
            launch_template_source=bedrockagentcore.CfnCapacityProvider.LaunchTemplateSourceProperty(
                launch_parameters=bedrockagentcore.CfnCapacityProvider.LaunchParametersProperty(
                    instance_requirements=bedrockagentcore.CfnCapacityProvider.InstanceRequirementsProperty(
                        allowed_instance_types=["allowedInstanceTypes"]
                    ),
                    operating_system="operatingSystem",

                    # the properties below are optional
                    capacity_reservation_specification=bedrockagentcore.CfnCapacityProvider.CapacityReservationSpecificationProperty(
                        capacity_reservation_preference="capacityReservationPreference",
                        capacity_reservation_target=bedrockagentcore.CfnCapacityProvider.CapacityReservationTargetProperty(
                            capacity_reservation_id="capacityReservationId",
                            capacity_reservation_resource_group_arn="capacityReservationResourceGroupArn"
                        )
                    ),
                    ephemeral_volumes=[bedrockagentcore.CfnCapacityProvider.EphemeralBlockDeviceMappingProperty(
                        device_name="deviceName",
                        ebs=bedrockagentcore.CfnCapacityProvider.EphemeralEBSVolumeConfigurationProperty(
                            ebs_card_index=123,
                            encrypted=False,
                            iops=123,
                            kms_key_id="kmsKeyId",
                            snapshot_id="snapshotId",
                            throughput=123,
                            volume_initialization_rate=123,
                            volume_size=123,
                            volume_type="volumeType"
                        ),
                        virtual_name="virtualName"
                    )],
                    instance_profile_arn="instanceProfileArn",
                    license_specifications=[bedrockagentcore.CfnCapacityProvider.LicenseSpecificationProperty(
                        license_configuration_arn="licenseConfigurationArn"
                    )],
                    monitoring="monitoring",
                    propagated_tags={
                        "propagated_tags_key": "propagatedTags"
                    },
                    ssh_key_name="sshKeyName"
                )
            ),
            vpc_configuration=bedrockagentcore.CfnCapacityProvider.VpcConfigurationProperty(
                security_groups=["securityGroups"],
                subnets=["subnets"]
            ),

            # the properties below are optional
            lifecycle_configuration=bedrockagentcore.CfnCapacityProvider.InstanceLifecycleConfigurationProperty(
                idle_instance_timeout=123,
                max_lifetime=123
            ),
            root_volume=bedrockagentcore.CfnCapacityProvider.RootVolumeConfigurationProperty(
                encrypted=False,
                free_space_gi_b=123,
                iops=123,
                kms_key_id="kmsKeyId",
                throughput=123,
                volume_type="volumeType"
            ),
            volumes=[bedrockagentcore.CfnCapacityProvider.VolumeConfigurationProperty(
                ebs_configuration=bedrockagentcore.CfnCapacityProvider.EbsVolumeConfigurationProperty(
                    name="name",
                    size_gi_b=123,

                    # the properties below are optional
                    encrypted=False,
                    iops=123,
                    kms_key_id="kmsKeyId",
                    snapshot_id="snapshotId",
                    throughput=123,
                    volume_type="volumeType"
                )
            )]
        )
    ),
    name="name",
    permissions_configuration=bedrockagentcore.CfnCapacityProvider.PermissionsConfigurationProperty(
        capacity_provider_operator_role_arn="capacityProviderOperatorRoleArn"
    ),

    # the properties below are optional
    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.bedrockagentcore.*;

CfnCapacityProviderProps cfnCapacityProviderProps = CfnCapacityProviderProps.builder()
        .computeConfiguration(ComputeConfigurationProperty.builder()
                .ec2Configuration(Ec2ConfigurationProperty.builder()
                        .launchTemplateSource(LaunchTemplateSourceProperty.builder()
                                .launchParameters(LaunchParametersProperty.builder()
                                        .instanceRequirements(InstanceRequirementsProperty.builder()
                                                .allowedInstanceTypes(List.of("allowedInstanceTypes"))
                                                .build())
                                        .operatingSystem("operatingSystem")

                                        // the properties below are optional
                                        .capacityReservationSpecification(CapacityReservationSpecificationProperty.builder()
                                                .capacityReservationPreference("capacityReservationPreference")
                                                .capacityReservationTarget(CapacityReservationTargetProperty.builder()
                                                        .capacityReservationId("capacityReservationId")
                                                        .capacityReservationResourceGroupArn("capacityReservationResourceGroupArn")
                                                        .build())
                                                .build())
                                        .ephemeralVolumes(List.of(EphemeralBlockDeviceMappingProperty.builder()
                                                .deviceName("deviceName")
                                                .ebs(EphemeralEBSVolumeConfigurationProperty.builder()
                                                        .ebsCardIndex(123)
                                                        .encrypted(false)
                                                        .iops(123)
                                                        .kmsKeyId("kmsKeyId")
                                                        .snapshotId("snapshotId")
                                                        .throughput(123)
                                                        .volumeInitializationRate(123)
                                                        .volumeSize(123)
                                                        .volumeType("volumeType")
                                                        .build())
                                                .virtualName("virtualName")
                                                .build()))
                                        .instanceProfileArn("instanceProfileArn")
                                        .licenseSpecifications(List.of(LicenseSpecificationProperty.builder()
                                                .licenseConfigurationArn("licenseConfigurationArn")
                                                .build()))
                                        .monitoring("monitoring")
                                        .propagatedTags(Map.of(
                                                "propagatedTagsKey", "propagatedTags"))
                                        .sshKeyName("sshKeyName")
                                        .build())
                                .build())
                        .vpcConfiguration(VpcConfigurationProperty.builder()
                                .securityGroups(List.of("securityGroups"))
                                .subnets(List.of("subnets"))
                                .build())

                        // the properties below are optional
                        .lifecycleConfiguration(InstanceLifecycleConfigurationProperty.builder()
                                .idleInstanceTimeout(123)
                                .maxLifetime(123)
                                .build())
                        .rootVolume(RootVolumeConfigurationProperty.builder()
                                .encrypted(false)
                                .freeSpaceGiB(123)
                                .iops(123)
                                .kmsKeyId("kmsKeyId")
                                .throughput(123)
                                .volumeType("volumeType")
                                .build())
                        .volumes(List.of(VolumeConfigurationProperty.builder()
                                .ebsConfiguration(EbsVolumeConfigurationProperty.builder()
                                        .name("name")
                                        .sizeGiB(123)

                                        // the properties below are optional
                                        .encrypted(false)
                                        .iops(123)
                                        .kmsKeyId("kmsKeyId")
                                        .snapshotId("snapshotId")
                                        .throughput(123)
                                        .volumeType("volumeType")
                                        .build())
                                .build()))
                        .build())
                .build())
        .name("name")
        .permissionsConfiguration(PermissionsConfigurationProperty.builder()
                .capacityProviderOperatorRoleArn("capacityProviderOperatorRoleArn")
                .build())

        // the properties below are optional
        .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.BedrockAgentCore;

var cfnCapacityProviderProps = new CfnCapacityProviderProps {
    ComputeConfiguration = new ComputeConfigurationProperty {
        Ec2Configuration = new Ec2ConfigurationProperty {
            LaunchTemplateSource = new LaunchTemplateSourceProperty {
                LaunchParameters = new LaunchParametersProperty {
                    InstanceRequirements = new InstanceRequirementsProperty {
                        AllowedInstanceTypes = new [] { "allowedInstanceTypes" }
                    },
                    OperatingSystem = "operatingSystem",

                    // the properties below are optional
                    CapacityReservationSpecification = new CapacityReservationSpecificationProperty {
                        CapacityReservationPreference = "capacityReservationPreference",
                        CapacityReservationTarget = new CapacityReservationTargetProperty {
                            CapacityReservationId = "capacityReservationId",
                            CapacityReservationResourceGroupArn = "capacityReservationResourceGroupArn"
                        }
                    },
                    EphemeralVolumes = new [] { new EphemeralBlockDeviceMappingProperty {
                        DeviceName = "deviceName",
                        Ebs = new EphemeralEBSVolumeConfigurationProperty {
                            EbsCardIndex = 123,
                            Encrypted = false,
                            Iops = 123,
                            KmsKeyId = "kmsKeyId",
                            SnapshotId = "snapshotId",
                            Throughput = 123,
                            VolumeInitializationRate = 123,
                            VolumeSize = 123,
                            VolumeType = "volumeType"
                        },
                        VirtualName = "virtualName"
                    } },
                    InstanceProfileArn = "instanceProfileArn",
                    LicenseSpecifications = new [] { new LicenseSpecificationProperty {
                        LicenseConfigurationArn = "licenseConfigurationArn"
                    } },
                    Monitoring = "monitoring",
                    PropagatedTags = new Dictionary<string, string> {
                        { "propagatedTagsKey", "propagatedTags" }
                    },
                    SshKeyName = "sshKeyName"
                }
            },
            VpcConfiguration = new VpcConfigurationProperty {
                SecurityGroups = new [] { "securityGroups" },
                Subnets = new [] { "subnets" }
            },

            // the properties below are optional
            LifecycleConfiguration = new InstanceLifecycleConfigurationProperty {
                IdleInstanceTimeout = 123,
                MaxLifetime = 123
            },
            RootVolume = new RootVolumeConfigurationProperty {
                Encrypted = false,
                FreeSpaceGiB = 123,
                Iops = 123,
                KmsKeyId = "kmsKeyId",
                Throughput = 123,
                VolumeType = "volumeType"
            },
            Volumes = new [] { new VolumeConfigurationProperty {
                EbsConfiguration = new EbsVolumeConfigurationProperty {
                    Name = "name",
                    SizeGiB = 123,

                    // the properties below are optional
                    Encrypted = false,
                    Iops = 123,
                    KmsKeyId = "kmsKeyId",
                    SnapshotId = "snapshotId",
                    Throughput = 123,
                    VolumeType = "volumeType"
                }
            } }
        }
    },
    Name = "name",
    PermissionsConfiguration = new PermissionsConfigurationProperty {
        CapacityProviderOperatorRoleArn = "capacityProviderOperatorRoleArn"
    },

    // the properties below are optional
    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"

cfnCapacityProviderProps := &CfnCapacityProviderProps{
	ComputeConfiguration: &ComputeConfigurationProperty{
		Ec2Configuration: &Ec2ConfigurationProperty{
			LaunchTemplateSource: &LaunchTemplateSourceProperty{
				LaunchParameters: &LaunchParametersProperty{
					InstanceRequirements: &InstanceRequirementsProperty{
						AllowedInstanceTypes: []*string{
							jsii.String("allowedInstanceTypes"),
						},
					},
					OperatingSystem: jsii.String("operatingSystem"),

					// the properties below are optional
					CapacityReservationSpecification: &CapacityReservationSpecificationProperty{
						CapacityReservationPreference: jsii.String("capacityReservationPreference"),
						CapacityReservationTarget: &CapacityReservationTargetProperty{
							CapacityReservationId: jsii.String("capacityReservationId"),
							CapacityReservationResourceGroupArn: jsii.String("capacityReservationResourceGroupArn"),
						},
					},
					EphemeralVolumes: []interface{}{
						&EphemeralBlockDeviceMappingProperty{
							DeviceName: jsii.String("deviceName"),
							Ebs: &EphemeralEBSVolumeConfigurationProperty{
								EbsCardIndex: jsii.Number(123),
								Encrypted: jsii.Boolean(false),
								Iops: jsii.Number(123),
								KmsKeyId: jsii.String("kmsKeyId"),
								SnapshotId: jsii.String("snapshotId"),
								Throughput: jsii.Number(123),
								VolumeInitializationRate: jsii.Number(123),
								VolumeSize: jsii.Number(123),
								VolumeType: jsii.String("volumeType"),
							},
							VirtualName: jsii.String("virtualName"),
						},
					},
					InstanceProfileArn: jsii.String("instanceProfileArn"),
					LicenseSpecifications: []interface{}{
						&LicenseSpecificationProperty{
							LicenseConfigurationArn: jsii.String("licenseConfigurationArn"),
						},
					},
					Monitoring: jsii.String("monitoring"),
					PropagatedTags: map[string]*string{
						"propagatedTagsKey": jsii.String("propagatedTags"),
					},
					SshKeyName: jsii.String("sshKeyName"),
				},
			},
			VpcConfiguration: &VpcConfigurationProperty{
				SecurityGroups: []*string{
					jsii.String("securityGroups"),
				},
				Subnets: []*string{
					jsii.String("subnets"),
				},
			},

			// the properties below are optional
			LifecycleConfiguration: &InstanceLifecycleConfigurationProperty{
				IdleInstanceTimeout: jsii.Number(123),
				MaxLifetime: jsii.Number(123),
			},
			RootVolume: &RootVolumeConfigurationProperty{
				Encrypted: jsii.Boolean(false),
				FreeSpaceGiB: jsii.Number(123),
				Iops: jsii.Number(123),
				KmsKeyId: jsii.String("kmsKeyId"),
				Throughput: jsii.Number(123),
				VolumeType: jsii.String("volumeType"),
			},
			Volumes: []interface{}{
				&VolumeConfigurationProperty{
					EbsConfiguration: &EbsVolumeConfigurationProperty{
						Name: jsii.String("name"),
						SizeGiB: jsii.Number(123),

						// the properties below are optional
						Encrypted: jsii.Boolean(false),
						Iops: jsii.Number(123),
						KmsKeyId: jsii.String("kmsKeyId"),
						SnapshotId: jsii.String("snapshotId"),
						Throughput: jsii.Number(123),
						VolumeType: jsii.String("volumeType"),
					},
				},
			},
		},
	},
	Name: jsii.String("name"),
	PermissionsConfiguration: &PermissionsConfigurationProperty{
		CapacityProviderOperatorRoleArn: jsii.String("capacityProviderOperatorRoleArn"),
	},

	// the properties below are optional
	Description: jsii.String("description"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

computeConfigurationIResolvable | CfnCapacityProvider.ComputeConfigurationPropertycompute_configurationtyping.Union[IResolvable, ComputeConfigurationProperty]computeConfigurationIResolvableComputeConfigurationIResolvableComputeConfigurationinterface{} required #
The capacity configuration for the capacity provider.

Defines the compute resources for this capacity provider.

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #
An optional description of the capacity provider.
namestringnamestrnameStringNamestringName*string required #
The name of the capacity provider.
permissionsConfigurationIResolvable | CfnCapacityProvider.PermissionsConfigurationPropertypermissions_configurationtyping.Union[IResolvable, PermissionsConfigurationProperty]permissionsConfigurationIResolvablePermissionsConfigurationIResolvablePermissionsConfigurationinterface{} required #
Configuration for permissions associated with a capacity provider.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
An array of key-value pairs to apply to the capacity provider.