

# OptimizationVpcConfig


A VPC in Amazon VPC that's accessible to an optimized that you create with an optimization job. 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](https://docs.aws.amazon.com/sagemaker/latest/dg/infrastructure-give-access.html). 

## Contents


 ** SecurityGroupIds **   <a name="sagemaker-Type-OptimizationVpcConfig-SecurityGroupIds"></a>
The VPC security group IDs, in the form `sg-xxxxxxxx`. Specify the security groups for the VPC that is specified in the `Subnets` field.  
Type: Array of strings  
Array Members: Minimum number of 1 item. Maximum number of 5 items.  
Length Constraints: Minimum length of 0. Maximum length of 32.  
Pattern: `[-0-9a-zA-Z]+`   
Required: Yes

 ** Subnets **   <a name="sagemaker-Type-OptimizationVpcConfig-Subnets"></a>
The ID of the subnets in the VPC to which you want to connect your optimized model.  
Type: Array of strings  
Array Members: Minimum number of 1 item. Maximum number of 16 items.  
Length Constraints: Minimum length of 0. Maximum length of 32.  
Pattern: `[-0-9a-zA-Z]+`   
Required: Yes

## See Also


For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/sagemaker-2017-07-24/OptimizationVpcConfig) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/sagemaker-2017-07-24/OptimizationVpcConfig) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/sagemaker-2017-07-24/OptimizationVpcConfig) 