This topic describes the types and fields of requests from template developers.

Template developer request properties

The template developer uses ALIYUN::ROS::CustomResource to specify a custom resource in a template.

ALIYUN::ROS::CustomResource contains three properties: ServiceToken, Parameters, and Timeout.

  • ServiceToken
    • The service token that is obtained from the custom resource provider to access the service. The service token can be a Function Compute function, an MNS topic, an MNS queue, or an HTTP or HTTPS URL. The service token can be used in any regions.
    • Required: yes.
    • Type: string.
  • Parameters
    • When you create, update, or delete stacks, all fields in the resource properties are sent to the custom resource provider in the ResourceProperties field of the request. The custom resource provider defines both the names and valid content of these fields.
    • Required: no.
    • Type: map.
  • Timeout
    • The timeout period for ROS to wait for the callback notification from the custom resource provider. Valid values: 1 to 43200. Unit: seconds.
    • Required: no.
    • Type: number.
    • Default value: 60.

Request fields for the custom resource provider

These fields are sent in JSON requests from ROS to the custom resource provider.

  • RequestType
    • The request type is set by the ROS stack operation (CreateStack, UpdateStack, or DeleteStack) that was initiated by the template developer for the stack that contains the custom resource.
    • Valid values: Create, Update, and Delete. For more information, see Custom resource request types.
    • Required: yes.
    • Type: string.
  • ResponseURL
    • The presigned Internet URL. The URL receives responses from the custom resource provider to ROS.
    • Required: yes.
    • Type: string.
  • IntranetResponseURL
    • The presigned internal URL that can be used in ECS. The URL receives responses from the custom resource provider to ROS.
    • Required: yes.
    • Type: string.
  • StackId
    • The ID that identifies the stack that contains custom resource.
    • Required: yes.
    • Type: string.
  • StackName
    • The name of the stack that contains the custom resource.
    • Required: yes.
    • Type: string.
  • ResourceOwnerId
    • The ID of the Alibaba Cloud account to which the stack with the custom resource belongs.
    • Required: yes.
    • Type: string.
  • CallerId
    • The ID of the Alibaba Cloud account or RAM user that performs the stack operation.
    • Required: yes.
    • Type: string.
  • RegionId
    • The region ID of the stack that contains the custom resource.
    • Required: yes.
    • Type: string.
  • RequestId
    • The unique ID of the request.
    • You can use RequestId in combination with StackId to form a value that uniquely identifies a request on a particular custom resource.
    • Required: yes.
    • Type: string.
  • ResourceType
    • The resource type that the template developer selects for the custom resource in the template. Custom resource type names can be up to 68 characters in length and can contain letters, digits, underscores (_), at signs (@), and hyphens (-).
    • Required: yes.
    • Type: string.
  • LogicalResourceId
    • The name (logical ID) selected by the template developer for the custom resource in the ROS template. This field facilitates communication between the custom resource provider and the template developer.
    • Required: yes.
    • Type: string.
  • PhysicalResourceId
    • The required physical ID defined by the custom resource provider. The ID is unique to the provider.
    • Required: This field is always sent with Update and Delete requests, and never sent with Create requests.
    • Type: string.
  • ResourceProperties
    • This field contains the content of the Properties object sent by the template developer. The content is defined by the custom resource provider.
    • Required: yes.
    • Type: JSON object.
  • OldResourceProperties
    • Used only for Update requests. This field contains the resource properties that were declared previous to the update request.
    • Required: This field is always sent with Update requests, and never sent with Create and Delete requests.
    • Type: JSON object.