全部产品
Search
文档中心

资源编排:ALIYUN::RAM::AppSecret

更新时间:Nov 28, 2023

ALIYUN::RAM::AppSecret类型用于创建一个应用密钥。

语法

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

属性

属性名称

类型

必须

允许更新

描述

约束

AppId

String

应用ID。

返回值

Fn::GetAtt

  • AppSecretValue:应用密钥内容。该值可作为OAuth的应用密钥(Client Secret)使用。

  • AppSecretId:应用密钥ID。

示例

  • YAML格式

    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格式

    {
      "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"
            ]
          }
        }
      }
    }