Skip to content
v2.277.0

CfnWorkspaceInstanceProps Struct ​

Properties for defining a CfnWorkspaceInstance.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_workspacesinstances as workspacesinstances } from 'aws-cdk-lib';
const cfnWorkspaceInstanceProps: workspacesinstances.CfnWorkspaceInstanceProps = {
  managedInstance: {
    imageId: 'imageId',
    instanceType: 'instanceType',

    // the properties below are optional
    blockDeviceMappings: [{
      deviceName: 'deviceName',
      ebs: {
        encrypted: false,
        iops: 123,
        kmsKeyId: 'kmsKeyId',
        throughput: 123,
        volumeSize: 123,
        volumeType: 'volumeType',
      },
      noDevice: 'noDevice',
      virtualName: 'virtualName',
    }],
    capacityReservationSpecification: {
      capacityReservationPreference: 'capacityReservationPreference',
      capacityReservationTarget: {
        capacityReservationId: 'capacityReservationId',
        capacityReservationResourceGroupArn: 'capacityReservationResourceGroupArn',
      },
    },
    cpuOptions: {
      coreCount: 123,
      threadsPerCore: 123,
    },
    creditSpecification: {
      cpuCredits: 'cpuCredits',
    },
    disableApiStop: false,
    ebsOptimized: false,
    enablePrimaryIpv6: false,
    enclaveOptions: {
      enabled: false,
    },
    hibernationOptions: {
      configured: false,
    },
    iamInstanceProfile: {
      arn: 'arn',
      name: 'name',
    },
    ipv6AddressCount: 123,
    keyName: 'keyName',
    licenseSpecifications: [{
      licenseConfigurationArn: 'licenseConfigurationArn',
    }],
    maintenanceOptions: {
      autoRecovery: 'autoRecovery',
    },
    metadataOptions: {
      httpEndpoint: 'httpEndpoint',
      httpProtocolIpv6: 'httpProtocolIpv6',
      httpPutResponseHopLimit: 123,
      httpTokens: 'httpTokens',
      instanceMetadataTags: 'instanceMetadataTags',
    },
    monitoring: {
      enabled: false,
    },
    networkInterfaces: [{
      description: 'description',
      deviceIndex: 123,
      groups: ['groups'],
      subnetId: 'subnetId',
    }],
    networkPerformanceOptions: {
      bandwidthWeighting: 'bandwidthWeighting',
    },
    placement: {
      availabilityZone: 'availabilityZone',
      groupId: 'groupId',
      groupName: 'groupName',
      partitionNumber: 123,
      tenancy: 'tenancy',
    },
    privateDnsNameOptions: {
      enableResourceNameDnsAaaaRecord: false,
      enableResourceNameDnsARecord: false,
      hostnameType: 'hostnameType',
    },
    subnetId: 'subnetId',
    tagSpecifications: [{
      resourceType: 'resourceType',
      tags: [{
        key: 'key',
        value: 'value',
      }],
    }],
    userData: 'userData',
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
python
from aws_cdk import CfnTag, 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_workspacesinstances as workspacesinstances

cfn_workspace_instance_props = workspacesinstances.CfnWorkspaceInstanceProps(
    managed_instance=workspacesinstances.CfnWorkspaceInstance.ManagedInstanceProperty(
        image_id="imageId",
        instance_type="instanceType",

        # the properties below are optional
        block_device_mappings=[workspacesinstances.CfnWorkspaceInstance.BlockDeviceMappingProperty(
            device_name="deviceName",
            ebs=workspacesinstances.CfnWorkspaceInstance.EbsBlockDeviceProperty(
                encrypted=False,
                iops=123,
                kms_key_id="kmsKeyId",
                throughput=123,
                volume_size=123,
                volume_type="volumeType"
            ),
            no_device="noDevice",
            virtual_name="virtualName"
        )],
        capacity_reservation_specification=workspacesinstances.CfnWorkspaceInstance.CapacityReservationSpecificationProperty(
            capacity_reservation_preference="capacityReservationPreference",
            capacity_reservation_target=workspacesinstances.CfnWorkspaceInstance.CapacityReservationTargetProperty(
                capacity_reservation_id="capacityReservationId",
                capacity_reservation_resource_group_arn="capacityReservationResourceGroupArn"
            )
        ),
        cpu_options=workspacesinstances.CfnWorkspaceInstance.CpuOptionsRequestProperty(
            core_count=123,
            threads_per_core=123
        ),
        credit_specification=workspacesinstances.CfnWorkspaceInstance.CreditSpecificationRequestProperty(
            cpu_credits="cpuCredits"
        ),
        disable_api_stop=False,
        ebs_optimized=False,
        enable_primary_ipv6=False,
        enclave_options=workspacesinstances.CfnWorkspaceInstance.EnclaveOptionsRequestProperty(
            enabled=False
        ),
        hibernation_options=workspacesinstances.CfnWorkspaceInstance.HibernationOptionsRequestProperty(
            configured=False
        ),
        iam_instance_profile=workspacesinstances.CfnWorkspaceInstance.IamInstanceProfileSpecificationProperty(
            arn="arn",
            name="name"
        ),
        ipv6_address_count=123,
        key_name="keyName",
        license_specifications=[workspacesinstances.CfnWorkspaceInstance.LicenseConfigurationRequestProperty(
            license_configuration_arn="licenseConfigurationArn"
        )],
        maintenance_options=workspacesinstances.CfnWorkspaceInstance.InstanceMaintenanceOptionsRequestProperty(
            auto_recovery="autoRecovery"
        ),
        metadata_options=workspacesinstances.CfnWorkspaceInstance.InstanceMetadataOptionsRequestProperty(
            http_endpoint="httpEndpoint",
            http_protocol_ipv6="httpProtocolIpv6",
            http_put_response_hop_limit=123,
            http_tokens="httpTokens",
            instance_metadata_tags="instanceMetadataTags"
        ),
        monitoring=workspacesinstances.CfnWorkspaceInstance.RunInstancesMonitoringEnabledProperty(
            enabled=False
        ),
        network_interfaces=[workspacesinstances.CfnWorkspaceInstance.InstanceNetworkInterfaceSpecificationProperty(
            description="description",
            device_index=123,
            groups=["groups"],
            subnet_id="subnetId"
        )],
        network_performance_options=workspacesinstances.CfnWorkspaceInstance.InstanceNetworkPerformanceOptionsRequestProperty(
            bandwidth_weighting="bandwidthWeighting"
        ),
        placement=workspacesinstances.CfnWorkspaceInstance.PlacementProperty(
            availability_zone="availabilityZone",
            group_id="groupId",
            group_name="groupName",
            partition_number=123,
            tenancy="tenancy"
        ),
        private_dns_name_options=workspacesinstances.CfnWorkspaceInstance.PrivateDnsNameOptionsRequestProperty(
            enable_resource_name_dns_aaaa_record=False,
            enable_resource_name_dns_a_record=False,
            hostname_type="hostnameType"
        ),
        subnet_id="subnetId",
        tag_specifications=[workspacesinstances.CfnWorkspaceInstance.TagSpecificationProperty(
            resource_type="resourceType",
            tags=[CfnTag(
                key="key",
                value="value"
            )]
        )],
        user_data="userData"
    ),
    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.workspacesinstances.*;

CfnWorkspaceInstanceProps cfnWorkspaceInstanceProps = CfnWorkspaceInstanceProps.builder()
        .managedInstance(ManagedInstanceProperty.builder()
                .imageId("imageId")
                .instanceType("instanceType")

                // the properties below are optional
                .blockDeviceMappings(List.of(BlockDeviceMappingProperty.builder()
                        .deviceName("deviceName")
                        .ebs(EbsBlockDeviceProperty.builder()
                                .encrypted(false)
                                .iops(123)
                                .kmsKeyId("kmsKeyId")
                                .throughput(123)
                                .volumeSize(123)
                                .volumeType("volumeType")
                                .build())
                        .noDevice("noDevice")
                        .virtualName("virtualName")
                        .build()))
                .capacityReservationSpecification(CapacityReservationSpecificationProperty.builder()
                        .capacityReservationPreference("capacityReservationPreference")
                        .capacityReservationTarget(CapacityReservationTargetProperty.builder()
                                .capacityReservationId("capacityReservationId")
                                .capacityReservationResourceGroupArn("capacityReservationResourceGroupArn")
                                .build())
                        .build())
                .cpuOptions(CpuOptionsRequestProperty.builder()
                        .coreCount(123)
                        .threadsPerCore(123)
                        .build())
                .creditSpecification(CreditSpecificationRequestProperty.builder()
                        .cpuCredits("cpuCredits")
                        .build())
                .disableApiStop(false)
                .ebsOptimized(false)
                .enablePrimaryIpv6(false)
                .enclaveOptions(EnclaveOptionsRequestProperty.builder()
                        .enabled(false)
                        .build())
                .hibernationOptions(HibernationOptionsRequestProperty.builder()
                        .configured(false)
                        .build())
                .iamInstanceProfile(IamInstanceProfileSpecificationProperty.builder()
                        .arn("arn")
                        .name("name")
                        .build())
                .ipv6AddressCount(123)
                .keyName("keyName")
                .licenseSpecifications(List.of(LicenseConfigurationRequestProperty.builder()
                        .licenseConfigurationArn("licenseConfigurationArn")
                        .build()))
                .maintenanceOptions(InstanceMaintenanceOptionsRequestProperty.builder()
                        .autoRecovery("autoRecovery")
                        .build())
                .metadataOptions(InstanceMetadataOptionsRequestProperty.builder()
                        .httpEndpoint("httpEndpoint")
                        .httpProtocolIpv6("httpProtocolIpv6")
                        .httpPutResponseHopLimit(123)
                        .httpTokens("httpTokens")
                        .instanceMetadataTags("instanceMetadataTags")
                        .build())
                .monitoring(RunInstancesMonitoringEnabledProperty.builder()
                        .enabled(false)
                        .build())
                .networkInterfaces(List.of(InstanceNetworkInterfaceSpecificationProperty.builder()
                        .description("description")
                        .deviceIndex(123)
                        .groups(List.of("groups"))
                        .subnetId("subnetId")
                        .build()))
                .networkPerformanceOptions(InstanceNetworkPerformanceOptionsRequestProperty.builder()
                        .bandwidthWeighting("bandwidthWeighting")
                        .build())
                .placement(PlacementProperty.builder()
                        .availabilityZone("availabilityZone")
                        .groupId("groupId")
                        .groupName("groupName")
                        .partitionNumber(123)
                        .tenancy("tenancy")
                        .build())
                .privateDnsNameOptions(PrivateDnsNameOptionsRequestProperty.builder()
                        .enableResourceNameDnsAaaaRecord(false)
                        .enableResourceNameDnsARecord(false)
                        .hostnameType("hostnameType")
                        .build())
                .subnetId("subnetId")
                .tagSpecifications(List.of(TagSpecificationProperty.builder()
                        .resourceType("resourceType")
                        .tags(List.of(CfnTag.builder()
                                .key("key")
                                .value("value")
                                .build()))
                        .build()))
                .userData("userData")
                .build())
        .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.WorkspacesInstances;

var cfnWorkspaceInstanceProps = new CfnWorkspaceInstanceProps {
    ManagedInstance = new ManagedInstanceProperty {
        ImageId = "imageId",
        InstanceType = "instanceType",

        // the properties below are optional
        BlockDeviceMappings = new [] { new BlockDeviceMappingProperty {
            DeviceName = "deviceName",
            Ebs = new EbsBlockDeviceProperty {
                Encrypted = false,
                Iops = 123,
                KmsKeyId = "kmsKeyId",
                Throughput = 123,
                VolumeSize = 123,
                VolumeType = "volumeType"
            },
            NoDevice = "noDevice",
            VirtualName = "virtualName"
        } },
        CapacityReservationSpecification = new CapacityReservationSpecificationProperty {
            CapacityReservationPreference = "capacityReservationPreference",
            CapacityReservationTarget = new CapacityReservationTargetProperty {
                CapacityReservationId = "capacityReservationId",
                CapacityReservationResourceGroupArn = "capacityReservationResourceGroupArn"
            }
        },
        CpuOptions = new CpuOptionsRequestProperty {
            CoreCount = 123,
            ThreadsPerCore = 123
        },
        CreditSpecification = new CreditSpecificationRequestProperty {
            CpuCredits = "cpuCredits"
        },
        DisableApiStop = false,
        EbsOptimized = false,
        EnablePrimaryIpv6 = false,
        EnclaveOptions = new EnclaveOptionsRequestProperty {
            Enabled = false
        },
        HibernationOptions = new HibernationOptionsRequestProperty {
            Configured = false
        },
        IamInstanceProfile = new IamInstanceProfileSpecificationProperty {
            Arn = "arn",
            Name = "name"
        },
        Ipv6AddressCount = 123,
        KeyName = "keyName",
        LicenseSpecifications = new [] { new LicenseConfigurationRequestProperty {
            LicenseConfigurationArn = "licenseConfigurationArn"
        } },
        MaintenanceOptions = new InstanceMaintenanceOptionsRequestProperty {
            AutoRecovery = "autoRecovery"
        },
        MetadataOptions = new InstanceMetadataOptionsRequestProperty {
            HttpEndpoint = "httpEndpoint",
            HttpProtocolIpv6 = "httpProtocolIpv6",
            HttpPutResponseHopLimit = 123,
            HttpTokens = "httpTokens",
            InstanceMetadataTags = "instanceMetadataTags"
        },
        Monitoring = new RunInstancesMonitoringEnabledProperty {
            Enabled = false
        },
        NetworkInterfaces = new [] { new InstanceNetworkInterfaceSpecificationProperty {
            Description = "description",
            DeviceIndex = 123,
            Groups = new [] { "groups" },
            SubnetId = "subnetId"
        } },
        NetworkPerformanceOptions = new InstanceNetworkPerformanceOptionsRequestProperty {
            BandwidthWeighting = "bandwidthWeighting"
        },
        Placement = new PlacementProperty {
            AvailabilityZone = "availabilityZone",
            GroupId = "groupId",
            GroupName = "groupName",
            PartitionNumber = 123,
            Tenancy = "tenancy"
        },
        PrivateDnsNameOptions = new PrivateDnsNameOptionsRequestProperty {
            EnableResourceNameDnsAaaaRecord = false,
            EnableResourceNameDnsARecord = false,
            HostnameType = "hostnameType"
        },
        SubnetId = "subnetId",
        TagSpecifications = new [] { new TagSpecificationProperty {
            ResourceType = "resourceType",
            Tags = new [] { new CfnTag {
                Key = "key",
                Value = "value"
            } }
        } },
        UserData = "userData"
    },
    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"

cfnWorkspaceInstanceProps := &CfnWorkspaceInstanceProps{
	ManagedInstance: &ManagedInstanceProperty{
		ImageId: jsii.String("imageId"),
		InstanceType: jsii.String("instanceType"),

		// the properties below are optional
		BlockDeviceMappings: []interface{}{
			&BlockDeviceMappingProperty{
				DeviceName: jsii.String("deviceName"),
				Ebs: &EbsBlockDeviceProperty{
					Encrypted: jsii.Boolean(false),
					Iops: jsii.Number(123),
					KmsKeyId: jsii.String("kmsKeyId"),
					Throughput: jsii.Number(123),
					VolumeSize: jsii.Number(123),
					VolumeType: jsii.String("volumeType"),
				},
				NoDevice: jsii.String("noDevice"),
				VirtualName: jsii.String("virtualName"),
			},
		},
		CapacityReservationSpecification: &CapacityReservationSpecificationProperty{
			CapacityReservationPreference: jsii.String("capacityReservationPreference"),
			CapacityReservationTarget: &CapacityReservationTargetProperty{
				CapacityReservationId: jsii.String("capacityReservationId"),
				CapacityReservationResourceGroupArn: jsii.String("capacityReservationResourceGroupArn"),
			},
		},
		CpuOptions: &CpuOptionsRequestProperty{
			CoreCount: jsii.Number(123),
			ThreadsPerCore: jsii.Number(123),
		},
		CreditSpecification: &CreditSpecificationRequestProperty{
			CpuCredits: jsii.String("cpuCredits"),
		},
		DisableApiStop: jsii.Boolean(false),
		EbsOptimized: jsii.Boolean(false),
		EnablePrimaryIpv6: jsii.Boolean(false),
		EnclaveOptions: &EnclaveOptionsRequestProperty{
			Enabled: jsii.Boolean(false),
		},
		HibernationOptions: &HibernationOptionsRequestProperty{
			Configured: jsii.Boolean(false),
		},
		IamInstanceProfile: &IamInstanceProfileSpecificationProperty{
			Arn: jsii.String("arn"),
			Name: jsii.String("name"),
		},
		Ipv6AddressCount: jsii.Number(123),
		KeyName: jsii.String("keyName"),
		LicenseSpecifications: []interface{}{
			&LicenseConfigurationRequestProperty{
				LicenseConfigurationArn: jsii.String("licenseConfigurationArn"),
			},
		},
		MaintenanceOptions: &InstanceMaintenanceOptionsRequestProperty{
			AutoRecovery: jsii.String("autoRecovery"),
		},
		MetadataOptions: &InstanceMetadataOptionsRequestProperty{
			HttpEndpoint: jsii.String("httpEndpoint"),
			HttpProtocolIpv6: jsii.String("httpProtocolIpv6"),
			HttpPutResponseHopLimit: jsii.Number(123),
			HttpTokens: jsii.String("httpTokens"),
			InstanceMetadataTags: jsii.String("instanceMetadataTags"),
		},
		Monitoring: &RunInstancesMonitoringEnabledProperty{
			Enabled: jsii.Boolean(false),
		},
		NetworkInterfaces: []interface{}{
			&InstanceNetworkInterfaceSpecificationProperty{
				Description: jsii.String("description"),
				DeviceIndex: jsii.Number(123),
				Groups: []*string{
					jsii.String("groups"),
				},
				SubnetId: jsii.String("subnetId"),
			},
		},
		NetworkPerformanceOptions: &InstanceNetworkPerformanceOptionsRequestProperty{
			BandwidthWeighting: jsii.String("bandwidthWeighting"),
		},
		Placement: &PlacementProperty{
			AvailabilityZone: jsii.String("availabilityZone"),
			GroupId: jsii.String("groupId"),
			GroupName: jsii.String("groupName"),
			PartitionNumber: jsii.Number(123),
			Tenancy: jsii.String("tenancy"),
		},
		PrivateDnsNameOptions: &PrivateDnsNameOptionsRequestProperty{
			EnableResourceNameDnsAaaaRecord: jsii.Boolean(false),
			EnableResourceNameDnsARecord: jsii.Boolean(false),
			HostnameType: jsii.String("hostnameType"),
		},
		SubnetId: jsii.String("subnetId"),
		TagSpecifications: []interface{}{
			&TagSpecificationProperty{
				ResourceType: jsii.String("resourceType"),
				Tags: []CfnTag{
					&CfnTag{
						Key: jsii.String("key"),
						Value: jsii.String("value"),
					},
				},
			},
		},
		UserData: jsii.String("userData"),
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

managedInstanceoptionalIResolvable | CfnWorkspaceInstance.ManagedInstancePropertymanaged_instanceoptionaltyping.Union[IResolvable, ManagedInstanceProperty]managedInstanceoptionalIResolvableManagedInstanceoptionalIResolvableManagedInstanceoptionalinterface{} #
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #