ves-io-schema-views-aws_vpc_site-API-Create

Examples of creating aws_vpc_site

Usecase:

Create vpc-site1

Request using vesctl:

vesctl configuration create aws_vpc_site -i aws_vpc_site.yaml

where file aws_vpc_site.yaml has following contents (aws_vpc_site.CreateRequest):

RequestJSON:

{"metadata":{"name":"vpc-site1","namespace":"system"},"spec":{"vpc":{"new_vpc":{"name_tag":"aws-vpc-unit-test","primary_ipv4":"192.168.0.0/16"}},"voltstack_cluster":{"aws_certified_hw":"aws-byol-voltstack-combo","az_nodes":[{"aws_az_name":"eu-west-3a","local_subnet":{"subnet_param":{"ipv4":"192.168.1.0/24"}}},{"aws_az_name":"eu-west-3b","local_subnet":{"subnet_param":{"ipv4":"192.168.2.0/24"}}},{"aws_az_name":"eu-west-3c","local_subnet":{"subnet_param":{"ipv4":"192.168.3.0/24"}}}],"no_network_policy":null,"no_forward_proxy":null,"no_outside_static_routes":null,"no_global_network":null,"storage_class_list":{"storage_classes":[{"storage_class_name":"maya-storage-class","openebs_enterprise":{"replication":3,"storage_class_size":10}}]},"no_k8s_cluster":{}},"aws_cred":{"namespace":"system","name":"unit-creds-views-aws-test"},"aws_region":"eu-west-3","logs_streaming_disabled":{},"sw":{"default_sw_version":{}},"os":{"default_os_version":{}},"nodes_per_az":0}} `

vesctl yaml response:

ResponseJSON:

  "metadata": {
    "name": "vpc-site1",
    "namespace": "system",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "dcd96d09-03a8-4382-a914-aab490a7c8c5",
    "creation_timestamp": "2022-07-28T12:14:26.753671343Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null,
    "labels": {
    }
  },
  "spec": {
    "vpc": {
      "new_vpc": {
        "name_tag": "aws-vpc-unit-test",
        "primary_ipv4": "192.168.0.0/16",
        "allocate_ipv6": false
      }
    },
    "voltstack_cluster": {
      "aws_certified_hw": "aws-byol-voltstack-combo",
      "az_nodes": [
        {
          "aws_az_name": "eu-west-3a",
          "local_subnet": {
            "subnet_param": {
              "ipv4": "192.168.1.0/24",
              "ipv6": ""
            }
          },
          "disk_size": 0
        },
        {
          "aws_az_name": "eu-west-3b",
          "local_subnet": {
            "subnet_param": {
              "ipv4": "192.168.2.0/24",
              "ipv6": ""
            }
          },
          "disk_size": 0
        },
        {
          "aws_az_name": "eu-west-3c",
          "local_subnet": {
            "subnet_param": {
              "ipv4": "192.168.3.0/24",
              "ipv6": ""
            }
          },
          "disk_size": 0
        }
      ],
      "no_dc_cluster_group": {

      },
      "sm_connection_public_ip": {

      },
      "storage_class_list": {
        "storage_classes": [
          {
            "storage_class_name": "maya-storage-class",
            "default_storage_class": false,
            "openebs_enterprise": {
              "replication": 3,
              "storage_class_size": 10
            }
          }
        ]
      },
      "allowed_vip_port": null,
      "no_k8s_cluster": {

      },
      "local_control_plane": null
    },
    "aws_cred": {
      "tenant": "acmecorp",
      "namespace": "system",
      "name": "unit-creds-views-aws-test"
    },
    "instance_type": "",
    "disk_size": 0,
    "volterra_software_version": "",
    "operating_system_version": "",
    "aws_region": "eu-west-3",
    "ssh_key": "",
    "address": "",
    "coordinates": null,
    "logs_streaming_disabled": {

    },
    "site_state": "ONLINE",
    "vip_params_per_az": [
    ],
    "user_modification_timestamp": null,
    "tags": {
    },
    "nodes_per_az": 0,
    "default_blocked_services": {

    },
    "direct_connect_disabled": {

    },
    "cloud_site_info": null,
    "direct_connect_info": null
  }
}```
`

Request using curl:

    


curl -X 'POST' -d '{"metadata":{"name":"vpc-site1","namespace":"system"},"spec":{"vpc":{"new_vpc":{"name_tag":"aws-vpc-unit-test","primary_ipv4":"192.168.0.0/16"}},"voltstack_cluster":{"aws_certified_hw":"aws-byol-voltstack-combo","az_nodes":[{"aws_az_name":"eu-west-3a","local_subnet":{"subnet_param":{"ipv4":"192.168.1.0/24"}}},{"aws_az_name":"eu-west-3b","local_subnet":{"subnet_param":{"ipv4":"192.168.2.0/24"}}},{"aws_az_name":"eu-west-3c","local_subnet":{"subnet_param":{"ipv4":"192.168.3.0/24"}}}],"no_network_policy":null,"no_forward_proxy":null,"no_outside_static_routes":null,"no_global_network":null,"storage_class_list":{"storage_classes":[{"storage_class_name":"maya-storage-class","openebs_enterprise":{"replication":3,"storage_class_size":10}}]},"no_k8s_cluster":{}},"aws_cred":{"namespace":"system","name":"unit-creds-views-aws-test"},"aws_region":"eu-west-3","logs_streaming_disabled":{},"sw":{"default_sw_version":{}},"os":{"default_os_version":{}},"nodes_per_az":0}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build1372770011_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/system/aws_vpc_sites'



curl response:

	


HTTP/1.1 200 OK Content-Type: application/json Date: Thu, 28 Jul 2022 12:14:26 GMT Vary: Accept-Encoding

{ "metadata": { "name": "vpc-site1", "namespace": "system", "labels": { }, "annotations": { }, "description": "", "disable": false }, "system_metadata": { "uid": "dcd96d09-03a8-4382-a914-aab490a7c8c5", "creation_timestamp": "2022-07-28T12:14:26.753671343Z", "deletion_timestamp": null, "modification_timestamp": null, "initializers": null, "finalizers": [ ], "tenant": "acmecorp", "creator_class": "examplesvc", "creator_id": "examplesvc", "object_index": 0, "owner_view": null, "labels": { } }, "spec": { "vpc": { "new_vpc": { "name_tag": "aws-vpc-unit-test", "primary_ipv4": "192.168.0.0/16", "allocate_ipv6": false } }, "voltstack_cluster": { "aws_certified_hw": "aws-byol-voltstack-combo", "az_nodes": [ { "aws_az_name": "eu-west-3a", "local_subnet": { "subnet_param": { "ipv4": "192.168.1.0/24", "ipv6": "" } }, "disk_size": 0 }, { "aws_az_name": "eu-west-3b", "local_subnet": { "subnet_param": { "ipv4": "192.168.2.0/24", "ipv6": "" } }, "disk_size": 0 }, { "aws_az_name": "eu-west-3c", "local_subnet": { "subnet_param": { "ipv4": "192.168.3.0/24", "ipv6": "" } }, "disk_size": 0 } ], "no_dc_cluster_group": {

  },
  "sm_connection_public_ip": {

  },
  "storage_class_list": {
    "storage_classes": [
      {
        "storage_class_name": "maya-storage-class",
        "default_storage_class": false,
        "openebs_enterprise": {
          "replication": 3,
          "storage_class_size": 10
        }
      }
    ]
  },
  "allowed_vip_port": null,
  "no_k8s_cluster": {

  },
  "local_control_plane": null
},
"aws_cred": {
  "tenant": "acmecorp",
  "namespace": "system",
  "name": "unit-creds-views-aws-test"
},
"instance_type": "",
"disk_size": 0,
"volterra_software_version": "",
"operating_system_version": "",
"aws_region": "eu-west-3",
"ssh_key": "",
"address": "",
"coordinates": null,
"logs_streaming_disabled": {

},
"site_state": "ONLINE",
"vip_params_per_az": [
],
"user_modification_timestamp": null,
"tags": {
},
"nodes_per_az": 0,
"default_blocked_services": {

},
"direct_connect_disabled": {

},
"cloud_site_info": null,
"direct_connect_info": null

} }