Skip to main content

Docker Success Center

The Docker enterprise customer portal.

Docker, Inc.

How can I customize VPC/IAM elements in Docker Cloud using the API?

Question

How can I customize VPC/IAM elements in Docker Cloud using the API?

Answer

Add the following section to your body parameters:

"provider_options" = {
    "vpc": {                                                 # optional
        "id": "vpc-xxxxxxxx",                                # required
        "subnets": ["subnet-xxxxxxxx", "subnet-yyyyyyyy"],   # optional
        "security_groups": ["sg-xxxxxxxx"]                   # optional
    },
    "iam": {                                                 # optional
        "instance_profile_name": "my_instance_profile_name"  # required
    }
}