Documentation ¶
Index ¶
- func List(client *golangsdk.ServiceClient, opts ListOptsBuilder) pagination.Pager
- type BaseInstance
- type CreateOpts
- type CreateOptsBuilder
- type CreateResp
- type CreateResult
- type DeleteResult
- type DisableEgressResult
- type DisableIngressResult
- type Egress
- type EgressAccessOpts
- type EgressAccessOptsBuilder
- type EgressResult
- type EnableEgressResult
- type EnableIngressResult
- type GetResult
- type Ingress
- type IngressAccessOpts
- type IngressAccessOptsBuilder
- type Instance
- type InstancePage
- type ListOpts
- type ListOptsBuilder
- type UdpateEgressResult
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *golangsdk.ServiceClient, opts ListOptsBuilder) pagination.Pager
List is a method to obtain an array of one or more APIG dedicated instance according to the query parameters.
Types ¶
type BaseInstance ¶
type BaseInstance struct { // Instance ID. Id string `json:"id"` // Project ID ProjectId string `json:"project_id"` // Instance name. Name string `json:"instance_name"` // Instance status. The value are as following: // Creating, CreateSuccess, CreateFail, Initing, Registering, Running, InitingFailed, RegisterFailed, Installing // InstallFailed, Updating, UpdateFailed, Rollbacking, RollbackSuccess, RollbackFailed, Deleting, DeleteFailed // Unregistering, UnRegisterFailed, CreateTimeout, InitTimeout, RegisterTimeout, InstallTimeout, UpdateTimeout // RollbackTimeout, DeleteTimeout, UnregisterTimeout, Starting, Freezing, Frozen, Restarting, RestartFail // Unhealthy, RestartTimeout // Ditto: Issue of status 'Deleting'. --2021/06/15 Status string `json:"status"` // Instance status ID. // 1:Creating, 2:CreateSuccess, 3:CreateFail, 4:Initing, 5:Registering, 6:Running, 7:InitingFailed // 8:RegisterFailed, 10:Installing, 11:InstallFailed, 12:Updating, 13:UpdateFailed, 20:Rollbacking // 21:RollbackSuccess, 22:RollbackFailed, 23:Deleting, 24:DeleteFailed, 25:Unregistering, 26:UnRegisterFailed // 27:CreateTimeout, 28:InitTimeout, 29:RegisterTimeout, 30:InstallTimeout, 31:UpdateTimeout // 32:RollbackTimeout, 33:DeleteTimeout, 34:UnregisterTimeout, 35:Starting, 36:Freezing, 37:Frozen, 38:Restarting // 39:RestartFail, 40:Unhealthy, 41:RestartTimeout // Ditto: Issue of status id 23 (Deleting). --2021/06/15 StatusId int `json:"instance_status"` // Instance type. Type string `json:"type"` // Instance edition. Edition string `json:"spec"` // Time when the APIG dedicated instance is created, in Unix timestamp format. CreateTimestamp int64 `json:"create_time"` // Enterprise project ID. EnterpriseProjectId string `json:"enterprise_project_id"` // EIP bound to the APIG dedicated instance. Ipv4Address string `json:"eip_address"` // Billing mode of the APIG dedicated instance. // 0:Pay per use // 1:Pay per use ChargeMode int `json:"charging_mode"` // Yearly/Monthly subscription order ID. CbcMetadata string `json:"cbc_metadata"` }
func ExtractInstances ¶
func ExtractInstances(r pagination.Page) ([]BaseInstance, error)
Call its Extract method to interpret it as a BaseInstance array.
type CreateOpts ¶
type CreateOpts struct { // Name of the APIG dedicated instance. The name can contains of 3 to 64 characters. Name string `json:"instance_name" required:"true"` // Edition of the APIG dedicated instance. Currently, the editions are support: // (IPv4): BASIC, PROFESSIONAL, ENTERPRISE, PLATINUM // (IPv6): BASIC_IPV6, PROFESSIONAL_IPV6, ENTERPRISE_IPV6, PLATINUM_IPV6 Edition string `json:"spec_id" required:"true"` // VPC ID. VpcId string `json:"vpc_id" required:"true"` // Subnet network ID. SubnetId string `json:"subnet_id" required:"true"` // ID of the security group to which the APIG dedicated instance belongs to. SecurityGroupId string `json:"security_group_id" required:"true"` // ID of the APIG dedicated instance, which will be automatically generated if you do not specify this parameter. Id string `json:"instance_id,omitempty"` // Description about the APIG dedicated instance. Description string `json:"description,omitempty"` // Start time of the maintenance time window in the format "xx:00:00". // The value of xx can be 02, 06, 10, 14, 18, or 22. MaintainBegin string `json:"maintain_begin,omitempty"` // End time of the maintenance time window in the format "xx:00:00". // There is a 4-hour difference between the start time and end time. MaintainEnd string `json:"maintain_end,omitempty"` // EIP ID. EipId string `json:"eip_id,omitempty"` // Outbound access bandwidth. This parameter is required if public outbound access is enabled for the APIG // dedicated instance. // Zero means turn off the egress access. BandwidthSize int `json:"bandwidth_size"` // Enterprise project ID. This parameter is required if you are using an enterprise account. EnterpriseProjectId string `json:"enterprise_project_id,omitempty"` // AZs. AvailableZoneIds []string `json:"available_zone_ids,omitempty"` // Whether public access with an IPv6 address is supported. Ipv6Enable bool `json:"ipv6_enable,omitempty"` }
CreateOpts allows to create an APIG dedicated instance using given parameters.
func (CreateOpts) ToInstanceCreateMap ¶
func (opts CreateOpts) ToInstanceCreateMap() (map[string]interface{}, error)
type CreateOptsBuilder ¶
type CreateResp ¶
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
GetResult represents the result of a create operation.
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create is a method by which to create function that create a APIG dedicated instance.
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*CreateResp, error)
Call its Extract method to interpret it as a Instance Id.
type DeleteResult ¶
DeleteResult represents the result of a Delete operation.
func Delete ¶
func Delete(client *golangsdk.ServiceClient, id string) (r DeleteResult)
Delete is a method to delete an existing APIG dedicated instance
type DisableEgressResult ¶
DisableEgressResult represents the result of a DisableEgressAccess operation.
func DisableEgressAccess ¶
func DisableEgressAccess(client *golangsdk.ServiceClient, id string) (r DisableEgressResult)
DisableEgressAccess is a method by which to disable the egress access of an existing APIG dedicated instance.
type DisableIngressResult ¶
DisableIngressResult represents the result of a DisableIngressAccess operation.
func DisableIngressAccess ¶
func DisableIngressAccess(client *golangsdk.ServiceClient, id string) (r DisableIngressResult)
DisableIngressAccess is a method to unbind the eip associated with an existing APIG dedicated instance.
type Egress ¶
type Egress struct { Id string `json:"id"` CloudEipId string `json:"cloudEipId"` CloudEipAddress string `json:"cloudEipAddress"` InstanceId string `json:"instanceId"` CloudBandwidthId string `json:"cloudBandwidthId"` BandwidthName string `json:"bandwidthName"` BandwidthSize int `json:"bandwidthSize"` }
type EgressAccessOpts ¶
type EgressAccessOpts struct { // Outbound access bandwidth, in Mbit/s. BandwidthSize string `json:"bandwidth_size,omitempty"` }
EgressAccessOpts allows the bandwidth size of an existing APIG dedicated instance to be updated with the given parameters.
func (EgressAccessOpts) ToEgressAccessMap ¶
func (opts EgressAccessOpts) ToEgressAccessMap() (map[string]interface{}, error)
type EgressAccessOptsBuilder ¶
type EgressResult ¶
func (EgressResult) Extract ¶
func (r EgressResult) Extract() (*Egress, error)
Call its Extract method to interpret it as a Egress.
type EnableEgressResult ¶
type EnableEgressResult struct {
EgressResult
}
EnableEgressResult represents the result of a EnableEgressAccess operation.
func EnableEgressAccess ¶
func EnableEgressAccess(client *golangsdk.ServiceClient, id string, opts EgressAccessOptsBuilder) (r EnableEgressResult)
EnableEgressAccess is a method by which to enable the egress access of an existing APIG dedicated instance.
type EnableIngressResult ¶
type EnableIngressResult struct {
// contains filtered or unexported fields
}
EnableIngressResult represents the result of a EnableIngressAccess operation.
func EnableIngressAccess ¶
func EnableIngressAccess(client *golangsdk.ServiceClient, id string, opts IngressAccessOptsBuilder) (r EnableIngressResult)
UpdateIngressAccess is a method to bind and update the eip associated with an existing APIG dedicated instance.
func (EnableIngressResult) Extract ¶
func (r EnableIngressResult) Extract() (*Ingress, error)
Call its Extract method to interpret it as a Ingress.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult represents the result of a Get operation.
type IngressAccessOpts ¶
type IngressAccessOpts struct { // EIP ID EipId string `json:"eip_id,omitempty"` }
IngressAccessOpts allows binding and updating the eip associated with an existing APIG dedicated instance with the given parameters.
func (IngressAccessOpts) ToEnableIngressAccessMap ¶
func (opts IngressAccessOpts) ToEnableIngressAccessMap() (map[string]interface{}, error)
type Instance ¶
type Instance struct { // Instance ID. Id string `json:"id"` // Project ID. ProjectId string `json:"project_id"` // Instance name. Name string `json:"instance_name"` // Instance status. The value are as following: // Creating, CreateSuccess, CreateFail, Initing, Registering, Running, InitingFailed, RegisterFailed, Installing // InstallFailed, Updating, UpdateFailed, Rollbacking, RollbackSuccess, RollbackFailed, Deleting, DeleteFailed // Unregistering, UnRegisterFailed, CreateTimeout, InitTimeout, RegisterTimeout, InstallTimeout, UpdateTimeout // RollbackTimeout, DeleteTimeout, UnregisterTimeout, Starting, Freezing, Frozen, Restarting, RestartFail // Unhealthy, RestartTimeout // The status 'Deleting' is not supported, it's a BUG. --2021/06/15 Status string `json:"status"` // Instance status ID. // 1:Creating, 2:CreateSuccess, 3:CreateFail, 4:Initing, 5:Registering, 6:Running, 7:InitingFailed // 8:RegisterFailed, 10:Installing, 11:InstallFailed, 12:Updating, 13:UpdateFailed, 20:Rollbacking // 21:RollbackSuccess, 22:RollbackFailed, 23:Deleting, 24:DeleteFailed, 25:Unregistering, 26:UnRegisterFailed // 27:CreateTimeout, 28:InitTimeout, 29:RegisterTimeout, 30:InstallTimeout, 31:UpdateTimeout // 32:RollbackTimeout, 33:DeleteTimeout, 34:UnregisterTimeout, 35:Starting, 36:Freezing, 37:Frozen, 38:Restarting // 39:RestartFail, 40:Unhealthy, 41:RestartTimeout // Ditto: Issue of status id 23 (Deleting). --2021/06/15 StatusId int `json:"instance_status"` // Instance type. Type string `json:"type"` // Instance edition. Edition string `json:"spec"` // Time when the APIG dedicated instance is created, in Unix timestamp format. CreateTimestamp int64 `json:"create_time"` // Enterprise project ID. EnterpriseProjectId string `json:"enterprise_project_id"` // Billing mode of the APIG dedicated instance. // 0:Pay per use // 1:Pay per use ChargeMode int `json:"charging_mode"` // Yearly/Monthly subscription order ID. CbcMetadata string `json:"cbc_metadata"` // Description about the APIG dedicated instance. Description string `json:"description"` // VPC ID. VpcId string `json:"vpc_id"` // Subnet network ID. SubnetId string `json:"subnet_id"` // ID of the security group to which the APIG dedicated instance belongs to. SecurityGroupId string `json:"security_group_id"` // Start time of the maintenance time window in the format "xx:00:00". MaintainBegin string `json:"maintain_begin"` // End time of the maintenance time window in the format "xx:00:00". MaintainEnd string `json:"maintain_end"` // VPC ingress private address. Ipv4VpcIngressAddress string `json:"ingress_ip"` // VPC ingress private address (IPv6). Ipv6VpcIngressAddress string `json:"ingress_ip_v6"` // ID of the account to which the APIG dedicated instance belongs. UserId string `json:"user_id"` // EIP bound to the APIG dedicated instance. Ipv4IngressEipAddress string `json:"eip_address"` // EIP (IPv6). Ipv6IngressEipAddress string `json:"eip_ipv6_address"` // Public egress address (IPv6). Ipv6EgressCidr string `json:"nat_eip_ipv6_cidr"` // IP address for public outbound access. Ipv4EgressAddress string `json:"nat_eip_address"` // Outbound access bandwidth. BandwidthSize int `json:"bandwidth_size"` // AZs. AvailableZoneIds string `json:"available_zone_ids"` // Instance version. Version string `json:"instance_version"` // Supported features. SupportedFeatures []string `json:"supported_features"` }
type InstancePage ¶
type InstancePage struct {
pagination.SinglePageBase
}
InstancePage represents the result of a List operation.
type ListOpts ¶
type ListOpts struct { // ID of the APIG dedicated instance. Id string `q:"instance_id"` // Name of the APIG dedicated instance. Name string `q:"instance_name"` // Instance status. Status string `q:"status"` // Offset from which the query starts. // If the offset is less than 0, the value is automatically converted to 0. Default to 0. Offset int `q:"offset"` // Number of items displayed on each page. Limit int `q:"limit"` }
ListOpts allows to filter list data using given parameters.
func (ListOpts) ToInstanceListQuery ¶
type ListOptsBuilder ¶
type UdpateEgressResult ¶
type UdpateEgressResult struct {
EgressResult
}
UdpateEgressResult represents the result of a UpdateEgressBandwidth operation.
func UpdateEgressBandwidth ¶
func UpdateEgressBandwidth(client *golangsdk.ServiceClient, id string, opts EgressAccessOptsBuilder) (r UdpateEgressResult)
UpdateEgressBandwidth is a method by which to update the egress bandwidth size of an existing APIG dedicated instance.
type UpdateOpts ¶
type UpdateOpts struct { // Description about the APIG dedicated instance. Description string `json:"description,omitempty"` // Start time of the maintenance time window in the format "xx:00:00". // The value of xx can be 02, 06, 10, 14, 18, or 22. MaintainBegin string `json:"maintain_begin,omitempty"` // End time of the maintenance time window in the format "xx:00:00". // There is a 4-hour difference between the start time and end time. MaintainEnd string `json:"maintain_end,omitempty"` // Description about the APIG dedicated instance. Name string `json:"instance_name,omitempty"` // ID of the security group to which the APIG dedicated instance belongs to. SecurityGroupId string `json:"security_group_id,omitempty"` }
UpdateOpts allows to update an existing APIG dedicated instance using given parameters.
func (UpdateOpts) ToInstanceUpdateMap ¶
func (opts UpdateOpts) ToInstanceUpdateMap() (map[string]interface{}, error)
type UpdateOptsBuilder ¶
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
UpdateResult represents the result of a Update operation.
func Update ¶
func Update(client *golangsdk.ServiceClient, id string, opts UpdateOptsBuilder) (r UpdateResult)
Update is a method by which to update an existing APIG dedicated instance.