client

package
v4.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func ResponseWasNotFound

func ResponseWasNotFound(resp autorest.Response) bool

ResponseWasNotFound returns true if the response code from the Azure API was a 404.

Types

type AzureClientSet

type AzureClientSet struct {
	// The subscription ID this client set is configured with.
	SubscriptionID string

	// DeploymentsClient manages deployments of ARM templates.
	DeploymentsClient *resources.DeploymentsClient
	// GroupsClient manages ARM resource groups.
	GroupsClient *resources.GroupsClient
	// DNSRecordSetsClient manages DNS zones' records.
	DNSRecordSetsClient *dns.RecordSetsClient
	// DNSRecordSetsClient manages DNS zones.
	DNSZonesClient *dns.ZonesClient
	// InterfacesClient manages virtual network interfaces.
	InterfacesClient *network.InterfacesClient
	// PublicIpAddressesClient manages public IP addresses.
	PublicIpAddressesClient *network.PublicIPAddressesClient
	// SecurityRulesClient manages networking rules in a security group.
	SecurityRulesClient *network.SecurityRulesClient
	// StorageAccountsClient manages blobs in storage containers.
	StorageAccountsClient *storage.AccountsClient
	// SubnetsClient manages subnets.
	SubnetsClient *network.SubnetsClient
	// UsageClient is used to work with limits and quotas.
	UsageClient *compute.UsageClient
	// VirtualNetworkClient manages virtual networks.
	VirtualNetworkClient *network.VirtualNetworksClient
	// VirtualNetworkGatewayConnectionsClient manages virtual network gateway connections.
	VirtualNetworkGatewayConnectionsClient *network.VirtualNetworkGatewayConnectionsClient
	// VirtualNetworkGatewaysClient manages virtual network gateways.
	VirtualNetworkGatewaysClient *network.VirtualNetworkGatewaysClient
	// VirtualMachineScaleSetsClient manages virtual machine scale sets.
	VirtualMachineScaleSetsClient *compute.VirtualMachineScaleSetsClient
	// VirtualMachineScaleSetVMsClient manages virtual machine scale set VMs.
	VirtualMachineScaleSetVMsClient *compute.VirtualMachineScaleSetVMsClient
	// VnetPeeringClient manages virtual network peerings.
	VnetPeeringClient *network.VirtualNetworkPeeringsClient
}

AzureClientSet is the collection of Azure API clients.

func NewAzureClientSet

func NewAzureClientSet(clientCredentialsConfig auth.ClientCredentialsConfig, subscriptionID, partnerID string) (*AzureClientSet, error)

NewAzureClientSet returns the Azure API clients using the given Authorizer.

type Factory

type Factory struct {
	// contains filtered or unexported fields
}

Factory is creating Azure clients for specified AzureConfig CRs, so basically for specified tenant clusters. All created clients are cached.

func NewFactory

func NewFactory(config FactoryConfig) (*Factory, error)

NewFactory returns a new Azure client factory that is used throughout entire azure-operator lifetime.

func (*Factory) GetDeploymentsClient

func (f *Factory) GetDeploymentsClient(credentialNamespace, credentialName string) (*resources.DeploymentsClient, error)

GetDeploymentsClient returns DeploymentsClient that is used for management of deployments and ARM templates. The client (for specified cluster) is cached after creation, so the same client is returned every time.

func (*Factory) GetGroupsClient

func (f *Factory) GetGroupsClient(credentialNamespace, credentialName string) (*resources.GroupsClient, error)

GetGroupsClient returns GroupsClient that is used for management of resource groups for the specified cluster. The created client is cached for the time period specified in the factory config.

func (*Factory) GetStorageAccountsClient

func (f *Factory) GetStorageAccountsClient(credentialNamespace, credentialName string) (*storage.AccountsClient, error)

GetStorageAccountsClient returns *storage.AccountsClient that is used for management of Azure storage accounts for the specified cluster. The created client is cached for the time period specified in the factory config.

func (*Factory) GetSubnetsClient

func (f *Factory) GetSubnetsClient(credentialNamespace, credentialName string) (*network.SubnetsClient, error)

GetStorageAccountsClient returns *network.SubnetsClient that is used for management of Azure subnets. The created client is cached for the time period specified in the factory config.

func (*Factory) GetVirtualMachineScaleSetVMsClient

func (f *Factory) GetVirtualMachineScaleSetVMsClient(credentialNamespace, credentialName string) (*compute.VirtualMachineScaleSetVMsClient, error)

GetVirtualMachineScaleSetVMsClient returns GetVirtualMachineScaleSetVMsClient that is used for management of virtual machine scale set instances for the specified cluster. The created client is cached for the time period specified in the factory config.

func (*Factory) GetVirtualMachineScaleSetsClient

func (f *Factory) GetVirtualMachineScaleSetsClient(credentialNamespace, credentialName string) (*compute.VirtualMachineScaleSetsClient, error)

GetVirtualMachineScaleSetsClient returns VirtualMachineScaleSetsClient that is used for management of virtual machine scale sets for the specified cluster. The created client is cached for the time period specified in the factory config.

type FactoryConfig

type FactoryConfig struct {
	CacheDuration      time.Duration
	CredentialProvider credential.Provider
	Logger             micrologger.Logger
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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