Documentation ¶
Index ¶
- type AggregationType
- type AvailableOperation
- type AvailableOperationDisplay
- type AvailableOperationDisplayPropertyServiceSpecification
- type AvailableOperationDisplayPropertyServiceSpecificationMetricsItem
- type AvailableOperationDisplayPropertyServiceSpecificationMetricsList
- type AvailableOperationsListResponse
- type CSRPError
- type CSRPErrorBody
- type ClientFactory
- func (c *ClientFactory) NewCustomizationPoliciesClient() *CustomizationPoliciesClient
- func (c *ClientFactory) NewDedicatedCloudNodesClient() *DedicatedCloudNodesClient
- func (c *ClientFactory) NewDedicatedCloudServicesClient() *DedicatedCloudServicesClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewPrivateCloudsClient() *PrivateCloudsClient
- func (c *ClientFactory) NewResourcePoolsClient() *ResourcePoolsClient
- func (c *ClientFactory) NewSKUsAvailabilityClient() *SKUsAvailabilityClient
- func (c *ClientFactory) NewUsagesClient() *UsagesClient
- func (c *ClientFactory) NewVirtualMachineTemplatesClient() *VirtualMachineTemplatesClient
- func (c *ClientFactory) NewVirtualMachinesClient() *VirtualMachinesClient
- func (c *ClientFactory) NewVirtualNetworksClient() *VirtualNetworksClient
- type CustomizationHostName
- type CustomizationHostNameType
- type CustomizationIPAddress
- type CustomizationIPAddressType
- type CustomizationIPSettings
- type CustomizationIdentity
- type CustomizationIdentityType
- type CustomizationIdentityUserData
- type CustomizationNicSetting
- type CustomizationPoliciesClient
- func (client *CustomizationPoliciesClient) Get(ctx context.Context, regionID string, pcName string, ...) (CustomizationPoliciesClientGetResponse, error)
- func (client *CustomizationPoliciesClient) NewListPager(regionID string, pcName string, ...) *runtime.Pager[CustomizationPoliciesClientListResponse]
- type CustomizationPoliciesClientGetOptions
- type CustomizationPoliciesClientGetResponse
- type CustomizationPoliciesClientListOptions
- type CustomizationPoliciesClientListResponse
- type CustomizationPoliciesListResponse
- type CustomizationPolicy
- type CustomizationPolicyProperties
- type CustomizationPolicyPropertiesType
- type CustomizationSpecification
- type DedicatedCloudNode
- type DedicatedCloudNodeListResponse
- type DedicatedCloudNodeProperties
- type DedicatedCloudNodesClient
- func (client *DedicatedCloudNodesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, referer string, ...) (*runtime.Poller[DedicatedCloudNodesClientCreateOrUpdateResponse], error)
- func (client *DedicatedCloudNodesClient) Delete(ctx context.Context, resourceGroupName string, dedicatedCloudNodeName string, ...) (DedicatedCloudNodesClientDeleteResponse, error)
- func (client *DedicatedCloudNodesClient) Get(ctx context.Context, resourceGroupName string, dedicatedCloudNodeName string, ...) (DedicatedCloudNodesClientGetResponse, error)
- func (client *DedicatedCloudNodesClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[DedicatedCloudNodesClientListByResourceGroupResponse]
- func (client *DedicatedCloudNodesClient) NewListBySubscriptionPager(options *DedicatedCloudNodesClientListBySubscriptionOptions) *runtime.Pager[DedicatedCloudNodesClientListBySubscriptionResponse]
- func (client *DedicatedCloudNodesClient) Update(ctx context.Context, resourceGroupName string, dedicatedCloudNodeName string, ...) (DedicatedCloudNodesClientUpdateResponse, error)
- type DedicatedCloudNodesClientBeginCreateOrUpdateOptions
- type DedicatedCloudNodesClientCreateOrUpdateResponse
- type DedicatedCloudNodesClientDeleteOptions
- type DedicatedCloudNodesClientDeleteResponse
- type DedicatedCloudNodesClientGetOptions
- type DedicatedCloudNodesClientGetResponse
- type DedicatedCloudNodesClientListByResourceGroupOptions
- type DedicatedCloudNodesClientListByResourceGroupResponse
- type DedicatedCloudNodesClientListBySubscriptionOptions
- type DedicatedCloudNodesClientListBySubscriptionResponse
- type DedicatedCloudNodesClientUpdateOptions
- type DedicatedCloudNodesClientUpdateResponse
- type DedicatedCloudService
- type DedicatedCloudServiceListResponse
- type DedicatedCloudServiceProperties
- type DedicatedCloudServicesClient
- func (client *DedicatedCloudServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, ...) (*runtime.Poller[DedicatedCloudServicesClientDeleteResponse], error)
- func (client *DedicatedCloudServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, ...) (DedicatedCloudServicesClientCreateOrUpdateResponse, error)
- func (client *DedicatedCloudServicesClient) Get(ctx context.Context, resourceGroupName string, ...) (DedicatedCloudServicesClientGetResponse, error)
- func (client *DedicatedCloudServicesClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[DedicatedCloudServicesClientListByResourceGroupResponse]
- func (client *DedicatedCloudServicesClient) NewListBySubscriptionPager(options *DedicatedCloudServicesClientListBySubscriptionOptions) *runtime.Pager[DedicatedCloudServicesClientListBySubscriptionResponse]
- func (client *DedicatedCloudServicesClient) Update(ctx context.Context, resourceGroupName string, ...) (DedicatedCloudServicesClientUpdateResponse, error)
- type DedicatedCloudServicesClientBeginDeleteOptions
- type DedicatedCloudServicesClientCreateOrUpdateOptions
- type DedicatedCloudServicesClientCreateOrUpdateResponse
- type DedicatedCloudServicesClientDeleteResponse
- type DedicatedCloudServicesClientGetOptions
- type DedicatedCloudServicesClientGetResponse
- type DedicatedCloudServicesClientListByResourceGroupOptions
- type DedicatedCloudServicesClientListByResourceGroupResponse
- type DedicatedCloudServicesClientListBySubscriptionOptions
- type DedicatedCloudServicesClientListBySubscriptionResponse
- type DedicatedCloudServicesClientUpdateOptions
- type DedicatedCloudServicesClientUpdateResponse
- type DiskIndependenceMode
- type GuestOSCustomization
- type GuestOSNICCustomization
- type GuestOSNICCustomizationAllocation
- type GuestOSType
- type NICType
- type NodeStatus
- type OnboardingStatus
- type OperationError
- type OperationOrigin
- type OperationResource
- type OperationsClient
- type OperationsClientGetOptions
- type OperationsClientGetResponse
- type OperationsClientListOptions
- type OperationsClientListResponse
- type PatchPayload
- type PrivateCloud
- type PrivateCloudList
- type PrivateCloudProperties
- type PrivateCloudsClient
- type PrivateCloudsClientGetOptions
- type PrivateCloudsClientGetResponse
- type PrivateCloudsClientListOptions
- type PrivateCloudsClientListResponse
- type ResourcePool
- type ResourcePoolProperties
- type ResourcePoolsClient
- func (client *ResourcePoolsClient) Get(ctx context.Context, regionID string, pcName string, resourcePoolName string, ...) (ResourcePoolsClientGetResponse, error)
- func (client *ResourcePoolsClient) NewListPager(regionID string, pcName string, options *ResourcePoolsClientListOptions) *runtime.Pager[ResourcePoolsClientListResponse]
- type ResourcePoolsClientGetOptions
- type ResourcePoolsClientGetResponse
- type ResourcePoolsClientListOptions
- type ResourcePoolsClientListResponse
- type ResourcePoolsListResponse
- type SKU
- type SKUAvailability
- type SKUAvailabilityListResponse
- type SKUDescription
- type SKUsAvailabilityClient
- type SKUsAvailabilityClientListOptions
- type SKUsAvailabilityClientListResponse
- type StopMode
- type Usage
- type UsageCount
- type UsageListResponse
- type UsageName
- type UsagesClient
- type UsagesClientListOptions
- type UsagesClientListResponse
- type VirtualDisk
- type VirtualDiskController
- type VirtualMachine
- type VirtualMachineListResponse
- type VirtualMachineProperties
- type VirtualMachineStatus
- type VirtualMachineStopMode
- type VirtualMachineTemplate
- type VirtualMachineTemplateListResponse
- type VirtualMachineTemplateProperties
- type VirtualMachineTemplatesClient
- func (client *VirtualMachineTemplatesClient) Get(ctx context.Context, regionID string, pcName string, ...) (VirtualMachineTemplatesClientGetResponse, error)
- func (client *VirtualMachineTemplatesClient) NewListPager(pcName string, regionID string, resourcePoolName string, ...) *runtime.Pager[VirtualMachineTemplatesClientListResponse]
- type VirtualMachineTemplatesClientGetOptions
- type VirtualMachineTemplatesClientGetResponse
- type VirtualMachineTemplatesClientListOptions
- type VirtualMachineTemplatesClientListResponse
- type VirtualMachinesClient
- func (client *VirtualMachinesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, referer string, ...) (*runtime.Poller[VirtualMachinesClientCreateOrUpdateResponse], error)
- func (client *VirtualMachinesClient) BeginDelete(ctx context.Context, resourceGroupName string, referer string, ...) (*runtime.Poller[VirtualMachinesClientDeleteResponse], error)
- func (client *VirtualMachinesClient) BeginStart(ctx context.Context, resourceGroupName string, referer string, ...) (*runtime.Poller[VirtualMachinesClientStartResponse], error)
- func (client *VirtualMachinesClient) BeginStop(ctx context.Context, resourceGroupName string, referer string, ...) (*runtime.Poller[VirtualMachinesClientStopResponse], error)
- func (client *VirtualMachinesClient) BeginUpdate(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[VirtualMachinesClientUpdateResponse], error)
- func (client *VirtualMachinesClient) Get(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (VirtualMachinesClientGetResponse, error)
- func (client *VirtualMachinesClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[VirtualMachinesClientListByResourceGroupResponse]
- func (client *VirtualMachinesClient) NewListBySubscriptionPager(options *VirtualMachinesClientListBySubscriptionOptions) *runtime.Pager[VirtualMachinesClientListBySubscriptionResponse]
- type VirtualMachinesClientBeginCreateOrUpdateOptions
- type VirtualMachinesClientBeginDeleteOptions
- type VirtualMachinesClientBeginStartOptions
- type VirtualMachinesClientBeginStopOptions
- type VirtualMachinesClientBeginUpdateOptions
- type VirtualMachinesClientCreateOrUpdateResponse
- type VirtualMachinesClientDeleteResponse
- type VirtualMachinesClientGetOptions
- type VirtualMachinesClientGetResponse
- type VirtualMachinesClientListByResourceGroupOptions
- type VirtualMachinesClientListByResourceGroupResponse
- type VirtualMachinesClientListBySubscriptionOptions
- type VirtualMachinesClientListBySubscriptionResponse
- type VirtualMachinesClientStartResponse
- type VirtualMachinesClientStopResponse
- type VirtualMachinesClientUpdateResponse
- type VirtualNetwork
- type VirtualNetworkListResponse
- type VirtualNetworkProperties
- type VirtualNetworksClient
- func (client *VirtualNetworksClient) Get(ctx context.Context, regionID string, pcName string, virtualNetworkName string, ...) (VirtualNetworksClientGetResponse, error)
- func (client *VirtualNetworksClient) NewListPager(regionID string, pcName string, resourcePoolName string, ...) *runtime.Pager[VirtualNetworksClientListResponse]
- type VirtualNetworksClientGetOptions
- type VirtualNetworksClientGetResponse
- type VirtualNetworksClientListOptions
- type VirtualNetworksClientListResponse
- type VirtualNic
Examples ¶
- CustomizationPoliciesClient.Get
- CustomizationPoliciesClient.NewListPager
- DedicatedCloudNodesClient.BeginCreateOrUpdate
- DedicatedCloudNodesClient.Delete
- DedicatedCloudNodesClient.Get
- DedicatedCloudNodesClient.NewListByResourceGroupPager
- DedicatedCloudNodesClient.NewListBySubscriptionPager
- DedicatedCloudNodesClient.Update
- DedicatedCloudServicesClient.BeginDelete
- DedicatedCloudServicesClient.CreateOrUpdate
- DedicatedCloudServicesClient.Get
- DedicatedCloudServicesClient.NewListByResourceGroupPager
- DedicatedCloudServicesClient.NewListBySubscriptionPager
- DedicatedCloudServicesClient.Update
- OperationsClient.Get (GetFailedOperationResult)
- OperationsClient.Get (GetOperationResult)
- OperationsClient.NewListPager
- PrivateCloudsClient.Get
- PrivateCloudsClient.NewListPager
- ResourcePoolsClient.Get
- ResourcePoolsClient.NewListPager
- SKUsAvailabilityClient.NewListPager
- UsagesClient.NewListPager
- VirtualMachineTemplatesClient.Get
- VirtualMachineTemplatesClient.NewListPager
- VirtualMachinesClient.BeginCreateOrUpdate
- VirtualMachinesClient.BeginDelete
- VirtualMachinesClient.BeginStart
- VirtualMachinesClient.BeginStop (StopInBodyVirtualMachine)
- VirtualMachinesClient.BeginStop (StopInQueryVirtualMachine)
- VirtualMachinesClient.BeginUpdate
- VirtualMachinesClient.Get
- VirtualMachinesClient.NewListByResourceGroupPager
- VirtualMachinesClient.NewListBySubscriptionPager
- VirtualNetworksClient.Get
- VirtualNetworksClient.NewListPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregationType ¶
type AggregationType string
AggregationType - Metric's aggregation type for e.g. (Average, Total)
const ( AggregationTypeAverage AggregationType = "Average" AggregationTypeTotal AggregationType = "Total" )
func PossibleAggregationTypeValues ¶
func PossibleAggregationTypeValues() []AggregationType
PossibleAggregationTypeValues returns the possible values for the AggregationType const type.
type AvailableOperation ¶
type AvailableOperation struct { // The list of operations Display *AvailableOperationDisplay // Indicating whether the operation is a data action or not IsDataAction *bool // {resourceProviderNamespace}/{resourceType}/{read|write|delete|action} Name *string // The origin of operation Origin *OperationOrigin // The list of operation properties Properties *AvailableOperationDisplayPropertyServiceSpecification }
AvailableOperation - Resource provider available operation model
func (AvailableOperation) MarshalJSON ¶ added in v1.1.0
func (a AvailableOperation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AvailableOperation.
func (*AvailableOperation) UnmarshalJSON ¶ added in v1.1.0
func (a *AvailableOperation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AvailableOperation.
type AvailableOperationDisplay ¶
type AvailableOperationDisplay struct { // Description of the operation for display purposes Description *string // Name of the operation for display purposes Operation *string // Name of the provider for display purposes Provider *string // Name of the resource type for display purposes Resource *string }
AvailableOperationDisplay - Resource provider available operation display model
func (AvailableOperationDisplay) MarshalJSON ¶ added in v1.1.0
func (a AvailableOperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AvailableOperationDisplay.
func (*AvailableOperationDisplay) UnmarshalJSON ¶ added in v1.1.0
func (a *AvailableOperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AvailableOperationDisplay.
type AvailableOperationDisplayPropertyServiceSpecification ¶
type AvailableOperationDisplayPropertyServiceSpecification struct { // The list of specification's service metrics ServiceSpecification *AvailableOperationDisplayPropertyServiceSpecificationMetricsList }
AvailableOperationDisplayPropertyServiceSpecification - Available operation display property service specification model
func (AvailableOperationDisplayPropertyServiceSpecification) MarshalJSON ¶ added in v1.1.0
func (a AvailableOperationDisplayPropertyServiceSpecification) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AvailableOperationDisplayPropertyServiceSpecification.
func (*AvailableOperationDisplayPropertyServiceSpecification) UnmarshalJSON ¶ added in v1.1.0
func (a *AvailableOperationDisplayPropertyServiceSpecification) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AvailableOperationDisplayPropertyServiceSpecification.
type AvailableOperationDisplayPropertyServiceSpecificationMetricsItem ¶
type AvailableOperationDisplayPropertyServiceSpecificationMetricsItem struct { // REQUIRED; Metric's aggregation type for e.g. (Average, Total) AggregationType *AggregationType // REQUIRED; Metric's description DisplayDescription *string // REQUIRED; Human readable metric's name DisplayName *string // REQUIRED; Metric's name/id Name *string // REQUIRED; Metric's unit Unit *string }
AvailableOperationDisplayPropertyServiceSpecificationMetricsItem - Available operation display property service specification metrics item
func (AvailableOperationDisplayPropertyServiceSpecificationMetricsItem) MarshalJSON ¶ added in v1.1.0
func (a AvailableOperationDisplayPropertyServiceSpecificationMetricsItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AvailableOperationDisplayPropertyServiceSpecificationMetricsItem.
func (*AvailableOperationDisplayPropertyServiceSpecificationMetricsItem) UnmarshalJSON ¶ added in v1.1.0
func (a *AvailableOperationDisplayPropertyServiceSpecificationMetricsItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AvailableOperationDisplayPropertyServiceSpecificationMetricsItem.
type AvailableOperationDisplayPropertyServiceSpecificationMetricsList ¶
type AvailableOperationDisplayPropertyServiceSpecificationMetricsList struct { // Metric specifications of operation MetricSpecifications []*AvailableOperationDisplayPropertyServiceSpecificationMetricsItem }
AvailableOperationDisplayPropertyServiceSpecificationMetricsList - List of available operation display property service specification metrics
func (AvailableOperationDisplayPropertyServiceSpecificationMetricsList) MarshalJSON ¶
func (a AvailableOperationDisplayPropertyServiceSpecificationMetricsList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AvailableOperationDisplayPropertyServiceSpecificationMetricsList.
func (*AvailableOperationDisplayPropertyServiceSpecificationMetricsList) UnmarshalJSON ¶ added in v1.1.0
func (a *AvailableOperationDisplayPropertyServiceSpecificationMetricsList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AvailableOperationDisplayPropertyServiceSpecificationMetricsList.
type AvailableOperationsListResponse ¶
type AvailableOperationsListResponse struct { // Link for next list of available operations NextLink *string // Returns a list of available operations Value []*AvailableOperation }
AvailableOperationsListResponse - List of available operations
func (AvailableOperationsListResponse) MarshalJSON ¶
func (a AvailableOperationsListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AvailableOperationsListResponse.
func (*AvailableOperationsListResponse) UnmarshalJSON ¶ added in v1.1.0
func (a *AvailableOperationsListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AvailableOperationsListResponse.
type CSRPError ¶
type CSRPError struct { // Error's body Error *CSRPErrorBody }
CSRPError - General error model
func (CSRPError) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type CSRPError.
func (*CSRPError) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type CSRPError.
type CSRPErrorBody ¶
type CSRPErrorBody struct { // Error's target Target *string // READ-ONLY; Error's code Code *string // READ-ONLY; Error's details Details []*CSRPErrorBody // READ-ONLY; Error's message Message *string }
CSRPErrorBody - Error properties
func (CSRPErrorBody) MarshalJSON ¶
func (c CSRPErrorBody) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CSRPErrorBody.
func (*CSRPErrorBody) UnmarshalJSON ¶ added in v1.1.0
func (c *CSRPErrorBody) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CSRPErrorBody.
type ClientFactory ¶ added in v1.1.0
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶ added in v1.1.0
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - The subscription ID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewCustomizationPoliciesClient ¶ added in v1.1.0
func (c *ClientFactory) NewCustomizationPoliciesClient() *CustomizationPoliciesClient
NewCustomizationPoliciesClient creates a new instance of CustomizationPoliciesClient.
func (*ClientFactory) NewDedicatedCloudNodesClient ¶ added in v1.1.0
func (c *ClientFactory) NewDedicatedCloudNodesClient() *DedicatedCloudNodesClient
NewDedicatedCloudNodesClient creates a new instance of DedicatedCloudNodesClient.
func (*ClientFactory) NewDedicatedCloudServicesClient ¶ added in v1.1.0
func (c *ClientFactory) NewDedicatedCloudServicesClient() *DedicatedCloudServicesClient
NewDedicatedCloudServicesClient creates a new instance of DedicatedCloudServicesClient.
func (*ClientFactory) NewOperationsClient ¶ added in v1.1.0
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewPrivateCloudsClient ¶ added in v1.1.0
func (c *ClientFactory) NewPrivateCloudsClient() *PrivateCloudsClient
NewPrivateCloudsClient creates a new instance of PrivateCloudsClient.
func (*ClientFactory) NewResourcePoolsClient ¶ added in v1.1.0
func (c *ClientFactory) NewResourcePoolsClient() *ResourcePoolsClient
NewResourcePoolsClient creates a new instance of ResourcePoolsClient.
func (*ClientFactory) NewSKUsAvailabilityClient ¶ added in v1.1.0
func (c *ClientFactory) NewSKUsAvailabilityClient() *SKUsAvailabilityClient
NewSKUsAvailabilityClient creates a new instance of SKUsAvailabilityClient.
func (*ClientFactory) NewUsagesClient ¶ added in v1.1.0
func (c *ClientFactory) NewUsagesClient() *UsagesClient
NewUsagesClient creates a new instance of UsagesClient.
func (*ClientFactory) NewVirtualMachineTemplatesClient ¶ added in v1.1.0
func (c *ClientFactory) NewVirtualMachineTemplatesClient() *VirtualMachineTemplatesClient
NewVirtualMachineTemplatesClient creates a new instance of VirtualMachineTemplatesClient.
func (*ClientFactory) NewVirtualMachinesClient ¶ added in v1.1.0
func (c *ClientFactory) NewVirtualMachinesClient() *VirtualMachinesClient
NewVirtualMachinesClient creates a new instance of VirtualMachinesClient.
func (*ClientFactory) NewVirtualNetworksClient ¶ added in v1.1.0
func (c *ClientFactory) NewVirtualNetworksClient() *VirtualNetworksClient
NewVirtualNetworksClient creates a new instance of VirtualNetworksClient.
type CustomizationHostName ¶
type CustomizationHostName struct { // Hostname Name *string // Type of host name Type *CustomizationHostNameType }
CustomizationHostName - Host name model
func (CustomizationHostName) MarshalJSON ¶ added in v1.1.0
func (c CustomizationHostName) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CustomizationHostName.
func (*CustomizationHostName) UnmarshalJSON ¶ added in v1.1.0
func (c *CustomizationHostName) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CustomizationHostName.
type CustomizationHostNameType ¶
type CustomizationHostNameType string
CustomizationHostNameType - Type of host name
const ( CustomizationHostNameTypeCUSTOMNAME CustomizationHostNameType = "CUSTOM_NAME" CustomizationHostNameTypeFIXED CustomizationHostNameType = "FIXED" CustomizationHostNameTypePREFIXBASED CustomizationHostNameType = "PREFIX_BASED" CustomizationHostNameTypeUSERDEFINED CustomizationHostNameType = "USER_DEFINED" CustomizationHostNameTypeVIRTUALMACHINENAME CustomizationHostNameType = "VIRTUAL_MACHINE_NAME" )
func PossibleCustomizationHostNameTypeValues ¶
func PossibleCustomizationHostNameTypeValues() []CustomizationHostNameType
PossibleCustomizationHostNameTypeValues returns the possible values for the CustomizationHostNameType const type.
type CustomizationIPAddress ¶
type CustomizationIPAddress struct { // Argument when Custom ip type is selected Argument *string // Defined Ip Address when Fixed ip type is selected IPAddress *string // Customization Specification ip type Type *CustomizationIPAddressType }
func (CustomizationIPAddress) MarshalJSON ¶ added in v1.1.0
func (c CustomizationIPAddress) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CustomizationIPAddress.
func (*CustomizationIPAddress) UnmarshalJSON ¶ added in v1.1.0
func (c *CustomizationIPAddress) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CustomizationIPAddress.
type CustomizationIPAddressType ¶
type CustomizationIPAddressType string
CustomizationIPAddressType - Customization Specification ip type
const ( CustomizationIPAddressTypeCUSTOM CustomizationIPAddressType = "CUSTOM" CustomizationIPAddressTypeDHCPIP CustomizationIPAddressType = "DHCP_IP" CustomizationIPAddressTypeFIXEDIP CustomizationIPAddressType = "FIXED_IP" CustomizationIPAddressTypeUSERDEFINED CustomizationIPAddressType = "USER_DEFINED" )
func PossibleCustomizationIPAddressTypeValues ¶
func PossibleCustomizationIPAddressTypeValues() []CustomizationIPAddressType
PossibleCustomizationIPAddressTypeValues returns the possible values for the CustomizationIPAddressType const type.
type CustomizationIPSettings ¶
type CustomizationIPSettings struct { // The list of gateways Gateway []*string // Ip address customization settings IP *CustomizationIPAddress // Adapter subnet mask SubnetMask *string }
func (CustomizationIPSettings) MarshalJSON ¶
func (c CustomizationIPSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CustomizationIPSettings.
func (*CustomizationIPSettings) UnmarshalJSON ¶ added in v1.1.0
func (c *CustomizationIPSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CustomizationIPSettings.
type CustomizationIdentity ¶
type CustomizationIdentity struct { // Windows Text Identity. Prepared data Data *string // Virtual machine host name settings HostName *CustomizationHostName // Identity type Type *CustomizationIdentityType // Windows Identity. User data customization UserData *CustomizationIdentityUserData }
func (CustomizationIdentity) MarshalJSON ¶ added in v1.1.0
func (c CustomizationIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CustomizationIdentity.
func (*CustomizationIdentity) UnmarshalJSON ¶ added in v1.1.0
func (c *CustomizationIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CustomizationIdentity.
type CustomizationIdentityType ¶
type CustomizationIdentityType string
CustomizationIdentityType - Identity type
const ( CustomizationIdentityTypeLINUX CustomizationIdentityType = "LINUX" CustomizationIdentityTypeWINDOWS CustomizationIdentityType = "WINDOWS" CustomizationIdentityTypeWINDOWSTEXT CustomizationIdentityType = "WINDOWS_TEXT" )
func PossibleCustomizationIdentityTypeValues ¶
func PossibleCustomizationIdentityTypeValues() []CustomizationIdentityType
PossibleCustomizationIdentityTypeValues returns the possible values for the CustomizationIdentityType const type.
type CustomizationIdentityUserData ¶
type CustomizationIdentityUserData struct { // Is password predefined in customization policy IsPasswordPredefined *bool }
CustomizationIdentityUserData - Windows Identity. User data customization
func (CustomizationIdentityUserData) MarshalJSON ¶ added in v1.1.0
func (c CustomizationIdentityUserData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CustomizationIdentityUserData.
func (*CustomizationIdentityUserData) UnmarshalJSON ¶ added in v1.1.0
func (c *CustomizationIdentityUserData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CustomizationIdentityUserData.
type CustomizationNicSetting ¶
type CustomizationNicSetting struct { // The list of adapters' settings Adapter *CustomizationIPSettings // NIC mac address MacAddress *string }
func (CustomizationNicSetting) MarshalJSON ¶ added in v1.1.0
func (c CustomizationNicSetting) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CustomizationNicSetting.
func (*CustomizationNicSetting) UnmarshalJSON ¶ added in v1.1.0
func (c *CustomizationNicSetting) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CustomizationNicSetting.
type CustomizationPoliciesClient ¶
type CustomizationPoliciesClient struct {
// contains filtered or unexported fields
}
CustomizationPoliciesClient contains the methods for the CustomizationPolicies group. Don't use this type directly, use NewCustomizationPoliciesClient() instead.
func NewCustomizationPoliciesClient ¶
func NewCustomizationPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomizationPoliciesClient, error)
NewCustomizationPoliciesClient creates a new instance of CustomizationPoliciesClient with the specified values.
- subscriptionID - The subscription ID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*CustomizationPoliciesClient) Get ¶
func (client *CustomizationPoliciesClient) Get(ctx context.Context, regionID string, pcName string, customizationPolicyName string, options *CustomizationPoliciesClientGetOptions) (CustomizationPoliciesClientGetResponse, error)
Get - Returns customization policy by its name If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-04-01
- regionID - The region Id (westus, eastus)
- pcName - The private cloud name
- customizationPolicyName - customization policy name
- options - CustomizationPoliciesClientGetOptions contains the optional parameters for the CustomizationPoliciesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetCustomizationPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewCustomizationPoliciesClient().Get(ctx, "myResourceGroup", "myPrivateCloud", "Linux1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.CustomizationPolicy = armvmwarecloudsimple.CustomizationPolicy{ // Name: to.Ptr("Linux1"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/customizationPolicies"), // ID: to.Ptr("/subscriptions/b85c4986-56ae-4ebd-b5c5-a1595ca3dab1/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/foobar/customizationpolicies/Linux1"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.CustomizationPolicyProperties{ // Type: to.Ptr(armvmwarecloudsimple.CustomizationPolicyPropertiesTypeLINUX), // PrivateCloudID: to.Ptr("/subscriptions/b85c4986-56ae-4ebd-b5c5-a1595ca3dab1/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/foobar"), // Specification: &armvmwarecloudsimple.CustomizationSpecification{ // Identity: &armvmwarecloudsimple.CustomizationIdentity{ // Type: to.Ptr(armvmwarecloudsimple.CustomizationIdentityTypeLINUX), // HostName: &armvmwarecloudsimple.CustomizationHostName{ // Type: to.Ptr(armvmwarecloudsimple.CustomizationHostNameTypeUSERDEFINED), // }, // UserData: &armvmwarecloudsimple.CustomizationIdentityUserData{ // IsPasswordPredefined: to.Ptr(false), // }, // }, // NicSettings: []*armvmwarecloudsimple.CustomizationNicSetting{ // { // Adapter: &armvmwarecloudsimple.CustomizationIPSettings{ // IP: &armvmwarecloudsimple.CustomizationIPAddress{ // Type: to.Ptr(armvmwarecloudsimple.CustomizationIPAddressTypeUSERDEFINED), // }, // }, // }}, // }, // Version: to.Ptr("1568102823"), // }, // } }
Output:
func (*CustomizationPoliciesClient) NewListPager ¶ added in v0.4.0
func (client *CustomizationPoliciesClient) NewListPager(regionID string, pcName string, options *CustomizationPoliciesClientListOptions) *runtime.Pager[CustomizationPoliciesClientListResponse]
NewListPager - Returns list of customization policies in region for private cloud
Generated from API version 2019-04-01
- regionID - The region Id (westus, eastus)
- pcName - The private cloud name
- options - CustomizationPoliciesClientListOptions contains the optional parameters for the CustomizationPoliciesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListCustomizationPolicies.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewCustomizationPoliciesClient().NewListPager("myResourceGroup", "myPrivateCloud", &armvmwarecloudsimple.CustomizationPoliciesClientListOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.CustomizationPoliciesListResponse = armvmwarecloudsimple.CustomizationPoliciesListResponse{ // Value: []*armvmwarecloudsimple.CustomizationPolicy{ // { // Name: to.Ptr("Linux1"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/customizationPolicies"), // ID: to.Ptr("/subscriptions/b85c4986-56ae-4ebd-b5c5-a1595ca3dab1/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/foobar/customizationpolicies/Linux1"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.CustomizationPolicyProperties{ // Type: to.Ptr(armvmwarecloudsimple.CustomizationPolicyPropertiesTypeLINUX), // PrivateCloudID: to.Ptr("/subscriptions/b85c4986-56ae-4ebd-b5c5-a1595ca3dab1/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/foobar"), // Specification: &armvmwarecloudsimple.CustomizationSpecification{ // Identity: &armvmwarecloudsimple.CustomizationIdentity{ // Type: to.Ptr(armvmwarecloudsimple.CustomizationIdentityTypeLINUX), // HostName: &armvmwarecloudsimple.CustomizationHostName{ // Type: to.Ptr(armvmwarecloudsimple.CustomizationHostNameTypeUSERDEFINED), // }, // UserData: &armvmwarecloudsimple.CustomizationIdentityUserData{ // IsPasswordPredefined: to.Ptr(false), // }, // }, // NicSettings: []*armvmwarecloudsimple.CustomizationNicSetting{ // { // Adapter: &armvmwarecloudsimple.CustomizationIPSettings{ // IP: &armvmwarecloudsimple.CustomizationIPAddress{ // Type: to.Ptr(armvmwarecloudsimple.CustomizationIPAddressTypeUSERDEFINED), // }, // }, // }}, // }, // Version: to.Ptr("1568102823"), // }, // }, // { // Name: to.Ptr("Linux2"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/customizationPolicies"), // ID: to.Ptr("/subscriptions/b85c4986-56ae-4ebd-b5c5-a1595ca3dab1/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/foobar/customizationpolicies/Linux2"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.CustomizationPolicyProperties{ // Type: to.Ptr(armvmwarecloudsimple.CustomizationPolicyPropertiesTypeLINUX), // PrivateCloudID: to.Ptr("/subscriptions/b85c4986-56ae-4ebd-b5c5-a1595ca3dab1/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/foobar"), // Specification: &armvmwarecloudsimple.CustomizationSpecification{ // Identity: &armvmwarecloudsimple.CustomizationIdentity{ // Type: to.Ptr(armvmwarecloudsimple.CustomizationIdentityTypeLINUX), // HostName: &armvmwarecloudsimple.CustomizationHostName{ // Type: to.Ptr(armvmwarecloudsimple.CustomizationHostNameTypeVIRTUALMACHINENAME), // }, // UserData: &armvmwarecloudsimple.CustomizationIdentityUserData{ // IsPasswordPredefined: to.Ptr(false), // }, // }, // NicSettings: []*armvmwarecloudsimple.CustomizationNicSetting{ // { // Adapter: &armvmwarecloudsimple.CustomizationIPSettings{ // IP: &armvmwarecloudsimple.CustomizationIPAddress{ // Type: to.Ptr(armvmwarecloudsimple.CustomizationIPAddressTypeDHCPIP), // }, // }, // }}, // }, // Version: to.Ptr("1568102846"), // }, // }}, // } } }
Output:
type CustomizationPoliciesClientGetOptions ¶ added in v0.2.0
type CustomizationPoliciesClientGetOptions struct { }
CustomizationPoliciesClientGetOptions contains the optional parameters for the CustomizationPoliciesClient.Get method.
type CustomizationPoliciesClientGetResponse ¶ added in v0.2.0
type CustomizationPoliciesClientGetResponse struct { // The virtual machine customization policy CustomizationPolicy }
CustomizationPoliciesClientGetResponse contains the response from method CustomizationPoliciesClient.Get.
type CustomizationPoliciesClientListOptions ¶ added in v0.2.0
type CustomizationPoliciesClientListOptions struct { // The filter to apply on the list operation. only type is allowed here as a filter e.g. $filter=type eq 'xxxx' Filter *string }
CustomizationPoliciesClientListOptions contains the optional parameters for the CustomizationPoliciesClient.NewListPager method.
type CustomizationPoliciesClientListResponse ¶ added in v0.2.0
type CustomizationPoliciesClientListResponse struct { // List of customization polices response model CustomizationPoliciesListResponse }
CustomizationPoliciesClientListResponse contains the response from method CustomizationPoliciesClient.NewListPager.
type CustomizationPoliciesListResponse ¶
type CustomizationPoliciesListResponse struct { // Link for next list of the Customization policy NextLink *string // List of the customization policies Value []*CustomizationPolicy }
CustomizationPoliciesListResponse - List of customization polices response model
func (CustomizationPoliciesListResponse) MarshalJSON ¶
func (c CustomizationPoliciesListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CustomizationPoliciesListResponse.
func (*CustomizationPoliciesListResponse) UnmarshalJSON ¶ added in v1.1.0
func (c *CustomizationPoliciesListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CustomizationPoliciesListResponse.
type CustomizationPolicy ¶
type CustomizationPolicy struct { // Customization policy azure id ID *string // Azure region Location *string // Customization Policy properties Properties *CustomizationPolicyProperties // READ-ONLY; Customization policy name Name *string // READ-ONLY Type *string }
CustomizationPolicy - The virtual machine customization policy
func (CustomizationPolicy) MarshalJSON ¶ added in v1.1.0
func (c CustomizationPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CustomizationPolicy.
func (*CustomizationPolicy) UnmarshalJSON ¶ added in v1.1.0
func (c *CustomizationPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CustomizationPolicy.
type CustomizationPolicyProperties ¶
type CustomizationPolicyProperties struct { // Policy description Description *string // The Private cloud id PrivateCloudID *string // Detailed customization policy specification Specification *CustomizationSpecification // The type of customization (Linux or Windows) Type *CustomizationPolicyPropertiesType // Policy version Version *string }
CustomizationPolicyProperties - The properties of Customization policy
func (CustomizationPolicyProperties) MarshalJSON ¶ added in v1.1.0
func (c CustomizationPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CustomizationPolicyProperties.
func (*CustomizationPolicyProperties) UnmarshalJSON ¶ added in v1.1.0
func (c *CustomizationPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CustomizationPolicyProperties.
type CustomizationPolicyPropertiesType ¶
type CustomizationPolicyPropertiesType string
CustomizationPolicyPropertiesType - The type of customization (Linux or Windows)
const ( CustomizationPolicyPropertiesTypeLINUX CustomizationPolicyPropertiesType = "LINUX" CustomizationPolicyPropertiesTypeWINDOWS CustomizationPolicyPropertiesType = "WINDOWS" )
func PossibleCustomizationPolicyPropertiesTypeValues ¶
func PossibleCustomizationPolicyPropertiesTypeValues() []CustomizationPolicyPropertiesType
PossibleCustomizationPolicyPropertiesTypeValues returns the possible values for the CustomizationPolicyPropertiesType const type.
type CustomizationSpecification ¶
type CustomizationSpecification struct { // Customization Identity. It contains data about user and hostname Identity *CustomizationIdentity // Network interface settings NicSettings []*CustomizationNicSetting }
CustomizationSpecification - The specification for Customization Policy
func (CustomizationSpecification) MarshalJSON ¶
func (c CustomizationSpecification) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CustomizationSpecification.
func (*CustomizationSpecification) UnmarshalJSON ¶ added in v1.1.0
func (c *CustomizationSpecification) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CustomizationSpecification.
type DedicatedCloudNode ¶
type DedicatedCloudNode struct { // REQUIRED; Azure region Location *string // Dedicated Cloud Nodes properties Properties *DedicatedCloudNodeProperties // Dedicated Cloud Nodes SKU SKU *SKU // Dedicated Cloud Nodes tags Tags map[string]*string // READ-ONLY; /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/dedicatedCloudNodes/{dedicatedCloudNodeName} ID *string // READ-ONLY; {dedicatedCloudNodeName} Name *string // READ-ONLY; {resourceProviderNamespace}/{resourceType} Type *string }
DedicatedCloudNode - Dedicated cloud node model
func (DedicatedCloudNode) MarshalJSON ¶
func (d DedicatedCloudNode) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DedicatedCloudNode.
func (*DedicatedCloudNode) UnmarshalJSON ¶ added in v1.1.0
func (d *DedicatedCloudNode) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedCloudNode.
type DedicatedCloudNodeListResponse ¶
type DedicatedCloudNodeListResponse struct { // Link for next list of DedicatedCloudNode NextLink *string // Results of the DedicatedCloudNode list Value []*DedicatedCloudNode }
DedicatedCloudNodeListResponse - List of dedicated nodes response model
func (DedicatedCloudNodeListResponse) MarshalJSON ¶
func (d DedicatedCloudNodeListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DedicatedCloudNodeListResponse.
func (*DedicatedCloudNodeListResponse) UnmarshalJSON ¶ added in v1.1.0
func (d *DedicatedCloudNodeListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedCloudNodeListResponse.
type DedicatedCloudNodeProperties ¶
type DedicatedCloudNodeProperties struct { // REQUIRED; Availability Zone id, e.g. "az1" AvailabilityZoneID *string // REQUIRED; count of nodes to create NodesCount *int32 // REQUIRED; Placement Group id, e.g. "n1" PlacementGroupID *string // REQUIRED; purchase id PurchaseID *string // Dedicated Cloud Nodes SKU's description SKUDescription *SKUDescription // READ-ONLY; Availability Zone name, e.g. "Availability Zone 1" AvailabilityZoneName *string // READ-ONLY; VMWare Cloud Rack Name CloudRackName *string // READ-ONLY; date time the resource was created Created *time.Time // READ-ONLY; Placement Name, e.g. "Placement Group 1" PlacementGroupName *string // READ-ONLY; Private Cloud Id PrivateCloudID *string // READ-ONLY; Resource Pool Name PrivateCloudName *string // READ-ONLY; The provisioning status of the resource ProvisioningState *string // READ-ONLY; Node status, indicates is private cloud set up on this node or not Status *NodeStatus // READ-ONLY; VMWare Cluster Name VmwareClusterName *string }
DedicatedCloudNodeProperties - Properties of dedicated cloud node
func (DedicatedCloudNodeProperties) MarshalJSON ¶
func (d DedicatedCloudNodeProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DedicatedCloudNodeProperties.
func (*DedicatedCloudNodeProperties) UnmarshalJSON ¶
func (d *DedicatedCloudNodeProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedCloudNodeProperties.
type DedicatedCloudNodesClient ¶
type DedicatedCloudNodesClient struct {
// contains filtered or unexported fields
}
DedicatedCloudNodesClient contains the methods for the DedicatedCloudNodes group. Don't use this type directly, use NewDedicatedCloudNodesClient() instead.
func NewDedicatedCloudNodesClient ¶
func NewDedicatedCloudNodesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DedicatedCloudNodesClient, error)
NewDedicatedCloudNodesClient creates a new instance of DedicatedCloudNodesClient with the specified values.
- subscriptionID - The subscription ID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DedicatedCloudNodesClient) BeginCreateOrUpdate ¶
func (client *DedicatedCloudNodesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, referer string, dedicatedCloudNodeName string, dedicatedCloudNodeRequest DedicatedCloudNode, options *DedicatedCloudNodesClientBeginCreateOrUpdateOptions) (*runtime.Poller[DedicatedCloudNodesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Returns dedicated cloud node by its name If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-04-01
- resourceGroupName - The name of the resource group
- referer - referer url
- dedicatedCloudNodeName - dedicated cloud node name
- dedicatedCloudNodeRequest - Create Dedicated Cloud Node request
- options - DedicatedCloudNodesClientBeginCreateOrUpdateOptions contains the optional parameters for the DedicatedCloudNodesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/CreateDedicatedCloudNode.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDedicatedCloudNodesClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "https://management.azure.com/", "myNode", armvmwarecloudsimple.DedicatedCloudNode{ Location: to.Ptr("westus"), Properties: &armvmwarecloudsimple.DedicatedCloudNodeProperties{ AvailabilityZoneID: to.Ptr("az1"), NodesCount: to.Ptr[int32](1), PlacementGroupID: to.Ptr("n1"), PurchaseID: to.Ptr("56acbd46-3d36-4bbf-9b08-57c30fdf6932"), SKUDescription: &armvmwarecloudsimple.SKUDescription{ Name: to.Ptr("CS28-Node"), ID: to.Ptr("general"), }, }, SKU: &armvmwarecloudsimple.SKU{ Name: to.Ptr("VMware_CloudSimple_CS28"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DedicatedCloudNode = armvmwarecloudsimple.DedicatedCloudNode{ // Name: to.Ptr("myNode"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/dedicatedCloudNodes"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VMwareCloudSimple/dedicatedCloudNodes/myNode"), // Location: to.Ptr("westus"), // Properties: &armvmwarecloudsimple.DedicatedCloudNodeProperties{ // AvailabilityZoneID: to.Ptr("az1"), // Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-21T13:43:26.441Z"); return t}()), // NodesCount: to.Ptr[int32](0), // PlacementGroupID: to.Ptr("n1"), // ProvisioningState: to.Ptr("Succeeded"), // PurchaseID: to.Ptr("56acbd46-3d36-4bbf-9b08-57c30fdf6932"), // SKUDescription: &armvmwarecloudsimple.SKUDescription{ // Name: to.Ptr("CS28-Node"), // ID: to.Ptr("general"), // }, // Status: to.Ptr(armvmwarecloudsimple.NodeStatusUnused), // }, // SKU: &armvmwarecloudsimple.SKU{ // Name: to.Ptr("VMware_CloudSimple_CS28"), // }, // } }
Output:
func (*DedicatedCloudNodesClient) Delete ¶
func (client *DedicatedCloudNodesClient) Delete(ctx context.Context, resourceGroupName string, dedicatedCloudNodeName string, options *DedicatedCloudNodesClientDeleteOptions) (DedicatedCloudNodesClientDeleteResponse, error)
Delete - Delete dedicated cloud node If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-04-01
- resourceGroupName - The name of the resource group
- dedicatedCloudNodeName - dedicated cloud node name
- options - DedicatedCloudNodesClientDeleteOptions contains the optional parameters for the DedicatedCloudNodesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/DeleteDedicatedCloudNode.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewDedicatedCloudNodesClient().Delete(ctx, "myResourceGroup", "myNode", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*DedicatedCloudNodesClient) Get ¶
func (client *DedicatedCloudNodesClient) Get(ctx context.Context, resourceGroupName string, dedicatedCloudNodeName string, options *DedicatedCloudNodesClientGetOptions) (DedicatedCloudNodesClientGetResponse, error)
Get - Returns dedicated cloud node If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-04-01
- resourceGroupName - The name of the resource group
- dedicatedCloudNodeName - dedicated cloud node name
- options - DedicatedCloudNodesClientGetOptions contains the optional parameters for the DedicatedCloudNodesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetDedicatedCloudNode.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDedicatedCloudNodesClient().Get(ctx, "myResourceGroup", "myNode", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DedicatedCloudNode = armvmwarecloudsimple.DedicatedCloudNode{ // Name: to.Ptr("myNode"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/dedicatedCloudNodes"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VMwareCloudSimple/dedicatedCloudNodes/myNode"), // Location: to.Ptr("eastus"), // Properties: &armvmwarecloudsimple.DedicatedCloudNodeProperties{ // AvailabilityZoneID: to.Ptr("az1"), // AvailabilityZoneName: to.Ptr("Availability Zone 1"), // CloudRackName: to.Ptr("cloud_rack_1"), // Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-21T07:32:12.114Z"); return t}()), // NodesCount: to.Ptr[int32](0), // PlacementGroupID: to.Ptr("n2"), // PlacementGroupName: to.Ptr("Placement Group 2"), // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // PrivateCloudName: to.Ptr("private_cloud_name"), // PurchaseID: to.Ptr("225fadec-3bbe-4e61-a119-ff102da67d0d"), // SKUDescription: &armvmwarecloudsimple.SKUDescription{ // Name: to.Ptr("CS28-Node"), // ID: to.Ptr("general"), // }, // Status: to.Ptr(armvmwarecloudsimple.NodeStatusUsed), // VmwareClusterName: to.Ptr("Cluster"), // }, // SKU: &armvmwarecloudsimple.SKU{ // Name: to.Ptr("VMware_CloudSimple_CS28"), // }, // } }
Output:
func (*DedicatedCloudNodesClient) NewListByResourceGroupPager ¶ added in v0.4.0
func (client *DedicatedCloudNodesClient) NewListByResourceGroupPager(resourceGroupName string, options *DedicatedCloudNodesClientListByResourceGroupOptions) *runtime.Pager[DedicatedCloudNodesClientListByResourceGroupResponse]
NewListByResourceGroupPager - Returns list of dedicate cloud nodes within resource group
Generated from API version 2019-04-01
- resourceGroupName - The name of the resource group
- options - DedicatedCloudNodesClientListByResourceGroupOptions contains the optional parameters for the DedicatedCloudNodesClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListRGDedicatedCloudNodes.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDedicatedCloudNodesClient().NewListByResourceGroupPager("myResourceGroup", &armvmwarecloudsimple.DedicatedCloudNodesClientListByResourceGroupOptions{Filter: nil, Top: nil, SkipToken: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DedicatedCloudNodeListResponse = armvmwarecloudsimple.DedicatedCloudNodeListResponse{ // Value: []*armvmwarecloudsimple.DedicatedCloudNode{ // { // Name: to.Ptr("node-east-1"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/dedicatedCloudNodes"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VMwareCloudSimple/dedicatedCloudNodes/node-east-1"), // Location: to.Ptr("eastus"), // Properties: &armvmwarecloudsimple.DedicatedCloudNodeProperties{ // AvailabilityZoneID: to.Ptr("az1"), // AvailabilityZoneName: to.Ptr("Availability Zone 1"), // CloudRackName: to.Ptr("cloud_rack_1"), // Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-21T07:32:12.134Z"); return t}()), // NodesCount: to.Ptr[int32](0), // PlacementGroupID: to.Ptr("n2"), // PlacementGroupName: to.Ptr("Placement Group 2"), // PrivateCloudID: to.Ptr("private_cloud_id"), // PrivateCloudName: to.Ptr("private_cloud_name"), // PurchaseID: to.Ptr("225fadec-3bbe-4e61-a119-ff102da67d0d"), // SKUDescription: &armvmwarecloudsimple.SKUDescription{ // Name: to.Ptr("CS28-Node"), // ID: to.Ptr("general"), // }, // Status: to.Ptr(armvmwarecloudsimple.NodeStatusUsed), // VmwareClusterName: to.Ptr("Cluster"), // }, // SKU: &armvmwarecloudsimple.SKU{ // Name: to.Ptr("VMware_CloudSimple_CS28"), // }, // }, // { // Name: to.Ptr("node-east-2"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/dedicatedCloudNodes"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VMwareCloudSimple/dedicatedCloudNodes/node-east-2"), // Location: to.Ptr("eastus"), // Properties: &armvmwarecloudsimple.DedicatedCloudNodeProperties{ // AvailabilityZoneID: to.Ptr("az1"), // AvailabilityZoneName: to.Ptr("Availability Zone 1"), // CloudRackName: to.Ptr("cloud_rack_1"), // Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-21T07:32:12.114Z"); return t}()), // NodesCount: to.Ptr[int32](0), // PlacementGroupID: to.Ptr("n2"), // PlacementGroupName: to.Ptr("Placement Group 2"), // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // PrivateCloudName: to.Ptr("private_cloud_name"), // PurchaseID: to.Ptr("225fadec-3bbe-4e61-a119-ff102da67d0d"), // SKUDescription: &armvmwarecloudsimple.SKUDescription{ // Name: to.Ptr("CS28-Node"), // ID: to.Ptr("general"), // }, // Status: to.Ptr(armvmwarecloudsimple.NodeStatusUsed), // VmwareClusterName: to.Ptr("Cluster"), // }, // SKU: &armvmwarecloudsimple.SKU{ // Name: to.Ptr("VMware_CloudSimple_CS28"), // }, // }, // { // Name: to.Ptr("myNode"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/dedicatedCloudNodes"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VMwareCloudSimple/dedicatedCloudNodes/myNode"), // Location: to.Ptr("eastus"), // Properties: &armvmwarecloudsimple.DedicatedCloudNodeProperties{ // AvailabilityZoneID: to.Ptr("az1"), // AvailabilityZoneName: to.Ptr("Availability Zone 1"), // CloudRackName: to.Ptr("cloud_rack_1"), // Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-08T09:35:47.961Z"); return t}()), // NodesCount: to.Ptr[int32](0), // PlacementGroupID: to.Ptr("n2"), // PlacementGroupName: to.Ptr("Placement Group 2"), // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // PrivateCloudName: to.Ptr("myPrivateCloud"), // PurchaseID: to.Ptr("b3fcd958-f19c-4421-ab46-e4fa9cc8514e"), // SKUDescription: &armvmwarecloudsimple.SKUDescription{ // Name: to.Ptr("CS28-Node"), // ID: to.Ptr("general"), // }, // Status: to.Ptr(armvmwarecloudsimple.NodeStatusUsed), // VmwareClusterName: to.Ptr("Cluster"), // }, // SKU: &armvmwarecloudsimple.SKU{ // Name: to.Ptr("VMware_CloudSimple_CS28"), // }, // }}, // } } }
Output:
func (*DedicatedCloudNodesClient) NewListBySubscriptionPager ¶ added in v0.4.0
func (client *DedicatedCloudNodesClient) NewListBySubscriptionPager(options *DedicatedCloudNodesClientListBySubscriptionOptions) *runtime.Pager[DedicatedCloudNodesClientListBySubscriptionResponse]
NewListBySubscriptionPager - Returns list of dedicate cloud nodes within subscription
Generated from API version 2019-04-01
- options - DedicatedCloudNodesClientListBySubscriptionOptions contains the optional parameters for the DedicatedCloudNodesClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListDedicatedCloudNodes.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDedicatedCloudNodesClient().NewListBySubscriptionPager(&armvmwarecloudsimple.DedicatedCloudNodesClientListBySubscriptionOptions{Filter: nil, Top: nil, SkipToken: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DedicatedCloudNodeListResponse = armvmwarecloudsimple.DedicatedCloudNodeListResponse{ // Value: []*armvmwarecloudsimple.DedicatedCloudNode{ // { // Name: to.Ptr("node-2"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/dedicatedCloudNodes"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup-1/providers/Microsoft.VMwareCloudSimple/dedicatedCloudNodes/node-2"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.DedicatedCloudNodeProperties{ // AvailabilityZoneID: to.Ptr("az1"), // AvailabilityZoneName: to.Ptr("Availability Zone 1"), // CloudRackName: to.Ptr("cloud_rack_1"), // Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-21T07:32:12.134Z"); return t}()), // NodesCount: to.Ptr[int32](0), // PlacementGroupID: to.Ptr("n2"), // PlacementGroupName: to.Ptr("Placement Group 2"), // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // PrivateCloudName: to.Ptr("private_cloud_name"), // PurchaseID: to.Ptr("225fadec-3bbe-4e61-a119-ff102da67d0d"), // SKUDescription: &armvmwarecloudsimple.SKUDescription{ // Name: to.Ptr("CS28-Node"), // ID: to.Ptr("general"), // }, // Status: to.Ptr(armvmwarecloudsimple.NodeStatusUsed), // VmwareClusterName: to.Ptr("Cluster"), // }, // SKU: &armvmwarecloudsimple.SKU{ // Name: to.Ptr("VMware_CloudSimple_CS28"), // }, // }, // { // Name: to.Ptr("node1"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/dedicatedCloudNodes"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup-2/providers/Microsoft.VMwareCloudSimple/dedicatedCloudNodes/node-1"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.DedicatedCloudNodeProperties{ // AvailabilityZoneID: to.Ptr("az1"), // AvailabilityZoneName: to.Ptr("Availability Zone 1"), // Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-22T11:57:43.891Z"); return t}()), // NodesCount: to.Ptr[int32](0), // PlacementGroupID: to.Ptr("n1"), // PlacementGroupName: to.Ptr("Placement Group 1"), // PurchaseID: to.Ptr("eb9d2e22-c787-4723-aa4f-3760b53a0a4d"), // SKUDescription: &armvmwarecloudsimple.SKUDescription{ // Name: to.Ptr("CS28-Node"), // ID: to.Ptr("general"), // }, // Status: to.Ptr(armvmwarecloudsimple.NodeStatusUnused), // }, // SKU: &armvmwarecloudsimple.SKU{ // Name: to.Ptr("VMware_CloudSimple_CS28"), // }, // }}, // } } }
Output:
func (*DedicatedCloudNodesClient) Update ¶
func (client *DedicatedCloudNodesClient) Update(ctx context.Context, resourceGroupName string, dedicatedCloudNodeName string, dedicatedCloudNodeRequest PatchPayload, options *DedicatedCloudNodesClientUpdateOptions) (DedicatedCloudNodesClientUpdateResponse, error)
Update - Patches dedicated node properties If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-04-01
- resourceGroupName - The name of the resource group
- dedicatedCloudNodeName - dedicated cloud node name
- dedicatedCloudNodeRequest - Patch Dedicated Cloud Node request
- options - DedicatedCloudNodesClientUpdateOptions contains the optional parameters for the DedicatedCloudNodesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/PatchDedicatedCloudNode.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDedicatedCloudNodesClient().Update(ctx, "myResourceGroup", "myNode", armvmwarecloudsimple.PatchPayload{ Tags: map[string]*string{ "myTag": to.Ptr("tagValue"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DedicatedCloudNode = armvmwarecloudsimple.DedicatedCloudNode{ // Name: to.Ptr("myNode"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/dedicatedCloudNodes"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VMwareCloudSimple/dedicatedCloudNodes/myNode"), // Location: to.Ptr("westus"), // Properties: &armvmwarecloudsimple.DedicatedCloudNodeProperties{ // AvailabilityZoneID: to.Ptr("az1"), // Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-21T13:43:26.441Z"); return t}()), // NodesCount: to.Ptr[int32](0), // PlacementGroupID: to.Ptr("n1"), // PurchaseID: to.Ptr("56acbd46-3d36-4bbf-9b08-57c30fdf6932"), // SKUDescription: &armvmwarecloudsimple.SKUDescription{ // Name: to.Ptr("CS28-Node"), // ID: to.Ptr("general"), // }, // Status: to.Ptr(armvmwarecloudsimple.NodeStatusUnused), // }, // Tags: map[string]*string{ // "myTag": to.Ptr("tagValue"), // }, // } }
Output:
type DedicatedCloudNodesClientBeginCreateOrUpdateOptions ¶ added in v0.2.0
type DedicatedCloudNodesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DedicatedCloudNodesClientBeginCreateOrUpdateOptions contains the optional parameters for the DedicatedCloudNodesClient.BeginCreateOrUpdate method.
type DedicatedCloudNodesClientCreateOrUpdateResponse ¶ added in v0.2.0
type DedicatedCloudNodesClientCreateOrUpdateResponse struct { // Dedicated cloud node model DedicatedCloudNode }
DedicatedCloudNodesClientCreateOrUpdateResponse contains the response from method DedicatedCloudNodesClient.BeginCreateOrUpdate.
type DedicatedCloudNodesClientDeleteOptions ¶ added in v0.2.0
type DedicatedCloudNodesClientDeleteOptions struct { }
DedicatedCloudNodesClientDeleteOptions contains the optional parameters for the DedicatedCloudNodesClient.Delete method.
type DedicatedCloudNodesClientDeleteResponse ¶ added in v0.2.0
type DedicatedCloudNodesClientDeleteResponse struct { }
DedicatedCloudNodesClientDeleteResponse contains the response from method DedicatedCloudNodesClient.Delete.
type DedicatedCloudNodesClientGetOptions ¶ added in v0.2.0
type DedicatedCloudNodesClientGetOptions struct { }
DedicatedCloudNodesClientGetOptions contains the optional parameters for the DedicatedCloudNodesClient.Get method.
type DedicatedCloudNodesClientGetResponse ¶ added in v0.2.0
type DedicatedCloudNodesClientGetResponse struct { // Dedicated cloud node model DedicatedCloudNode }
DedicatedCloudNodesClientGetResponse contains the response from method DedicatedCloudNodesClient.Get.
type DedicatedCloudNodesClientListByResourceGroupOptions ¶ added in v0.2.0
type DedicatedCloudNodesClientListByResourceGroupOptions struct { // The filter to apply on the list operation Filter *string // to be used by nextLink implementation SkipToken *string // The maximum number of record sets to return Top *int32 }
DedicatedCloudNodesClientListByResourceGroupOptions contains the optional parameters for the DedicatedCloudNodesClient.NewListByResourceGroupPager method.
type DedicatedCloudNodesClientListByResourceGroupResponse ¶ added in v0.2.0
type DedicatedCloudNodesClientListByResourceGroupResponse struct { // List of dedicated nodes response model DedicatedCloudNodeListResponse }
DedicatedCloudNodesClientListByResourceGroupResponse contains the response from method DedicatedCloudNodesClient.NewListByResourceGroupPager.
type DedicatedCloudNodesClientListBySubscriptionOptions ¶ added in v0.2.0
type DedicatedCloudNodesClientListBySubscriptionOptions struct { // The filter to apply on the list operation Filter *string // to be used by nextLink implementation SkipToken *string // The maximum number of record sets to return Top *int32 }
DedicatedCloudNodesClientListBySubscriptionOptions contains the optional parameters for the DedicatedCloudNodesClient.NewListBySubscriptionPager method.
type DedicatedCloudNodesClientListBySubscriptionResponse ¶ added in v0.2.0
type DedicatedCloudNodesClientListBySubscriptionResponse struct { // List of dedicated nodes response model DedicatedCloudNodeListResponse }
DedicatedCloudNodesClientListBySubscriptionResponse contains the response from method DedicatedCloudNodesClient.NewListBySubscriptionPager.
type DedicatedCloudNodesClientUpdateOptions ¶ added in v0.2.0
type DedicatedCloudNodesClientUpdateOptions struct { }
DedicatedCloudNodesClientUpdateOptions contains the optional parameters for the DedicatedCloudNodesClient.Update method.
type DedicatedCloudNodesClientUpdateResponse ¶ added in v0.2.0
type DedicatedCloudNodesClientUpdateResponse struct { // Dedicated cloud node model DedicatedCloudNode }
DedicatedCloudNodesClientUpdateResponse contains the response from method DedicatedCloudNodesClient.Update.
type DedicatedCloudService ¶
type DedicatedCloudService struct { // REQUIRED; Azure region Location *string // The properties of Dedicated Node Service Properties *DedicatedCloudServiceProperties // The list of tags Tags map[string]*string // READ-ONLY; /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/dedicatedCloudServices/{dedicatedCloudServiceName} ID *string // READ-ONLY; {dedicatedCloudServiceName} Name *string // READ-ONLY; {resourceProviderNamespace}/{resourceType} Type *string }
DedicatedCloudService - Dedicated cloud service model
func (DedicatedCloudService) MarshalJSON ¶
func (d DedicatedCloudService) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DedicatedCloudService.
func (*DedicatedCloudService) UnmarshalJSON ¶ added in v1.1.0
func (d *DedicatedCloudService) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedCloudService.
type DedicatedCloudServiceListResponse ¶
type DedicatedCloudServiceListResponse struct { // Link for next list of DedicatedCloudNode NextLink *string // Results of the DedicatedCloudService list Value []*DedicatedCloudService }
DedicatedCloudServiceListResponse - List of dedicated cloud services
func (DedicatedCloudServiceListResponse) MarshalJSON ¶
func (d DedicatedCloudServiceListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DedicatedCloudServiceListResponse.
func (*DedicatedCloudServiceListResponse) UnmarshalJSON ¶ added in v1.1.0
func (d *DedicatedCloudServiceListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedCloudServiceListResponse.
type DedicatedCloudServiceProperties ¶
type DedicatedCloudServiceProperties struct { // REQUIRED; gateway Subnet for the account. It will collect the subnet address and always treat it as /28 GatewaySubnet *string // READ-ONLY; indicates whether account onboarded or not in a given region IsAccountOnboarded *OnboardingStatus // READ-ONLY; total nodes purchased Nodes *int32 // READ-ONLY; link to a service management web portal ServiceURL *string }
DedicatedCloudServiceProperties - Properties of dedicated cloud service
func (DedicatedCloudServiceProperties) MarshalJSON ¶ added in v1.1.0
func (d DedicatedCloudServiceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DedicatedCloudServiceProperties.
func (*DedicatedCloudServiceProperties) UnmarshalJSON ¶ added in v1.1.0
func (d *DedicatedCloudServiceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedCloudServiceProperties.
type DedicatedCloudServicesClient ¶
type DedicatedCloudServicesClient struct {
// contains filtered or unexported fields
}
DedicatedCloudServicesClient contains the methods for the DedicatedCloudServices group. Don't use this type directly, use NewDedicatedCloudServicesClient() instead.
func NewDedicatedCloudServicesClient ¶
func NewDedicatedCloudServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DedicatedCloudServicesClient, error)
NewDedicatedCloudServicesClient creates a new instance of DedicatedCloudServicesClient with the specified values.
- subscriptionID - The subscription ID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DedicatedCloudServicesClient) BeginDelete ¶
func (client *DedicatedCloudServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, dedicatedCloudServiceName string, options *DedicatedCloudServicesClientBeginDeleteOptions) (*runtime.Poller[DedicatedCloudServicesClientDeleteResponse], error)
BeginDelete - Delete dedicate cloud service If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-04-01
- resourceGroupName - The name of the resource group
- dedicatedCloudServiceName - dedicated cloud service name
- options - DedicatedCloudServicesClientBeginDeleteOptions contains the optional parameters for the DedicatedCloudServicesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/DeleteDedicatedCloudService.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDedicatedCloudServicesClient().BeginDelete(ctx, "myResourceGroup", "myService", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*DedicatedCloudServicesClient) CreateOrUpdate ¶
func (client *DedicatedCloudServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, dedicatedCloudServiceName string, dedicatedCloudServiceRequest DedicatedCloudService, options *DedicatedCloudServicesClientCreateOrUpdateOptions) (DedicatedCloudServicesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Create dedicate cloud service If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-04-01
- resourceGroupName - The name of the resource group
- dedicatedCloudServiceName - dedicated cloud Service name
- dedicatedCloudServiceRequest - Create Dedicated Cloud Service request
- options - DedicatedCloudServicesClientCreateOrUpdateOptions contains the optional parameters for the DedicatedCloudServicesClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/CreateDedicatedCloudService.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDedicatedCloudServicesClient().CreateOrUpdate(ctx, "myResourceGroup", "myService", armvmwarecloudsimple.DedicatedCloudService{ Location: to.Ptr("westus"), Properties: &armvmwarecloudsimple.DedicatedCloudServiceProperties{ GatewaySubnet: to.Ptr("10.0.0.0"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DedicatedCloudService = armvmwarecloudsimple.DedicatedCloudService{ // Name: to.Ptr("myService"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/dedicatedCloudServices"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VMwareCloudSimple/dedicatedCloudServices/myService"), // Location: to.Ptr("westus"), // Properties: &armvmwarecloudsimple.DedicatedCloudServiceProperties{ // GatewaySubnet: to.Ptr("10.0.10.0/28"), // IsAccountOnboarded: to.Ptr(armvmwarecloudsimple.OnboardingStatusNotOnBoarded), // }, // } }
Output:
func (*DedicatedCloudServicesClient) Get ¶
func (client *DedicatedCloudServicesClient) Get(ctx context.Context, resourceGroupName string, dedicatedCloudServiceName string, options *DedicatedCloudServicesClientGetOptions) (DedicatedCloudServicesClientGetResponse, error)
Get - Returns Dedicate Cloud Service If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-04-01
- resourceGroupName - The name of the resource group
- dedicatedCloudServiceName - dedicated cloud Service name
- options - DedicatedCloudServicesClientGetOptions contains the optional parameters for the DedicatedCloudServicesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetDedicatedCloudService.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDedicatedCloudServicesClient().Get(ctx, "myResourceGroup", "myService", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DedicatedCloudService = armvmwarecloudsimple.DedicatedCloudService{ // Name: to.Ptr("myService"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/dedicatedCloudServices"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VMwareCloudSimple/dedicatedCloudServices/myService"), // Location: to.Ptr("westus"), // Properties: &armvmwarecloudsimple.DedicatedCloudServiceProperties{ // GatewaySubnet: to.Ptr("10.0.10.0/28"), // IsAccountOnboarded: to.Ptr(armvmwarecloudsimple.OnboardingStatusNotOnBoarded), // Nodes: to.Ptr[int32](1), // ServiceURL: to.Ptr("https://westus-he.azure.cloudsimple.com"), // }, // } }
Output:
func (*DedicatedCloudServicesClient) NewListByResourceGroupPager ¶ added in v0.4.0
func (client *DedicatedCloudServicesClient) NewListByResourceGroupPager(resourceGroupName string, options *DedicatedCloudServicesClientListByResourceGroupOptions) *runtime.Pager[DedicatedCloudServicesClientListByResourceGroupResponse]
NewListByResourceGroupPager - Returns list of dedicated cloud services within a resource group
Generated from API version 2019-04-01
- resourceGroupName - The name of the resource group
- options - DedicatedCloudServicesClientListByResourceGroupOptions contains the optional parameters for the DedicatedCloudServicesClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListRGDedicatedCloudServices.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDedicatedCloudServicesClient().NewListByResourceGroupPager("myResourceGroup", &armvmwarecloudsimple.DedicatedCloudServicesClientListByResourceGroupOptions{Filter: nil, Top: nil, SkipToken: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DedicatedCloudServiceListResponse = armvmwarecloudsimple.DedicatedCloudServiceListResponse{ // Value: []*armvmwarecloudsimple.DedicatedCloudService{ // { // Name: to.Ptr("service-east"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/dedicatedCloudServices"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VMwareCloudSimple/dedicatedCloudServices/service-east"), // Location: to.Ptr("eastus"), // Properties: &armvmwarecloudsimple.DedicatedCloudServiceProperties{ // GatewaySubnet: to.Ptr("10.101.201.0/28"), // IsAccountOnboarded: to.Ptr(armvmwarecloudsimple.OnboardingStatusOnBoarded), // ServiceURL: to.Ptr("https://eastus-he.azure.cloudsimple.com"), // }, // }, // { // Name: to.Ptr("service-west"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/dedicatedCloudServices"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VMwareCloudSimple/dedicatedCloudServices/service-west"), // Location: to.Ptr("westus"), // Properties: &armvmwarecloudsimple.DedicatedCloudServiceProperties{ // GatewaySubnet: to.Ptr("10.0.0.0/28"), // IsAccountOnboarded: to.Ptr(armvmwarecloudsimple.OnboardingStatusOnBoarded), // ServiceURL: to.Ptr("https://westus-he.azure.cloudsimple.com"), // }, // }}, // } } }
Output:
func (*DedicatedCloudServicesClient) NewListBySubscriptionPager ¶ added in v0.4.0
func (client *DedicatedCloudServicesClient) NewListBySubscriptionPager(options *DedicatedCloudServicesClientListBySubscriptionOptions) *runtime.Pager[DedicatedCloudServicesClientListBySubscriptionResponse]
NewListBySubscriptionPager - Returns list of dedicated cloud services within a subscription
Generated from API version 2019-04-01
- options - DedicatedCloudServicesClientListBySubscriptionOptions contains the optional parameters for the DedicatedCloudServicesClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListDedicatedCloudServices.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDedicatedCloudServicesClient().NewListBySubscriptionPager(&armvmwarecloudsimple.DedicatedCloudServicesClientListBySubscriptionOptions{Filter: nil, Top: nil, SkipToken: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DedicatedCloudServiceListResponse = armvmwarecloudsimple.DedicatedCloudServiceListResponse{ // Value: []*armvmwarecloudsimple.DedicatedCloudService{ // { // Name: to.Ptr("service-east"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/dedicatedCloudServices"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup-1/providers/Microsoft.VMwareCloudSimple/dedicatedCloudServices/service-east"), // Location: to.Ptr("eastus"), // Properties: &armvmwarecloudsimple.DedicatedCloudServiceProperties{ // GatewaySubnet: to.Ptr("10.101.201.0/28"), // IsAccountOnboarded: to.Ptr(armvmwarecloudsimple.OnboardingStatusOnBoarded), // ServiceURL: to.Ptr("https://eastus-he.azure.cloudsimple.com"), // }, // }, // { // Name: to.Ptr("service-west"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/dedicatedCloudServices"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup-2/providers/Microsoft.VMwareCloudSimple/dedicatedCloudServices/service-west"), // Location: to.Ptr("westus"), // Properties: &armvmwarecloudsimple.DedicatedCloudServiceProperties{ // GatewaySubnet: to.Ptr("10.0.0.0/28"), // IsAccountOnboarded: to.Ptr(armvmwarecloudsimple.OnboardingStatusOnBoarded), // ServiceURL: to.Ptr("https://westus-he.azure.cloudsimple.com"), // }, // }}, // } } }
Output:
func (*DedicatedCloudServicesClient) Update ¶
func (client *DedicatedCloudServicesClient) Update(ctx context.Context, resourceGroupName string, dedicatedCloudServiceName string, dedicatedCloudServiceRequest PatchPayload, options *DedicatedCloudServicesClientUpdateOptions) (DedicatedCloudServicesClientUpdateResponse, error)
Update - Patch dedicated cloud service's properties If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-04-01
- resourceGroupName - The name of the resource group
- dedicatedCloudServiceName - dedicated cloud service name
- dedicatedCloudServiceRequest - Patch Dedicated Cloud Service request
- options - DedicatedCloudServicesClientUpdateOptions contains the optional parameters for the DedicatedCloudServicesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/PatchDedicatedService.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDedicatedCloudServicesClient().Update(ctx, "myResourceGroup", "myService", armvmwarecloudsimple.PatchPayload{ Tags: map[string]*string{ "myTag": to.Ptr("tagValue"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DedicatedCloudService = armvmwarecloudsimple.DedicatedCloudService{ // Name: to.Ptr("myService"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/dedicatedCloudServices"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VMwareCloudSimple/dedicatedCloudServices/myService"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.DedicatedCloudServiceProperties{ // GatewaySubnet: to.Ptr("10.0.0.0/28"), // IsAccountOnboarded: to.Ptr(armvmwarecloudsimple.OnboardingStatusOnBoarded), // ServiceURL: to.Ptr("https://westus-he.azure.cloudsimple.com"), // }, // Tags: map[string]*string{ // "myTag": to.Ptr("tagValue"), // }, // } }
Output:
type DedicatedCloudServicesClientBeginDeleteOptions ¶ added in v0.2.0
type DedicatedCloudServicesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DedicatedCloudServicesClientBeginDeleteOptions contains the optional parameters for the DedicatedCloudServicesClient.BeginDelete method.
type DedicatedCloudServicesClientCreateOrUpdateOptions ¶ added in v0.2.0
type DedicatedCloudServicesClientCreateOrUpdateOptions struct { }
DedicatedCloudServicesClientCreateOrUpdateOptions contains the optional parameters for the DedicatedCloudServicesClient.CreateOrUpdate method.
type DedicatedCloudServicesClientCreateOrUpdateResponse ¶ added in v0.2.0
type DedicatedCloudServicesClientCreateOrUpdateResponse struct { // Dedicated cloud service model DedicatedCloudService }
DedicatedCloudServicesClientCreateOrUpdateResponse contains the response from method DedicatedCloudServicesClient.CreateOrUpdate.
type DedicatedCloudServicesClientDeleteResponse ¶ added in v0.2.0
type DedicatedCloudServicesClientDeleteResponse struct { }
DedicatedCloudServicesClientDeleteResponse contains the response from method DedicatedCloudServicesClient.BeginDelete.
type DedicatedCloudServicesClientGetOptions ¶ added in v0.2.0
type DedicatedCloudServicesClientGetOptions struct { }
DedicatedCloudServicesClientGetOptions contains the optional parameters for the DedicatedCloudServicesClient.Get method.
type DedicatedCloudServicesClientGetResponse ¶ added in v0.2.0
type DedicatedCloudServicesClientGetResponse struct { // Dedicated cloud service model DedicatedCloudService }
DedicatedCloudServicesClientGetResponse contains the response from method DedicatedCloudServicesClient.Get.
type DedicatedCloudServicesClientListByResourceGroupOptions ¶ added in v0.2.0
type DedicatedCloudServicesClientListByResourceGroupOptions struct { // The filter to apply on the list operation Filter *string // to be used by nextLink implementation SkipToken *string // The maximum number of record sets to return Top *int32 }
DedicatedCloudServicesClientListByResourceGroupOptions contains the optional parameters for the DedicatedCloudServicesClient.NewListByResourceGroupPager method.
type DedicatedCloudServicesClientListByResourceGroupResponse ¶ added in v0.2.0
type DedicatedCloudServicesClientListByResourceGroupResponse struct { // List of dedicated cloud services DedicatedCloudServiceListResponse }
DedicatedCloudServicesClientListByResourceGroupResponse contains the response from method DedicatedCloudServicesClient.NewListByResourceGroupPager.
type DedicatedCloudServicesClientListBySubscriptionOptions ¶ added in v0.2.0
type DedicatedCloudServicesClientListBySubscriptionOptions struct { // The filter to apply on the list operation Filter *string // to be used by nextLink implementation SkipToken *string // The maximum number of record sets to return Top *int32 }
DedicatedCloudServicesClientListBySubscriptionOptions contains the optional parameters for the DedicatedCloudServicesClient.NewListBySubscriptionPager method.
type DedicatedCloudServicesClientListBySubscriptionResponse ¶ added in v0.2.0
type DedicatedCloudServicesClientListBySubscriptionResponse struct { // List of dedicated cloud services DedicatedCloudServiceListResponse }
DedicatedCloudServicesClientListBySubscriptionResponse contains the response from method DedicatedCloudServicesClient.NewListBySubscriptionPager.
type DedicatedCloudServicesClientUpdateOptions ¶ added in v0.2.0
type DedicatedCloudServicesClientUpdateOptions struct { }
DedicatedCloudServicesClientUpdateOptions contains the optional parameters for the DedicatedCloudServicesClient.Update method.
type DedicatedCloudServicesClientUpdateResponse ¶ added in v0.2.0
type DedicatedCloudServicesClientUpdateResponse struct { // Dedicated cloud service model DedicatedCloudService }
DedicatedCloudServicesClientUpdateResponse contains the response from method DedicatedCloudServicesClient.Update.
type DiskIndependenceMode ¶
type DiskIndependenceMode string
DiskIndependenceMode - Disk's independence mode type
const ( DiskIndependenceModeIndependentNonpersistent DiskIndependenceMode = "independent_nonpersistent" DiskIndependenceModeIndependentPersistent DiskIndependenceMode = "independent_persistent" DiskIndependenceModePersistent DiskIndependenceMode = "persistent" )
func PossibleDiskIndependenceModeValues ¶
func PossibleDiskIndependenceModeValues() []DiskIndependenceMode
PossibleDiskIndependenceModeValues returns the possible values for the DiskIndependenceMode const type.
type GuestOSCustomization ¶
type GuestOSCustomization struct { // List of dns servers to use DNSServers []*string // Virtual Machine hostname HostName *string // Password for login Password *string // id of customization policy PolicyID *string // Username for login Username *string }
GuestOSCustomization - Guest OS Customization properties
func (GuestOSCustomization) MarshalJSON ¶
func (g GuestOSCustomization) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GuestOSCustomization.
func (*GuestOSCustomization) UnmarshalJSON ¶ added in v1.1.0
func (g *GuestOSCustomization) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GuestOSCustomization.
type GuestOSNICCustomization ¶
type GuestOSNICCustomization struct { // IP address allocation method Allocation *GuestOSNICCustomizationAllocation // List of dns servers to use DNSServers []*string // Gateway addresses assigned to nic Gateway []*string // Static ip address for nic IPAddress *string // Network mask for nic Mask *string // primary WINS server for Windows PrimaryWinsServer *string // secondary WINS server for Windows SecondaryWinsServer *string }
GuestOSNICCustomization - Guest OS nic customization
func (GuestOSNICCustomization) MarshalJSON ¶
func (g GuestOSNICCustomization) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GuestOSNICCustomization.
func (*GuestOSNICCustomization) UnmarshalJSON ¶ added in v1.1.0
func (g *GuestOSNICCustomization) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GuestOSNICCustomization.
type GuestOSNICCustomizationAllocation ¶
type GuestOSNICCustomizationAllocation string
GuestOSNICCustomizationAllocation - IP address allocation method
const ( GuestOSNICCustomizationAllocationDynamic GuestOSNICCustomizationAllocation = "dynamic" GuestOSNICCustomizationAllocationStatic GuestOSNICCustomizationAllocation = "static" )
func PossibleGuestOSNICCustomizationAllocationValues ¶
func PossibleGuestOSNICCustomizationAllocationValues() []GuestOSNICCustomizationAllocation
PossibleGuestOSNICCustomizationAllocationValues returns the possible values for the GuestOSNICCustomizationAllocation const type.
type GuestOSType ¶
type GuestOSType string
GuestOSType - The Guest OS type
const ( GuestOSTypeLinux GuestOSType = "linux" GuestOSTypeOther GuestOSType = "other" GuestOSTypeWindows GuestOSType = "windows" )
func PossibleGuestOSTypeValues ¶
func PossibleGuestOSTypeValues() []GuestOSType
PossibleGuestOSTypeValues returns the possible values for the GuestOSType const type.
type NICType ¶
type NICType string
NICType - NIC type
func PossibleNICTypeValues ¶
func PossibleNICTypeValues() []NICType
PossibleNICTypeValues returns the possible values for the NICType const type.
type NodeStatus ¶
type NodeStatus string
NodeStatus - Node status, indicates is private cloud set up on this node or not
const ( NodeStatusUnused NodeStatus = "unused" NodeStatusUsed NodeStatus = "used" )
func PossibleNodeStatusValues ¶
func PossibleNodeStatusValues() []NodeStatus
PossibleNodeStatusValues returns the possible values for the NodeStatus const type.
type OnboardingStatus ¶
type OnboardingStatus string
OnboardingStatus - indicates whether account onboarded or not in a given region
const ( OnboardingStatusNotOnBoarded OnboardingStatus = "notOnBoarded" OnboardingStatusOnBoarded OnboardingStatus = "onBoarded" OnboardingStatusOnBoarding OnboardingStatus = "onBoarding" OnboardingStatusOnBoardingFailed OnboardingStatus = "onBoardingFailed" )
func PossibleOnboardingStatusValues ¶
func PossibleOnboardingStatusValues() []OnboardingStatus
PossibleOnboardingStatusValues returns the possible values for the OnboardingStatus const type.
type OperationError ¶
OperationError - Operation error model
func (OperationError) MarshalJSON ¶ added in v1.1.0
func (o OperationError) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationError.
func (*OperationError) UnmarshalJSON ¶ added in v1.1.0
func (o *OperationError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationError.
type OperationOrigin ¶
type OperationOrigin string
OperationOrigin - The origin of operation
const ( OperationOriginSystem OperationOrigin = "system" OperationOriginUser OperationOrigin = "user" OperationOriginUserSystem OperationOrigin = "user,system" )
func PossibleOperationOriginValues ¶
func PossibleOperationOriginValues() []OperationOrigin
PossibleOperationOriginValues returns the possible values for the OperationOrigin const type.
type OperationResource ¶
type OperationResource struct { // Error Message if operation failed Error *OperationError // READ-ONLY; End time of the operation EndTime *time.Time // READ-ONLY; Operation Id ID *string // READ-ONLY; Operation ID Name *string // READ-ONLY; Start time of the operation StartTime *time.Time // READ-ONLY; Operation status Status *string }
OperationResource - Operation status response
func (OperationResource) MarshalJSON ¶
func (o OperationResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationResource.
func (*OperationResource) UnmarshalJSON ¶
func (o *OperationResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationResource.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values.
- subscriptionID - The subscription ID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OperationsClient) Get ¶
func (client *OperationsClient) Get(ctx context.Context, regionID string, referer string, operationID string, options *OperationsClientGetOptions) (OperationsClientGetResponse, error)
Get - Return an async operation If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-04-01
- regionID - The region Id (westus, eastus)
- referer - referer url
- operationID - operation id
- options - OperationsClientGetOptions contains the optional parameters for the OperationsClient.Get method.
Example (GetFailedOperationResult) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetFailedOperationResult.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewOperationsClient().Get(ctx, "westus2", "https://management.azure.com/", "d030bb3f-7d53-11e9-8e09-9a86872085ff", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.OperationResource = armvmwarecloudsimple.OperationResource{ // Name: to.Ptr("d030bb3f-7d53-11e9-8e09-9a86872085ff"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-23T12:11:00.655Z"); return t}()), // Error: &armvmwarecloudsimple.OperationError{ // Code: to.Ptr("InternalError"), // Message: to.Ptr("Internal Service error"), // }, // ID: to.Ptr("/subscriptions/{subscription-id}/providers/microsoft.vmwarecloudsimple/locations/westus2/operationresults/d030bb3f-7d53-11e9-8e09-9a86872085ff"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-23T12:10:54.012Z"); return t}()), // Status: to.Ptr("Failed"), // } }
Output:
Example (GetOperationResult) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetOperationResult.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewOperationsClient().Get(ctx, "westus2", "https://management.azure.com/", "f8e1c8f1-7d52-11e9-8e07-9a86872085ff", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.OperationResource = armvmwarecloudsimple.OperationResource{ // Name: to.Ptr("f8e1c8f1-7d52-11e9-8e07-9a86872085ff"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-23T12:05:55.660Z"); return t}()), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/microsoft.vmwarecloudsimple/locations/westus2/operationresults/f8e1c8f1-7d52-11e9-8e07-9a86872085ff"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-23T12:04:52.784Z"); return t}()), // Status: to.Ptr("Succeeded"), // } }
Output:
func (*OperationsClient) NewListPager ¶ added in v0.4.0
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Return list of operations
Generated from API version 2019-04-01
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListOperations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewOperationsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.AvailableOperationsListResponse = armvmwarecloudsimple.AvailableOperationsListResponse{ // Value: []*armvmwarecloudsimple.AvailableOperation{ // { // Name: to.Ptr("Microsoft.VMwareCloudSimple/dedicatedCloudNodes/write"), // Display: &armvmwarecloudsimple.AvailableOperationDisplay{ // Description: to.Ptr("Creates a new dedicated cloud node"), // Operation: to.Ptr("Create Dedicated Cloud Node"), // Provider: to.Ptr("VMware Solution by CloudSimple"), // Resource: to.Ptr("Dedicated Cloud Nodes"), // }, // Origin: to.Ptr(armvmwarecloudsimple.OperationOriginUserSystem), // }}, // } } }
Output:
type OperationsClientGetOptions ¶ added in v0.2.0
type OperationsClientGetOptions struct { }
OperationsClientGetOptions contains the optional parameters for the OperationsClient.Get method.
type OperationsClientGetResponse ¶ added in v0.2.0
type OperationsClientGetResponse struct { // Operation status response OperationResource // Location contains the information returned from the Location header response. Location *string // RetryAfter contains the information returned from the Retry-After header response. RetryAfter *int32 }
OperationsClientGetResponse contains the response from method OperationsClient.Get.
type OperationsClientListOptions ¶ added in v0.2.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶ added in v0.2.0
type OperationsClientListResponse struct { // List of available operations AvailableOperationsListResponse }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type PatchPayload ¶
PatchPayload - General patch payload modal
func (PatchPayload) MarshalJSON ¶
func (p PatchPayload) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PatchPayload.
func (*PatchPayload) UnmarshalJSON ¶ added in v1.1.0
func (p *PatchPayload) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PatchPayload.
type PrivateCloud ¶
type PrivateCloud struct { // Azure Id, e.g. "/subscriptions/4da99247-a172-4ed6-8ae9-ebed2d12f839/providers/Microsoft.VMwareCloudSimple/privateClouds/cloud123" ID *string // Location where private cloud created, e.g "westus" Location *string // Private cloud name Name *string // Private cloud properties Properties *PrivateCloudProperties // Azure Resource type Type *string }
PrivateCloud - Private cloud model
func (PrivateCloud) MarshalJSON ¶ added in v1.1.0
func (p PrivateCloud) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateCloud.
func (*PrivateCloud) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateCloud) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateCloud.
type PrivateCloudList ¶
type PrivateCloudList struct { // Link for next list of Private Clouds NextLink *string // the list of private clouds Value []*PrivateCloud }
PrivateCloudList - List of private clouds
func (PrivateCloudList) MarshalJSON ¶
func (p PrivateCloudList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateCloudList.
func (*PrivateCloudList) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateCloudList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateCloudList.
type PrivateCloudProperties ¶
type PrivateCloudProperties struct { // Availability Zone id, e.g. "az1" AvailabilityZoneID *string // Availability Zone name, e.g. "Availability Zone 1" AvailabilityZoneName *string // Number of clusters ClustersNumber *int32 // User's emails who created cloud CreatedBy *string // When private cloud was created CreatedOn *time.Time // Array of DNS servers DNSServers []*string // Expiration date of PC Expires *string // Nsx Type, e.g. "Advanced" NsxType *string // Placement Group id, e.g. "n1" PlacementGroupID *string // Placement Group name PlacementGroupName *string // Id of a private cloud PrivateCloudID *string // The list of Resource Pools ResourcePools []*ResourcePool // Private Cloud state, e.g. "operational" State *string // Number of cores TotalCPUCores *int32 // Number of nodes TotalNodes *int32 // Memory size TotalRAM *int32 // Disk space in TB TotalStorage *float32 // Virtualization type e.g. "vSphere" Type *string // e.g. "6.5u2" VSphereVersion *string // FQDN for vcenter access VcenterFqdn *string // Vcenter ip address VcenterRefid *string // The list of Virtual Machine Templates VirtualMachineTemplates []*VirtualMachineTemplate // The list of Virtual Networks VirtualNetworks []*VirtualNetwork // Is Vrops enabled/disabled VrOpsEnabled *bool }
PrivateCloudProperties - Properties of private
func (PrivateCloudProperties) MarshalJSON ¶
func (p PrivateCloudProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateCloudProperties.
func (*PrivateCloudProperties) UnmarshalJSON ¶
func (p *PrivateCloudProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateCloudProperties.
type PrivateCloudsClient ¶
type PrivateCloudsClient struct {
// contains filtered or unexported fields
}
PrivateCloudsClient contains the methods for the PrivateClouds group. Don't use this type directly, use NewPrivateCloudsClient() instead.
func NewPrivateCloudsClient ¶
func NewPrivateCloudsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateCloudsClient, error)
NewPrivateCloudsClient creates a new instance of PrivateCloudsClient with the specified values.
- subscriptionID - The subscription ID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*PrivateCloudsClient) Get ¶
func (client *PrivateCloudsClient) Get(ctx context.Context, pcName string, regionID string, options *PrivateCloudsClientGetOptions) (PrivateCloudsClientGetResponse, error)
Get - Returns private cloud by its name If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-04-01
- pcName - The private cloud name
- regionID - The region Id (westus, eastus)
- options - PrivateCloudsClientGetOptions contains the optional parameters for the PrivateCloudsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetPrivateCloud.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateCloudsClient().Get(ctx, "myPrivateCloud", "westus2", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PrivateCloud = armvmwarecloudsimple.PrivateCloud{ // Name: to.Ptr("myPrivateCloud"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/privateClouds"), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.PrivateCloudProperties{ // Type: to.Ptr("vSphere"), // AvailabilityZoneID: to.Ptr("az1"), // AvailabilityZoneName: to.Ptr("Availability Zone 1"), // ClustersNumber: to.Ptr[int32](1), // CreatedBy: to.Ptr("john.doe@cloudsimple.com"), // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-22T09:55:36.627Z"); return t}()), // DNSServers: []*string{ // to.Ptr("100.0.0.8"), // to.Ptr("100.0.0.9")}, // Expires: to.Ptr("n/a"), // NsxType: to.Ptr("Advanced"), // PlacementGroupID: to.Ptr("n1"), // PlacementGroupName: to.Ptr("Placement Group 1"), // PrivateCloudID: to.Ptr("{pc-id}"), // ResourcePools: []*armvmwarecloudsimple.ResourcePool{ // { // Name: to.Ptr("Workload"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/resourcePools"), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/resourcePools/resgroup-26"), // Location: to.Ptr("westus2"), // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // Properties: &armvmwarecloudsimple.ResourcePoolProperties{ // FullName: to.Ptr("myPrivateCloud/Datacenter/Cluster/Workload"), // }, // }}, // State: to.Ptr("operational"), // TotalCPUCores: to.Ptr[int32](28), // TotalNodes: to.Ptr[int32](1), // TotalRAM: to.Ptr[int32](256), // TotalStorage: to.Ptr[float32](5.625), // VSphereVersion: to.Ptr("6.7u1"), // VcenterFqdn: to.Ptr("vcsa-4-westus2.az.cloudsimple.io"), // VcenterRefid: to.Ptr("100.0.0.6"), // VirtualMachineTemplates: []*armvmwarecloudsimple.VirtualMachineTemplate{ // { // Name: to.Ptr("centos-template"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/virtualMachineTemplates"), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualMachineTemplates/vm-34"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.VirtualMachineTemplateProperties{ // Path: to.Ptr("Datacenter/Workload VMs"), // AmountOfRAM: to.Ptr[int32](4096), // Controllers: []*armvmwarecloudsimple.VirtualDiskController{ // { // Name: to.Ptr("SCSI controller 0"), // Type: to.Ptr("SCSI"), // ID: to.Ptr("1000"), // SubType: to.Ptr("LSI_PARALEL"), // }}, // Disks: []*armvmwarecloudsimple.VirtualDisk{ // { // ControllerID: to.Ptr("1000"), // IndependenceMode: to.Ptr(armvmwarecloudsimple.DiskIndependenceModePersistent), // TotalSize: to.Ptr[int32](10485760), // VirtualDiskID: to.Ptr("2000"), // VirtualDiskName: to.Ptr("Hard disk 1"), // }}, // GuestOS: to.Ptr("Other (32-bit)"), // GuestOSType: to.Ptr("other"), // Nics: []*armvmwarecloudsimple.VirtualNic{ // { // MacAddress: to.Ptr("00:50:56:a6:7e:93"), // Network: &armvmwarecloudsimple.VirtualNetwork{ // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-19"), // }, // NicType: to.Ptr(armvmwarecloudsimple.NICTypeE1000), // PowerOnBoot: to.Ptr(true), // VirtualNicID: to.Ptr("4000"), // VirtualNicName: to.Ptr("Network adapter 1"), // }}, // NumberOfCores: to.Ptr[int32](2), // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // Vmwaretools: to.Ptr("10309"), // }, // }}, // VirtualNetworks: []*armvmwarecloudsimple.VirtualNetwork{ // { // Name: to.Ptr("Datacenter/CS-Management"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/virtualNetworks"), // Assignable: to.Ptr(false), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-19"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.VirtualNetworkProperties{ // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // }, // }, // { // Name: to.Ptr("Datacenter/CS-Rescue"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/virtualNetworks"), // Assignable: to.Ptr(true), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-20"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.VirtualNetworkProperties{ // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // }, // }, // { // Name: to.Ptr("Datacenter/CS-VSAN"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/virtualNetworks"), // Assignable: to.Ptr(false), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-21"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.VirtualNetworkProperties{ // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // }, // }, // { // Name: to.Ptr("Datacenter/CS-VMotion"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/virtualNetworks"), // Assignable: to.Ptr(false), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-22"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.VirtualNetworkProperties{ // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // }, // }, // { // Name: to.Ptr("Datacenter/net-01"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/virtualNetworks"), // Assignable: to.Ptr(true), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-35"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.VirtualNetworkProperties{ // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // }, // }}, // }, // } }
Output:
func (*PrivateCloudsClient) NewListPager ¶ added in v0.4.0
func (client *PrivateCloudsClient) NewListPager(regionID string, options *PrivateCloudsClientListOptions) *runtime.Pager[PrivateCloudsClientListResponse]
NewListPager - Returns list of private clouds in particular region
Generated from API version 2019-04-01
- regionID - The region Id (westus, eastus)
- options - PrivateCloudsClientListOptions contains the optional parameters for the PrivateCloudsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListPrivateCloudInLocation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPrivateCloudsClient().NewListPager("eastus", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PrivateCloudList = armvmwarecloudsimple.PrivateCloudList{ // Value: []*armvmwarecloudsimple.PrivateCloud{ // { // Name: to.Ptr("myPrivateCloud"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/privateClouds"), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/myPrivateCloud"), // Location: to.Ptr("eastus"), // Properties: &armvmwarecloudsimple.PrivateCloudProperties{ // Type: to.Ptr("vSphere"), // AvailabilityZoneID: to.Ptr("az1"), // AvailabilityZoneName: to.Ptr("Availability Zone 1"), // ClustersNumber: to.Ptr[int32](1), // CreatedBy: to.Ptr("john.doe@cloudsimple.com"), // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-21T07:32:59.491Z"); return t}()), // DNSServers: []*string{ // to.Ptr("100.100.100.8"), // to.Ptr("100.100.100.9")}, // Expires: to.Ptr("n/a"), // NsxType: to.Ptr("Advanced"), // PlacementGroupID: to.Ptr("n2"), // PlacementGroupName: to.Ptr("Placement Group 2"), // PrivateCloudID: to.Ptr("private-cloud-id"), // State: to.Ptr("operational"), // TotalCPUCores: to.Ptr[int32](84), // TotalNodes: to.Ptr[int32](3), // TotalRAM: to.Ptr[int32](768), // TotalStorage: to.Ptr[float32](16.875), // VSphereVersion: to.Ptr("6.7u1"), // VcenterFqdn: to.Ptr("vcsa-eastus.az.cloudsimple.io"), // VcenterRefid: to.Ptr("100.100.100.6"), // }, // }}, // } } }
Output:
type PrivateCloudsClientGetOptions ¶ added in v0.2.0
type PrivateCloudsClientGetOptions struct { }
PrivateCloudsClientGetOptions contains the optional parameters for the PrivateCloudsClient.Get method.
type PrivateCloudsClientGetResponse ¶ added in v0.2.0
type PrivateCloudsClientGetResponse struct { // Private cloud model PrivateCloud }
PrivateCloudsClientGetResponse contains the response from method PrivateCloudsClient.Get.
type PrivateCloudsClientListOptions ¶ added in v0.2.0
type PrivateCloudsClientListOptions struct { }
PrivateCloudsClientListOptions contains the optional parameters for the PrivateCloudsClient.NewListPager method.
type PrivateCloudsClientListResponse ¶ added in v0.2.0
type PrivateCloudsClientListResponse struct { // List of private clouds PrivateCloudList }
PrivateCloudsClientListResponse contains the response from method PrivateCloudsClient.NewListPager.
type ResourcePool ¶
type ResourcePool struct { // REQUIRED; resource pool id (privateCloudId:vsphereId) ID *string // Resource pool properties Properties *ResourcePoolProperties // READ-ONLY; Azure region Location *string // READ-ONLY; {ResourcePoolName} Name *string // READ-ONLY; The Private Cloud Id PrivateCloudID *string // READ-ONLY; {resourceProviderNamespace}/{resourceType} Type *string }
ResourcePool - Resource pool model
func (ResourcePool) MarshalJSON ¶ added in v1.1.0
func (r ResourcePool) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourcePool.
func (*ResourcePool) UnmarshalJSON ¶ added in v1.1.0
func (r *ResourcePool) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourcePool.
type ResourcePoolProperties ¶
type ResourcePoolProperties struct { // READ-ONLY; Hierarchical resource pool name FullName *string }
ResourcePoolProperties - Properties of resource pool
func (ResourcePoolProperties) MarshalJSON ¶ added in v1.1.0
func (r ResourcePoolProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourcePoolProperties.
func (*ResourcePoolProperties) UnmarshalJSON ¶ added in v1.1.0
func (r *ResourcePoolProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourcePoolProperties.
type ResourcePoolsClient ¶
type ResourcePoolsClient struct {
// contains filtered or unexported fields
}
ResourcePoolsClient contains the methods for the ResourcePools group. Don't use this type directly, use NewResourcePoolsClient() instead.
func NewResourcePoolsClient ¶
func NewResourcePoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourcePoolsClient, error)
NewResourcePoolsClient creates a new instance of ResourcePoolsClient with the specified values.
- subscriptionID - The subscription ID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ResourcePoolsClient) Get ¶
func (client *ResourcePoolsClient) Get(ctx context.Context, regionID string, pcName string, resourcePoolName string, options *ResourcePoolsClientGetOptions) (ResourcePoolsClientGetResponse, error)
Get - Returns resource pool templates by its name If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-04-01
- regionID - The region Id (westus, eastus)
- pcName - The private cloud name
- resourcePoolName - resource pool id (vsphereId)
- options - ResourcePoolsClientGetOptions contains the optional parameters for the ResourcePoolsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetResourcePool.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewResourcePoolsClient().Get(ctx, "westus2", "myPrivateCloud", "resgroup-26", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ResourcePool = armvmwarecloudsimple.ResourcePool{ // Name: to.Ptr("Workload"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/resourcePools"), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/resourcePools/resgroup-26"), // Location: to.Ptr("westus2"), // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // Properties: &armvmwarecloudsimple.ResourcePoolProperties{ // FullName: to.Ptr("myPrivateCloud/Datacenter/Cluster/Workload"), // }, // } }
Output:
func (*ResourcePoolsClient) NewListPager ¶ added in v0.4.0
func (client *ResourcePoolsClient) NewListPager(regionID string, pcName string, options *ResourcePoolsClientListOptions) *runtime.Pager[ResourcePoolsClientListResponse]
NewListPager - Returns list of resource pools in region for private cloud
Generated from API version 2019-04-01
- regionID - The region Id (westus, eastus)
- pcName - The private cloud name
- options - ResourcePoolsClientListOptions contains the optional parameters for the ResourcePoolsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListResourcePools.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewResourcePoolsClient().NewListPager("westus2", "myPrivateCloud", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ResourcePoolsListResponse = armvmwarecloudsimple.ResourcePoolsListResponse{ // Value: []*armvmwarecloudsimple.ResourcePool{ // { // Name: to.Ptr("Workload"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/resourcePools"), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/resourcePools/resgroup-26"), // Location: to.Ptr("westus2"), // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // Properties: &armvmwarecloudsimple.ResourcePoolProperties{ // FullName: to.Ptr("myPrivateCloud/Datacenter/Cluster/Workload"), // }, // }}, // } } }
Output:
type ResourcePoolsClientGetOptions ¶ added in v0.2.0
type ResourcePoolsClientGetOptions struct { }
ResourcePoolsClientGetOptions contains the optional parameters for the ResourcePoolsClient.Get method.
type ResourcePoolsClientGetResponse ¶ added in v0.2.0
type ResourcePoolsClientGetResponse struct { // Resource pool model ResourcePool }
ResourcePoolsClientGetResponse contains the response from method ResourcePoolsClient.Get.
type ResourcePoolsClientListOptions ¶ added in v0.2.0
type ResourcePoolsClientListOptions struct { }
ResourcePoolsClientListOptions contains the optional parameters for the ResourcePoolsClient.NewListPager method.
type ResourcePoolsClientListResponse ¶ added in v0.2.0
type ResourcePoolsClientListResponse struct { // List of resource pools response model ResourcePoolsListResponse }
ResourcePoolsClientListResponse contains the response from method ResourcePoolsClient.NewListPager.
type ResourcePoolsListResponse ¶
type ResourcePoolsListResponse struct { // Link for next list of ResourcePoolsList NextLink *string // Results of the Resource pools list Value []*ResourcePool }
ResourcePoolsListResponse - List of resource pools response model
func (ResourcePoolsListResponse) MarshalJSON ¶
func (r ResourcePoolsListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourcePoolsListResponse.
func (*ResourcePoolsListResponse) UnmarshalJSON ¶ added in v1.1.0
func (r *ResourcePoolsListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourcePoolsListResponse.
type SKU ¶
type SKU struct { // REQUIRED; The name of the SKU for VMWare CloudSimple Node Name *string // The capacity of the SKU Capacity *string // dedicatedCloudNode example: 8 x Ten-Core Intel® Xeon® Processor E5-2640 v4 2.40GHz 25MB Cache (90W); 12 x 64GB PC4-19200 // 2400MHz DDR4 ECC Registered DIMM, … Description *string // If the service has different generations of hardware, for the same SKU, then that can be captured here Family *string // The tier of the SKU Tier *string }
SKU - The purchase SKU for CloudSimple paid resources
func (SKU) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type SKU.
func (*SKU) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type SKU.
type SKUAvailability ¶
type SKUAvailability struct { // REQUIRED; indicates how many resources of a given SKU is available in a AZ->PG Limit *int32 // CloudSimple Availability Zone id DedicatedAvailabilityZoneID *string // CloudSimple Availability Zone Name DedicatedAvailabilityZoneName *string // CloudSimple Placement Group Id DedicatedPlacementGroupID *string // CloudSimple Placement Group name DedicatedPlacementGroupName *string // resource type e.g. DedicatedCloudNodes ResourceType *string // sku id SKUID *string // sku name SKUName *string }
SKUAvailability - SKU availability model
func (SKUAvailability) MarshalJSON ¶ added in v1.1.0
func (s SKUAvailability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SKUAvailability.
func (*SKUAvailability) UnmarshalJSON ¶ added in v1.1.0
func (s *SKUAvailability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SKUAvailability.
type SKUAvailabilityListResponse ¶
type SKUAvailabilityListResponse struct { // Link for next list of DedicatedCloudNode NextLink *string // Results of the DedicatedPlacementGroupSkuAvailability list Value []*SKUAvailability }
SKUAvailabilityListResponse - List of SKU availabilities
func (SKUAvailabilityListResponse) MarshalJSON ¶
func (s SKUAvailabilityListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SKUAvailabilityListResponse.
func (*SKUAvailabilityListResponse) UnmarshalJSON ¶ added in v1.1.0
func (s *SKUAvailabilityListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SKUAvailabilityListResponse.
type SKUDescription ¶
type SKUDescription struct { // REQUIRED; SKU's id ID *string // REQUIRED; SKU's name Name *string }
SKUDescription - The purchase SKU for CloudSimple paid resources
func (SKUDescription) MarshalJSON ¶ added in v1.1.0
func (s SKUDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SKUDescription.
func (*SKUDescription) UnmarshalJSON ¶ added in v1.1.0
func (s *SKUDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SKUDescription.
type SKUsAvailabilityClient ¶
type SKUsAvailabilityClient struct {
// contains filtered or unexported fields
}
SKUsAvailabilityClient contains the methods for the SKUsAvailability group. Don't use this type directly, use NewSKUsAvailabilityClient() instead.
func NewSKUsAvailabilityClient ¶
func NewSKUsAvailabilityClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SKUsAvailabilityClient, error)
NewSKUsAvailabilityClient creates a new instance of SKUsAvailabilityClient with the specified values.
- subscriptionID - The subscription ID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*SKUsAvailabilityClient) NewListPager ¶ added in v0.4.0
func (client *SKUsAvailabilityClient) NewListPager(regionID string, options *SKUsAvailabilityClientListOptions) *runtime.Pager[SKUsAvailabilityClientListResponse]
NewListPager - Returns list of available resources in region
Generated from API version 2019-04-01
- regionID - The region Id (westus, eastus)
- options - SKUsAvailabilityClientListOptions contains the optional parameters for the SKUsAvailabilityClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListAvailabilities.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSKUsAvailabilityClient().NewListPager("westus2", &armvmwarecloudsimple.SKUsAvailabilityClientListOptions{SKUID: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SKUAvailabilityListResponse = armvmwarecloudsimple.SKUAvailabilityListResponse{ // Value: []*armvmwarecloudsimple.SKUAvailability{ // { // DedicatedAvailabilityZoneID: to.Ptr("az1"), // DedicatedAvailabilityZoneName: to.Ptr("Availability Zone 1"), // DedicatedPlacementGroupID: to.Ptr("n1"), // DedicatedPlacementGroupName: to.Ptr("Placement Group 1"), // Limit: to.Ptr[int32](0), // ResourceType: to.Ptr("Microsoft.VMwareCloudSimple/dedicatedCloudNodes"), // SKUID: to.Ptr("general"), // SKUName: to.Ptr("CS28-Node"), // }, // { // DedicatedAvailabilityZoneID: to.Ptr("az1"), // DedicatedAvailabilityZoneName: to.Ptr("Availability Zone 1"), // DedicatedPlacementGroupID: to.Ptr("n1"), // DedicatedPlacementGroupName: to.Ptr("Placement Group 1"), // Limit: to.Ptr[int32](0), // ResourceType: to.Ptr("Microsoft.VMwareCloudSimple/dedicatedCloudNodes"), // SKUID: to.Ptr("large"), // SKUName: to.Ptr("CS36-Node"), // }}, // } } }
Output:
type SKUsAvailabilityClientListOptions ¶ added in v0.2.0
type SKUsAvailabilityClientListOptions struct { // sku id, if no sku is passed availability for all skus will be returned SKUID *string }
SKUsAvailabilityClientListOptions contains the optional parameters for the SKUsAvailabilityClient.NewListPager method.
type SKUsAvailabilityClientListResponse ¶ added in v0.2.0
type SKUsAvailabilityClientListResponse struct { // List of SKU availabilities SKUAvailabilityListResponse }
SKUsAvailabilityClientListResponse contains the response from method SKUsAvailabilityClient.NewListPager.
type StopMode ¶
type StopMode string
StopMode - mode indicates a type of stop operation - reboot, suspend, shutdown or power-off
func PossibleStopModeValues ¶
func PossibleStopModeValues() []StopMode
PossibleStopModeValues returns the possible values for the StopMode const type.
type Usage ¶
type Usage struct { // REQUIRED; The current usage value CurrentValue *int32 // REQUIRED; limit of a given sku in a region for a subscription. The maximum permitted value for the usage quota. If there // is no limit, this value will be -1 Limit *int32 // Usage name value and localized name Name *UsageName // The usages' unit Unit *UsageCount }
Usage model
func (Usage) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Usage.
func (*Usage) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Usage.
type UsageCount ¶
type UsageCount string
UsageCount - The usages' unit
const ( UsageCountBytes UsageCount = "Bytes" UsageCountBytesPerSecond UsageCount = "BytesPerSecond" UsageCountCount UsageCount = "Count" UsageCountCountPerSecond UsageCount = "CountPerSecond" UsageCountPercent UsageCount = "Percent" UsageCountSeconds UsageCount = "Seconds" )
func PossibleUsageCountValues ¶
func PossibleUsageCountValues() []UsageCount
PossibleUsageCountValues returns the possible values for the UsageCount const type.
type UsageListResponse ¶
type UsageListResponse struct { // Link for next list of DedicatedCloudNode NextLink *string // READ-ONLY; The list of usages Value []*Usage }
UsageListResponse - List of usages
func (UsageListResponse) MarshalJSON ¶
func (u UsageListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UsageListResponse.
func (*UsageListResponse) UnmarshalJSON ¶ added in v1.1.0
func (u *UsageListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UsageListResponse.
type UsageName ¶
type UsageName struct { // e.g. "Virtual Machines" LocalizedValue *string // resource type or resource type sku name, e.g. virtualMachines Value *string }
UsageName - User name model
func (UsageName) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type UsageName.
func (*UsageName) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type UsageName.
type UsagesClient ¶
type UsagesClient struct {
// contains filtered or unexported fields
}
UsagesClient contains the methods for the Usages group. Don't use this type directly, use NewUsagesClient() instead.
func NewUsagesClient ¶
func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsagesClient, error)
NewUsagesClient creates a new instance of UsagesClient with the specified values.
- subscriptionID - The subscription ID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*UsagesClient) NewListPager ¶ added in v0.4.0
func (client *UsagesClient) NewListPager(regionID string, options *UsagesClientListOptions) *runtime.Pager[UsagesClientListResponse]
NewListPager - Returns list of usage in region
Generated from API version 2019-04-01
- regionID - The region Id (westus, eastus)
- options - UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListUsages.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewUsagesClient().NewListPager("westus2", &armvmwarecloudsimple.UsagesClientListOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.UsageListResponse = armvmwarecloudsimple.UsageListResponse{ // Value: []*armvmwarecloudsimple.Usage{ // { // Name: &armvmwarecloudsimple.UsageName{ // LocalizedValue: to.Ptr("CS28-Node"), // Value: to.Ptr("general"), // }, // CurrentValue: to.Ptr[int32](1), // Limit: to.Ptr[int32](5), // Unit: to.Ptr(armvmwarecloudsimple.UsageCountCount), // }, // { // Name: &armvmwarecloudsimple.UsageName{ // LocalizedValue: to.Ptr("CS36-Node"), // Value: to.Ptr("large"), // }, // CurrentValue: to.Ptr[int32](0), // Limit: to.Ptr[int32](5), // Unit: to.Ptr(armvmwarecloudsimple.UsageCountCount), // }}, // } } }
Output:
type UsagesClientListOptions ¶ added in v0.2.0
type UsagesClientListOptions struct { // The filter to apply on the list operation. only name.value is allowed here as a filter e.g. $filter=name.value eq 'xxxx' Filter *string }
UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method.
type UsagesClientListResponse ¶ added in v0.2.0
type UsagesClientListResponse struct { // List of usages UsageListResponse }
UsagesClientListResponse contains the response from method UsagesClient.NewListPager.
type VirtualDisk ¶
type VirtualDisk struct { // REQUIRED; Disk's Controller id ControllerID *string // REQUIRED; Disk's independence mode type IndependenceMode *DiskIndependenceMode // REQUIRED; Disk's total size TotalSize *int32 // Disk's id VirtualDiskID *string // READ-ONLY; Disk's display name VirtualDiskName *string }
VirtualDisk - Virtual disk model
func (VirtualDisk) MarshalJSON ¶ added in v1.1.0
func (v VirtualDisk) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualDisk.
func (*VirtualDisk) UnmarshalJSON ¶ added in v1.1.0
func (v *VirtualDisk) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualDisk.
type VirtualDiskController ¶
type VirtualDiskController struct { // READ-ONLY; Controller's id ID *string // READ-ONLY; The display name of Controller Name *string // READ-ONLY; dik controller subtype (VMWAREPARAVIRTUAL, BUSPARALLEL, LSIPARALLEL, LSISAS) SubType *string // READ-ONLY; disk controller type (SCSI) Type *string }
VirtualDiskController - Virtual disk controller model
func (VirtualDiskController) MarshalJSON ¶ added in v1.1.0
func (v VirtualDiskController) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualDiskController.
func (*VirtualDiskController) UnmarshalJSON ¶ added in v1.1.0
func (v *VirtualDiskController) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualDiskController.
type VirtualMachine ¶
type VirtualMachine struct { // REQUIRED; Azure region Location *string // Virtual machine properties Properties *VirtualMachineProperties // The list of tags Tags map[string]*string // READ-ONLY; /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/virtualMachines/{virtualMachineName} ID *string // READ-ONLY; {virtualMachineName} Name *string // READ-ONLY; {resourceProviderNamespace}/{resourceType} Type *string }
VirtualMachine - Virtual machine model
func (VirtualMachine) MarshalJSON ¶
func (v VirtualMachine) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachine.
func (*VirtualMachine) UnmarshalJSON ¶ added in v1.1.0
func (v *VirtualMachine) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachine.
type VirtualMachineListResponse ¶
type VirtualMachineListResponse struct { // Link for next list of VirtualMachines NextLink *string // Results of the VirtualMachine list Value []*VirtualMachine }
VirtualMachineListResponse - List of virtual machines
func (VirtualMachineListResponse) MarshalJSON ¶
func (v VirtualMachineListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineListResponse.
func (*VirtualMachineListResponse) UnmarshalJSON ¶ added in v1.1.0
func (v *VirtualMachineListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineListResponse.
type VirtualMachineProperties ¶
type VirtualMachineProperties struct { // REQUIRED; The amount of memory AmountOfRAM *int32 // REQUIRED; The number of CPU cores NumberOfCores *int32 // REQUIRED; Private Cloud Id PrivateCloudID *string // Virtual machine properties Customization *GuestOSCustomization // The list of Virtual Disks Disks []*VirtualDisk // Expose Guest OS or not ExposeToGuestVM *bool // The list of Virtual NICs Nics []*VirtualNic // Password for login. Deprecated - use customization property Password *string // Virtual Machines Resource Pool ResourcePool *ResourcePool // Virtual Machine Template Id TemplateID *string // Username for login. Deprecated - use customization property Username *string // The list of Virtual VSphere Networks VSphereNetworks []*string // READ-ONLY; The list of Virtual Disks' Controllers Controllers []*VirtualDiskController // READ-ONLY; The DNS name of Virtual Machine in VCenter Dnsname *string // READ-ONLY; The path to virtual machine folder in VCenter Folder *string // READ-ONLY; The name of Guest OS GuestOS *string // READ-ONLY; The Guest OS type GuestOSType *GuestOSType // READ-ONLY; The provisioning status of the resource ProvisioningState *string // READ-ONLY; The public ip of Virtual Machine PublicIP *string // READ-ONLY; The status of Virtual machine Status *VirtualMachineStatus // READ-ONLY; The internal id of Virtual Machine in VCenter VMID *string // READ-ONLY; VMware tools version Vmwaretools *string }
VirtualMachineProperties - Properties of virtual machine
func (VirtualMachineProperties) MarshalJSON ¶
func (v VirtualMachineProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineProperties.
func (*VirtualMachineProperties) UnmarshalJSON ¶ added in v1.1.0
func (v *VirtualMachineProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineProperties.
type VirtualMachineStatus ¶
type VirtualMachineStatus string
VirtualMachineStatus - The status of Virtual machine
const ( VirtualMachineStatusDeallocating VirtualMachineStatus = "deallocating" VirtualMachineStatusDeleting VirtualMachineStatus = "deleting" VirtualMachineStatusPoweredoff VirtualMachineStatus = "poweredoff" VirtualMachineStatusRunning VirtualMachineStatus = "running" VirtualMachineStatusSuspended VirtualMachineStatus = "suspended" VirtualMachineStatusUpdating VirtualMachineStatus = "updating" )
func PossibleVirtualMachineStatusValues ¶
func PossibleVirtualMachineStatusValues() []VirtualMachineStatus
PossibleVirtualMachineStatusValues returns the possible values for the VirtualMachineStatus const type.
type VirtualMachineStopMode ¶
type VirtualMachineStopMode struct { // mode indicates a type of stop operation - reboot, suspend, shutdown or power-off Mode *StopMode }
VirtualMachineStopMode - List of virtual machine stop modes
func (VirtualMachineStopMode) MarshalJSON ¶ added in v1.1.0
func (v VirtualMachineStopMode) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineStopMode.
func (*VirtualMachineStopMode) UnmarshalJSON ¶ added in v1.1.0
func (v *VirtualMachineStopMode) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineStopMode.
type VirtualMachineTemplate ¶
type VirtualMachineTemplate struct { // Azure region Location *string // The Virtual Machine Template properties Properties *VirtualMachineTemplateProperties // READ-ONLY; virtual machine template id (privateCloudId:vsphereId) ID *string // READ-ONLY; {virtualMachineTemplateName} Name *string // READ-ONLY; {resourceProviderNamespace}/{resourceType} Type *string }
VirtualMachineTemplate - Virtual machine template model
func (VirtualMachineTemplate) MarshalJSON ¶ added in v1.1.0
func (v VirtualMachineTemplate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineTemplate.
func (*VirtualMachineTemplate) UnmarshalJSON ¶ added in v1.1.0
func (v *VirtualMachineTemplate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineTemplate.
type VirtualMachineTemplateListResponse ¶
type VirtualMachineTemplateListResponse struct { // Link for next list of VirtualMachineTemplate NextLink *string // Results of the VM template list Value []*VirtualMachineTemplate }
VirtualMachineTemplateListResponse - List of virtual machine templates
func (VirtualMachineTemplateListResponse) MarshalJSON ¶
func (v VirtualMachineTemplateListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineTemplateListResponse.
func (*VirtualMachineTemplateListResponse) UnmarshalJSON ¶ added in v1.1.0
func (v *VirtualMachineTemplateListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineTemplateListResponse.
type VirtualMachineTemplateProperties ¶
type VirtualMachineTemplateProperties struct { // REQUIRED; The Private Cloud Id PrivateCloudID *string // The amount of memory AmountOfRAM *int32 // The list of Virtual Disk Controllers Controllers []*VirtualDiskController // The description of Virtual Machine Template Description *string // The list of Virtual Disks Disks []*VirtualDisk // Expose Guest OS or not ExposeToGuestVM *bool // The list of Virtual NICs Nics []*VirtualNic // The number of CPU cores NumberOfCores *int32 // path to folder Path *string // The list of VSphere networks VSphereNetworks []*string // The tags from VSphere VSphereTags []*string // READ-ONLY; The Guest OS GuestOS *string // READ-ONLY; The Guest OS types GuestOSType *string // READ-ONLY; The VMware tools version Vmwaretools *string }
VirtualMachineTemplateProperties - Properties of virtual machine template
func (VirtualMachineTemplateProperties) MarshalJSON ¶
func (v VirtualMachineTemplateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineTemplateProperties.
func (*VirtualMachineTemplateProperties) UnmarshalJSON ¶ added in v1.1.0
func (v *VirtualMachineTemplateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineTemplateProperties.
type VirtualMachineTemplatesClient ¶
type VirtualMachineTemplatesClient struct {
// contains filtered or unexported fields
}
VirtualMachineTemplatesClient contains the methods for the VirtualMachineTemplates group. Don't use this type directly, use NewVirtualMachineTemplatesClient() instead.
func NewVirtualMachineTemplatesClient ¶
func NewVirtualMachineTemplatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineTemplatesClient, error)
NewVirtualMachineTemplatesClient creates a new instance of VirtualMachineTemplatesClient with the specified values.
- subscriptionID - The subscription ID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*VirtualMachineTemplatesClient) Get ¶
func (client *VirtualMachineTemplatesClient) Get(ctx context.Context, regionID string, pcName string, virtualMachineTemplateName string, options *VirtualMachineTemplatesClientGetOptions) (VirtualMachineTemplatesClientGetResponse, error)
Get - Returns virtual machine templates by its name If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-04-01
- regionID - The region Id (westus, eastus)
- pcName - The private cloud name
- virtualMachineTemplateName - virtual machine template id (vsphereId)
- options - VirtualMachineTemplatesClientGetOptions contains the optional parameters for the VirtualMachineTemplatesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetVirtualMachineTemplate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewVirtualMachineTemplatesClient().Get(ctx, "westus2", "myPrivateCloud", "vm-34", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.VirtualMachineTemplate = armvmwarecloudsimple.VirtualMachineTemplate{ // Name: to.Ptr("centos-template"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/virtualMachineTemplates"), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualMachineTemplates/vm-34"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.VirtualMachineTemplateProperties{ // Path: to.Ptr("Datacenter/Workload VMs"), // AmountOfRAM: to.Ptr[int32](4096), // Controllers: []*armvmwarecloudsimple.VirtualDiskController{ // { // Name: to.Ptr("SCSI controller 0"), // Type: to.Ptr("SCSI"), // ID: to.Ptr("1000"), // SubType: to.Ptr("LSI_PARALEL"), // }}, // Disks: []*armvmwarecloudsimple.VirtualDisk{ // { // ControllerID: to.Ptr("1000"), // IndependenceMode: to.Ptr(armvmwarecloudsimple.DiskIndependenceModePersistent), // TotalSize: to.Ptr[int32](10485760), // VirtualDiskID: to.Ptr("2000"), // VirtualDiskName: to.Ptr("Hard disk 1"), // }}, // GuestOS: to.Ptr("Other (32-bit)"), // GuestOSType: to.Ptr("other"), // Nics: []*armvmwarecloudsimple.VirtualNic{ // { // MacAddress: to.Ptr("00:50:56:a6:7e:93"), // Network: &armvmwarecloudsimple.VirtualNetwork{ // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-19"), // }, // NicType: to.Ptr(armvmwarecloudsimple.NICTypeE1000), // PowerOnBoot: to.Ptr(true), // VirtualNicID: to.Ptr("4000"), // VirtualNicName: to.Ptr("Network adapter 1"), // }}, // NumberOfCores: to.Ptr[int32](2), // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // Vmwaretools: to.Ptr("10309"), // }, // } }
Output:
func (*VirtualMachineTemplatesClient) NewListPager ¶ added in v0.4.0
func (client *VirtualMachineTemplatesClient) NewListPager(pcName string, regionID string, resourcePoolName string, options *VirtualMachineTemplatesClientListOptions) *runtime.Pager[VirtualMachineTemplatesClientListResponse]
NewListPager - Returns list of virtual machine templates in region for private cloud
Generated from API version 2019-04-01
- pcName - The private cloud name
- regionID - The region Id (westus, eastus)
- resourcePoolName - Resource pool used to derive vSphere cluster which contains VM templates
- options - VirtualMachineTemplatesClientListOptions contains the optional parameters for the VirtualMachineTemplatesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListVirtualMachineTemplates.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewVirtualMachineTemplatesClient().NewListPager("myPrivateCloud", "westus2", "/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/resourcePools/resgroup-26", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.VirtualMachineTemplateListResponse = armvmwarecloudsimple.VirtualMachineTemplateListResponse{ // Value: []*armvmwarecloudsimple.VirtualMachineTemplate{ // { // Name: to.Ptr("centos-template"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/virtualMachineTemplates"), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualMachineTemplates/vm-34"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.VirtualMachineTemplateProperties{ // Path: to.Ptr("Datacenter/Workload VMs"), // AmountOfRAM: to.Ptr[int32](4096), // Controllers: []*armvmwarecloudsimple.VirtualDiskController{ // { // Name: to.Ptr("SCSI controller 0"), // Type: to.Ptr("SCSI"), // ID: to.Ptr("1000"), // SubType: to.Ptr("LSI_PARALEL"), // }}, // Disks: []*armvmwarecloudsimple.VirtualDisk{ // { // ControllerID: to.Ptr("1000"), // IndependenceMode: to.Ptr(armvmwarecloudsimple.DiskIndependenceModePersistent), // TotalSize: to.Ptr[int32](10485760), // VirtualDiskID: to.Ptr("2000"), // VirtualDiskName: to.Ptr("Hard disk 1"), // }}, // GuestOS: to.Ptr("Other (32-bit)"), // GuestOSType: to.Ptr("other"), // Nics: []*armvmwarecloudsimple.VirtualNic{ // { // MacAddress: to.Ptr("00:50:56:a6:7e:93"), // Network: &armvmwarecloudsimple.VirtualNetwork{ // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-19"), // }, // NicType: to.Ptr(armvmwarecloudsimple.NICTypeE1000), // PowerOnBoot: to.Ptr(true), // VirtualNicID: to.Ptr("4000"), // VirtualNicName: to.Ptr("Network adapter 1"), // }}, // NumberOfCores: to.Ptr[int32](2), // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // Vmwaretools: to.Ptr("10309"), // }, // }}, // } } }
Output:
type VirtualMachineTemplatesClientGetOptions ¶ added in v0.2.0
type VirtualMachineTemplatesClientGetOptions struct { }
VirtualMachineTemplatesClientGetOptions contains the optional parameters for the VirtualMachineTemplatesClient.Get method.
type VirtualMachineTemplatesClientGetResponse ¶ added in v0.2.0
type VirtualMachineTemplatesClientGetResponse struct { // Virtual machine template model VirtualMachineTemplate }
VirtualMachineTemplatesClientGetResponse contains the response from method VirtualMachineTemplatesClient.Get.
type VirtualMachineTemplatesClientListOptions ¶ added in v0.2.0
type VirtualMachineTemplatesClientListOptions struct { }
VirtualMachineTemplatesClientListOptions contains the optional parameters for the VirtualMachineTemplatesClient.NewListPager method.
type VirtualMachineTemplatesClientListResponse ¶ added in v0.2.0
type VirtualMachineTemplatesClientListResponse struct { // List of virtual machine templates VirtualMachineTemplateListResponse }
VirtualMachineTemplatesClientListResponse contains the response from method VirtualMachineTemplatesClient.NewListPager.
type VirtualMachinesClient ¶
type VirtualMachinesClient struct {
// contains filtered or unexported fields
}
VirtualMachinesClient contains the methods for the VirtualMachines group. Don't use this type directly, use NewVirtualMachinesClient() instead.
func NewVirtualMachinesClient ¶
func NewVirtualMachinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachinesClient, error)
NewVirtualMachinesClient creates a new instance of VirtualMachinesClient with the specified values.
- subscriptionID - The subscription ID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*VirtualMachinesClient) BeginCreateOrUpdate ¶
func (client *VirtualMachinesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, referer string, virtualMachineName string, virtualMachineRequest VirtualMachine, options *VirtualMachinesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualMachinesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create Or Update Virtual Machine If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-04-01
- resourceGroupName - The name of the resource group
- referer - referer url
- virtualMachineName - virtual machine name
- virtualMachineRequest - Create or Update Virtual Machine request
- options - VirtualMachinesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/CreateVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachinesClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "https://management.azure.com/", "myVirtualMachine", armvmwarecloudsimple.VirtualMachine{ Location: to.Ptr("westus2"), Properties: &armvmwarecloudsimple.VirtualMachineProperties{ AmountOfRAM: to.Ptr[int32](4096), Disks: []*armvmwarecloudsimple.VirtualDisk{ { ControllerID: to.Ptr("1000"), IndependenceMode: to.Ptr(armvmwarecloudsimple.DiskIndependenceModePersistent), TotalSize: to.Ptr[int32](10485760), VirtualDiskID: to.Ptr("2000"), }}, Nics: []*armvmwarecloudsimple.VirtualNic{ { Network: &armvmwarecloudsimple.VirtualNetwork{ ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-19"), }, NicType: to.Ptr(armvmwarecloudsimple.NICTypeE1000), PowerOnBoot: to.Ptr(true), VirtualNicID: to.Ptr("4000"), }}, NumberOfCores: to.Ptr[int32](2), PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), ResourcePool: &armvmwarecloudsimple.ResourcePool{ ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/resourcePools/resgroup-26"), }, TemplateID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualMachineTemplates/vm-34"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.VirtualMachine = armvmwarecloudsimple.VirtualMachine{ // Name: to.Ptr("myVirtualMachine"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/virtualMachines"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VMwareCloudSimple/virtualMachines/myVirtualMachine"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.VirtualMachineProperties{ // AmountOfRAM: to.Ptr[int32](4096), // Controllers: []*armvmwarecloudsimple.VirtualDiskController{ // }, // Disks: []*armvmwarecloudsimple.VirtualDisk{ // { // ControllerID: to.Ptr("1000"), // IndependenceMode: to.Ptr(armvmwarecloudsimple.DiskIndependenceModePersistent), // TotalSize: to.Ptr[int32](10485760), // VirtualDiskID: to.Ptr("2000"), // VirtualDiskName: to.Ptr("Hard disk 1"), // }}, // GuestOS: to.Ptr("Other (32-bit)"), // GuestOSType: to.Ptr(armvmwarecloudsimple.GuestOSTypeOther), // Nics: []*armvmwarecloudsimple.VirtualNic{ // { // Network: &armvmwarecloudsimple.VirtualNetwork{ // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-19"), // }, // NicType: to.Ptr(armvmwarecloudsimple.NICTypeE1000), // PowerOnBoot: to.Ptr(true), // VirtualNicID: to.Ptr("4000"), // VirtualNicName: to.Ptr("Network adapter 1"), // }}, // NumberOfCores: to.Ptr[int32](2), // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // ProvisioningState: to.Ptr("Succeeded"), // ResourcePool: &armvmwarecloudsimple.ResourcePool{ // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/resourcePools/resgroup-26"), // }, // TemplateID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualMachineTemplates/vm-34"), // Vmwaretools: to.Ptr("0"), // }, // } }
Output:
func (*VirtualMachinesClient) BeginDelete ¶
func (client *VirtualMachinesClient) BeginDelete(ctx context.Context, resourceGroupName string, referer string, virtualMachineName string, options *VirtualMachinesClientBeginDeleteOptions) (*runtime.Poller[VirtualMachinesClientDeleteResponse], error)
BeginDelete - Delete virtual machine If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-04-01
- resourceGroupName - The name of the resource group
- referer - referer url
- virtualMachineName - virtual machine name
- options - VirtualMachinesClientBeginDeleteOptions contains the optional parameters for the VirtualMachinesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/DeleteVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachinesClient().BeginDelete(ctx, "myResourceGroup", "https://management.azure.com/", "myVirtualMachine", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*VirtualMachinesClient) BeginStart ¶
func (client *VirtualMachinesClient) BeginStart(ctx context.Context, resourceGroupName string, referer string, virtualMachineName string, options *VirtualMachinesClientBeginStartOptions) (*runtime.Poller[VirtualMachinesClientStartResponse], error)
BeginStart - Power on virtual machine If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-04-01
- resourceGroupName - The name of the resource group
- referer - referer url
- virtualMachineName - virtual machine name
- options - VirtualMachinesClientBeginStartOptions contains the optional parameters for the VirtualMachinesClient.BeginStart method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/StartVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachinesClient().BeginStart(ctx, "myResourceGroup", "https://management.azure.com/", "myVirtualMachine", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*VirtualMachinesClient) BeginStop ¶
func (client *VirtualMachinesClient) BeginStop(ctx context.Context, resourceGroupName string, referer string, virtualMachineName string, options *VirtualMachinesClientBeginStopOptions) (*runtime.Poller[VirtualMachinesClientStopResponse], error)
BeginStop - Power off virtual machine, options: shutdown, poweroff, and suspend If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-04-01
- resourceGroupName - The name of the resource group
- referer - referer url
- virtualMachineName - virtual machine name
- options - VirtualMachinesClientBeginStopOptions contains the optional parameters for the VirtualMachinesClient.BeginStop method.
Example (StopInBodyVirtualMachine) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/StopInBodyVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachinesClient().BeginStop(ctx, "myResourceGroup", "https://management.azure.com/", "myVirtualMachine", &armvmwarecloudsimple.VirtualMachinesClientBeginStopOptions{Mode: nil, M: &armvmwarecloudsimple.VirtualMachineStopMode{}, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
Example (StopInQueryVirtualMachine) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/StopInQueryVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachinesClient().BeginStop(ctx, "myResourceGroup", "https://management.azure.com/", "myVirtualMachine", &armvmwarecloudsimple.VirtualMachinesClientBeginStopOptions{Mode: to.Ptr(armvmwarecloudsimple.StopModeSuspend), M: nil, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*VirtualMachinesClient) BeginUpdate ¶
func (client *VirtualMachinesClient) BeginUpdate(ctx context.Context, resourceGroupName string, virtualMachineName string, virtualMachineRequest PatchPayload, options *VirtualMachinesClientBeginUpdateOptions) (*runtime.Poller[VirtualMachinesClientUpdateResponse], error)
BeginUpdate - Patch virtual machine properties If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-04-01
- resourceGroupName - The name of the resource group
- virtualMachineName - virtual machine name
- virtualMachineRequest - Patch virtual machine request
- options - VirtualMachinesClientBeginUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/PatchVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachinesClient().BeginUpdate(ctx, "myResourceGroup", "myVirtualMachine", armvmwarecloudsimple.PatchPayload{ Tags: map[string]*string{ "myTag": to.Ptr("tagValue"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.VirtualMachine = armvmwarecloudsimple.VirtualMachine{ // Name: to.Ptr("myVirtualMachine"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/virtualMachines"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VMwareCloudSimple/virtualMachines/myVirtualMachine"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.VirtualMachineProperties{ // AmountOfRAM: to.Ptr[int32](4096), // Controllers: []*armvmwarecloudsimple.VirtualDiskController{ // { // Name: to.Ptr("SCSI controller 0"), // Type: to.Ptr("SCSI"), // ID: to.Ptr("1000"), // SubType: to.Ptr("LSI_PARALEL"), // }}, // Disks: []*armvmwarecloudsimple.VirtualDisk{ // { // ControllerID: to.Ptr("1000"), // IndependenceMode: to.Ptr(armvmwarecloudsimple.DiskIndependenceModePersistent), // TotalSize: to.Ptr[int32](10485760), // VirtualDiskID: to.Ptr("2000"), // VirtualDiskName: to.Ptr("Hard disk 1"), // }}, // GuestOS: to.Ptr("Other (32-bit)"), // GuestOSType: to.Ptr(armvmwarecloudsimple.GuestOSTypeOther), // Nics: []*armvmwarecloudsimple.VirtualNic{ // { // Network: &armvmwarecloudsimple.VirtualNetwork{ // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-19"), // }, // NicType: to.Ptr(armvmwarecloudsimple.NICTypeE1000), // PowerOnBoot: to.Ptr(true), // VirtualNicID: to.Ptr("4000"), // VirtualNicName: to.Ptr("Network adapter 1"), // }}, // NumberOfCores: to.Ptr[int32](2), // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // ProvisioningState: to.Ptr("Succeeded"), // ResourcePool: &armvmwarecloudsimple.ResourcePool{ // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/resourcePools/resgroup-26"), // }, // Status: to.Ptr(armvmwarecloudsimple.VirtualMachineStatusRunning), // TemplateID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualMachineTemplates/vm-34"), // VMID: to.Ptr("vm-106"), // Vmwaretools: to.Ptr("10309"), // }, // Tags: map[string]*string{ // "myTag": to.Ptr("tagValue"), // }, // } }
Output:
func (*VirtualMachinesClient) Get ¶
func (client *VirtualMachinesClient) Get(ctx context.Context, resourceGroupName string, virtualMachineName string, options *VirtualMachinesClientGetOptions) (VirtualMachinesClientGetResponse, error)
Get - Get virtual machine If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-04-01
- resourceGroupName - The name of the resource group
- virtualMachineName - virtual machine name
- options - VirtualMachinesClientGetOptions contains the optional parameters for the VirtualMachinesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewVirtualMachinesClient().Get(ctx, "myResourceGroup", "myVirtualMachine", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.VirtualMachine = armvmwarecloudsimple.VirtualMachine{ // Name: to.Ptr("myVirtualMachine"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/virtualMachines"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VMwareCloudSimple/virtualMachines/myVirtualMachine"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.VirtualMachineProperties{ // AmountOfRAM: to.Ptr[int32](4096), // Controllers: []*armvmwarecloudsimple.VirtualDiskController{ // { // Name: to.Ptr("SCSI controller 0"), // Type: to.Ptr("SCSI"), // ID: to.Ptr("1000"), // SubType: to.Ptr("LSI_PARALEL"), // }}, // Disks: []*armvmwarecloudsimple.VirtualDisk{ // { // ControllerID: to.Ptr("1000"), // IndependenceMode: to.Ptr(armvmwarecloudsimple.DiskIndependenceModePersistent), // TotalSize: to.Ptr[int32](10485760), // VirtualDiskID: to.Ptr("2000"), // VirtualDiskName: to.Ptr("Hard disk 1"), // }}, // Folder: to.Ptr("Datacenter/Workload VMs"), // GuestOS: to.Ptr("Other (32-bit)"), // GuestOSType: to.Ptr(armvmwarecloudsimple.GuestOSTypeOther), // Nics: []*armvmwarecloudsimple.VirtualNic{ // { // MacAddress: to.Ptr("00:50:56:a6:d0:e1"), // Network: &armvmwarecloudsimple.VirtualNetwork{ // Name: to.Ptr("Datacenter/CS-Management"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/virtualNetworks"), // Assignable: to.Ptr(false), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualnetworks/dvportgroup-19"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.VirtualNetworkProperties{ // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // }, // }, // NicType: to.Ptr(armvmwarecloudsimple.NICTypeE1000), // PowerOnBoot: to.Ptr(true), // VirtualNicID: to.Ptr("4000"), // VirtualNicName: to.Ptr("Network adapter 1"), // }}, // NumberOfCores: to.Ptr[int32](2), // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // ProvisioningState: to.Ptr("Succeeded"), // ResourcePool: &armvmwarecloudsimple.ResourcePool{ // Name: to.Ptr("Workload"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/resourcePools"), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/resourcepools/resgroup-26"), // Location: to.Ptr("westus2"), // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // Properties: &armvmwarecloudsimple.ResourcePoolProperties{ // FullName: to.Ptr("Datacenter/Cluster/Workload"), // }, // }, // Status: to.Ptr(armvmwarecloudsimple.VirtualMachineStatusRunning), // TemplateID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualmachinetemplates/vm-34"), // VMID: to.Ptr("vm-100"), // Vmwaretools: to.Ptr("10309"), // }, // Tags: map[string]*string{ // "inUse": to.Ptr("true"), // }, // } }
Output:
func (*VirtualMachinesClient) NewListByResourceGroupPager ¶ added in v0.4.0
func (client *VirtualMachinesClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualMachinesClientListByResourceGroupOptions) *runtime.Pager[VirtualMachinesClientListByResourceGroupResponse]
NewListByResourceGroupPager - Returns list of virtual machine within resource group
Generated from API version 2019-04-01
- resourceGroupName - The name of the resource group
- options - VirtualMachinesClientListByResourceGroupOptions contains the optional parameters for the VirtualMachinesClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListRGVirtualMachines.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewVirtualMachinesClient().NewListByResourceGroupPager("myResourceGroup", &armvmwarecloudsimple.VirtualMachinesClientListByResourceGroupOptions{Filter: nil, Top: nil, SkipToken: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.VirtualMachineListResponse = armvmwarecloudsimple.VirtualMachineListResponse{ // Value: []*armvmwarecloudsimple.VirtualMachine{ // { // Name: to.Ptr("virtualMachine-2"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/virtualMachines"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VMwareCloudSimple/virtualMachines/virtualMachine-2"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.VirtualMachineProperties{ // AmountOfRAM: to.Ptr[int32](4096), // Controllers: []*armvmwarecloudsimple.VirtualDiskController{ // { // Name: to.Ptr("SCSI controller 0"), // Type: to.Ptr("SCSI"), // ID: to.Ptr("1000"), // SubType: to.Ptr("LSI_PARALEL"), // }}, // Disks: []*armvmwarecloudsimple.VirtualDisk{ // { // ControllerID: to.Ptr("1000"), // IndependenceMode: to.Ptr(armvmwarecloudsimple.DiskIndependenceModePersistent), // TotalSize: to.Ptr[int32](10485760), // VirtualDiskID: to.Ptr("2000"), // VirtualDiskName: to.Ptr("Hard disk 1"), // }}, // GuestOS: to.Ptr("Other (32-bit)"), // GuestOSType: to.Ptr(armvmwarecloudsimple.GuestOSTypeOther), // Nics: []*armvmwarecloudsimple.VirtualNic{ // { // MacAddress: to.Ptr("00:50:56:a6:33:12"), // Network: &armvmwarecloudsimple.VirtualNetwork{ // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-19"), // }, // NicType: to.Ptr(armvmwarecloudsimple.NICTypeE1000), // PowerOnBoot: to.Ptr(true), // VirtualNicID: to.Ptr("4000"), // VirtualNicName: to.Ptr("Network adapter 1"), // }}, // NumberOfCores: to.Ptr[int32](2), // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // ResourcePool: &armvmwarecloudsimple.ResourcePool{ // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/rp-test/resourcepools/resgroup-26"), // }, // TemplateID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualMachineTemplates/vm-34"), // VMID: to.Ptr("vm-101"), // Vmwaretools: to.Ptr("10309"), // }, // Tags: map[string]*string{ // "inUse": to.Ptr("true"), // }, // }, // { // Name: to.Ptr("virtualMachine-3"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/virtualMachines"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VMwareCloudSimple/virtualMachines/virtualMachine-3"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.VirtualMachineProperties{ // AmountOfRAM: to.Ptr[int32](4096), // Controllers: []*armvmwarecloudsimple.VirtualDiskController{ // { // Name: to.Ptr("SCSI controller 0"), // Type: to.Ptr("SCSI"), // ID: to.Ptr("1000"), // SubType: to.Ptr("LSI_PARALEL"), // }}, // Disks: []*armvmwarecloudsimple.VirtualDisk{ // { // ControllerID: to.Ptr("1000"), // IndependenceMode: to.Ptr(armvmwarecloudsimple.DiskIndependenceModePersistent), // TotalSize: to.Ptr[int32](10485760), // VirtualDiskID: to.Ptr("2000"), // VirtualDiskName: to.Ptr("Hard disk 1"), // }}, // GuestOS: to.Ptr("Other (32-bit)"), // GuestOSType: to.Ptr(armvmwarecloudsimple.GuestOSTypeOther), // Nics: []*armvmwarecloudsimple.VirtualNic{ // { // MacAddress: to.Ptr("00:50:56:a6:63:f3"), // Network: &armvmwarecloudsimple.VirtualNetwork{ // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-19"), // }, // NicType: to.Ptr(armvmwarecloudsimple.NICTypeE1000), // PowerOnBoot: to.Ptr(true), // VirtualNicID: to.Ptr("4000"), // VirtualNicName: to.Ptr("Network adapter 1"), // }}, // NumberOfCores: to.Ptr[int32](2), // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // ResourcePool: &armvmwarecloudsimple.ResourcePool{ // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/rp-test/resourcepools/resgroup-26"), // }, // TemplateID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualMachineTemplates/vm-34"), // VMID: to.Ptr("vm-102"), // Vmwaretools: to.Ptr("10309"), // }, // Tags: map[string]*string{ // "inUse": to.Ptr("true"), // }, // }}, // } } }
Output:
func (*VirtualMachinesClient) NewListBySubscriptionPager ¶ added in v0.4.0
func (client *VirtualMachinesClient) NewListBySubscriptionPager(options *VirtualMachinesClientListBySubscriptionOptions) *runtime.Pager[VirtualMachinesClientListBySubscriptionResponse]
NewListBySubscriptionPager - Returns list virtual machine within subscription
Generated from API version 2019-04-01
- options - VirtualMachinesClientListBySubscriptionOptions contains the optional parameters for the VirtualMachinesClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListVirtualMachines.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewVirtualMachinesClient().NewListBySubscriptionPager(&armvmwarecloudsimple.VirtualMachinesClientListBySubscriptionOptions{Filter: nil, Top: nil, SkipToken: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.VirtualMachineListResponse = armvmwarecloudsimple.VirtualMachineListResponse{ // Value: []*armvmwarecloudsimple.VirtualMachine{ // { // Name: to.Ptr("virtualMachine-1"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/virtualMachines"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup-1/providers/Microsoft.VMwareCloudSimple/virtualMachines/virtualMachine-1"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.VirtualMachineProperties{ // AmountOfRAM: to.Ptr[int32](4096), // Controllers: []*armvmwarecloudsimple.VirtualDiskController{ // { // Name: to.Ptr("SCSI controller 0"), // Type: to.Ptr("SCSI"), // ID: to.Ptr("1000"), // SubType: to.Ptr("LSI_PARALEL"), // }}, // Disks: []*armvmwarecloudsimple.VirtualDisk{ // { // ControllerID: to.Ptr("1000"), // IndependenceMode: to.Ptr(armvmwarecloudsimple.DiskIndependenceModePersistent), // TotalSize: to.Ptr[int32](10485760), // VirtualDiskID: to.Ptr("2000"), // VirtualDiskName: to.Ptr("Hard disk 1"), // }}, // GuestOS: to.Ptr("Other (32-bit)"), // GuestOSType: to.Ptr(armvmwarecloudsimple.GuestOSTypeOther), // Nics: []*armvmwarecloudsimple.VirtualNic{ // { // MacAddress: to.Ptr("00:50:56:a6:d0:e1"), // Network: &armvmwarecloudsimple.VirtualNetwork{ // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-19"), // }, // NicType: to.Ptr(armvmwarecloudsimple.NICTypeE1000), // PowerOnBoot: to.Ptr(true), // VirtualNicID: to.Ptr("4000"), // VirtualNicName: to.Ptr("Network adapter 1"), // }}, // NumberOfCores: to.Ptr[int32](2), // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // ResourcePool: &armvmwarecloudsimple.ResourcePool{ // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/rp-test/resourcepools/resgroup-26"), // }, // TemplateID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualMachineTemplates/vm-34"), // VMID: to.Ptr("vm-100"), // Vmwaretools: to.Ptr("10309"), // }, // Tags: map[string]*string{ // "inUse": to.Ptr("true"), // }, // }, // { // Name: to.Ptr("virtualMachine-2"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/virtualMachines"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup-2/providers/Microsoft.VMwareCloudSimple/virtualMachines/virtualMachine-2"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.VirtualMachineProperties{ // AmountOfRAM: to.Ptr[int32](4096), // Controllers: []*armvmwarecloudsimple.VirtualDiskController{ // { // Name: to.Ptr("SCSI controller 0"), // Type: to.Ptr("SCSI"), // ID: to.Ptr("1000"), // SubType: to.Ptr("LSI_PARALEL"), // }}, // Disks: []*armvmwarecloudsimple.VirtualDisk{ // { // ControllerID: to.Ptr("1000"), // IndependenceMode: to.Ptr(armvmwarecloudsimple.DiskIndependenceModePersistent), // TotalSize: to.Ptr[int32](10485760), // VirtualDiskID: to.Ptr("2000"), // VirtualDiskName: to.Ptr("Hard disk 1"), // }}, // GuestOS: to.Ptr("Other (32-bit)"), // GuestOSType: to.Ptr(armvmwarecloudsimple.GuestOSTypeOther), // Nics: []*armvmwarecloudsimple.VirtualNic{ // { // MacAddress: to.Ptr("00:50:56:a6:33:12"), // Network: &armvmwarecloudsimple.VirtualNetwork{ // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-19"), // }, // NicType: to.Ptr(armvmwarecloudsimple.NICTypeE1000), // PowerOnBoot: to.Ptr(true), // VirtualNicID: to.Ptr("4000"), // VirtualNicName: to.Ptr("Network adapter 1"), // }}, // NumberOfCores: to.Ptr[int32](2), // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // ResourcePool: &armvmwarecloudsimple.ResourcePool{ // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/rp-test/resourcepools/resgroup-26"), // }, // TemplateID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualMachineTemplates/vm-34"), // VMID: to.Ptr("vm-101"), // Vmwaretools: to.Ptr("10309"), // }, // Tags: map[string]*string{ // "inUse": to.Ptr("true"), // }, // }, // { // Name: to.Ptr("virtualMachine-3"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/virtualMachines"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup-1/providers/Microsoft.VMwareCloudSimple/virtualMachines/virtualMachine-3"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.VirtualMachineProperties{ // AmountOfRAM: to.Ptr[int32](4096), // Controllers: []*armvmwarecloudsimple.VirtualDiskController{ // { // Name: to.Ptr("SCSI controller 0"), // Type: to.Ptr("SCSI"), // ID: to.Ptr("1000"), // SubType: to.Ptr("LSI_PARALEL"), // }}, // Disks: []*armvmwarecloudsimple.VirtualDisk{ // { // ControllerID: to.Ptr("1000"), // IndependenceMode: to.Ptr(armvmwarecloudsimple.DiskIndependenceModePersistent), // TotalSize: to.Ptr[int32](10485760), // VirtualDiskID: to.Ptr("2000"), // VirtualDiskName: to.Ptr("Hard disk 1"), // }}, // GuestOS: to.Ptr("Other (32-bit)"), // GuestOSType: to.Ptr(armvmwarecloudsimple.GuestOSTypeOther), // Nics: []*armvmwarecloudsimple.VirtualNic{ // { // MacAddress: to.Ptr("00:50:56:a6:63:f3"), // Network: &armvmwarecloudsimple.VirtualNetwork{ // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-19"), // }, // NicType: to.Ptr(armvmwarecloudsimple.NICTypeE1000), // PowerOnBoot: to.Ptr(true), // VirtualNicID: to.Ptr("4000"), // VirtualNicName: to.Ptr("Network adapter 1"), // }}, // NumberOfCores: to.Ptr[int32](2), // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // ResourcePool: &armvmwarecloudsimple.ResourcePool{ // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/rp-test/resourcepools/resgroup-26"), // }, // TemplateID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualMachineTemplates/vm-34"), // VMID: to.Ptr("vm-102"), // Vmwaretools: to.Ptr("10309"), // }, // Tags: map[string]*string{ // "inUse": to.Ptr("true"), // }, // }}, // } } }
Output:
type VirtualMachinesClientBeginCreateOrUpdateOptions ¶ added in v0.2.0
type VirtualMachinesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginCreateOrUpdate method.
type VirtualMachinesClientBeginDeleteOptions ¶ added in v0.2.0
type VirtualMachinesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginDeleteOptions contains the optional parameters for the VirtualMachinesClient.BeginDelete method.
type VirtualMachinesClientBeginStartOptions ¶ added in v0.2.0
type VirtualMachinesClientBeginStartOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginStartOptions contains the optional parameters for the VirtualMachinesClient.BeginStart method.
type VirtualMachinesClientBeginStopOptions ¶ added in v0.2.0
type VirtualMachinesClientBeginStopOptions struct { // body stop mode parameter (reboot, shutdown, etc…) M *VirtualMachineStopMode // query stop mode parameter (reboot, shutdown, etc…) Mode *StopMode // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginStopOptions contains the optional parameters for the VirtualMachinesClient.BeginStop method.
type VirtualMachinesClientBeginUpdateOptions ¶ added in v0.2.0
type VirtualMachinesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginUpdate method.
type VirtualMachinesClientCreateOrUpdateResponse ¶ added in v0.2.0
type VirtualMachinesClientCreateOrUpdateResponse struct { // Virtual machine model VirtualMachine }
VirtualMachinesClientCreateOrUpdateResponse contains the response from method VirtualMachinesClient.BeginCreateOrUpdate.
type VirtualMachinesClientDeleteResponse ¶ added in v0.2.0
type VirtualMachinesClientDeleteResponse struct { }
VirtualMachinesClientDeleteResponse contains the response from method VirtualMachinesClient.BeginDelete.
type VirtualMachinesClientGetOptions ¶ added in v0.2.0
type VirtualMachinesClientGetOptions struct { }
VirtualMachinesClientGetOptions contains the optional parameters for the VirtualMachinesClient.Get method.
type VirtualMachinesClientGetResponse ¶ added in v0.2.0
type VirtualMachinesClientGetResponse struct { // Virtual machine model VirtualMachine }
VirtualMachinesClientGetResponse contains the response from method VirtualMachinesClient.Get.
type VirtualMachinesClientListByResourceGroupOptions ¶ added in v0.2.0
type VirtualMachinesClientListByResourceGroupOptions struct { // The filter to apply on the list operation Filter *string // to be used by nextLink implementation SkipToken *string // The maximum number of record sets to return Top *int32 }
VirtualMachinesClientListByResourceGroupOptions contains the optional parameters for the VirtualMachinesClient.NewListByResourceGroupPager method.
type VirtualMachinesClientListByResourceGroupResponse ¶ added in v0.2.0
type VirtualMachinesClientListByResourceGroupResponse struct { // List of virtual machines VirtualMachineListResponse }
VirtualMachinesClientListByResourceGroupResponse contains the response from method VirtualMachinesClient.NewListByResourceGroupPager.
type VirtualMachinesClientListBySubscriptionOptions ¶ added in v0.2.0
type VirtualMachinesClientListBySubscriptionOptions struct { // The filter to apply on the list operation Filter *string // to be used by nextLink implementation SkipToken *string // The maximum number of record sets to return Top *int32 }
VirtualMachinesClientListBySubscriptionOptions contains the optional parameters for the VirtualMachinesClient.NewListBySubscriptionPager method.
type VirtualMachinesClientListBySubscriptionResponse ¶ added in v0.2.0
type VirtualMachinesClientListBySubscriptionResponse struct { // List of virtual machines VirtualMachineListResponse }
VirtualMachinesClientListBySubscriptionResponse contains the response from method VirtualMachinesClient.NewListBySubscriptionPager.
type VirtualMachinesClientStartResponse ¶ added in v0.2.0
type VirtualMachinesClientStartResponse struct { }
VirtualMachinesClientStartResponse contains the response from method VirtualMachinesClient.BeginStart.
type VirtualMachinesClientStopResponse ¶ added in v0.2.0
type VirtualMachinesClientStopResponse struct { }
VirtualMachinesClientStopResponse contains the response from method VirtualMachinesClient.BeginStop.
type VirtualMachinesClientUpdateResponse ¶ added in v0.2.0
type VirtualMachinesClientUpdateResponse struct { // Virtual machine model VirtualMachine }
VirtualMachinesClientUpdateResponse contains the response from method VirtualMachinesClient.BeginUpdate.
type VirtualNetwork ¶
type VirtualNetwork struct { // REQUIRED; virtual network id (privateCloudId:vsphereId) ID *string // Virtual Network properties Properties *VirtualNetworkProperties // READ-ONLY; can be used in vm creation/deletion Assignable *bool // READ-ONLY; Azure region Location *string // READ-ONLY; {VirtualNetworkName} Name *string // READ-ONLY; {resourceProviderNamespace}/{resourceType} Type *string }
VirtualNetwork - Virtual network model
func (VirtualNetwork) MarshalJSON ¶ added in v1.1.0
func (v VirtualNetwork) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNetwork.
func (*VirtualNetwork) UnmarshalJSON ¶ added in v1.1.0
func (v *VirtualNetwork) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetwork.
type VirtualNetworkListResponse ¶
type VirtualNetworkListResponse struct { // Link for next list of VirtualNetwork NextLink *string // Results of the VirtualNetwork list Value []*VirtualNetwork }
VirtualNetworkListResponse - List of virtual networks
func (VirtualNetworkListResponse) MarshalJSON ¶
func (v VirtualNetworkListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNetworkListResponse.
func (*VirtualNetworkListResponse) UnmarshalJSON ¶ added in v1.1.0
func (v *VirtualNetworkListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkListResponse.
type VirtualNetworkProperties ¶
type VirtualNetworkProperties struct { // READ-ONLY; The Private Cloud id PrivateCloudID *string }
VirtualNetworkProperties - Properties of virtual network
func (VirtualNetworkProperties) MarshalJSON ¶ added in v1.1.0
func (v VirtualNetworkProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNetworkProperties.
func (*VirtualNetworkProperties) UnmarshalJSON ¶ added in v1.1.0
func (v *VirtualNetworkProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkProperties.
type VirtualNetworksClient ¶
type VirtualNetworksClient struct {
// contains filtered or unexported fields
}
VirtualNetworksClient contains the methods for the VirtualNetworks group. Don't use this type directly, use NewVirtualNetworksClient() instead.
func NewVirtualNetworksClient ¶
func NewVirtualNetworksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworksClient, error)
NewVirtualNetworksClient creates a new instance of VirtualNetworksClient with the specified values.
- subscriptionID - The subscription ID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*VirtualNetworksClient) Get ¶
func (client *VirtualNetworksClient) Get(ctx context.Context, regionID string, pcName string, virtualNetworkName string, options *VirtualNetworksClientGetOptions) (VirtualNetworksClientGetResponse, error)
Get - Return virtual network by its name If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-04-01
- regionID - The region Id (westus, eastus)
- pcName - The private cloud name
- virtualNetworkName - virtual network id (vsphereId)
- options - VirtualNetworksClientGetOptions contains the optional parameters for the VirtualNetworksClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetVirtualNetwork.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewVirtualNetworksClient().Get(ctx, "westus2", "myPrivateCloud", "dvportgroup-19", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.VirtualNetwork = armvmwarecloudsimple.VirtualNetwork{ // Name: to.Ptr("Datacenter/CS-Management"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/virtualNetworks"), // Assignable: to.Ptr(false), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-19"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.VirtualNetworkProperties{ // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // }, // } }
Output:
func (*VirtualNetworksClient) NewListPager ¶ added in v0.4.0
func (client *VirtualNetworksClient) NewListPager(regionID string, pcName string, resourcePoolName string, options *VirtualNetworksClientListOptions) *runtime.Pager[VirtualNetworksClientListResponse]
NewListPager - Return list of virtual networks in location for private cloud
Generated from API version 2019-04-01
- regionID - The region Id (westus, eastus)
- pcName - The private cloud name
- resourcePoolName - Resource pool used to derive vSphere cluster which contains virtual networks
- options - VirtualNetworksClientListOptions contains the optional parameters for the VirtualNetworksClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListVirtualNetworks.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/vmwarecloudsimple/armvmwarecloudsimple" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armvmwarecloudsimple.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewVirtualNetworksClient().NewListPager("westus2", "myPrivateCloud", "/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/resourcePools/resgroup-26", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.VirtualNetworkListResponse = armvmwarecloudsimple.VirtualNetworkListResponse{ // Value: []*armvmwarecloudsimple.VirtualNetwork{ // { // Name: to.Ptr("Datacenter/CS-Management"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/virtualNetworks"), // Assignable: to.Ptr(false), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-19"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.VirtualNetworkProperties{ // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // }, // }, // { // Name: to.Ptr("Datacenter/CS-Rescue"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/virtualNetworks"), // Assignable: to.Ptr(true), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-20"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.VirtualNetworkProperties{ // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // }, // }, // { // Name: to.Ptr("Datacenter/CS-VSAN"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/virtualNetworks"), // Assignable: to.Ptr(false), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-21"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.VirtualNetworkProperties{ // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // }, // }, // { // Name: to.Ptr("Datacenter/CS-VMotion"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/virtualNetworks"), // Assignable: to.Ptr(false), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-22"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.VirtualNetworkProperties{ // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // }, // }, // { // Name: to.Ptr("Datacenter/net-01"), // Type: to.Ptr("Microsoft.VMwareCloudSimple/virtualNetworks"), // Assignable: to.Ptr(true), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-35"), // Location: to.Ptr("westus2"), // Properties: &armvmwarecloudsimple.VirtualNetworkProperties{ // PrivateCloudID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"), // }, // }}, // } } }
Output:
type VirtualNetworksClientGetOptions ¶ added in v0.2.0
type VirtualNetworksClientGetOptions struct { }
VirtualNetworksClientGetOptions contains the optional parameters for the VirtualNetworksClient.Get method.
type VirtualNetworksClientGetResponse ¶ added in v0.2.0
type VirtualNetworksClientGetResponse struct { // Virtual network model VirtualNetwork }
VirtualNetworksClientGetResponse contains the response from method VirtualNetworksClient.Get.
type VirtualNetworksClientListOptions ¶ added in v0.2.0
type VirtualNetworksClientListOptions struct { }
VirtualNetworksClientListOptions contains the optional parameters for the VirtualNetworksClient.NewListPager method.
type VirtualNetworksClientListResponse ¶ added in v0.2.0
type VirtualNetworksClientListResponse struct { // List of virtual networks VirtualNetworkListResponse }
VirtualNetworksClientListResponse contains the response from method VirtualNetworksClient.NewListPager.
type VirtualNic ¶
type VirtualNic struct { // REQUIRED; Virtual Network Network *VirtualNetwork // REQUIRED; NIC type NicType *NICType // guest OS customization for nic Customization *GuestOSNICCustomization // NIC ip address IPAddresses []*string // NIC MAC address MacAddress *string // Is NIC powered on/off on boot PowerOnBoot *bool // NIC id VirtualNicID *string // READ-ONLY; NIC name VirtualNicName *string }
VirtualNic - Virtual NIC model
func (VirtualNic) MarshalJSON ¶
func (v VirtualNic) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNic.
func (*VirtualNic) UnmarshalJSON ¶ added in v1.1.0
func (v *VirtualNic) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNic.
Source Files ¶
- build.go
- client_factory.go
- constants.go
- customizationpolicies_client.go
- dedicatedcloudnodes_client.go
- dedicatedcloudservices_client.go
- models.go
- models_serde.go
- operations_client.go
- options.go
- privateclouds_client.go
- resourcepools_client.go
- response_types.go
- skusavailability_client.go
- time_rfc3339.go
- usages_client.go
- virtualmachines_client.go
- virtualmachinetemplates_client.go
- virtualnetworks_client.go