Obtaining Execution Plan Metadata
Function
GetExecutionPlanMetadata
This API obtains the metadata of a specified execution plan, including the ID and name of the stack and the ID, name, description, creation time, execution time, and status of the execution plan.
You can obtain details by referring to GetExecutionPlanMetadataResponseBody.
To obtain the details of an execution plan, call GetExecutionPlan.
URI
GET /v1/{project_id}/stacks/{stack_name}/execution-plans/{execution_plan_name}/metadata
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
A project ID is obtained by calling an API or from the console. |
stack_name |
Yes |
String |
A stack name is unique within its domain (domain_id), region, and project (project_id). It is case-sensitive and starts with a letter. Only letters, digits, underscores (_), and hyphens (-) are allowed. |
execution_plan_name |
Yes |
String |
An execution plan name is unique within its domain (domain_id), region, project (project_id), and stack (stack_id). It is case-sensitive and starts with a letter. Only letters, digits, underscores (_), and hyphens (-) are allowed. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
stack_id |
No |
String |
Unique stack ID. It is a UUID generated by RFS when a stack is created. Stack names are unique at one specific time, so you can create a stack named HelloWorld and another stack with the same name after deleting the first one. For parallel development, team members may want to ensure that they are operating the stack they created, not one with the same name created by other members after deleting the previous one. To avoid this mismatch, check the ID, since RFS ensures each stack has a unique ID that does not change with updates. If the stack_id value differs from the current stack ID, 400 is returned. |
execution_plan_id |
No |
String |
Unique execution plan ID. A UUID is generated by RFS when an execution plan is created. Execution plan names are unique at one specific time, so you can create an execution plan named HelloWorld and another execution plan with the same name after deleting the first one. For parallel development, team members may want to ensure that they are operating the execution plan they created, not one with the same name created by other members after deleting the previous one. To avoid this mismatch, check the ID, since RFS ensures each execution plan has a unique ID that does not change with updates. If the execution_plan_id value differs from the current execution plan ID, 400 is returned. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Client-Request-Id |
Yes |
String |
A unique request ID is specified by a user to locate a request. UUID is recommended. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
stack_id |
String |
Unique stack ID. It is a UUID generated by RFS when a stack is created. Stack names are unique at one specific time, so you can create a stack named HelloWorld and another stack with the same name after deleting the first one. For parallel development, team members may want to ensure that they are operating the stack they created, not one with the same name created by other members after deleting the previous one. To avoid this mismatch, check the ID, since RFS ensures each stack has a unique ID that does not change with updates. If the stack_id value differs from the current stack ID, 400 is returned. |
stack_name |
String |
A stack name is unique within its domain (domain_id), region, and project (project_id). It is case-sensitive and starts with a letter. Only letters, digits, underscores (_), and hyphens (-) are allowed. |
execution_plan_id |
String |
Unique execution plan ID. A UUID is generated by RFS when an execution plan is created. Execution plan names are unique at one specific time, so you can create an execution plan named HelloWorld and another execution plan with the same name after deleting the first one. For parallel development, team members may want to ensure that they are operating the execution plan they created, not one with the same name created by other members after deleting the previous one. To avoid this mismatch, check the ID, since RFS ensures each execution plan has a unique ID that does not change with updates. If the execution_plan_id value differs from the current execution plan ID, 400 is returned. Note:
|
execution_plan_name |
String |
An execution plan name is unique within its domain (domain_id), region, project (project_id), and stack (stack_id). It is case-sensitive and starts with a letter. Only letters, digits, underscores (_), and hyphens (-) are allowed. |
description |
String |
Execution plan description. It is used to identify your own execution plans. |
vars_structure |
Array of VarsStructure objects |
HCL variable structure. Transferring variables is supported by the HCL template. The same template can use different variables for different purposes.
|
vars_uri_content |
String |
File content corresponding to vars_uri. |
vars_body |
String |
Content of the HCL variable file. Transferring variables is supported by the HCL template. The same template can use different variables for different purposes.
|
status |
String |
Status of an execution plan. * CREATION_IN_PROGRESS indicates that creation is in progress. * CREATION_FAILED indicates the creation failed. You can obtain the error information summary from status_message. * AVAILABLE indicates the creation completed. You can call ApplyExecutionPlan to apply the plan. * APPLY_IN_PROGRESS indicates the execution is in progress. You can call GetStackMetadata to query the stack status, or call ListStackEvents to obtain the stack events generated during the execution. * APPLIED indicates the plan has been applied. |
status_message |
String |
If an execution plan is in a CREATION_FAILED status, a brief error information summary is displayed for debugging. |
create_time |
String |
Creation time of an execution plan. The format complies with RFC 3339 (YYYY-MM-DDTHH:MM:SSZ), for example, 1970-01-01T00:00:00Z. |
apply_time |
String |
Time of applying an execution plan. The format complies with RFC 3339 (YYYY-MM-DDTHH:MM:SSZ), for example, 1970-01-01T00:00:00Z. |
summary |
ExecutionPlanSummary object |
Summary of the execution plan result may include:
|
Parameter |
Type |
Description |
---|---|---|
var_key |
String |
Variable name. |
var_value |
String |
Variable value. Variables must be in the form of a string. If a parameter is a number, it must also be in the form of a string, for example, '10'. For different types or complex structures, you can use vars_uri or vars_body. |
encryption |
EncryptionStructure object |
If a transferred var_value has been encrypted, you can declare this variable to require RFS to decrypt the var_value before using it. Currently, only KMS encryption and decryption are supported. |
Parameter |
Type |
Description |
---|---|---|
kms |
KmsStructure object |
If an assigned var_value is encrypted by KMS, related encryption information can be transferred. RFS will help you decrypt the var_value by KMS. For more details about KMS encryption and its sample code, refer to KMS Application Scenarios. Note:
|
Parameter |
Type |
Description |
---|---|---|
id |
String |
KMS key ID is used by RFS during decryption. Generally, the key ID is that used for encryption. |
cipher_text |
String |
Ciphertext of data encryption key. |
Parameter |
Type |
Description |
---|---|---|
resource_add |
Integer |
Number of new resources. |
resource_update |
Integer |
Number of updated resources. |
resource_delete |
Integer |
Number of deleted resources. |
resource_import |
Integer |
Number of imported resources. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Response code. |
error_msg |
String |
Response message. |
encoded_authorization_message |
String |
The message contains information about unauthorized requests. |
details |
Array of Detail objects |
Detailed error messages returned by service when permission is denied. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Response code. |
error_msg |
String |
Response message. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Response code. |
error_msg |
String |
Response message. |
encoded_authorization_message |
String |
The message contains information about unauthorized requests. |
details |
Array of Detail objects |
Detailed error messages returned by service when permission is denied. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Response code. |
error_msg |
String |
Response message. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Response code. |
error_msg |
String |
Response message. |
encoded_authorization_message |
String |
The message contains information about unauthorized requests. |
details |
Array of Detail objects |
Detailed error messages returned by service when permission is denied. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Response code. |
error_msg |
String |
Response message. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Response code. |
error_msg |
String |
Response message. |
encoded_authorization_message |
String |
The message contains information about unauthorized requests. |
details |
Array of Detail objects |
Detailed error messages returned by service when permission is denied. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Response code. |
error_msg |
String |
Response message. |
Status code: 429
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Response code. |
error_msg |
String |
Response message. |
encoded_authorization_message |
String |
The message contains information about unauthorized requests. |
details |
Array of Detail objects |
Detailed error messages returned by service when permission is denied. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Response code. |
error_msg |
String |
Response message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Response code. |
error_msg |
String |
Response message. |
encoded_authorization_message |
String |
The message contains information about unauthorized requests. |
details |
Array of Detail objects |
Detailed error messages returned by service when permission is denied. |
Example Requests
-
Obtain the metadata of a specified execution plan.
GET https://{endpoint}/v1/ba2b9930c977f71edaeaa3a5e96a8ff1/stacks/my_hello_world_stack/execution-plans/my_first_execution_plan/metadata
-
Obtain the metadata of a specified execution plan, with a stack ID and an execution plan ID provided to check whether they match the current stack and execution plan.
GET https://{endpoint}/v1/ba2b9930c977f71edaeaa3a5e96a8ff1/stacks/my_hello_world_stack/execution-plans/my_first_execution_plan/metadata?stack_id=ea6a4f0e-ee8a-494e-b12a-8be4a1e65af2&execution_plan_id=fb5e781e-a27d-46e2-9954-242753857a9f
Example Responses
Status code: 200
Execution plan metadata obtained.
{ "stack_id" : "f689e9fd-97e7-4185-bd8a-7d5f708d45d7", "stack_name" : "my_hello_world_stack", "execution_plan_id" : "ebc0979a-c617-4382-9147-57fc83a634aa", "execution_plan_name" : "my_first_execution_plan", "status" : "APPLIED", "apply_time" : "2023-05-17T11:56:40Z", "create_time" : "2023-05-16T03:37:24Z", "summary" : { "resource_add" : 2 } }
Status Codes
Status Code |
Description |
---|---|
200 |
Execution plan metadata obtained. |
400 |
Invalid request. |
401 |
Authentication failed. |
403 |
The user does not have the permission to call this API. |
404 |
|
429 |
Too frequent requests. |
500 |
Internal server error. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot