The ALIYUN::APIG::ConsumerAuthorizationRule resource type creates a consumer authorization rule.
Syntax
{
"Type": "ALIYUN::APIG::ConsumerAuthorizationRule",
"Properties": {
"ConsumerId": String,
"ResourceIdentifier": Map,
"ResourceType": String,
"ExpireTimestamp": Integer,
"ExpireMode": String
}
}Properties
Parameter | Type | Required | Update allowed | Description | Constraints |
ConsumerId | String | Yes | No | The consumer ID. | None |
ResourceIdentifier | Map | Yes | Yes | The resource identifier for non-standard code sources. | For more information, see ResourceIdentifier properties. |
ResourceType | String | Yes | No | The resource type. | None |
ExpireMode | String | No | No | The expiration mode. | Valid values:
|
ExpireTimestamp | Integer | No | No | The expiration timestamp. | Specified in milliseconds. |
ResourceIdentifier syntax
"ResourceIdentifier": {
"EnvironmentId": String,
"ParentResourceId": String,
"ResourceId": String,
"Resources": List
}ResourceIdentifier properties
Parameter | Type | Required | Update allowed | Description | Constraints |
EnvironmentId | String | Yes | No | The environment ID. | None |
ResourceId | String | Yes | No | The resource ID. | None |
ParentResourceId | String | No | No | The parent resource ID. | None |
Resources | List | No | No | A list of resources. | None |
Return values
Fn::GetAtt
ConsumerAuthorizationRuleId: The ID of the consumer authorization rule.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ConsumerId:
Type: String
Description:
en: The consumer ID.
Required: true
ResourceType:
Type: String
Description:
en: The resource type.
Required: true
ResourceIdentifier:
Description:
en: Resource identifier for non-standard code sources.
Required: true
Type: Json
AssociationPropertyMetadata:
Parameters:
ResourceId:
Type: String
Description:
en: The resource ID.
Required: true
EnvironmentId:
Type: String
Description:
en: The environment ID.
Required: true
ParentResourceId:
Type: String
Description:
en: The parent resource ID.
Default: Null
Required: false
Resources:
Description:
en: A list of resources.
Required: false
Default: Null
Type: Json
AssociationProperty: List[Parameter]
AssociationPropertyMetadata:
Parameter:
Type: String
Default: Null
Required: false
ExpireMode:
Type: String
Description:
en: 'The expiration mode. Valid values: LongTerm, ShortTerm.'
AllowedValues:
- LongTerm
- ShortTerm
Default: Null
Required: false
ExpireTimestamp:
Type: Number
Description:
en: The expiration timestamp in milliseconds.
Default: Null
Required: false
Resources:
ConsumerAuthorizationRule:
Type: ALIYUN::APIG::ConsumerAuthorizationRule
Properties:
ConsumerId:
Ref: ConsumerId
ResourceType:
Ref: ResourceType
ResourceIdentifier:
Ref: ResourceIdentifier
ExpireMode:
Ref: ExpireMode
ExpireTimestamp:
Ref: ExpireTimestamp
Outputs:
ConsumerAuthorizationRuleId:
Value:
Fn::GetAtt:
- ConsumerAuthorizationRule
- ConsumerAuthorizationRuleId
Description: The ID of the consumer authorization rule.
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ConsumerId": {
"Type": "String",
"Description": {
"en": "The consumer ID."
},
"Required": true
},
"ResourceType": {
"Type": "String",
"Description": {
"en": "The resource type."
},
"Required": true
},
"ResourceIdentifier": {
"Description": {
"en": "Resource identifier for non-standard code sources."
},
"Required": true,
"Type": "Json",
"AssociationPropertyMetadata": {
"Parameters": {
"ResourceId": {
"Type": "String",
"Description": {
"en": "The resource ID."
},
"Required": true
},
"EnvironmentId": {
"Type": "String",
"Description": {
"en": "The environment ID."
},
"Required": true
},
"ParentResourceId": {
"Type": "String",
"Description": {
"en": "The parent resource ID."
},
"Default": null,
"Required": false
},
"Resources": {
"Description": {
"en": "A list of resources."
},
"Required": false,
"Default": null,
"Type": "Json",
"AssociationProperty": "List[Parameter]",
"AssociationPropertyMetadata": {
"Parameter": {
"Type": "String",
"Default": null,
"Required": false
}
}
}
}
}
},
"ExpireMode": {
"Type": "String",
"Description": {
"en": "The expiration mode. Valid values: LongTerm, ShortTerm."
},
"AllowedValues": [
"LongTerm",
"ShortTerm"
],
"Default": null,
"Required": false
},
"ExpireTimestamp": {
"Type": "Number",
"Description": {
"en": "The expiration timestamp in milliseconds."
},
"Default": null,
"Required": false
}
},
"Resources": {
"ConsumerAuthorizationRule": {
"Type": "ALIYUN::APIG::ConsumerAuthorizationRule",
"Properties": {
"ConsumerId": {
"Ref": "ConsumerId"
},
"ResourceType": {
"Ref": "ResourceType"
},
"ResourceIdentifier": {
"Ref": "ResourceIdentifier"
},
"ExpireMode": {
"Ref": "ExpireMode"
},
"ExpireTimestamp": {
"Ref": "ExpireTimestamp"
}
}
}
},
"Outputs": {
"ConsumerAuthorizationRuleId": {
"Value": {
"Fn::GetAtt": [
"ConsumerAuthorizationRule",
"ConsumerAuthorizationRuleId"
]
},
"Description": "The ID of the consumer authorization rule."
}
}
}