Documentation ¶
Index ¶
- Variables
- func Delete(client *golangsdk.ServiceClient, stackName string, opts DeleteOpts) error
- func Deploy(client *golangsdk.ServiceClient, stackName string, opts DeployOpts) (string, error)
- type Agency
- type CreateOpts
- type CreateResp
- type DeleteOpts
- type DeployOpts
- type Encryption
- type EventType
- type KmsStructure
- type ListEventsOpts
- type Stack
- type StackEvent
- type StackStatus
- type VarsStructure
Constants ¶
This section is empty.
Variables ¶
var ( StackStatusCreationComplete StackStatus = "CREATION_COMPLETE" StackStatusDeploymentInProgress StackStatus = "DEPLOYMENT_IN_PROGRESS" StackStatusDeploymentFailed StackStatus = "DEPLOYMENT_FAILED" StackStatusDeploymentComplete StackStatus = "DEPLOYMENT_COMPLETE" StackStatusRollbackInProgress StackStatus = "ROLLBACK_IN_PROGRESS" StackStatusRollbackFailed StackStatus = "ROLLBACK_FAILED" StackStatusRollbackComplete StackStatus = "ROLLBACK_COMPLETE" StackStatusDeletionInProgress StackStatus = "DELETION_IN_PROGRESS" StackStatusDeletionFailed StackStatus = "DELETION_FAILED" EventTypeLog EventType = "LOG" EventTypeError EventType = "ERROR" EventTypeDrift EventType = "DRIFT" EventTypeSummary EventType = "SUMMARY" EventTypeCreationInProgress EventType = "CREATION_IN_PROGRESS" EventTypeCreationFailed EventType = "CREATION_FAILED" EventTypeCreationComplete EventType = "CREATION_COMPLETE" EventTypeDeletionInProgress EventType = "DELETION_IN_PROGRESS" EventTypeDeletionFailed EventType = "DELETION_FAILED" EventTypeDeletionComplete EventType = "DELETION_COMPLETE" EventTypeDeletionSkipped EventType = "DELETION_SKIPPED" EventTypeUpdateInProgress EventType = "UPDATE_IN_PROGRESS" EventTypeUpdateFailed EventType = "UPDATE_FAILED" EventTypeUpdateComplete EventType = "UPDATE_COMPLETE" )
Functions ¶
func Delete ¶
func Delete(client *golangsdk.ServiceClient, stackName string, opts DeleteOpts) error
Delete is a method to remove a stack using stack name and delete option.
Types ¶
type Agency ¶
type Agency struct { // The name of the provider corresponding to the IAM agency. // If the provider_name given by the user contains duplicate values, return 400. ProviderName string `json:"provider_name" required:"true"` // The name of IAM agency authorized to IAC account. // RF will use the agency authority to access and create resources corresponding to the provider. AgencyName string `json:"agency_name" required:"true"` }
Agency is an object that represents the IAC agency configuration.
type CreateOpts ¶
type CreateOpts struct { // The name of the stack. // The value can contain 1 to 64 characters, only letters, digits and hyphens (-) are allowed. // The name must start with a letter and end with a letter or digit. Name string `json:"stack_name" required:"true"` // The agencies authorized to IAC. Agencies []Agency `json:"agencies,omitempty"` // The description of the stack. // The value can contain 0 to 1024 characters. Description string `json:"description,omitempty"` // The flag of the deletion protection. // The resource stack deletion protection is not enabled by default (the resource stack is not allowed to be deleted // after the deletion protection is enabled). EnableDeletionProtection *bool `json:"enable_deletion_protection,omitempty"` // The automatic rollback flag. // The automatic rollback of the resource stack is not enabled by default (after automatic rollback is enabled, if // the deployment fails, it will automatically roll back and return to the previous stable state). EnableAutoRollback *bool `json:"enable_auto_rollback,omitempty"` // The HCL template content for deployment resources. TemplateBody string `json:"template_body,omitempty"` // The OBS address where the HCL template ZIP is located, which describes the target status of the deployment // resources. TemplateUri string `json:"template_uri,omitempty"` // The variable content for deployment resources. VarsBody string `json:"vars_body,omitempty"` // The variable structures for deployment resources. VarsStructure []VarsStructure `json:"vars_structure,omitempty"` // The OBS address where the variable ZIP corresponding to the HCL template is located, which describes the target // status of the deployment resources. VarsUri string `json:"vars_uri,omitempty"` }
CreateOpts is the structure used to create a stack.
type CreateResp ¶
type CreateResp struct { // The unique ID of the resource stack. StackId string `json:"stack_id"` // The unique ID of the resource deployment. DeploymentId string `json:"deployment_id"` }
CreateResp is the structure that represents the API response of the 'Create' method, which contains stack ID and the deployment ID.
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*CreateResp, error)
Create is a method to create a stack using create option.
type DeleteOpts ¶
type DeleteOpts struct { // The stack ID. StackId string `json:"stack_id,omitempty"` }
DeleteOpts is the structure used to remove a stack.
type DeployOpts ¶
type DeployOpts struct { // The HCL template content for terraform resources. TemplateBody string `json:"template_body,omitempty"` // The OBS address where the HCL template ZIP is located, which describes the target status of the terraform // resources. TemplateUri string `json:"template_uri,omitempty"` // The variable content for terraform resources. VarsBody string `json:"vars_body,omitempty"` // The variable structures for terraform resources. VarsStructure []VarsStructure `json:"vars_structure,omitempty"` // The OBS address where the variable ZIP corresponding to the HCL template is located, which describes the target // status of the deployment resources. VarsUri string `json:"vars_uri,omitempty"` // The unique ID of the resource stack. StackId string `json:"stack_id,omitempty"` }
DeployOpts is the structure used to deploy a terraform script.
type Encryption ¶
type Encryption struct { // Encryption configuration for variables. Kms KmsStructure `json:"kms" required:"true"` }
Encryption is an object that represents the KMS usage for variables.
type KmsStructure ¶
type KmsStructure struct { // The ID of the KMD secret key. ID string `json:"id" required:"true"` // The ciphertext corresponding to the data encryption key. CipherText string `json:"cipher_text" required:"true"` }
KmsStructure is an object that represents the encrypt structure.
type ListEventsOpts ¶
type ListEventsOpts struct { // The unique ID of the resource stack. StackId string `q:"stack_id"` // The unique ID of the resource deployment. DeploymentId string `q:"deployment_id"` }
ListEventsOpts allows to filter list data using given parameters.
type Stack ¶
type Stack struct { // The name of the resource stack. Name string `json:"stack_name"` // The description of the resource stack. Description string `json:"description"` // The unique ID of the resource stack. ID string `json:"stack_id"` // The current status of the stack. // The valid values are as follows: // + CREATION_COMPLETE // + DEPLOYMENT_IN_PROGRESS // + DEPLOYMENT_FAILED // + DEPLOYMENT_COMPLETE // + ROLLBACK_IN_PROGRESS // + ROLLBACK_FAILED // + ROLLBACK_COMPLETE // + DELETION_IN_PROGRESS // + DELETION_FAILED Status string `json:"status"` // The creation time. CreatedAt string `json:"create_time"` // The latest update time. UpdatedAt string `json:"update_time"` // The debug message for current deployment operation. StatusMessage string `json:"status_message"` }
Stack is the structure that represents the details of the resource stack.
type StackEvent ¶
type StackEvent struct { // The id name of the resource, that is, the name of the value used by the corresponding resource as the unique id. // When the resource is not created, resource_id_key is not returned. ResourceIdKey string `json:"resource_id_key"` // The id value of the resource, that is, the value used by the corresponding resource as the unique id. // When the resource is not created, resource_id_value is not returned. ResourceIdValue string `json:"resource_id_value"` // The resource name. ResourceName string `json:"resource_name"` // The resource type. ResourceType string `json:"resource_type"` // The time when the event occurred, the format is: yyyy-mm-ddTHH:MM:SSZ. Time string `json:"time"` // The event type. // The valid values are as follows: // + LOG // + ERROR // + DRIFT // + SUMMARY // + CREATION_IN_PROGRESS // + CREATION_FAILED // + CREATION_COMPLETE // + DELETION_IN_PROGRESS // + DELETION_FAILED // + DELETION_COMPLETE // + DELETION_SKIPPED // + UPDATE_IN_PROGRESS // + UPDATE_FAILED // + UPDATE_COMPLETE EventType string `json:"event_type"` // The message of the current event. EventMessage string `json:"event_message"` // The time spent changing the resource, in seconds. EventSeconds string `json:"event_seconds"` }
StackEvent is the structure that represents the details of the current execution event.
func ListAllEvents ¶
func ListAllEvents(client *golangsdk.ServiceClient, stackName string, opts ListEventsOpts) ([]StackEvent, error)
ListAllEvents is a method to query all events for a specified stack using given parameters.
type StackStatus ¶
type StackStatus string
type VarsStructure ¶
type VarsStructure struct { // The variable key. VarKey string `json:"var_key" required:"true"` // The variable value. VarValue string `json:"var_value" required:"true"` // The encryption configuration. Encryption Encryption `json:"encryption,omitempty"` }
VarsStructure is an object that represents the variable structure details.