Skip to main content
Hay disponible una nueva versión de este producto.
Se proporciona el idioma español mediante traducción automática para su comodidad. En caso de alguna inconsistencia, el inglés precede al español.

Modify an app

Colaboradores

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

  • example: {{.Account}}

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).

  • example: true

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:

  • "application/astra-app"

version

string

True

Version of the resource. Defined values are:

  • "2.0"

  • "2.1"

  • "2.2"

id

string

False

Globally unique identifier of the resource. Defined values are:

  • Conforms to the UUIDv4 Schema

name

string

False

JSON string containing a name for the application. Defined values are:

  • Minimum length: 1

  • Maximum length: 63

  • This string is internally validated to prevent XSS, Unicode, directory traversal, and SQL-injection attacks.

  • Conforms to the DNS 1123 Label Schema

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:

  • Conforms to the ISO-8601 Date Time Schema

state

string

False

JSON string containing a value indicating the operational state of the application. Defined values are:

  • "pending" - The application is scheduled for discovery

  • "discovering" - The application is in the process of being discovered

  • "provisioning" - The application is in the process of being provisioned

  • "ready" - The application is running normally

  • "failed" - The application is in a permanent failure state

  • "restoring" - The application is being restored from backup or snapshot

  • "unavailable" - The application is not currently accessible

  • "unknown" - The application state cannot be determined

  • "deleting" - The application is in the process of being deleted

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:

  • Minimum Items: 0

protectionState

string

False

JSON string containing a value indicating the protection state of the application. Defined values are:

  • "protected" - The application has a protection policy defined and is in conformance with that policy

  • "partial" - The application has a protection policy defined, but is out of conformance with that policy

  • "none" - The application does not have a protection policy defined

  • "atRisk" - The default storage class on the cluster does not support snapshots, the application is at risk of gaining an unsupported volume

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:

  • Minimum Items: 0

appDetectedType

string

False

JSON string that uniquely represents the specific type of application that is detected. Defined values are:

  • "system" - The application contains a resource that identifies it as part of the Kubernetes environment

  • "acc" - The application contains resources that identify it as an Astra Control Center instance

namespaces

array[string]

False

JSON array of JSON strings containing the names of the namespaces in which the application is running. Defined values are:

  • Minimum length: 1

  • Maximum length: 253

  • Conforms to the DNS 1123 Label Schema

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:

  • Minimum Items: 0

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:

  • Minimum Items: 0

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:

  • Conforms to the Astra Identifier Schema

clusterType

string

False

JSON string containing a value indicating the type of cluster. Defined values are:

  • "gke" - Kubernetes hosted on Google Kubernetes Engine (GKE)

  • "aks" - Kubernetes hosted on Microsoft Azure Kubernetes Service (AKS)

  • "eks" - Kubernetes hosted on Amazon Elastic Kubernetes Service (Amazon EKS)

  • "openshift" - The cluster is of type OpenShift

  • "kubernetes" - The cluster is generic Kubernetes

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:

  • Conforms to the Astra Identifier Schema

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:

  • Conforms to the Astra Identifier Schema

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:

  • Conforms to the Astra Identifier Schema

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:

  • Conforms to the Astra Identifier Schema

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:

  • Conforms to the Astra Identifier Schema

restoreFilter

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

type_astra_metadata_update

False

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.

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.

  • This string is internally validated against Astra /apiResources

kind

string

False

JSON string containing a kind identifier assigned by Kubernetes.

  • This string is internally validated against Astra /apiResources

version

string

False

JSON string containing a version identifier assigned by Kubernetes.

  • This string is internally validated against Astra /apiResources

clusterScopedResources

Name Type Required Description

GVK

GVK

False

JSON object containing a Kubernetes group/version/kind.

  • This object is internally validated against Astra /apiResources.

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:

  • Minimum length: 1

  • Maximum length: 253

  • Conforms to the DNS 1123 Label Schema

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:

  • [ "app=mysql" ] — Select all resources that have a label whose name is app and whose value is mysql

  • [ "app != mysql" ] — Select all resources that have a label whose name is app and whose value is not mysql

  • [ "app in (mysql, mariadb)" ] — Select all resources that have a label whose name is app and value is mysql or mariadb

  • [ "app notin (nginx, wordpress)" ] — Select all resources that do not have a label whose name is app and whose values are nginx or wordpress

  • [ "app" ] — Select all resources that have a label named app

  • [ "!app" ] — Select all resources that do not have a label named app Note that multiple selection operators can be included in a single selector, separated by commas. In that case, the results of the individual selection operators are AND-ed:

  • [ "app=mysql,version=2" ] — Select all resources that have a label whose name is app and whose value is mysql and a label whose name is version and whose value is 2

type_astra_stateTransition

Name Type Required Description

from

string

True

to

array[string]

True

type_astra_stateDetail

Name Type Required Description

type

string

True

title

string

True

detail

string

True

namespaceMapping

Name Type Required Description

source

string

False

JSON string containing the name of the namespace on the source cluster. Defined values are:

  • Minimum length: 1

  • Maximum length: 253

  • Conforms to the DNS 1123 Label Schema

destination

string

False

JSON string containing the name of the namespace on the destination cluster. Defined values are:

  • Minimum length: 1

  • Maximum length: 253

  • Conforms to the DNS 1123 Label Schema

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:

  • Minimum length: 1

  • Maximum length: 63

  • Conforms to the DNS 1123 Label Schema if Storage Class name is used

  • '*' to specify all storage classes

destination

string

False

JSON string containing the name of the destination storage class. Defined values are:

  • Minimum length: 1

  • Maximum length: 63

  • Conforms to the DNS 1123 Label Schema

GVKN

Name Type Required Description

group

string

False

JSON string containing a group identifier assigned by Kubernetes.

  • This string is internally validated against Astra /apiResources

version

string

False

JSON string containing a version identifier assigned by Kubernetes.

  • This string is internally validated against Astra /apiResources

kind

string

False

JSON string containing a kind identifier assigned by Kubernetes.

  • This string is internally validated against Astra /apiResources

namespaces

array[string]

False

JSON array of JSON strings describing namespaces to include or exclude resources from. Defined values are:

  • Minimum length: 1

  • Maximum length: 63

  • Conforms to the DNS 1123 Label Schema

names

array[string]

False

JSON array of JSON strings describing Kubernetes resource names to include or exclude from the selective restore. Defined values are:

  • Minimum length: 1

  • Maximum length: 253

  • Conforms to the DNS 1123 Label Schema

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