Modify an app
PUT /accounts/{account_id}/k8s/v2/apps/{app_id}
Replaces the entire stored resource with the supplied JSON request body while preserving key values that are not user-modifiable.
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
account_id |
string |
path |
True |
ID of the containing account resource
|
app_id |
string |
path |
True |
ID of the app collection to list |
forceUpdate |
string |
header |
False |
Flag that enables destructive overwrites. Only include this when requesting an in-place restore (IPR).
|
Request Body
Replaces the entire stored resource with the supplied JSON request body while preserving key values that are not user-modifiable.
Name | Type | Required | Description |
---|---|---|---|
type |
string |
True |
Media type of the resource. Defined values are:
|
version |
string |
True |
Version of the resource. Defined values are:
|
id |
string |
False |
Globally unique identifier of the resource. Defined values are:
|
name |
string |
False |
JSON string containing a name for the application. Defined values are:
|
clusterScopedResources |
array[clusterScopedResources] |
False |
JSON array of JSON objects describing the cluster-scoped resources that are part of this app |
namespaceScopedResources |
array[namespaceScopedResources] |
False |
JSON array of JSON objects describing the resources that are part of this app |
lastResourceCollectionTimestamp |
string |
False |
JSON string containing the timestamp when the last resource collection was performed. This field is unset if no resource collection has been performed for this application yet. Defined values are:
|
state |
string |
False |
JSON string containing a value indicating the operational state of the application. Defined values are:
|
stateTransitions |
array[type_astra_stateTransition] |
False |
JSON array of JSON objects, each representing the set of permitted state transitions from a given defined state. Each JSON object contains the fields "from" and "to", where the "from" value is the name of a state, and the "to" value is an array of permitted destination states. |
stateDetails |
array[type_astra_stateDetail] |
False |
JSON array of JSON objects which lists additional details about the current state, including why the current state was reached. If no details are available, this array will be empty. Defined values are:
|
protectionState |
string |
False |
JSON string containing a value indicating the protection state of the application. Defined values are:
|
protectionStateDetails |
array[type_astra_stateDetail] |
False |
JSON array of JSON objects which lists additional details about the current protection state, including why the current state was reached. If no details are available, this array will be empty. Defined values are:
|
appDetectedType |
string |
False |
JSON string that uniquely represents the specific type of application that is detected. Defined values are:
|
namespaces |
array[string] |
False |
JSON array of JSON strings containing the names of the namespaces in which the application is running. Defined values are:
|
namespaceMapping |
array[namespaceMapping] |
False |
JSON array of JSON objects, each mapping a source namespace to a destination namespace for a clone operation. Defined values are:
|
storageClassMapping |
array[storageClassMapping] |
False |
JSON array of JSON objects, each mapping a source storage class to a destination storage class for a restore operation. If no elements or not present, original source storage class names will be used. Defined values are:
|
clusterName |
string |
False |
JSON string containing the name of the cluster that the application is running on. Not returned if the application is not currently running. |
clusterID |
string |
False |
JSON string containing the ID of the cluster that the application is running on. Not returned if the application is not currently running. When specified on create, clusterID indicates which cluster the application must be cloned into. If the specified cluster does not exist, or if the cluster specified does not match the clusterID specified in the request URI, the clone will fail. Defined values are:
|
clusterType |
string |
False |
JSON string containing a value indicating the type of cluster. Defined values are:
|
sourceAppID |
string |
False |
JSON string containing the ID of a source application. Only returned if the application was cloned from another application, or was restored from a backup or snapshot. When specified on create, the sourceAppID is used in conjunction with the sourceClusterID and indicates which running application will be cloned. If the specified application does not exist on the specified source cluster, the clone will fail. Only one of sourceAppID, backupID, or snapshotID can be specified when creating an application. Defined values are:
|
sourceClusterName |
string |
False |
JSON string containing the name of the cluster the application was previously running on. Only returned if the application was cloned from another cluster. |
sourceClusterID |
string |
False |
JSON string containing the ID of the cluster the application was previously running on. Only returned if the application was cloned from another cluster. When specified on create, the sourceClusterID is used in conjunction with the sourceAppID and indicates the source cluster of the application to be cloned. If the specified source cluster does not exist, the clone will fail. Defined values are:
|
backupID |
string |
False |
JSON string containing the ID of the backup that the application was restored from. Only returned if the application was restored from a backup. When specified on create, backupID indicates that an application will be cloned from an existing backup. If the specified backup does not exist, the clone will fail. Only one of sourceAppID, backupID, or snapshotID can be specified when creating an application. When specified on a replace, backupID indicates the application backup from which the application will be in-place restored. If the specified backup does not exist, the restore will fail. Only one of backupID or snapshotID can be specified when updating an application Defined values are:
|
snapshotID |
string |
False |
JSON string containing the ID of the snapshot that the application was restored from. Only returned if the application was restored from a snapshot. When specified on create, snapshotID indicates that an application will be cloned from an existing snapshot. If the specified snapshot does not exist, the clone will fail. Only one of sourceAppID, backupID, or snapshotID can be specified when creating an application. When specified on a replace, snapshotID indicates the application snapshot from which the application will be in-place restored. If the specified snapshot does not exist, the restore will fail. Only one of backupID or snapshotID can be specified when updating an application. Defined values are:
|
replicationSourceAppID |
string |
False |
JSON string containing the ID of the application that is being replicated to this application. Only returned if the application is currently the destination in an AppMirror relationship, and the relationship is not in the failedOver state. When the relationship is in the failedOver state, this field is not returned. Defined values are:
|
restoreFilter |
False |
JSON object containing a list of filters that describe which resources are included or excluded from a selective restore operation. Include and exclude are mutually exclusive, and a selective restore can only use one kind of filter. |
|
metadata |
False |
Client and service-specified metadata associated with the resource. Defined values are:
|
Example request
{
"type": "application/astra-app",
"version": "2.2",
"name": "mysql-old"
}
Response
Status: 204, Indicates if the app resource was updated.
Response
Status: 401, Unauthorized
Name | Type | Required | Description |
---|---|---|---|
type |
string |
True |
|
title |
string |
True |
|
detail |
string |
True |
|
status |
string |
True |
|
correlationID |
string |
False |
Example response
{
"type": "https://astra.netapp.io/problems/3",
"title": "Missing bearer token",
"detail": "The request is missing the required bearer token.",
"status": "401"
}
Response
Status: 400, Bad request
Name | Type | Required | Description |
---|---|---|---|
type |
string |
True |
|
title |
string |
True |
|
detail |
string |
True |
|
status |
string |
True |
|
correlationID |
string |
False |
Example response
{
"type": "https://astra.netapp.io/problems/5",
"title": "Invalid query parameters",
"detail": "The supplied query parameters are invalid.",
"status": "400"
}
Response
Status: 409, Conflict
Name | Type | Required | Description |
---|---|---|---|
type |
string |
True |
|
title |
string |
True |
|
detail |
string |
True |
|
status |
string |
True |
|
correlationID |
string |
False |
Example response
{
"type": "https://astra.netapp.io/problems/10",
"title": "JSON resource conflict",
"detail": "The request body JSON contains a field that conflicts with an idempotent value.",
"status": "409"
}
Response
Status: 403, Forbidden
Name | Type | Required | Description |
---|---|---|---|
type |
string |
True |
|
title |
string |
True |
|
detail |
string |
True |
|
status |
string |
True |
|
correlationID |
string |
False |
Example response
{
"type": "https://astra.netapp.io/problems/11",
"title": "Operation not permitted",
"detail": "The requested operation isn't permitted.",
"status": "403"
}
Error
Status: 404, Not found
Name | Type | Required | Description |
---|---|---|---|
type |
string |
True |
|
title |
string |
True |
|
detail |
string |
True |
|
status |
string |
True |
|
correlationID |
string |
False |
Example error response
{
"type": "https://astra.netapp.io/problems/1",
"title": "Resource not found",
"detail": "The resource specified in the request URI wasn't found.",
"status": "404"
}
Definitions
See Definitions
GVK
JSON object containing a Kubernetes group/version/kind.
-
This object is internally validated against Astra /apiResources.
Name | Type | Required | Description |
---|---|---|---|
group |
string |
False |
JSON string containing a group identifier assigned by Kubernetes.
|
kind |
string |
False |
JSON string containing a kind identifier assigned by Kubernetes.
|
version |
string |
False |
JSON string containing a version identifier assigned by Kubernetes.
|
clusterScopedResources
Name | Type | Required | Description |
---|---|---|---|
GVK |
False |
JSON object containing a Kubernetes group/version/kind.
|
|
labelSelectors |
array[string] |
False |
JSON array of JSON strings representing a label selector for the cluster-scoped GroupVersionKinds (GVKs) within the cluster. If this is empty, then all GVK instances on the cluster are included. Each element in this array is a Kubernetes label selector string and follows the same grammar for those values. Examples:
|
namespaceScopedResources
Name | Type | Required | Description |
---|---|---|---|
namespace |
string |
False |
JSON string containing the name of a namespace in which the application is defined. Defined values are:
|
labelSelectors |
array[string] |
False |
JSON array of JSON strings representing a label selector within the namespace. If this is empty, then all resources in the namespace are included. Each element in this array is a Kubernetes label selector string and follows the grammar for those values. Examples:
|
type_astra_stateTransition
Name | Type | Required | Description |
---|---|---|---|
from |
string |
True |
|
to |
array[string] |
True |
additionalDetails
type_astra_stateDetail
Name | Type | Required | Description |
---|---|---|---|
type |
string |
True |
|
title |
string |
True |
|
detail |
string |
True |
|
additionalDetails |
False |
namespaceMapping
Name | Type | Required | Description |
---|---|---|---|
source |
string |
False |
JSON string containing the name of the namespace on the source cluster. Defined values are:
|
destination |
string |
False |
JSON string containing the name of the namespace on the destination cluster. Defined values are:
|
storageClassMapping
Name | Type | Required | Description |
---|---|---|---|
source |
string |
False |
JSON string containing the name of the source storage class. Can also be '*' to specify all source storage classes. Defined values are:
|
destination |
string |
False |
JSON string containing the name of the destination storage class. Defined values are:
|
GVKN
Name | Type | Required | Description |
---|---|---|---|
group |
string |
False |
JSON string containing a group identifier assigned by Kubernetes.
|
version |
string |
False |
JSON string containing a version identifier assigned by Kubernetes.
|
kind |
string |
False |
JSON string containing a kind identifier assigned by Kubernetes.
|
namespaces |
array[string] |
False |
JSON array of JSON strings describing namespaces to include or exclude resources from. Defined values are:
|
names |
array[string] |
False |
JSON array of JSON strings describing Kubernetes resource names to include or exclude from the selective restore. Defined values are:
|
labelSelectors |
array[string] |
False |
JSON array of JSON strings describing Kubernetes label selectors used to include or exclude resources from the selective restore. Each element in this array is a Kubernetes label selector string and follows the same grammar for those values. Examples:
|
restoreFilter
JSON object containing a list of filters that describe which resources are included or excluded from a selective restore operation. Include and exclude are mutually exclusive, and a selective restore can only use one kind of filter.
Name | Type | Required | Description |
---|---|---|---|
resourceSelectionCriteria |
string |
True |
JSON string containing a value that indicates how resource filters select resources. Valid values are include or exclude. |
GVKN |
array[GVKN] |
True |
JSON array of JSON objects that describe resources to filter during a selective restore. A resource matches a single GVKN filter element if all of the specified filter fields match the corresponding resource field. Filter fields that are arrays (for example, namespaces and names) match if any of its elements match the corresponding resource field. The labelSelectors field requires that all selectors match. A resource that matches any filter in the array of GVKN filter objects is included or excluded from the restore based on the resourceSelectionCriteria value. Specifying empty GVKN objects results in a validation error. |
type_astra_label
Name | Type | Required | Description |
---|---|---|---|
name |
string |
True |
|
value |
string |
True |
type_astra_metadata_update
Client and service-specified metadata associated with the resource. Defined values are:
-
Conforms to the Astra Metadata Schema If not specified on create, a metadata object will be created with no labels. If not specified on update, the metadata object's labels, creationTimestamp and createdBy, will be preserved without modification.
Name | Type | Required | Description |
---|---|---|---|
labels |
array[type_astra_label] |
False |
|
creationTimestamp |
string |
False |
|
modificationTimestamp |
string |
False |
|
createdBy |
string |
False |
|
modifiedBy |
string |
False |
invalidParams
Name | Type | Required | Description |
---|---|---|---|
name |
string |
True |
Name of the invalid query parameter |
reason |
string |
True |
Reason why the query parameter is invalid |
invalidFields
Name | Type | Required | Description |
---|---|---|---|
name |
string |
True |
Name of the invalid request body field |
reason |
string |
True |
Reason why the request body field is invalid |