UpdateApplication

更新时间:
复制 MD 格式

Modifies the configuration information of an application.

Try it now

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

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

ram:UpdateApplication

update

*Application

acs:ram::{#accountId}:application/{#AppName}

None

None

Request parameters

Parameter

Type

Required

Description

Example

AppId

string

Yes

The application ID.

472457090344041****

NewDisplayName

string

No

The display name of the application.

NewApp

NewRedirectUris

string

No

The redirect URL.

To specify multiple URLs, separate them with semicolons (;).

https://www.example.com

NewPredefinedScopes

string

No

The scope of application permissions.

For more information about the application permission scope, see OAuth overview. You can also call the ListPredefinedScopes operation to obtain the scopes that are supported by different application types.

To specify multiple permissions, separate them with semicolons (;).

The new value of this parameter overwrites the original value, and the permission specified by the new value takes effect. For example, if the original value is /acs/ccc, and the new value is /acs/alidns/acs/alidns takes effect. If you want to retain the original permission and the /acs/alidns permission, set the value to /acs/ccc;/acs/alidns.

openid

NewRequiredScopes

string

No

The required permission.

You can specify one or more permissions for the RequiredScopes parameter. When a user grants permissions to the application, the scopes specified in this parameter are pre-selected and cannot be deselected.

If you also specify the NewPredefinedScopes parameter, the NewPredefinedScopes parameter specifies the permissions that can be granted on the application, and this parameter specifies the required permissions.

To enter multiple scopes, separate them with semicolons (;).

The new value of this parameter overwrites the original value, and the required permission specified by the new value takes effect.

Note

Any scope specified here must also be included in PredefinedScopes. Otherwise, the scope will not be set as required.

profile;aliuid

NewSecretRequired

boolean

No

Specifies whether a secret is required. Valid values:

  • true

  • false

Note
  • For applications of the WebApp and ServerApp types, this parameter is automatically set to true and cannot be changed.

  • For applications of the NativeApp type, this parameter can be set to true or false. If you do not set this parameter, false is used. Applications of the NativeApp type run in untrusted environments and the secrets of these applications are not protected.

We recommend that you do not set this parameter to true unless otherwise specified. For more information, see Access Alibaba Cloud APIs from a native application.

true

NewAccessTokenValidity

integer

No

The validity period of the access token.

Valid values: 900 to 10800. Unit: seconds.

3600

NewRefreshTokenValidity

integer

No

The validity period of the refresh token.

Valid values: 7200 to 31536000. Unit: seconds.

7776000

NewIsMultiTenant

boolean

No

Specifies whether the application can be installed by using other Alibaba Cloud accounts. Valid values:

  • true

  • false

true

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

6616F09B-2768-4C11-8866-A8EE4C4A583E

Application

object

The application information.

DisplayName

string

The display name of the application.

NewApp

AccessTokenValidity

integer

The validity period of the access token. Unit: seconds.

3600

SecretRequired

boolean

Indicates whether a secret is required.

true

AccountId

string

The ID of the Alibaba Cloud account to which the application belongs.

177242285274****

CreateDate

string

The time when the application was created.

2020-10-23T08:06:57Z

AppName

string

The application name.

myapp

RedirectUris

object

The redirect URLs.

RedirectUri

array

The redirect URL.

string

The redirect URL.

https://www.example.com

UpdateDate

string

The time when the application was updated.

2020-10-23T08:06:57Z

DelegatedScope

object

The information about the permissions that are granted on the application.

PredefinedScopes

object

The information about the permissions that are granted on the application.

PredefinedScope

array<object>

The information about the permissions that are granted on the application.

object

The information about the permissions that are granted on the application.

Description

string

The description of the permission.

Obtain the OpenID of the user. This is the default permission that you cannot remove.

Name

string

The name of the permission.

openid

Required

boolean

Indicates whether the permission is automatically selected by default when you install the application. Valid values:

  • true

  • false

openid is required by default.

true

AppId

string

The application ID.

472457090344041****

RefreshTokenValidity

integer

The validity period of the refresh token. Unit: seconds.

7776000

IsMultiTenant

boolean

Indicates whether the application can be installed by using other Alibaba Cloud accounts.

true

AppType

string

The application type.

WebApp

ProtocolVersion

string

The OAuth protocol version of the application. Valid values:

  • 2.0: OAuth 2.0

  • 2.1: OAuth 2.1

2.0

Examples

Success response

JSON format

{
  "RequestId": "6616F09B-2768-4C11-8866-A8EE4C4A583E",
  "Application": {
    "DisplayName": "NewApp",
    "AccessTokenValidity": 3600,
    "SecretRequired": true,
    "AccountId": "177242285274****",
    "CreateDate": "2020-10-23T08:06:57Z",
    "AppName": "myapp",
    "RedirectUris": {
      "RedirectUri": [
        "https://www.example.com"
      ]
    },
    "UpdateDate": "2020-10-23T08:06:57Z",
    "DelegatedScope": {
      "PredefinedScopes": {
        "PredefinedScope": [
          {
            "Description": "Obtain the OpenID of the user. This is the default permission that you cannot remove.",
            "Name": "openid",
            "Required": true
          }
        ]
      }
    },
    "AppId": "472457090344041****",
    "RefreshTokenValidity": 7776000,
    "IsMultiTenant": true,
    "AppType": "WebApp",
    "ProtocolVersion": "2.0"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See 变更详情 for a complete list.