Skip to main content
本产品推出了新版本。
简体中文版经机器翻译而成,仅供参考。如与英语版出现任何冲突,应以英语版为准。

Retrieve an app for a managed cluster

贡献者

GET /accounts/{account_id}/topology/v2/managedClusters/{managedCluster_id}/apps/{app_id}

Returns the stored App API resource in the JSON response body.

Parameters

Name Type In Required Description

account_id

string

path

True

ID of the containing account resource

  • example: {{.Account}}

managedCluster_id

string

path

True

ID of the containing managedCluster resource

app_id

string

path

True

ID of the app collection to list

Response

Status: 200, Returns the stored App API resource in the JSON response body.
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"

id

string

True

Globally unique identifier of the resource. Defined values are:

  • Conforms to the UUIDv4 Schema

name

string

True

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]

True

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

True

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

stateTransitions

array[type_astra_stateTransitions]

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_stateDetails]

True

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

True

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_stateDetails]

True

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]

True

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

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 failedOver state, this field is not returned. Defined values are:

  • Conforms to the Astra Identifier Schema

metadata

type_astra_metadata_update

True

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 response
{
  "type": "application/astra-app",
  "version": "2.1",
  "id": "9703bbe7-def0-5b08-a40b-1edef8c47f7c",
  "name": "jenkins",
  "namespaceScopedResources": [
    {
      "namespace": "production-clone",
      "labelSelectors": [
        "app = jenkins,release = production"
      ]
    }
  ],
  "namespaceMapping": [
    {
      "source": "production",
      "destination": "production-clone"
    }
  ],
  "state": "ready",
  "stateDetails": [],
  "protectionState": "none",
  "protectionStateDetails": [],
  "namespaces": [
    "production-clone"
  ],
  "snapshotID": "8d561930-0437-4647-b3e6-49b8a5362e3d",
  "clusterName": "GKE-24",
  "clusterID": "0f284377-e5dc-4dcd-bacd-3197f2b8a347",
  "clusterType": "kubernetes",
  "metadata": {
    "labels": [],
    "creationTimestamp": "2022-10-06T20:58:16.305662Z",
    "modificationTimestamp": "2022-10-06T20:58:16.305662Z",
    "createdBy": "8f84cf09-8036-51e4-b579-bd30cb07b269"
  }
}

Response

Status: 401, Unauthorized
Name Type Required Description

type

string

True

title

string

True

detail

string

False

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

False

status

string

True

correlationID

string

False

invalidParams

array[invalidParams]

False

List of invalid query parameters

Example response
{
  "type": "https://astra.netapp.io/problems/5",
  "title": "Invalid query parameters",
  "detail": "The supplied query parameters are invalid.",
  "status": "400"
}

Response

Status: 403, Forbidden
Name Type Required Description

type

string

True

title

string

True

detail

string

False

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

False

status

string

True

correlationID

string

False

Example error response
{
  "type": "https://astra.netapp.io/problems/2",
  "title": "Collection not found",
  "detail": "The collection 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

True

JSON string containing a group identifier assigned by Kubernetes.

  • This string is internally validated against Astra /apiResources

kind

string

True

JSON string containing a kind identifier assigned by Kubernetes.

  • This string is internally validated against Astra /apiResources

version

string

True

JSON string containing a version identifier assigned by Kubernetes.

  • This string is internally validated against Astra /apiResources

clusterScopedResources

Name Type Required Description

GVK

GVK

True

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

True

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]

True

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_stateTransitions

Name Type Required Description

from

string

True

to

array[string]

True

type_astra_stateDetails

Name Type Required Description

type

string

True

title

string

True

detail

string

True

namespaceMapping

Name Type Required Description

source

string

True

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

True

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

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