Documentation ¶
Index ¶
- func IsAzureAPINotFoundError(err error) bool
- func IsAzureAPIUnauthorized(err error) bool
- type AzureFactory
- func (f AzureFactory) DNSRecordSet(ctx context.Context, secretRef corev1.SecretReference) (DNSRecordSet, error)
- func (f AzureFactory) DNSZone(ctx context.Context, secretRef corev1.SecretReference) (DNSZone, error)
- func (f AzureFactory) Disk(ctx context.Context, secretRef corev1.SecretReference) (Disk, error)
- func (f AzureFactory) Group(ctx context.Context, secretRef corev1.SecretReference) (Group, error)
- func (f AzureFactory) NetworkInterface(ctx context.Context, secretRef corev1.SecretReference) (NetworkInterface, error)
- func (f AzureFactory) NetworkSecurityGroup(ctx context.Context, secretRef corev1.SecretReference) (NetworkSecurityGroup, error)
- func (f AzureFactory) PublicIP(ctx context.Context, secretRef corev1.SecretReference) (PublicIP, error)
- func (f AzureFactory) Storage(ctx context.Context, secretRef corev1.SecretReference) (Storage, error)
- func (f AzureFactory) StorageAccount(ctx context.Context, secretRef corev1.SecretReference) (StorageAccount, error)
- func (f AzureFactory) Subnet(ctx context.Context, secretRef corev1.SecretReference) (Subnet, error)
- func (f AzureFactory) VirtualMachine(ctx context.Context, secretRef corev1.SecretReference) (VirtualMachine, error)
- func (f AzureFactory) VirtualMachineImage(ctx context.Context, secretRef corev1.SecretReference) (VirtualMachineImage, error)
- func (f AzureFactory) Vmss(ctx context.Context, secretRef corev1.SecretReference) (Vmss, error)
- type DNSRecordSet
- type DNSRecordSetClient
- type DNSZone
- type DNSZoneClient
- type Disk
- type DisksClient
- func (c DisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, diskName string, ...) (*compute.Disk, error)
- func (c DisksClient) Delete(ctx context.Context, resourceGroupName, name string) error
- func (c DisksClient) Get(ctx context.Context, resourceGroupName string, name string) (*compute.Disk, error)
- type Factory
- type Group
- type GroupClient
- type NetworkInterface
- type NetworkInterfaceClient
- func (c NetworkInterfaceClient) CreateOrUpdate(ctx context.Context, resourceGroupName, name string, ...) (*network.Interface, error)
- func (c NetworkInterfaceClient) Delete(ctx context.Context, resourceGroupName, name string) error
- func (c NetworkInterfaceClient) Get(ctx context.Context, resourceGroupName string, name string, expander string) (*network.Interface, error)
- type NetworkSecurityGroup
- type NetworkSecurityGroupClient
- type PublicIP
- type PublicIPClient
- func (c PublicIPClient) CreateOrUpdate(ctx context.Context, resourceGroupName, name string, ...) (*network.PublicIPAddress, error)
- func (c PublicIPClient) Delete(ctx context.Context, resourceGroupName, name string) error
- func (c PublicIPClient) Get(ctx context.Context, resourceGroupName string, name string, expander string) (*network.PublicIPAddress, error)
- type SecurityRulesClient
- type Storage
- type StorageAccount
- type StorageAccountClient
- type StorageClient
- type Subnet
- type SubnetsClient
- func (c SubnetsClient) Delete(ctx context.Context, resourceGroupName, vnetName, subnetName string) error
- func (c SubnetsClient) Get(ctx context.Context, resourceGroupName string, vnetName string, name string, ...) (*network.Subnet, error)
- func (c SubnetsClient) List(ctx context.Context, resourceGroupName, vnetName string) ([]network.Subnet, error)
- type VirtualMachine
- type VirtualMachineImage
- type VirtualMachineImageClient
- type VirtualMachinesClient
- func (c VirtualMachinesClient) Create(ctx context.Context, resourceGroupName string, name string, ...) (*compute.VirtualMachine, error)
- func (c VirtualMachinesClient) Delete(ctx context.Context, resourceGroupName, name string, forceDeletion *bool) error
- func (c VirtualMachinesClient) Get(ctx context.Context, resourceGroupName string, name string, ...) (*compute.VirtualMachine, error)
- type Vmss
- type VmssClient
- func (c VmssClient) Create(ctx context.Context, resourceGroupName, name string, ...) (*compute.VirtualMachineScaleSet, error)
- func (c VmssClient) Delete(ctx context.Context, resourceGroupName, name string, forceDeletion *bool) error
- func (c VmssClient) Get(ctx context.Context, resourceGroupName, name string, ...) (*compute.VirtualMachineScaleSet, error)
- func (c VmssClient) List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachineScaleSet, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAzureAPINotFoundError ¶ added in v1.18.0
IsAzureAPINotFoundError tries to determine if an error is a resource not found error.
func IsAzureAPIUnauthorized ¶ added in v1.33.0
IsAzureAPIUnauthorized tries to determine if the API error is due to unauthorized access
Types ¶
type AzureFactory ¶ added in v1.15.0
type AzureFactory struct {
// contains filtered or unexported fields
}
AzureFactory is an implementation of Factory to produce clients for various Azure services.
func (AzureFactory) DNSRecordSet ¶ added in v1.21.0
func (f AzureFactory) DNSRecordSet(ctx context.Context, secretRef corev1.SecretReference) (DNSRecordSet, error)
DNSRecordSet reads the secret from the passed reference and return an Azure DNS record set client.
func (AzureFactory) DNSZone ¶ added in v1.21.0
func (f AzureFactory) DNSZone(ctx context.Context, secretRef corev1.SecretReference) (DNSZone, error)
DNSZone reads the secret from the passed reference and return an Azure DNS zone client.
func (AzureFactory) Disk ¶ added in v1.26.0
func (f AzureFactory) Disk(ctx context.Context, secretRef corev1.SecretReference) (Disk, error)
Disk reads the secret from the passed reference and return an Azure disk client.
func (AzureFactory) Group ¶ added in v1.15.0
func (f AzureFactory) Group(ctx context.Context, secretRef corev1.SecretReference) (Group, error)
Group reads the secret from the passed reference and return an Azure resource group client.
func (AzureFactory) NetworkInterface ¶ added in v1.26.0
func (f AzureFactory) NetworkInterface(ctx context.Context, secretRef corev1.SecretReference) (NetworkInterface, error)
NetworkInterface reads the secret from the passed reference and return an Azure network interface client.
func (AzureFactory) NetworkSecurityGroup ¶ added in v1.26.0
func (f AzureFactory) NetworkSecurityGroup(ctx context.Context, secretRef corev1.SecretReference) (NetworkSecurityGroup, error)
NetworkSecurityGroup reads the secret from the passed reference and return an Azure network security group client.
func (AzureFactory) PublicIP ¶ added in v1.26.0
func (f AzureFactory) PublicIP(ctx context.Context, secretRef corev1.SecretReference) (PublicIP, error)
PublicIP reads the secret from the passed reference and return an Azure network PublicIPClient.
func (AzureFactory) Storage ¶ added in v1.15.0
func (f AzureFactory) Storage(ctx context.Context, secretRef corev1.SecretReference) (Storage, error)
Storage reads the secret from the passed reference and return an Azure (blob) storage client.
func (AzureFactory) StorageAccount ¶ added in v1.15.0
func (f AzureFactory) StorageAccount(ctx context.Context, secretRef corev1.SecretReference) (StorageAccount, error)
StorageAccount reads the secret from the passed reference and return an Azure storage account client.
func (AzureFactory) Subnet ¶ added in v1.26.0
func (f AzureFactory) Subnet(ctx context.Context, secretRef corev1.SecretReference) (Subnet, error)
Subnet reads the secret from the passed reference and return an Azure Subnet client.
func (AzureFactory) VirtualMachine ¶ added in v1.26.0
func (f AzureFactory) VirtualMachine(ctx context.Context, secretRef corev1.SecretReference) (VirtualMachine, error)
VirtualMachine reads the secret from the passed reference and return an Azure virtual machine client.
func (AzureFactory) VirtualMachineImage ¶ added in v1.38.0
func (f AzureFactory) VirtualMachineImage(ctx context.Context, secretRef corev1.SecretReference) (VirtualMachineImage, error)
VirtualMachineImage reads the secret from the passed reference and return an Azure Virtual Machine Image client.
func (AzureFactory) Vmss ¶ added in v1.18.0
func (f AzureFactory) Vmss(ctx context.Context, secretRef corev1.SecretReference) (Vmss, error)
Vmss reads the secret from the passed reference and return an Azure virtual machine scale set client.
type DNSRecordSet ¶ added in v1.21.0
type DNSRecordSet interface { CreateOrUpdate(context.Context, string, string, string, []string, int64) error Delete(context.Context, string, string, string) error }
DNSRecordSet represents an Azure DNS recordset client.
type DNSRecordSetClient ¶ added in v1.21.0
type DNSRecordSetClient struct {
// contains filtered or unexported fields
}
DNSRecordSetClient is an implementation of DNSRecordSet for a DNS recordset client.
func (DNSRecordSetClient) CreateOrUpdate ¶ added in v1.21.0
func (c DNSRecordSetClient) CreateOrUpdate(ctx context.Context, zoneID string, name string, recordType string, values []string, ttl int64) error
CreateOrUpdate creates or updates the recordset with the given name, record type, values, and TTL in the zone with the given zone ID.
type DNSZoneClient ¶ added in v1.21.0
type DNSZoneClient struct {
// contains filtered or unexported fields
}
DNSZoneClient is an implementation of DNSZone for a DNS zone client.
type Disk ¶ added in v1.26.0
type Disk interface { Get(ctx context.Context, resourceGroupName string, name string) (*compute.Disk, error) CreateOrUpdate(ctx context.Context, resourceGroupName string, diskName string, disk compute.Disk) (*compute.Disk, error) Delete(ctx context.Context, resourceGroupName, name string) error }
Disk represents an Azure Disk client.
type DisksClient ¶ added in v1.26.0
type DisksClient struct {
// contains filtered or unexported fields
}
DisksClient is an implementation of Disk for a disk client.
func (DisksClient) CreateOrUpdate ¶ added in v1.26.0
func (c DisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, diskName string, disk compute.Disk) (*compute.Disk, error)
CreateOrUpdate will create or update a disk.
type Factory ¶ added in v1.15.0
type Factory interface { Group(context.Context, corev1.SecretReference) (Group, error) Storage(context.Context, corev1.SecretReference) (Storage, error) StorageAccount(context.Context, corev1.SecretReference) (StorageAccount, error) Vmss(context.Context, corev1.SecretReference) (Vmss, error) DNSZone(context.Context, corev1.SecretReference) (DNSZone, error) DNSRecordSet(context.Context, corev1.SecretReference) (DNSRecordSet, error) VirtualMachine(ctx context.Context, secretRef corev1.SecretReference) (VirtualMachine, error) NetworkSecurityGroup(ctx context.Context, secretRef corev1.SecretReference) (NetworkSecurityGroup, error) PublicIP(ctx context.Context, secretRef corev1.SecretReference) (PublicIP, error) NetworkInterface(ctx context.Context, secretRef corev1.SecretReference) (NetworkInterface, error) Disk(ctx context.Context, secretRef corev1.SecretReference) (Disk, error) Subnet(ctx context.Context, secretRef corev1.SecretReference) (Subnet, error) VirtualMachineImage(ctx context.Context, secretRef corev1.SecretReference) (VirtualMachineImage, error) }
Factory represents a factory to produce clients for various Azure services.
func NewAzureClientFactory ¶ added in v1.15.0
NewAzureClientFactory returns a new factory to produce clients for various Azure services.
type Group ¶ added in v1.15.0
type Group interface { Get(context.Context, string) (*resources.Group, error) CreateOrUpdate(context.Context, string, string) error DeleteIfExits(context.Context, string) error }
Group represents an Azure group client.
type GroupClient ¶ added in v1.15.0
type GroupClient struct {
// contains filtered or unexported fields
}
GroupClient is an implementation of Group for a resource group client.
func (GroupClient) CreateOrUpdate ¶ added in v1.15.0
func (c GroupClient) CreateOrUpdate(ctx context.Context, resourceGroupName, region string) error
CreateOrUpdate creates a resource group or update an existing resource group.
func (GroupClient) DeleteIfExits ¶ added in v1.15.0
func (c GroupClient) DeleteIfExits(ctx context.Context, resourceGroupName string) error
DeleteIfExits deletes a resource group if it exits.
type NetworkInterface ¶ added in v1.26.0
type NetworkInterface interface { Get(ctx context.Context, resourceGroupName string, name string, expander string) (*network.Interface, error) CreateOrUpdate(ctx context.Context, resourceGroupName, name string, parameters network.Interface) (*network.Interface, error) Delete(ctx context.Context, resourceGroupName, name string) error }
NetworkInterface represents an Azure Network Interface client.
type NetworkInterfaceClient ¶ added in v1.26.0
type NetworkInterfaceClient struct {
// contains filtered or unexported fields
}
NetworkInterfaceClient is an implementation of Network Interface.
func (NetworkInterfaceClient) CreateOrUpdate ¶ added in v1.26.0
func (c NetworkInterfaceClient) CreateOrUpdate(ctx context.Context, resourceGroupName, name string, parameters network.Interface) (*network.Interface, error)
CreateOrUpdate indicates an expected call of Network interface CreateOrUpdate.
type NetworkSecurityGroup ¶ added in v1.26.0
type NetworkSecurityGroup interface { Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName, name string) (*network.SecurityGroup, error) CreateOrUpdate(ctx context.Context, resourceGroupName, name string, parameters network.SecurityGroup) (*network.SecurityGroup, error) }
NetworkSecurityGroup represents an Azure Network security group client.
type NetworkSecurityGroupClient ¶ added in v1.26.0
type NetworkSecurityGroupClient struct {
// contains filtered or unexported fields
}
NetworkSecurityGroupClient is an implementation of Network Security Group for a network security group client.
func (NetworkSecurityGroupClient) CreateOrUpdate ¶ added in v1.26.0
func (c NetworkSecurityGroupClient) CreateOrUpdate(ctx context.Context, resourceGroupName, name string, parameters network.SecurityGroup) (*network.SecurityGroup, error)
CreateOrUpdate indicates an expected call of Network Security Group CreateOrUpdate.
func (NetworkSecurityGroupClient) Get ¶ added in v1.26.0
func (c NetworkSecurityGroupClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName, name string) (*network.SecurityGroup, error)
Get will fetch a network security group
type PublicIP ¶ added in v1.26.0
type PublicIP interface { Get(ctx context.Context, resourceGroupName string, name string, expander string) (*network.PublicIPAddress, error) CreateOrUpdate(ctx context.Context, resourceGroupName, name string, parameters network.PublicIPAddress) (*network.PublicIPAddress, error) Delete(ctx context.Context, resourceGroupName, name string) error }
PublicIP represents an Azure Network PUblic IP client.
type PublicIPClient ¶ added in v1.26.0
type PublicIPClient struct {
// contains filtered or unexported fields
}
PublicIPClient is an implementation of Network Public IP Address.
func (PublicIPClient) CreateOrUpdate ¶ added in v1.26.0
func (c PublicIPClient) CreateOrUpdate(ctx context.Context, resourceGroupName, name string, parameters network.PublicIPAddress) (*network.PublicIPAddress, error)
CreateOrUpdate indicates an expected call of Network Public IP CreateOrUpdate.
type SecurityRulesClient ¶ added in v1.26.0
type SecurityRulesClient struct {
// contains filtered or unexported fields
}
SecurityRulesClient is an implementation of Network Security Groups rules.
type Storage ¶
type Storage interface { DeleteObjectsWithPrefix(context.Context, string, string) error CreateContainerIfNotExists(context.Context, string) error DeleteContainerIfExists(context.Context, string) error }
Storage represents an Azure (blob) storage client.
type StorageAccount ¶ added in v1.15.0
type StorageAccount interface { CreateStorageAccount(context.Context, string, string, string) error ListStorageAccountKey(context.Context, string, string) (string, error) }
StorageAccount represents an Azure storage account client.
type StorageAccountClient ¶ added in v1.15.0
type StorageAccountClient struct {
// contains filtered or unexported fields
}
StorageAccountClient is an implementation of StorageAccount for storage account client.
func (StorageAccountClient) CreateStorageAccount ¶ added in v1.15.0
func (c StorageAccountClient) CreateStorageAccount(ctx context.Context, resourceGroupName, storageAccountName, region string) error
CreateStorageAccount creates a storage account.
func (StorageAccountClient) ListStorageAccountKey ¶ added in v1.15.0
func (c StorageAccountClient) ListStorageAccountKey(ctx context.Context, resourceGroupName, storageAccountName string) (string, error)
ListStorageAccountKey lists the first key of a storage account.
type StorageClient ¶
type StorageClient struct {
// contains filtered or unexported fields
}
StorageClient is an implementation of Storage for a (blob) storage client.
func (StorageClient) CreateContainerIfNotExists ¶
func (c StorageClient) CreateContainerIfNotExists(ctx context.Context, container string) error
CreateContainerIfNotExists creates the azure blob container with name <container>. If it already exist,no error is returned.
func (StorageClient) DeleteContainerIfExists ¶
func (c StorageClient) DeleteContainerIfExists(ctx context.Context, container string) error
DeleteContainerIfExists deletes the azure blob container with name <container>. If it does not exist, no error is returned.
func (StorageClient) DeleteObjectsWithPrefix ¶
func (c StorageClient) DeleteObjectsWithPrefix(ctx context.Context, container, prefix string) error
DeleteObjectsWithPrefix deletes the blob objects with the specific <prefix> from <container>. If it does not exist, no error is returned.
type Subnet ¶ added in v1.26.0
type Subnet interface { Get(ctx context.Context, resourceGroupName string, vnetName string, name string, expander string) (*network.Subnet, error) List(context.Context, string, string) ([]network.Subnet, error) Delete(context.Context, string, string, string) error }
Subnet represents an Azure Subnet client.
type SubnetsClient ¶ added in v1.26.0
type SubnetsClient struct {
// contains filtered or unexported fields
}
SubnetsClient is an implementation of Subnet for a Subnet client.
func (SubnetsClient) Delete ¶ added in v1.28.0
func (c SubnetsClient) Delete(ctx context.Context, resourceGroupName, vnetName, subnetName string) error
Delete deletes a subnet in a given virtual network.
type VirtualMachine ¶ added in v1.26.0
type VirtualMachine interface { Get(ctx context.Context, resourceGroupName string, name string, instanceViewTypes compute.InstanceViewTypes) (*compute.VirtualMachine, error) Create(ctx context.Context, resourceGroupName string, name string, parameters *compute.VirtualMachine) (*compute.VirtualMachine, error) Delete(ctx context.Context, resourceGroupName string, name string, forceDeletion *bool) error }
VirtualMachine represents an Azure virtual machine client.
type VirtualMachineImage ¶ added in v1.38.0
type VirtualMachineImage interface {
ListSkus(ctx context.Context, location string, publisherName string, offer string) (*compute.ListVirtualMachineImageResource, error)
}
VirtualMachineImage represents an Azure Virtual Machine Image client.
type VirtualMachineImageClient ¶ added in v1.38.0
type VirtualMachineImageClient struct {
// contains filtered or unexported fields
}
VirtualMachineImageClient is an implementation of Virtual Machine Image for a Virtual Machine Image client.
func (VirtualMachineImageClient) ListSkus ¶ added in v1.38.0
func (c VirtualMachineImageClient) ListSkus(ctx context.Context, location string, publisherName string, offer string) (*compute.ListVirtualMachineImageResource, error)
ListSkus will a list of virtual machine image SKUs for the specified location, publisher, and offer.
type VirtualMachinesClient ¶ added in v1.26.0
type VirtualMachinesClient struct {
// contains filtered or unexported fields
}
VirtualMachinesClient is an implementation of Vm for a virtual machine client.
func (VirtualMachinesClient) Create ¶ added in v1.26.0
func (c VirtualMachinesClient) Create(ctx context.Context, resourceGroupName string, name string, parameters *compute.VirtualMachine) (*compute.VirtualMachine, error)
Create will Create a virtual machine.
func (VirtualMachinesClient) Delete ¶ added in v1.26.0
func (c VirtualMachinesClient) Delete(ctx context.Context, resourceGroupName, name string, forceDeletion *bool) error
Delete will delete a virtual machine.
func (VirtualMachinesClient) Get ¶ added in v1.26.0
func (c VirtualMachinesClient) Get(ctx context.Context, resourceGroupName string, name string, instanceViewTypes compute.InstanceViewTypes) (*compute.VirtualMachine, error)
Get will get virtual machines in a resource group.
type Vmss ¶ added in v1.18.0
type Vmss interface { List(context.Context, string) ([]compute.VirtualMachineScaleSet, error) Get(context.Context, string, string, compute.ExpandTypesForGetVMScaleSets) (*compute.VirtualMachineScaleSet, error) Create(context.Context, string, string, *compute.VirtualMachineScaleSet) (*compute.VirtualMachineScaleSet, error) Delete(context.Context, string, string, *bool) error }
Vmss represents an Azure virtual machine scale set client.
type VmssClient ¶ added in v1.18.0
type VmssClient struct {
// contains filtered or unexported fields
}
VmssClient is an implementation of Vmss for a virtual machine scale set client.
func (VmssClient) Create ¶ added in v1.18.0
func (c VmssClient) Create(ctx context.Context, resourceGroupName, name string, properties *compute.VirtualMachineScaleSet) (*compute.VirtualMachineScaleSet, error)
Create will create a vmss.
func (VmssClient) Delete ¶ added in v1.18.0
func (c VmssClient) Delete(ctx context.Context, resourceGroupName, name string, forceDeletion *bool) error
Delete will delete a vmss.
func (VmssClient) Get ¶ added in v1.18.0
func (c VmssClient) Get(ctx context.Context, resourceGroupName, name string, expand compute.ExpandTypesForGetVMScaleSets) (*compute.VirtualMachineScaleSet, error)
Get will fetch a vmss.
func (VmssClient) List ¶ added in v1.18.0
func (c VmssClient) List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachineScaleSet, error)
List will list vmss in a resource group.