ves-io-schema-kms_key-API-Create

Examples of creating kms_key

Usecase:

Create kms-rsa-key-default

Request using vesctl:

vesctl configuration create kms_key -i kms_key.yaml

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

RequestJSON:

{"metadata":{"name":"kms-rsa-key-default","namespace":"documentation"},"spec":{"key_info":{"rsa_key":{}}}} `

vesctl yaml response:

ResponseJSON:

  "metadata": {
    "name": "kms-rsa-key-default",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "70bb7fc4-d3cc-4b6a-a70c-c3121141eaca",
    "creation_timestamp": "2022-07-28T12:10:37.127201410Z",
    "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": {
    "sensitivity": "SENSITIVITY_MEDIUM",
    "policies": [
    ],
    "max_cache_age": null
  }
}```
`

Request using curl:

    


curl -X 'POST' -d '{"metadata":{"name":"kms-rsa-key-default","namespace":"documentation"},"spec":{"key_info":{"rsa_key":{}}}}' -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/kms/namespaces/documentation/kms_keys'



curl response:

	


HTTP/1.1 200 OK Content-Length: 718 Content-Type: application/json Date: Thu, 28 Jul 2022 12:10:37 GMT Vary: Accept-Encoding

{ "metadata": { "name": "kms-rsa-key-default", "namespace": "documentation", "labels": { }, "annotations": { }, "description": "", "disable": false }, "system_metadata": { "uid": "70bb7fc4-d3cc-4b6a-a70c-c3121141eaca", "creation_timestamp": "2022-07-28T12:10:37.127201410Z", "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": { "sensitivity": "SENSITIVITY_MEDIUM", "policies": [ ], "max_cache_age": null } }



Usecase:
--------
Create kms-rsa-key-with-params

Request using vesctl:

    vesctl configuration create kms_key -i kms_key.yaml

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

	
RequestJSON:

```{"metadata":{"name":"kms-rsa-key-with-params","namespace":"documentation"},"spec":{"sensitivity":"SENSITIVITY_LOW","key_info":{"rsa_key":{"params":{"key_size":2048,"ES_schemes":["RSAES_OAEP","RSAES_PKCS1_V15"],"SSA_schemes":["RSASSA_PKCS1_V15","RSASSA_PSS"],"hash_algos":["SHA256"]}}}}}```
`

vesctl yaml response:

	
ResponseJSON:

```{
  "metadata": {
    "name": "kms-rsa-key-with-params",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "696e1ee5-9ab0-4194-969a-1674ec5e0111",
    "creation_timestamp": "2022-07-28T12:10:37.130455403Z",
    "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": {
    "sensitivity": "SENSITIVITY_LOW",
    "policies": [
    ],
    "max_cache_age": null
  }
}```
`

Request using curl:

    


curl -X 'POST' -d '{"metadata":{"name":"kms-rsa-key-with-params","namespace":"documentation"},"spec":{"sensitivity":"SENSITIVITY_LOW","key_info":{"rsa_key":{"params":{"key_size":2048,"ES_schemes":["RSAES_OAEP","RSAES_PKCS1_V15"],"SSA_schemes":["RSASSA_PKCS1_V15","RSASSA_PSS"],"hash_algos":["SHA256"]}}}}}' -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/kms/namespaces/documentation/kms_keys'



curl response:

	


HTTP/1.1 200 OK Content-Length: 719 Content-Type: application/json Date: Thu, 28 Jul 2022 12:10:37 GMT Vary: Accept-Encoding

{ "metadata": { "name": "kms-rsa-key-with-params", "namespace": "documentation", "labels": { }, "annotations": { }, "description": "", "disable": false }, "system_metadata": { "uid": "696e1ee5-9ab0-4194-969a-1674ec5e0111", "creation_timestamp": "2022-07-28T12:10:37.130455403Z", "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": { "sensitivity": "SENSITIVITY_LOW", "policies": [ ], "max_cache_age": null } }



Usecase:
--------
Create kms-aes-key-default

Request using vesctl:

    vesctl configuration create kms_key -i kms_key.yaml

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

	
RequestJSON:

```{"metadata":{"name":"kms-aes-key-default","namespace":"documentation"},"spec":{"key_info":{"aes_key":{}}}}```
`

vesctl yaml response:

	
ResponseJSON:

```{
  "metadata": {
    "name": "kms-aes-key-default",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "eb724092-606e-45c9-94ae-f3458a557f6e",
    "creation_timestamp": "2022-07-28T12:10:37.133183561Z",
    "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": {
    "sensitivity": "SENSITIVITY_MEDIUM",
    "policies": [
    ],
    "max_cache_age": null
  }
}```
`

Request using curl:

    


curl -X 'POST' -d '{"metadata":{"name":"kms-aes-key-default","namespace":"documentation"},"spec":{"key_info":{"aes_key":{}}}}' -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/kms/namespaces/documentation/kms_keys'



curl response:

	


HTTP/1.1 200 OK Content-Length: 718 Content-Type: application/json Date: Thu, 28 Jul 2022 12:10:37 GMT Vary: Accept-Encoding

{ "metadata": { "name": "kms-aes-key-default", "namespace": "documentation", "labels": { }, "annotations": { }, "description": "", "disable": false }, "system_metadata": { "uid": "eb724092-606e-45c9-94ae-f3458a557f6e", "creation_timestamp": "2022-07-28T12:10:37.133183561Z", "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": { "sensitivity": "SENSITIVITY_MEDIUM", "policies": [ ], "max_cache_age": null } }



Usecase:
--------
Create kms-aes-key-with-params

Request using vesctl:

    vesctl configuration create kms_key -i kms_key.yaml

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

	
RequestJSON:

```{"metadata":{"name":"kms-aes-key-with-params","namespace":"documentation"},"spec":{"sensitivity":"SENSITIVITY_LOW","key_info":{"aes_key":{"params":{"key_size":256,"nonce_size_min":96,"nonce_size_max":256}}}}}```
`

vesctl yaml response:

	
ResponseJSON:

```{
  "metadata": {
    "name": "kms-aes-key-with-params",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "de79b5d7-0cbb-4b0d-9b36-5539562edd81",
    "creation_timestamp": "2022-07-28T12:10:37.135943098Z",
    "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": {
    "sensitivity": "SENSITIVITY_LOW",
    "policies": [
    ],
    "max_cache_age": null
  }
}```
`

Request using curl:

    


curl -X 'POST' -d '{"metadata":{"name":"kms-aes-key-with-params","namespace":"documentation"},"spec":{"sensitivity":"SENSITIVITY_LOW","key_info":{"aes_key":{"params":{"key_size":256,"nonce_size_min":96,"nonce_size_max":256}}}}}' -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/kms/namespaces/documentation/kms_keys'



curl response:

	


HTTP/1.1 200 OK Content-Length: 719 Content-Type: application/json Date: Thu, 28 Jul 2022 12:10:37 GMT Vary: Accept-Encoding

{ "metadata": { "name": "kms-aes-key-with-params", "namespace": "documentation", "labels": { }, "annotations": { }, "description": "", "disable": false }, "system_metadata": { "uid": "de79b5d7-0cbb-4b0d-9b36-5539562edd81", "creation_timestamp": "2022-07-28T12:10:37.135943098Z", "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": { "sensitivity": "SENSITIVITY_LOW", "policies": [ ], "max_cache_age": null } }



Usecase:
--------
Create kms-hmac-key-default

Request using vesctl:

    vesctl configuration create kms_key -i kms_key.yaml

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

	
RequestJSON:

```{"metadata":{"name":"kms-hmac-key-default","namespace":"documentation"},"spec":{"key_info":{"hmac_key":{}}}}```
`

vesctl yaml response:

	
ResponseJSON:

```{
  "metadata": {
    "name": "kms-hmac-key-default",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "a4b2465a-71dd-4355-a1b9-3bcbdc6590ff",
    "creation_timestamp": "2022-07-28T12:10:37.138447880Z",
    "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": {
    "sensitivity": "SENSITIVITY_MEDIUM",
    "policies": [
    ],
    "max_cache_age": null
  }
}```
`

Request using curl:

    


curl -X 'POST' -d '{"metadata":{"name":"kms-hmac-key-default","namespace":"documentation"},"spec":{"key_info":{"hmac_key":{}}}}' -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/kms/namespaces/documentation/kms_keys'



curl response:

	


HTTP/1.1 200 OK Content-Length: 719 Content-Type: application/json Date: Thu, 28 Jul 2022 12:10:37 GMT Vary: Accept-Encoding

{ "metadata": { "name": "kms-hmac-key-default", "namespace": "documentation", "labels": { }, "annotations": { }, "description": "", "disable": false }, "system_metadata": { "uid": "a4b2465a-71dd-4355-a1b9-3bcbdc6590ff", "creation_timestamp": "2022-07-28T12:10:37.138447880Z", "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": { "sensitivity": "SENSITIVITY_MEDIUM", "policies": [ ], "max_cache_age": null } }



Usecase:
--------
Create kms-hmac-key-with-params

Request using vesctl:

    vesctl configuration create kms_key -i kms_key.yaml

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

	
RequestJSON:

```{"metadata":{"name":"kms-hmac-key-with-params","namespace":"documentation"},"spec":{"sensitivity":"SENSITIVITY_LOW","key_info":{"hmac_key":{"params":{"key_size":256,"algo_list":["SHA256"]}}}}}```
`

vesctl yaml response:

	
ResponseJSON:

```{
  "metadata": {
    "name": "kms-hmac-key-with-params",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "ddc699ab-477d-41af-9f49-9494259d33e1",
    "creation_timestamp": "2022-07-28T12:10:37.140949881Z",
    "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": {
    "sensitivity": "SENSITIVITY_LOW",
    "policies": [
    ],
    "max_cache_age": null
  }
}```
`

Request using curl:

    


curl -X 'POST' -d '{"metadata":{"name":"kms-hmac-key-with-params","namespace":"documentation"},"spec":{"sensitivity":"SENSITIVITY_LOW","key_info":{"hmac_key":{"params":{"key_size":256,"algo_list":["SHA256"]}}}}}' -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/kms/namespaces/documentation/kms_keys'



curl response:

	


HTTP/1.1 200 OK Content-Length: 720 Content-Type: application/json Date: Thu, 28 Jul 2022 12:10:37 GMT Vary: Accept-Encoding

{ "metadata": { "name": "kms-hmac-key-with-params", "namespace": "documentation", "labels": { }, "annotations": { }, "description": "", "disable": false }, "system_metadata": { "uid": "ddc699ab-477d-41af-9f49-9494259d33e1", "creation_timestamp": "2022-07-28T12:10:37.140949881Z", "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": { "sensitivity": "SENSITIVITY_LOW", "policies": [ ], "max_cache_age": null } }