All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::RAM::AppSecret

更新時間:Jan 02, 2024

ALIYUN::RAM::AppSecret is used to create an application secret.

Syntax

{
  "Type": "ALIYUN::RAM::AppSecret",
  "Properties": {
    "AppId": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

AppId

String

Yes

No

The application ID.

None.

Return values

Fn::GetAtt

  • AppSecretValue: the content of the application secret. This value can be used for the Client Secret parameter of Open Authorization (OAuth) applications.

  • AppSecretId: the ID of the application secret.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      AppId:
        Description: The ID of the application.
        Type: String
    Resources:
      AppSecret:
        Properties:
          AppId:
            Ref: AppId
        Type: ALIYUN::RAM::AppSecret
    Outputs:
      AppSecretId:
        Description: The ID of the application secret.
        Value:
          Fn::GetAtt:
          - AppSecret
          - AppSecretId
      AppSecretValue:
        Description: The content of the application secret. This value can be used as
          the client secret for open authorization.
        Value:
          Fn::GetAtt:
          - AppSecret
          - AppSecretValue
                            
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "AppId": {
          "Type": "String",
          "Description": "The ID of the application."
        }
      },
      "Resources": {
        "AppSecret": {
          "Type": "ALIYUN::RAM::AppSecret",
          "Properties": {
            "AppId": {
              "Ref": "AppId"
            }
          }
        }
      },
      "Outputs": {
        "AppSecretValue": {
          "Description": "The content of the application secret. This value can be used as the client secret for open authorization.",
          "Value": {
            "Fn::GetAtt": [
              "AppSecret",
              "AppSecretValue"
            ]
          }
        },
        "AppSecretId": {
          "Description": "The ID of the application secret.",
          "Value": {
            "Fn::GetAtt": [
              "AppSecret",
              "AppSecretId"
            ]
          }
        }
      }
    }