InstanceLaunchTemplateProperty Struct
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_batch as batch } from 'aws-cdk-lib';
const instanceLaunchTemplateProperty: batch.CfnComputeEnvironment.InstanceLaunchTemplateProperty = {
ec2InstanceProfileArn: 'ec2InstanceProfileArn',
networkConfiguration: {
securityGroups: ['securityGroups'],
subnets: ['subnets'],
},
// the properties below are optional
capacityOptionType: 'capacityOptionType',
capacityReservations: {
reservationGroupArn: 'reservationGroupArn',
reservationPreference: 'reservationPreference',
},
fipsEnabled: false,
instanceMetadataTagsPropagation: false,
instanceRequirements: {
allowedInstanceTypes: ['allowedInstanceTypes'],
},
localStorageConfiguration: {
useLocalStorage: false,
},
monitoring: 'monitoring',
storageConfiguration: {
storageSizeGiB: 123,
},
};
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_batch as batch
instance_launch_template_property = batch.CfnComputeEnvironment.InstanceLaunchTemplateProperty(
ec2_instance_profile_arn="ec2InstanceProfileArn",
network_configuration=batch.CfnComputeEnvironment.ManagedInstancesNetworkConfigurationProperty(
security_groups=["securityGroups"],
subnets=["subnets"]
),
# the properties below are optional
capacity_option_type="capacityOptionType",
capacity_reservations=batch.CfnComputeEnvironment.CapacityReservationsProperty(
reservation_group_arn="reservationGroupArn",
reservation_preference="reservationPreference"
),
fips_enabled=False,
instance_metadata_tags_propagation=False,
instance_requirements=batch.CfnComputeEnvironment.InstanceRequirementsProperty(
allowed_instance_types=["allowedInstanceTypes"]
),
local_storage_configuration=batch.CfnComputeEnvironment.ManagedInstancesLocalStorageConfigurationProperty(
use_local_storage=False
),
monitoring="monitoring",
storage_configuration=batch.CfnComputeEnvironment.ManagedInstancesStorageConfigurationProperty(
storage_size_gi_b=123
)
)
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.batch.*;
InstanceLaunchTemplateProperty instanceLaunchTemplateProperty = InstanceLaunchTemplateProperty.builder()
.ec2InstanceProfileArn("ec2InstanceProfileArn")
.networkConfiguration(ManagedInstancesNetworkConfigurationProperty.builder()
.securityGroups(List.of("securityGroups"))
.subnets(List.of("subnets"))
.build())
// the properties below are optional
.capacityOptionType("capacityOptionType")
.capacityReservations(CapacityReservationsProperty.builder()
.reservationGroupArn("reservationGroupArn")
.reservationPreference("reservationPreference")
.build())
.fipsEnabled(false)
.instanceMetadataTagsPropagation(false)
.instanceRequirements(InstanceRequirementsProperty.builder()
.allowedInstanceTypes(List.of("allowedInstanceTypes"))
.build())
.localStorageConfiguration(ManagedInstancesLocalStorageConfigurationProperty.builder()
.useLocalStorage(false)
.build())
.monitoring("monitoring")
.storageConfiguration(ManagedInstancesStorageConfigurationProperty.builder()
.storageSizeGiB(123)
.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.Batch;
var instanceLaunchTemplateProperty = new InstanceLaunchTemplateProperty {
Ec2InstanceProfileArn = "ec2InstanceProfileArn",
NetworkConfiguration = new ManagedInstancesNetworkConfigurationProperty {
SecurityGroups = new [] { "securityGroups" },
Subnets = new [] { "subnets" }
},
// the properties below are optional
CapacityOptionType = "capacityOptionType",
CapacityReservations = new CapacityReservationsProperty {
ReservationGroupArn = "reservationGroupArn",
ReservationPreference = "reservationPreference"
},
FipsEnabled = false,
InstanceMetadataTagsPropagation = false,
InstanceRequirements = new InstanceRequirementsProperty {
AllowedInstanceTypes = new [] { "allowedInstanceTypes" }
},
LocalStorageConfiguration = new ManagedInstancesLocalStorageConfigurationProperty {
UseLocalStorage = false
},
Monitoring = "monitoring",
StorageConfiguration = new ManagedInstancesStorageConfigurationProperty {
StorageSizeGiB = 123
}
};
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"
instanceLaunchTemplateProperty := &InstanceLaunchTemplateProperty{
Ec2InstanceProfileArn: jsii.String("ec2InstanceProfileArn"),
NetworkConfiguration: &ManagedInstancesNetworkConfigurationProperty{
SecurityGroups: []*string{
jsii.String("securityGroups"),
},
Subnets: []*string{
jsii.String("subnets"),
},
},
// the properties below are optional
CapacityOptionType: jsii.String("capacityOptionType"),
CapacityReservations: &CapacityReservationsProperty{
ReservationGroupArn: jsii.String("reservationGroupArn"),
ReservationPreference: jsii.String("reservationPreference"),
},
FipsEnabled: jsii.Boolean(false),
InstanceMetadataTagsPropagation: jsii.Boolean(false),
InstanceRequirements: &InstanceRequirementsProperty{
AllowedInstanceTypes: []*string{
jsii.String("allowedInstanceTypes"),
},
},
LocalStorageConfiguration: &ManagedInstancesLocalStorageConfigurationProperty{
UseLocalStorage: jsii.Boolean(false),
},
Monitoring: jsii.String("monitoring"),
StorageConfiguration: &ManagedInstancesStorageConfigurationProperty{
StorageSizeGiB: jsii.Number(123),
},
}
Properties
capacityOptionTypeoptionalstringcapacity_option_typeoptionalstrcapacityOptionTypeoptionalStringCapacityOptionTypeoptionalstringCapacityOptionTypeoptional*string #capacityReservationsoptionalIResolvable | CfnComputeEnvironment.capacity_reservationsoptionaltyping.Union[IResolvable, CapacityReservationsProperty]capacityReservationsoptionalIResolvableCapacityReservationsoptionalIResolvableCapacityReservationsoptionalinterface{} #ec2InstanceProfileArnstringec2_instance_profile_arnstrec2InstanceProfileArnStringEc2InstanceProfileArnstringEc2InstanceProfileArn*string required #fipsEnabledoptionalboolean | IResolvablefips_enabledoptionaltyping.Union[bool, IResolvable]fipsEnabledoptionalBooleanFipsEnabledoptionalboolFipsEnabledoptionalinterface{} #instanceMetadataTagsPropagationoptionalboolean | IResolvableinstance_metadata_tags_propagationoptionaltyping.Union[bool, IResolvable]instanceMetadataTagsPropagationoptionalBooleanInstanceMetadataTagsPropagationoptionalboolInstanceMetadataTagsPropagationoptionalinterface{} #instanceRequirementsoptionalIResolvable | CfnComputeEnvironment.instance_requirementsoptionaltyping.Union[IResolvable, InstanceRequirementsProperty]instanceRequirementsoptionalIResolvableInstanceRequirementsoptionalIResolvableInstanceRequirementsoptionalinterface{} #localStorageConfigurationoptionalIResolvable | CfnComputeEnvironment.local_storage_configurationoptionaltyping.Union[IResolvable, ManagedInstancesLocalStorageConfigurationProperty]localStorageConfigurationoptionalIResolvableLocalStorageConfigurationoptionalIResolvableLocalStorageConfigurationoptionalinterface{} #monitoringoptionalstringmonitoringoptionalstrmonitoringoptionalStringMonitoringoptionalstringMonitoringoptional*string #networkConfigurationIResolvable | CfnComputeEnvironment.network_configurationtyping.Union[IResolvable, ManagedInstancesNetworkConfigurationProperty]networkConfigurationIResolvableNetworkConfigurationIResolvableNetworkConfigurationinterface{} required #storageConfigurationoptionalIResolvable | CfnComputeEnvironment.storage_configurationoptionaltyping.Union[IResolvable, ManagedInstancesStorageConfigurationProperty]storageConfigurationoptionalIResolvableStorageConfigurationoptionalIResolvableStorageConfigurationoptionalinterface{} #