Documentation ¶
Index ¶
- type AzureClient
- func (ac *AzureClient) CreateOrUpdateAsync(ctx context.Context, spec azure.ResourceSpecGetter, resumeToken string, ...) (result interface{}, ...)
- func (ac *AzureClient) DeleteAsync(ctx context.Context, spec azure.ResourceSpecGetter, resumeToken string) (poller *runtime.Poller[armcompute.VirtualMachinesClientDeleteResponse], ...)
- func (ac *AzureClient) Get(ctx context.Context, spec azure.ResourceSpecGetter) (result interface{}, err error)
- type Client
- type Service
- type VMScope
- type VMSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AzureClient ¶
type AzureClient struct {
// contains filtered or unexported fields
}
AzureClient contains the Azure go-sdk Client.
func NewClient ¶
func NewClient(auth azure.Authorizer) (*AzureClient, error)
NewClient creates a VMs client from an authorizer.
func (*AzureClient) CreateOrUpdateAsync ¶ added in v1.1.0
func (ac *AzureClient) CreateOrUpdateAsync(ctx context.Context, spec azure.ResourceSpecGetter, resumeToken string, parameters interface{}) (result interface{}, poller *runtime.Poller[armcompute.VirtualMachinesClientCreateOrUpdateResponse], err error)
CreateOrUpdateAsync creates or updates a virtual machine asynchronously. It sends a PUT request to Azure and if accepted without error, the func will return a Poller which can be used to track the ongoing progress of the operation.
func (*AzureClient) DeleteAsync ¶ added in v1.1.0
func (ac *AzureClient) DeleteAsync(ctx context.Context, spec azure.ResourceSpecGetter, resumeToken string) (poller *runtime.Poller[armcompute.VirtualMachinesClientDeleteResponse], err error)
DeleteAsync deletes a virtual machine asynchronously. DeleteAsync sends a DELETE request to Azure and if accepted without error, the func will return a Poller which can be used to track the ongoing progress of the operation.
func (*AzureClient) Get ¶
func (ac *AzureClient) Get(ctx context.Context, spec azure.ResourceSpecGetter) (result interface{}, err error)
Get retrieves information about the model view or the instance view of a virtual machine.
type Client ¶
type Client interface { Get(context.Context, azure.ResourceSpecGetter) (interface{}, error) CreateOrUpdateAsync(ctx context.Context, spec azure.ResourceSpecGetter, resumeToken string, parameters interface{}) (result interface{}, poller *runtime.Poller[armcompute.VirtualMachinesClientCreateOrUpdateResponse], err error) DeleteAsync(ctx context.Context, spec azure.ResourceSpecGetter, resumeToken string) (poller *runtime.Poller[armcompute.VirtualMachinesClientDeleteResponse], err error) }
Client provides operations on Azure virtual machine resources.
type Service ¶
type Service struct { Scope VMScope async.Reconciler // contains filtered or unexported fields }
Service provides operations on Azure resources.
func (*Service) IsManaged ¶ added in v1.3.0
IsManaged returns always returns true as CAPZ does not support BYO VM.
type VMScope ¶
type VMScope interface { azure.Authorizer azure.AsyncStatusUpdater VMSpec() azure.ResourceSpecGetter SetAnnotation(string, string) SetProviderID(string) SetAddresses([]corev1.NodeAddress) SetVMState(infrav1.ProvisioningState) SetConditionFalse(clusterv1.ConditionType, string, clusterv1.ConditionSeverity, string) }
VMScope defines the scope interface for a virtual machines service.
type VMSpec ¶ added in v1.1.0
type VMSpec struct { Name string ResourceGroup string Location string ExtendedLocation *infrav1.ExtendedLocationSpec ClusterName string Role string NICIDs []string SSHKeyData string Size string AvailabilitySetID string Zone string Identity infrav1.VMIdentity OSDisk infrav1.OSDisk DataDisks []infrav1.DataDisk UserAssignedIdentities []infrav1.UserAssignedIdentity SpotVMOptions *infrav1.SpotVMOptions SecurityProfile *infrav1.SecurityProfile AdditionalTags infrav1.Tags AdditionalCapabilities *infrav1.AdditionalCapabilities DiagnosticsProfile *infrav1.Diagnostics SKU resourceskus.SKU Image *infrav1.Image BootstrapData string ProviderID string }
VMSpec defines the specification for a Virtual Machine.
func (*VMSpec) OwnerResourceName ¶ added in v1.1.0
OwnerResourceName is a no-op for virtual machines.
func (*VMSpec) Parameters ¶ added in v1.1.0
func (s *VMSpec) Parameters(ctx context.Context, existing interface{}) (params interface{}, err error)
Parameters returns the parameters for the virtual machine.
func (*VMSpec) ResourceGroupName ¶ added in v1.1.0
ResourceGroupName returns the name of the virtual machine.
func (*VMSpec) ResourceName ¶ added in v1.1.0
ResourceName returns the name of the virtual machine.