github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/rf/v1/stacks/results.go (about)

     1  package stacks
     2  
     3  type (
     4  	StackStatus string
     5  	EventType   string
     6  )
     7  
     8  var (
     9  	StackStatusCreationComplete     StackStatus = "CREATION_COMPLETE"
    10  	StackStatusDeploymentInProgress StackStatus = "DEPLOYMENT_IN_PROGRESS"
    11  	StackStatusDeploymentFailed     StackStatus = "DEPLOYMENT_FAILED"
    12  	StackStatusDeploymentComplete   StackStatus = "DEPLOYMENT_COMPLETE"
    13  	StackStatusRollbackInProgress   StackStatus = "ROLLBACK_IN_PROGRESS"
    14  	StackStatusRollbackFailed       StackStatus = "ROLLBACK_FAILED"
    15  	StackStatusRollbackComplete     StackStatus = "ROLLBACK_COMPLETE"
    16  	StackStatusDeletionInProgress   StackStatus = "DELETION_IN_PROGRESS"
    17  	StackStatusDeletionFailed       StackStatus = "DELETION_FAILED"
    18  
    19  	EventTypeLog                EventType = "LOG"
    20  	EventTypeError              EventType = "ERROR"
    21  	EventTypeDrift              EventType = "DRIFT"
    22  	EventTypeSummary            EventType = "SUMMARY"
    23  	EventTypeCreationInProgress EventType = "CREATION_IN_PROGRESS"
    24  	EventTypeCreationFailed     EventType = "CREATION_FAILED"
    25  	EventTypeCreationComplete   EventType = "CREATION_COMPLETE"
    26  	EventTypeDeletionInProgress EventType = "DELETION_IN_PROGRESS"
    27  	EventTypeDeletionFailed     EventType = "DELETION_FAILED"
    28  	EventTypeDeletionComplete   EventType = "DELETION_COMPLETE"
    29  	EventTypeDeletionSkipped    EventType = "DELETION_SKIPPED"
    30  	EventTypeUpdateInProgress   EventType = "UPDATE_IN_PROGRESS"
    31  	EventTypeUpdateFailed       EventType = "UPDATE_FAILED"
    32  	EventTypeUpdateComplete     EventType = "UPDATE_COMPLETE"
    33  )
    34  
    35  // CreateResp is the structure that represents the API response of the 'Create' method, which contains stack ID and the
    36  // deployment ID.
    37  type CreateResp struct {
    38  	// The unique ID of the resource stack.
    39  	StackId string `json:"stack_id"`
    40  	// The unique ID of the resource deployment.
    41  	DeploymentId string `json:"deployment_id"`
    42  }
    43  
    44  // listResp is the structure that represents the API response of the 'ListAll' method, which contains the list of stack
    45  // details.
    46  type listResp struct {
    47  	// The list of stack details.
    48  	Stacks []Stack `json:"stacks"`
    49  }
    50  
    51  // Stack is the structure that represents the details of the resource stack.
    52  type Stack struct {
    53  	// The name of the resource stack.
    54  	Name string `json:"stack_name"`
    55  	// The description of the resource stack.
    56  	Description string `json:"description"`
    57  	// The unique ID of the resource stack.
    58  	ID string `json:"stack_id"`
    59  	// The current status of the stack.
    60  	// The valid values are as follows:
    61  	// + CREATION_COMPLETE
    62  	// + DEPLOYMENT_IN_PROGRESS
    63  	// + DEPLOYMENT_FAILED
    64  	// + DEPLOYMENT_COMPLETE
    65  	// + ROLLBACK_IN_PROGRESS
    66  	// + ROLLBACK_FAILED
    67  	// + ROLLBACK_COMPLETE
    68  	// + DELETION_IN_PROGRESS
    69  	// + DELETION_FAILED
    70  	Status string `json:"status"`
    71  	// The creation time.
    72  	CreatedAt string `json:"create_time"`
    73  	// The latest update time.
    74  	UpdatedAt string `json:"update_time"`
    75  	// The debug message for current deployment operation.
    76  	StatusMessage string `json:"status_message"`
    77  }
    78  
    79  // deployResp is the structure that represents the API response of the 'Deploy' method, which contains the deployment
    80  // ID.
    81  type deployResp struct {
    82  	// The unique ID of the resource deployment.
    83  	DeploymentId string `json:"deployment_id"`
    84  }
    85  
    86  // listEventsResp is the structure that represents the API response of the 'ListAllEvents' method, which contains the
    87  // list of the execution events.
    88  type listEventsResp struct {
    89  	// The list of the execution events.
    90  	StackEvents []StackEvent `json:"stack_events"`
    91  }
    92  
    93  // StackEvent is the structure that represents the details of the current execution event.
    94  type StackEvent struct {
    95  	// The id name of the resource, that is, the name of the value used by the corresponding resource as the unique id.
    96  	// When the resource is not created, resource_id_key is not returned.
    97  	ResourceIdKey string `json:"resource_id_key"`
    98  	// The id value of the resource, that is, the value used by the corresponding resource as the unique id.
    99  	// When the resource is not created, resource_id_value is not returned.
   100  	ResourceIdValue string `json:"resource_id_value"`
   101  	// The resource name.
   102  	ResourceName string `json:"resource_name"`
   103  	// The resource type.
   104  	ResourceType string `json:"resource_type"`
   105  	// The time when the event occurred, the format is: yyyy-mm-ddTHH:MM:SSZ.
   106  	Time string `json:"time"`
   107  	// The event type.
   108  	// The valid values are as follows:
   109  	// + LOG
   110  	// + ERROR
   111  	// + DRIFT
   112  	// + SUMMARY
   113  	// + CREATION_IN_PROGRESS
   114  	// + CREATION_FAILED
   115  	// + CREATION_COMPLETE
   116  	// + DELETION_IN_PROGRESS
   117  	// + DELETION_FAILED
   118  	// + DELETION_COMPLETE
   119  	// + DELETION_SKIPPED
   120  	// + UPDATE_IN_PROGRESS
   121  	// + UPDATE_FAILED
   122  	// + UPDATE_COMPLETE
   123  	EventType string `json:"event_type"`
   124  	// The message of the current event.
   125  	EventMessage string `json:"event_message"`
   126  	// The time spent changing the resource, in seconds.
   127  	EventSeconds string `json:"event_seconds"`
   128  }