huaweicloud

package
v1.24.1-0...-4a156ac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2021 License: MPL-2.0 Imports: 195 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PoolID   = "0a2228f2-7f8a-45f1-8e09-9039e1d09975"
	PoolName = "admin_external_net"
)
View Source
const DisabledState = "3"
View Source
const EnabledState = "2"
View Source
const PendingDeletionState = "4"
View Source
const WaitingForEnableState = "1"

Variables

View Source
var BandWidthChargeMode = [1]string{"traffic"}
View Source
var BandWidthShareType = [1]string{"PER"}
View Source
var ContainerFormats = [1]string{"bare"}
View Source
var DiskFormats = [2]string{"vhd", "qcow2"}
View Source
var DiskTypes = [2]string{"DATA", "SYS"}
View Source
var HealthAuditMethods = [2]string{"ELB_AUDIT", "NOVA_AUDIT"}
View Source
var HealthAuditTime = [4]int{5, 15, 60, 180}
View Source
var IpTypes = [1]string{"5_bgp"}
View Source
var PolicyActions = [3]string{"ADD", "REMOVE", "SET"}
View Source
var PolicyTypes = [3]string{"ALARM", "SCHEDULED", "RECURRENCE"}
View Source
var RecurrenceTypes = [3]string{"Daily", "Weekly", "Monthly"}
View Source
var TerminatePolices = [4]string{"OLD_CONFIG_OLD_INSTANCE", "OLD_CONFIG_NEW_INSTANCE", "OLD_INSTANCE", "NEW_INSTANCE"}
View Source
var VolumeTypes = [5]string{"SATA", "SSD", "SAS", "co-p1", "uh-l1"}

Functions

func AddValueSpecs

func AddValueSpecs(body map[string]interface{}) map[string]interface{}

AddValueSpecs expands the 'value_specs' object and removes 'value_specs' from the reqeust body.

func BuildRequest

func BuildRequest(opts interface{}, parent string) (map[string]interface{}, error)

BuildRequest takes an opts struct and builds a request body for golangsdk to execute

func BytesToString

func BytesToString(b []byte) string

func CheckDeleted

func CheckDeleted(d *schema.ResourceData, err error, msg string) error

CheckDeleted checks the error to see if it's a 404 (Not Found) and, if so, sets the resource ID to the empty string instead of throwing an error.

func ClusterStateRefreshFunc

func ClusterStateRefreshFunc(client *golangsdk.ServiceClient, clusterID string) resource.StateRefreshFunc

func DataSourceAvailabilityZones

func DataSourceAvailabilityZones() *schema.Resource

func DataSourceBandWidth

func DataSourceBandWidth() *schema.Resource

func DataSourceCCEClusterV3

func DataSourceCCEClusterV3() *schema.Resource

func DataSourceCCENodePoolV3

func DataSourceCCENodePoolV3() *schema.Resource

func DataSourceCCENodeV3

func DataSourceCCENodeV3() *schema.Resource

func DataSourceComputeInstance

func DataSourceComputeInstance() *schema.Resource

func DataSourceEcsFlavors

func DataSourceEcsFlavors() *schema.Resource

func DataSourceEnterpriseProject

func DataSourceEnterpriseProject() *schema.Resource

func DataSourceIdentityCustomRole

func DataSourceIdentityCustomRole() *schema.Resource

func DataSourceIdentityRoleV3

func DataSourceIdentityRoleV3() *schema.Resource

func DataSourceImagesImageV2

func DataSourceImagesImageV2() *schema.Resource

func DataSourceNatGatewayV2

func DataSourceNatGatewayV2() *schema.Resource

func DataSourceNetworkingPortV2

func DataSourceNetworkingPortV2() *schema.Resource

func DataSourceNetworkingSecGroupV2

func DataSourceNetworkingSecGroupV2() *schema.Resource

func DataSourceObsBucketObject

func DataSourceObsBucketObject() *schema.Resource

func DataSourceVPCEPPublicServices

func DataSourceVPCEPPublicServices() *schema.Resource

func DataSourceVPCRouteV2

func DataSourceVPCRouteV2() *schema.Resource

func DataSourceVirtualPrivateCloudVpcV1

func DataSourceVirtualPrivateCloudVpcV1() *schema.Resource

func DataSourceVpcEip

func DataSourceVpcEip() *schema.Resource

func DataSourceVpcSubnetIdsV1

func DataSourceVpcSubnetIdsV1() *schema.Resource

func DataSourceVpcSubnetV1

func DataSourceVpcSubnetV1() *schema.Resource

func DcsInstancesV1StateRefreshFunc

func DcsInstancesV1StateRefreshFunc(client *golangsdk.ServiceClient, instanceID string) resource.StateRefreshFunc

func DdsInstanceStateRefreshFunc

func DdsInstanceStateRefreshFunc(client *golangsdk.ServiceClient, instanceID string) resource.StateRefreshFunc

func DmsInstancesV1StateRefreshFunc

func DmsInstancesV1StateRefreshFunc(client *golangsdk.ServiceClient, instanceID string) resource.StateRefreshFunc

func FloatingIPV2StateRefreshFunc

func FloatingIPV2StateRefreshFunc(computeClient *golangsdk.ServiceClient, d *schema.ResourceData) resource.StateRefreshFunc

func GaussDBInstanceStateRefreshFunc

func GaussDBInstanceStateRefreshFunc(client *golangsdk.ServiceClient, instanceID string) resource.StateRefreshFunc

func GeminiDBInstanceStateRefreshFunc

func GeminiDBInstanceStateRefreshFunc(client *golangsdk.ServiceClient, instanceID string) resource.StateRefreshFunc

func GeminiDBInstanceUpdateRefreshFunc

func GeminiDBInstanceUpdateRefreshFunc(client *golangsdk.ServiceClient, instanceID, state string) resource.StateRefreshFunc

func GetEnterpriseProjectID

func GetEnterpriseProjectID(d *schema.ResourceData, config *config.Config) string

GetEnterpriseProjectID returns the enterprise_project_id that was specified in the resource. If it was not set, the provider-level value is checked. The provider-level value can either be set by the `enterprise_project_id` argument or by HW_ENTERPRISE_PROJECT_ID.

func GetRegion

func GetRegion(d *schema.ResourceData, config *config.Config) string

GetRegion returns the region that was specified in the resource. If a region was not set, the provider-level region is checked. The provider-level region can either be set by the region argument or by HW_REGION_NAME.

func JobStateRefreshFunc

func JobStateRefreshFunc(client *golangsdk.ServiceClient, jobID string) resource.StateRefreshFunc

func KeyV1StateRefreshFunc

func KeyV1StateRefreshFunc(client *golangsdk.ServiceClient, keyID string) resource.StateRefreshFunc

func MapResourceProp

func MapResourceProp(d *schema.ResourceData, prop string) map[string]interface{}

MapResourceProp converts ResourceData property into a map

func MapValueSpecs

func MapValueSpecs(d *schema.ResourceData) map[string]string

MapValueSpecs converts ResourceData into a map

func OpenGaussInstanceStateRefreshFunc

func OpenGaussInstanceStateRefreshFunc(client *golangsdk.ServiceClient, instanceID string) resource.StateRefreshFunc

func Provider

func Provider() terraform.ResourceProvider

Provider returns a schema.Provider for HuaweiCloud.

func ResourceASConfiguration

func ResourceASConfiguration() *schema.Resource

func ResourceASGroup

func ResourceASGroup() *schema.Resource

func ResourceASPolicy

func ResourceASPolicy() *schema.Resource

func ResourceBmsInstance

func ResourceBmsInstance() *schema.Resource

func ResourceCCEAddonV3

func ResourceCCEAddonV3() *schema.Resource

func ResourceCCEClusterV3

func ResourceCCEClusterV3() *schema.Resource

func ResourceCCENodePool

func ResourceCCENodePool() *schema.Resource

func ResourceCCENodeV3

func ResourceCCENodeV3() *schema.Resource

func ResourceCertificateV2

func ResourceCertificateV2() *schema.Resource

func ResourceComputeFloatingIPAssociateV2

func ResourceComputeFloatingIPAssociateV2() *schema.Resource

func ResourceComputeFloatingIPV2

func ResourceComputeFloatingIPV2() *schema.Resource

func ResourceComputeInstanceV2

func ResourceComputeInstanceV2() *schema.Resource

func ResourceComputeInterfaceAttachV2

func ResourceComputeInterfaceAttachV2() *schema.Resource

func ResourceComputeKeypairV2

func ResourceComputeKeypairV2() *schema.Resource

func ResourceComputeSecGroupV2

func ResourceComputeSecGroupV2() *schema.Resource

func ResourceComputeServerGroupV2

func ResourceComputeServerGroupV2() *schema.Resource

func ResourceComputeVolumeAttachV2

func ResourceComputeVolumeAttachV2() *schema.Resource

func ResourceDNSPtrRecordV2

func ResourceDNSPtrRecordV2() *schema.Resource

func ResourceDNSRecordSetV2

func ResourceDNSRecordSetV2() *schema.Resource

func ResourceDNSZoneV2

func ResourceDNSZoneV2() *schema.Resource

func ResourceDcsInstanceV1

func ResourceDcsInstanceV1() *schema.Resource

func ResourceEvsSnapshotV2

func ResourceEvsSnapshotV2() *schema.Resource

func ResourceEvsStorageVolumeV3

func ResourceEvsStorageVolumeV3() *schema.Resource

func ResourceFWFirewallGroupV2

func ResourceFWFirewallGroupV2() *schema.Resource

func ResourceIdentityGroupMembershipV3

func ResourceIdentityGroupMembershipV3() *schema.Resource

func ResourceIdentityGroupV3

func ResourceIdentityGroupV3() *schema.Resource

func ResourceIdentityProjectV3

func ResourceIdentityProjectV3() *schema.Resource

func ResourceIdentityRoleAssignmentV3

func ResourceIdentityRoleAssignmentV3() *schema.Resource

func ResourceIdentityUserV3

func ResourceIdentityUserV3() *schema.Resource

func ResourceIecVpc

func ResourceIecVpc() *schema.Resource

func ResourceImsImage

func ResourceImsImage() *schema.Resource

func ResourceL7PolicyV2

func ResourceL7PolicyV2() *schema.Resource

func ResourceL7RuleV2

func ResourceL7RuleV2() *schema.Resource

func ResourceListenerV2

func ResourceListenerV2() *schema.Resource

func ResourceLoadBalancerV2

func ResourceLoadBalancerV2() *schema.Resource

func ResourceMemberV2

func ResourceMemberV2() *schema.Resource

func ResourceMonitorV2

func ResourceMonitorV2() *schema.Resource

func ResourceNatDnatRuleV2

func ResourceNatDnatRuleV2() *schema.Resource

func ResourceNatGatewayV2

func ResourceNatGatewayV2() *schema.Resource

func ResourceNatSnatRuleV2

func ResourceNatSnatRuleV2() *schema.Resource

func ResourceNetworkACL

func ResourceNetworkACL() *schema.Resource

func ResourceNetworkACLRule

func ResourceNetworkACLRule() *schema.Resource

func ResourceNetworkingPortV2

func ResourceNetworkingPortV2() *schema.Resource

func ResourceNetworkingSecGroupRuleV2

func ResourceNetworkingSecGroupRuleV2() *schema.Resource

func ResourceNetworkingSecGroupV2

func ResourceNetworkingSecGroupV2() *schema.Resource

func ResourceObsBucket

func ResourceObsBucket() *schema.Resource

func ResourceObsBucketObject

func ResourceObsBucketObject() *schema.Resource

func ResourceObsBucketPolicy

func ResourceObsBucketPolicy() *schema.Resource

func ResourcePoolV2

func ResourcePoolV2() *schema.Resource

func ResourceSFSTurbo

func ResourceSFSTurbo() *schema.Resource

func ResourceVPCEndpoint

func ResourceVPCEndpoint() *schema.Resource

func ResourceVPCEndpointApproval

func ResourceVPCEndpointApproval() *schema.Resource

func ResourceVPCEndpointService

func ResourceVPCEndpointService() *schema.Resource

func ResourceVPCRouteV2

func ResourceVPCRouteV2() *schema.Resource

func ResourceVirtualPrivateCloudV1

func ResourceVirtualPrivateCloudV1() *schema.Resource

func ResourceVpcBandWidthV2

func ResourceVpcBandWidthV2() *schema.Resource

func ResourceVpcEIPV1

func ResourceVpcEIPV1() *schema.Resource

func ResourceVpcPeeringConnectionV2

func ResourceVpcPeeringConnectionV2() *schema.Resource

func ResourceVpcSubnetV1

func ResourceVpcSubnetV1() *schema.Resource

func ResourceWhitelistV2

func ResourceWhitelistV2() *schema.Resource

func SecGroupV2StateRefreshFunc

func SecGroupV2StateRefreshFunc(computeClient *golangsdk.ServiceClient, d *schema.ResourceData) resource.StateRefreshFunc

func ServerV2StateRefreshFunc

func ServerV2StateRefreshFunc(client *golangsdk.ServiceClient, instanceID string) resource.StateRefreshFunc

ServerV2StateRefreshFunc returns a resource.StateRefreshFunc that is used to watch an HuaweiCloud instance.

func UnsubscribePrePaidResource

func UnsubscribePrePaidResource(d *schema.ResourceData, config *config.Config, resourceIDs []string) error

UnsubscribePrePaidResource impl the action of unsubscribe resource

func VolumeV2StateRefreshFunc

func VolumeV2StateRefreshFunc(client *golangsdk.ServiceClient, volumeID string) resource.StateRefreshFunc

VolumeV2StateRefreshFunc returns a resource.StateRefreshFunc that is used to watch an HuaweiCloud volume.

Types

type Condition

type Condition struct {
	KeyPrefixEquals             string `json:"KeyPrefixEquals,omitempty"`
	HttpErrorCodeReturnedEquals string `json:"HttpErrorCodeReturnedEquals,omitempty"`
}

type EIPCreateOpts

type EIPCreateOpts struct {
	eips.ApplyOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

EIPCreateOpts represents the attributes used when creating a new eip.

type FirewallGroup

FirewallGroup is an HuaweiCloud firewall group.

type FirewallGroupCreateOpts

type FirewallGroupCreateOpts struct {
	firewall_groups.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

FirewallGroupCreateOpts represents the attributes used when creating a new firewall.

func (FirewallGroupCreateOpts) ToFirewallCreateMap

func (opts FirewallGroupCreateOpts) ToFirewallCreateMap() (map[string]interface{}, error)

ToFirewallCreateMap casts a FirewallGroupCreateOpts struct to a map. It overrides firewalls.ToFirewallCreateMap to add the ValueSpecs field.

type FirewallGroupUpdateOpts

type FirewallGroupUpdateOpts struct {
	firewall_groups.UpdateOptsBuilder
}

FirewallGroupUpdateOpts represents the attributes used when updating a firewall

func (FirewallGroupUpdateOpts) ToFirewallUpdateMap

func (opts FirewallGroupUpdateOpts) ToFirewallUpdateMap() (map[string]interface{}, error)

ToFirewallUpdateMap casts a FirewallGroupUpdateOpts struct to a map.

type FloatingIPCreateOpts

type FloatingIPCreateOpts struct {
	floatingips.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

FloatingIPCreateOpts represents the attributes used when creating a new floating ip.

func (FloatingIPCreateOpts) ToFloatingIPCreateMap

func (opts FloatingIPCreateOpts) ToFloatingIPCreateMap() (map[string]interface{}, error)

ToFloatingIPCreateMap casts a CreateOpts struct to a map. It overrides floatingips.ToFloatingIPCreateMap to add the ValueSpecs field.

type Group

type Group struct {
	ID string
}

type InstanceNIC

type InstanceNIC struct {
	NetworkID string
	PortID    string
	FixedIPv4 string
	FixedIPv6 string
	MAC       string
	Fetched   bool
}

InstanceNIC is a structured representation of a servers.Server virtual NIC

type InstanceNetwork

type InstanceNetwork struct {
	UUID          string
	Name          string
	Port          string
	FixedIP       string
	AccessNetwork bool
}

InstanceNetwork represents a collection of network information that a Terraform instance needs to satisfy all network information requirements.

type Network

type Network struct {
	ID string
}

type NetworkCreateOpts

type NetworkCreateOpts struct {
	networks.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

NetworkCreateOpts represents the attributes used when creating a new network.

func (NetworkCreateOpts) ToNetworkCreateMap

func (opts NetworkCreateOpts) ToNetworkCreateMap() (map[string]interface{}, error)

ToNetworkCreateMap casts a CreateOpts struct to a map. It overrides networks.ToNetworkCreateMap to add the ValueSpecs field.

type PolicyCreateOpts

type PolicyCreateOpts struct {
	policies.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

PolicyCreateOpts represents the attributes used when creating a new firewall policy.

func (PolicyCreateOpts) ToFirewallPolicyCreateMap

func (opts PolicyCreateOpts) ToFirewallPolicyCreateMap() (map[string]interface{}, error)

ToFirewallPolicyCreateMap casts a PolicyCreateOpts struct to a map. It overrides policies.ToFirewallPolicyCreateMap to add the ValueSpecs field.

type PortCreateOpts

type PortCreateOpts struct {
	ports.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

PortCreateOpts represents the attributes used when creating a new port.

func (PortCreateOpts) ToPortCreateMap

func (opts PortCreateOpts) ToPortCreateMap() (map[string]interface{}, error)

ToPortCreateMap casts a CreateOpts struct to a map. It overrides ports.ToPortCreateMap to add the ValueSpecs field.

type RecordSetCreateOpts

type RecordSetCreateOpts struct {
	recordsets.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

RecordSetCreateOpts represents the attributes used when creating a new DNS record set.

func (RecordSetCreateOpts) ToRecordSetCreateMap

func (opts RecordSetCreateOpts) ToRecordSetCreateMap() (map[string]interface{}, error)

ToRecordSetCreateMap casts a CreateOpts struct to a map. It overrides recordsets.ToRecordSetCreateMap to add the ValueSpecs field.

type Redirect

type Redirect struct {
	Protocol             string `json:"Protocol,omitempty"`
	HostName             string `json:"HostName,omitempty"`
	ReplaceKeyPrefixWith string `json:"ReplaceKeyPrefixWith,omitempty"`
	ReplaceKeyWith       string `json:"ReplaceKeyWith,omitempty"`
	HttpRedirectCode     string `json:"HttpRedirectCode,omitempty"`
}

type RouterCreateOpts

type RouterCreateOpts struct {
	routers.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

RouterCreateOpts represents the attributes used when creating a new router.

func (RouterCreateOpts) ToRouterCreateMap

func (opts RouterCreateOpts) ToRouterCreateMap() (map[string]interface{}, error)

ToRouterCreateMap casts a CreateOpts struct to a map. It overrides routers.ToRouterCreateMap to add the ValueSpecs field.

type RuleCreateOpts

type RuleCreateOpts struct {
	rules.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

RuleCreateOpts represents the attributes used when creating a new firewall rule.

func (RuleCreateOpts) ToRuleCreateMap

func (opts RuleCreateOpts) ToRuleCreateMap() (map[string]interface{}, error)

ToRuleCreateMap casts a CreateOpts struct to a map. It overrides rules.ToRuleCreateMap to add the ValueSpecs field.

type SubnetCreateOpts

type SubnetCreateOpts struct {
	subnets.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

SubnetCreateOpts represents the attributes used when creating a new subnet.

func (SubnetCreateOpts) ToSubnetCreateMap

func (opts SubnetCreateOpts) ToSubnetCreateMap() (map[string]interface{}, error)

ToSubnetCreateMap casts a CreateOpts struct to a map. It overrides subnets.ToSubnetCreateMap to add the ValueSpecs field.

type VpnEndpointGroupCreateOpts

type VpnEndpointGroupCreateOpts struct {
	endpointgroups.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

VpnEndpointGroupCreateOpts represents the attributes used when creating a new endpoint group.

type VpnIKEPolicyCreateOpts

type VpnIKEPolicyCreateOpts struct {
	ikepolicies.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

VpnIKEPolicyCreateOpts represents the attributes used when creating a new IKE policy.

type VpnIKEPolicyLifetimeCreateOpts

type VpnIKEPolicyLifetimeCreateOpts struct {
	ikepolicies.LifetimeCreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

VpnIKEPolicyLifetimeCreateOpts represents the attributes used when creating a new lifetime for an IKE policy.

type VpnIPSecPolicyCreateOpts

type VpnIPSecPolicyCreateOpts struct {
	ipsecpolicies.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

VpnIPSecPolicyCreateOpts represents the attributes used when creating a new IPSec policy.

type VpnServiceCreateOpts

type VpnServiceCreateOpts struct {
	services.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

VpnServiceCreateOpts represents the attributes used when creating a new VPN service.

type VpnSiteConnectionCreateOpts

type VpnSiteConnectionCreateOpts struct {
	siteconnections.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

VpnSiteConnectionCreateOpts represents the attributes used when creating a new IPSec site connection.

type WaitDomainStatus

type WaitDomainStatus struct {
	ID      string
	Penging []string
	Target  []string
	Opts    *domains.ExtensionOpts
}

type WebsiteRoutingRule

type WebsiteRoutingRule struct {
	Condition Condition `json:"Condition,omitempty"`
	Redirect  Redirect  `json:"Redirect"`
}

type ZoneCreateOpts

type ZoneCreateOpts struct {
	zones.CreateOpts
	ValueSpecs map[string]interface{} `json:"value_specs,omitempty"`
}

ZoneCreateOpts represents the attributes used when creating a new DNS zone.

func (ZoneCreateOpts) ToZoneCreateMap

func (opts ZoneCreateOpts) ToZoneCreateMap() (map[string]interface{}, error)

ToZoneCreateMap casts a CreateOpts struct to a map. It overrides zones.ToZoneCreateMap to add the ValueSpecs field.

Source Files

Directories

Path Synopsis
services

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL