Deployment Resources - CRUD
editDeployment Resources - CRUD
editGet the items in the Elasticsearch resource keystore
editFetches the current fields and metadata (but not the values) of the keystore for the Elasticsearch resource.
Request
editGET /api/v1/deployments/{deployment_id}/elasticsearch/{ref_id}/keystore
Path parameters
editName | Type | Required | Description |
---|---|---|---|
|
|
Y |
Identifier for the Deployment |
|
|
Y |
User-specified RefId for the Resource (or '_main' if there is only one) |
Responses
edit-
200
-
The contents of the Elasticsearch keystore, with values redacted
-
404
-
-
The Deployment specified by {deployment_id} cannot be found. (code:
deployments.deployment_not_found
) -
The Resource specified by {ref_id} cannot be found. (code:
deployments.deployment_resource_not_found
)
Headers
-
x-cloud-error-codes
(string
; allowed values: [deployments.deployment_not_found
,deployments.deployment_resource_not_found
]) - The error codes associated with the response
-
The Deployment specified by {deployment_id} cannot be found. (code:
-
500
-
We have failed you. (code:
deployments.metadata_internal_error
)Headers
-
x-cloud-error-codes
(string
; allowed values: [deployments.metadata_internal_error
]) - The error codes associated with the response
-
Request example
editcurl -XGET https://api.elastic-cloud.com/api/v1/deployments/{deployment_id}/elasticsearch/{ref_id}/keystore \ -H "Authorization: ApiKey $EC_API_KEY"
Add or remove items from the Elasticsearch resource keystore
editAdds the specified values to the Elasticsearch keystore, or removes the keys for the unspecified values.
Request
editPATCH /api/v1/deployments/{deployment_id}/elasticsearch/{ref_id}/keystore
Path parameters
editName | Type | Required | Description |
---|---|---|---|
|
|
Y |
Identifier for the Deployment |
|
|
Y |
User-specified RefId for the Resource (or '_main' if there is only one) |
Request body
edit(KeystoreContents
) (required) The new settings that will be applied to the keystore of the Elasticsearch resource.
Responses
edit-
200
-
The new contents of the Elasticsearch keystore
-
404
-
-
The Deployment specified by {deployment_id} cannot be found. (code:
deployments.deployment_not_found
) -
The Resource specified by {ref_id} cannot be found. (code:
deployments.deployment_resource_not_found
)
Headers
-
x-cloud-error-codes
(string
; allowed values: [deployments.deployment_not_found
,deployments.deployment_resource_not_found
]) - The error codes associated with the response
-
The Deployment specified by {deployment_id} cannot be found. (code:
-
500
-
We have failed you. (code:
deployments.metadata_internal_error
)Headers
-
x-cloud-error-codes
(string
; allowed values: [deployments.metadata_internal_error
]) - The error codes associated with the response
-
Request example
editcurl -XPATCH https://api.elastic-cloud.com/api/v1/deployments/{deployment_id}/elasticsearch/{ref_id}/keystore \ -H "Authorization: ApiKey $EC_API_KEY" \ -H 'Content-Type: application/json' \ -d ' { "secrets" : { "some_property" : { "as_file" : true, "value" : {} } } } '
Restores a shutdown resource
editRestores a shutdown resource belonging to a given Deployment.
Request
editPOST /api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/_restore
Path parameters
editName | Type | Required | Description |
---|---|---|---|
|
|
Y |
Identifier for the Deployment |
|
|
Y |
User-specified RefId for the Resource (or '_main' if there is only one) |
|
|
Y |
The kind of resource |
Query parameters
editName | Type | Required | Description |
---|---|---|---|
|
|
N |
Whether or not to restore a snapshot for those resources that allow it. |
Responses
edit-
200
-
(
DeploymentResourceCrudResponse
)Standard Deployment Resource Crud Response
-
400
-
-
The Resource does not have a pending plan. (code:
deployments.resource_does_not_have_a_pending_plan
) -
The resource is not shut down. (code:
deployments.resource_not_shutdown
)
Headers
-
x-cloud-error-codes
(string
; allowed values: [deployments.resource_does_not_have_a_pending_plan
,deployments.resource_not_shutdown
]) - The error codes associated with the response
-
The Resource does not have a pending plan. (code:
-
404
-
The Deployment specified by {deployment_id} cannot be found. (code:
deployments.deployment_not_found
)Headers
-
x-cloud-error-codes
(string
; allowed values: [deployments.deployment_not_found
]) - The error codes associated with the response
-
Request example
editcurl -XPOST https://api.elastic-cloud.com/api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/_restore \ -H "Authorization: ApiKey $EC_API_KEY"
Cancel resource pending plan
editCancels the pending plan of a Resource belonging to a given Deployment.
Request
editDELETE /api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/plan/pending
Path parameters
editName | Type | Required | Description |
---|---|---|---|
|
|
Y |
Identifier for the Deployment |
|
|
Y |
User-specified RefId for the Resource (or '_main' if there is only one) |
|
|
Y |
The kind of resource |
Query parameters
editName | Type | Required | Description |
---|---|---|---|
|
|
N |
When |
|
|
N |
When |
Responses
edit-
200
-
(
DeploymentResourceCrudResponse
)Standard Deployment Resource Crud Response
-
400
-
The Resource does not have a pending plan. (code:
deployments.resource_does_not_have_a_pending_plan
)Headers
-
x-cloud-error-codes
(string
; allowed values: [deployments.resource_does_not_have_a_pending_plan
]) - The error codes associated with the response
-
-
404
-
The Deployment specified by {deployment_id} cannot be found. (code:
deployments.deployment_not_found
)Headers
-
x-cloud-error-codes
(string
; allowed values: [deployments.deployment_not_found
]) - The error codes associated with the response
-
-
500
-
We have failed you. (code:
deployments.deployment_resource_no_longer_exists
)Headers
-
x-cloud-error-codes
(string
; allowed values: [deployments.deployment_resource_no_longer_exists
]) - The error codes associated with the response
-
Request example
editcurl -XDELETE https://api.elastic-cloud.com/api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/plan/pending \ -H "Authorization: ApiKey $EC_API_KEY"