Skip to content
v2.278.0

ManagedInstancesProviderProperty Struct ​

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 managedInstancesProviderProperty: batch.CfnComputeEnvironment.ManagedInstancesProviderProperty = {
  infrastructureRoleArn: 'infrastructureRoleArn',
  instanceLaunchTemplate: {
    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,
    },
  },

  // the properties below are optional
  infrastructureOptimization: {
    scaleInAfter: 123,
  },
  propagateTags: 'propagateTags',
};
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

managed_instances_provider_property = batch.CfnComputeEnvironment.ManagedInstancesProviderProperty(
    infrastructure_role_arn="infrastructureRoleArn",
    instance_launch_template=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
        )
    ),

    # the properties below are optional
    infrastructure_optimization=batch.CfnComputeEnvironment.InfrastructureOptimizationProperty(
        scale_in_after=123
    ),
    propagate_tags="propagateTags"
)
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.*;

ManagedInstancesProviderProperty managedInstancesProviderProperty = ManagedInstancesProviderProperty.builder()
        .infrastructureRoleArn("infrastructureRoleArn")
        .instanceLaunchTemplate(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())

        // the properties below are optional
        .infrastructureOptimization(InfrastructureOptimizationProperty.builder()
                .scaleInAfter(123)
                .build())
        .propagateTags("propagateTags")
        .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 managedInstancesProviderProperty = new ManagedInstancesProviderProperty {
    InfrastructureRoleArn = "infrastructureRoleArn",
    InstanceLaunchTemplate = 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
        }
    },

    // the properties below are optional
    InfrastructureOptimization = new InfrastructureOptimizationProperty {
        ScaleInAfter = 123
    },
    PropagateTags = "propagateTags"
};
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"

managedInstancesProviderProperty := &ManagedInstancesProviderProperty{
	InfrastructureRoleArn: jsii.String("infrastructureRoleArn"),
	InstanceLaunchTemplate: &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),
		},
	},

	// the properties below are optional
	InfrastructureOptimization: &InfrastructureOptimizationProperty{
		ScaleInAfter: jsii.Number(123),
	},
	PropagateTags: jsii.String("propagateTags"),
}

Properties ​

infrastructureOptimizationoptionalIResolvable | CfnComputeEnvironment.InfrastructureOptimizationPropertyinfrastructure_optimizationoptionaltyping.Union[IResolvable, InfrastructureOptimizationProperty]infrastructureOptimizationoptionalIResolvableInfrastructureOptimizationoptionalIResolvableInfrastructureOptimizationoptionalinterface{} #
infrastructureRoleArnstringinfrastructure_role_arnstrinfrastructureRoleArnStringInfrastructureRoleArnstringInfrastructureRoleArn*string required #
instanceLaunchTemplateIResolvable | CfnComputeEnvironment.InstanceLaunchTemplatePropertyinstance_launch_templatetyping.Union[IResolvable, InstanceLaunchTemplateProperty]instanceLaunchTemplateIResolvableInstanceLaunchTemplateIResolvableInstanceLaunchTemplateinterface{} required #
propagateTagsoptionalstringpropagate_tagsoptionalstrpropagateTagsoptionalStringPropagateTagsoptionalstringPropagateTagsoptional*string #