Documentation ¶
Overview ¶
Package vmc provides helper methods that provides client.Connector, required to call VMC APIs.
Index ¶
- Constants
- func ConvertStorageCapacitytoInt(s string) int64
- func GetSDDC(connector client.Connector, orgID string, sddcID string) (model.Sddc, error)
- func HandleCreateError(resourceType string, err error) error
- func HandleDataSourceReadError(d *schema.ResourceData, resourceType string, err error) error
- func HandleDeleteError(resourceType string, resourceID string, err error) error
- func HandleListError(resourceType string, err error) error
- func HandleReadError(d *schema.ResourceData, resourceType string, resourceID string, err error) error
- func HandleUpdateError(resourceType string, err error) error
- func NewClientConnectorByRefreshToken(refreshToken, serviceUrl, cspURL string, httpClient http.Client) (client.Connector, error)
- func Provider() terraform.ResourceProvider
- func SecurityContextByRefreshToken(refreshToken string, cspURL string) (core.SecurityContext, error)
- type ConnectorWrapper
Constants ¶
View Source
const ( // DefaultVMCServer defines the default VMC server. DefaultVMCServer string = "https://vmc.vmware.com" // DefaultCSPUrl defines the default URL for CSP. DefaultCSPUrl string = "https://console.cloud.vmware.com" // CSPRefreshUrlSuffix defines the CSP Refresh API endpoint. CSPRefreshUrlSuffix string = "/csp/gateway/am/api/auth/api-tokens/authorize" // sksNSXTManager to be stripped from nsxt reverse proxy url for public IP resource SksNSXTManager string = "/sks-nsxt-manager" // ESX Host instance types supported for SDDC creation. HostInstancetypeI3 string = "I3_METAL" HostInstancetypeR5 string = "R5_METAL" // Availability Zones SingleAvailabilityZone string = "SingleAZ" MultiAvailabilityZone string = "MultiAZ" MinMultiAZHosts int = 6 ClusterIdFieldName = "clusterId" // Env variables used in acceptance tests APIToken string = "API_TOKEN" OrgID string = "ORG_ID" OrgDisplayName string = "ORG_DISPLAY_NAME" TestSDDCId string = "TEST_SDDC_ID" AWSAccountNumber string = "AWS_ACCOUNT_NUMBER" NSXTReverseProxyUrl string = "NSXT_REVERSE_PROXY_URL" )
Variables ¶
This section is empty.
Functions ¶
func ConvertStorageCapacitytoInt ¶ added in v1.3.0
func HandleCreateError ¶ added in v1.3.0
func HandleDataSourceReadError ¶ added in v1.3.0
func HandleDataSourceReadError(d *schema.ResourceData, resourceType string, err error) error
func HandleDeleteError ¶ added in v1.3.0
func HandleListError ¶ added in v1.3.0
func HandleReadError ¶ added in v1.3.0
func HandleUpdateError ¶ added in v1.3.0
func NewClientConnectorByRefreshToken ¶
func NewClientConnectorByRefreshToken(refreshToken, serviceUrl, cspURL string, httpClient http.Client) (client.Connector, error)
NewClientConnectorByRefreshToken returns client connector to any VMC service by using OAuth authentication using Refresh Token.
func Provider ¶
func Provider() terraform.ResourceProvider
Provider for VMware VMC Console APIs. Returns terraform.ResourceProvider
func SecurityContextByRefreshToken ¶
func SecurityContextByRefreshToken(refreshToken string, cspURL string) (core.SecurityContext, error)
SecurityContextByRefreshToken returns Security Context with access token that is received from Cloud Service Provider using Refresh Token by OAuth authentication scheme.
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.