GetApplication

更新时间:
复制 MD 格式

Retrieves basic information about an application.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

sae:GetApplication

get

*All Resource

*

None None

Request syntax

GET /pop/v1/sam/app/getApplication HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

AppId

string

No

The ID of the application.

017f39b8-dfa4-4e16-a84b-1dcee4b1****

AppName

string

No

The name of the application.

test

NamespaceId

string

No

The ID of the namespace.

cn-shenzhen

Response elements

Element

Type

Description

Example

object

The returned data.

RequestId

string

The request ID.

01CF26C7-00A3-4AA6-BA76-7E95F2A3****

Message

string

The response message.

  • If the request is successful, the value is success.

  • If the request fails, the value is a specific error code.

success

TraceId

string

The trace ID used to query the details of the request.

ac1a0b2215622920113732501e****

Application

object

The details of the application.

AppId

string

The application ID.

443d638a-ef76-47c4-b707-61197d******

AppName

string

The application name.

test

AppDescription

string

The application description.

for testing

NamespaceId

string

The namespace ID.

cn-shenzhen

ScaleRuleType

string

The type of the auto scaling policy. Valid values:

  • timing: scheduled auto scaling.

  • metric: metric-based auto scaling.

  • mix: hybrid auto scaling.

timing

ScaleRuleEnabled

string

Indicates whether the auto scaling policy is enabled. Valid values:

  • true: The policy is enabled.

  • false: The policy is disabled.

true

RunningInstances

integer

The number of running instances.

6

Instances

integer

The total number of application instances.

6

Cpu

integer

The CPU required for each instance, in millicores. This value cannot be 0. Valid values:

  • 500

  • 1000

  • 2000

  • 4000

  • 8000

  • 12000

  • 16000

  • 32000

2000

Mem

integer

The memory required for each instance, in MB. This value cannot be 0. The memory specification is coupled with the CPU specification. The following configurations are supported:

  • 1024: corresponds to 500 or 1,000 millicores of CPU.

  • 2048: corresponds to 500, 1,000, or 2,000 millicores of CPU.

  • 4096: corresponds to 1,000, 2,000, or 4,000 millicores of CPU.

  • 8192: corresponds to 2,000, 4,000, or 8,000 millicores of CPU.

  • 12288: corresponds to 12,000 millicores of CPU.

  • 16384: corresponds to 4,000, 8,000, or 16,000 millicores of CPU.

  • 24576: corresponds to 12,000 millicores of CPU.

  • 32768: corresponds to 16,000 millicores of CPU.

  • 65536: corresponds to 8,000, 16,000, or 32,000 millicores of CPU.

  • 131072: corresponds to 32,000 millicores of CPU.

4096

MseEnabled

boolean

Indicates whether WebAssemblyFilter is enabled. Valid values:

  • true: enabled.

  • false: disabled.

true

MseNamespaceId

string

The namespace ID of the MSE instance.

test

ProgrammingLanguage

string

The programming language of the application. Valid values:

  • java: Java.

  • php: PHP.

  • other: other languages, such as Python, C++, Go, .NET, and Node.js.

java

BaseAppId

string

The base application ID.

ee99cce6-1c8e-4bfa-96c3-3e2fa9******

IsStateful

boolean

Indicates whether the application is stateful.

Examples

Success response

JSON format

{
  "RequestId": "01CF26C7-00A3-4AA6-BA76-7E95F2A3****",
  "Message": "success",
  "TraceId": "ac1a0b2215622920113732501e****",
  "Application": {
    "AppId": "443d638a-ef76-47c4-b707-61197d******",
    "AppName": "test",
    "AppDescription": "for testing",
    "NamespaceId": "cn-shenzhen",
    "ScaleRuleType": "timing",
    "ScaleRuleEnabled": "true",
    "RunningInstances": 6,
    "Instances": 6,
    "Cpu": 2000,
    "Mem": 4096,
    "MseEnabled": true,
    "MseNamespaceId": "test",
    "ProgrammingLanguage": "java",
    "BaseAppId": "ee99cce6-1c8e-4bfa-96c3-3e2fa9******",
    "IsStateful": false
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidApplication.NotFound The current application does not exist.
400 InvalidParameter.WithMessage The parameter is invalid {%s}: %s
400 InvalidParameter.Obviously The specified parameter is invalid {%s}.
400 InvalidParameter.NotEmpty You must specify the parameter %s.
400 InvalidParameter.NoPermission Resource no permission
404 InvalidAppId.NotFound The specified AppId does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.