{
  "service": "aliyun_sts",
  "displayName": "Alibaba Cloud STS",
  "categories": [
    "Security",
    "Developer Tools"
  ],
  "authTypes": [
    "custom_credential"
  ],
  "auth": [
    {
      "type": "custom_credential",
      "fields": [
        {
          "key": "accessKeyId",
          "label": "Access Key ID",
          "inputType": "text",
          "required": true,
          "secret": false,
          "placeholder": "LTAI...",
          "description": "Alibaba Cloud RAM AccessKey ID used as the source credential for STS AssumeRole. Create or manage RAM AccessKey pairs here: https://www.alibabacloud.com/help/en/ram/user-guide/create-an-accesskey-pair"
        },
        {
          "key": "accessKeySecret",
          "label": "Access Key Secret",
          "inputType": "password",
          "required": true,
          "secret": true,
          "placeholder": "Your AccessKey secret",
          "description": "Alibaba Cloud RAM AccessKey secret from the same AccessKey pair. Alibaba Cloud only shows it when the key pair is created: https://www.alibabacloud.com/help/en/ram/user-guide/create-an-accesskey-pair"
        },
        {
          "key": "defaultRoleArn",
          "label": "Default Role ARN",
          "inputType": "text",
          "required": false,
          "secret": false,
          "placeholder": "acs:ram::1234567890123456:role/demo",
          "description": "Optional default RAM role ARN used by assume_role when the action input omits roleArn. If this is left blank, each assume_role action call must provide roleArn. Create or view RAM roles in the RAM console: https://ram.console.aliyun.com/roles"
        }
      ]
    }
  ],
  "homepageUrl": "https://www.alibabacloud.com/product/ram",
  "actions": [
    {
      "id": "aliyun_sts.assume_role",
      "service": "aliyun_sts",
      "name": "assume_role",
      "description": "Use a connected Alibaba Cloud RAM AccessKey pair to call STS AssumeRole and return temporary credentials.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "roleArn": {
            "type": "string",
            "minLength": 1,
            "description": "The Alibaba Cloud RAM role ARN to assume. Required when the connection has no saved Role ARN; otherwise the saved Role ARN is used when this field is omitted."
          },
          "roleSessionName": {
            "type": "string",
            "minLength": 1,
            "description": "The STS role session name."
          },
          "durationSeconds": {
            "type": "integer",
            "minimum": 900,
            "maximum": 43200,
            "description": "The temporary credential duration in seconds. Alibaba Cloud STS accepts 900 to 43200, limited by the RAM role maximum session duration."
          },
          "policy": {
            "type": "string",
            "minLength": 1,
            "description": "An optional inline session policy JSON string used only to narrow the temporary credential permissions."
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for assuming an Alibaba Cloud RAM role with saved RAM AK/SK credentials."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "accessKeyId": {
            "type": "string",
            "description": "The temporary AccessKey ID."
          },
          "accessKeySecret": {
            "type": "string",
            "description": "The temporary AccessKey secret."
          },
          "securityToken": {
            "type": "string",
            "description": "The STS security token used with the temporary AccessKey pair."
          },
          "expiration": {
            "type": "string",
            "description": "The ISO timestamp when the temporary credential expires."
          },
          "requestId": {
            "anyOf": [
              {
                "type": "string",
                "description": "The Alibaba Cloud STS request ID."
              },
              {
                "type": "null"
              }
            ]
          },
          "assumedRoleUser": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "arn": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "The assumed role user ARN."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "assumedRoleId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "The assumed role user ID."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false,
                "description": "The assumed role user identity returned by Alibaba Cloud STS."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "description": "The normalized Alibaba Cloud STS temporary credential returned by the connector."
      }
    }
  ]
}
