VpcConfig

class aws_cdk.aws_stepfunctions_tasks.VpcConfig(*, vpc, subnets=None)

Bases: object

Specifies the VPC that you want your Amazon SageMaker training job to connect to.

Parameters
  • vpc (IVpc) – VPC.

  • subnets (Union[SubnetSelection, Dict[str, Any], None]) – VPC subnets. Default: - Private Subnets are selected

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_ec2 as ec2
import aws_cdk.aws_stepfunctions_tasks as stepfunctions_tasks

# subnet: ec2.Subnet
# subnet_filter: ec2.SubnetFilter
# vpc: ec2.Vpc

vpc_config = stepfunctions_tasks.VpcConfig(
    vpc=vpc,

    # the properties below are optional
    subnets=ec2.SubnetSelection(
        availability_zones=["availabilityZones"],
        one_per_az=False,
        subnet_filters=[subnet_filter],
        subnet_group_name="subnetGroupName",
        subnet_name="subnetName",
        subnets=[subnet],
        subnet_type=ec2.SubnetType.ISOLATED
    )
)

Attributes

subnets

VPC subnets.

Default
  • Private Subnets are selected

Return type

Optional[SubnetSelection]

vpc

VPC.

Return type

IVpc