Class: AWSCDK::Sagemaker::CfnModel::VPCConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
sagemaker/cfn_model.rb

Overview

Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to.

You can control access to and from your resources by configuring a VPC. For more information, see Give SageMaker Access to Resources in your Amazon VPC .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(security_group_ids:, subnets:) ⇒ VPCConfigProperty

Returns a new instance of VPCConfigProperty.

Parameters:

  • security_group_ids (Array<String>)

    The VPC security group IDs, in the form sg-xxxxxxxx .

  • subnets (Array<String>)

    The ID of the subnets in the VPC to which you want to connect your training job or model.



1157
1158
1159
1160
1161
1162
# File 'sagemaker/cfn_model.rb', line 1157

def initialize(security_group_ids:, subnets:)
  @security_group_ids = security_group_ids
  Jsii::Type.check_type(@security_group_ids, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "securityGroupIds")
  @subnets = subnets
  Jsii::Type.check_type(@subnets, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "subnets")
end

Instance Attribute Details

#security_group_idsArray<String> (readonly)

The VPC security group IDs, in the form sg-xxxxxxxx .

Specify the security groups for the VPC that is specified in the Subnets field.



1170
1171
1172
# File 'sagemaker/cfn_model.rb', line 1170

def security_group_ids
  @security_group_ids
end

#subnetsArray<String> (readonly)

The ID of the subnets in the VPC to which you want to connect your training job or model.

For information about the availability of specific instance types, see Supported Instance Types and Availability Zones .



1177
1178
1179
# File 'sagemaker/cfn_model.rb', line 1177

def subnets
  @subnets
end

Class Method Details

.jsii_propertiesObject



1179
1180
1181
1182
1183
1184
# File 'sagemaker/cfn_model.rb', line 1179

def self.jsii_properties
  {
    :security_group_ids => "securityGroupIds",
    :subnets => "subnets",
  }
end

Instance Method Details

#to_jsiiObject



1186
1187
1188
1189
1190
1191
1192
1193
# File 'sagemaker/cfn_model.rb', line 1186

def to_jsii
  result = {}
  result.merge!({
    "securityGroupIds" => @security_group_ids,
    "subnets" => @subnets,
  })
  result.compact
end