Documentation ¶
Index ¶
- Constants
- Variables
- func FilterNotFoundError(err error) error
- func IsAzureAPINotFoundError(err error) bool
- func IsAzureAPIUnauthorized(err error) bool
- type AvailabilitySet
- type AvailabilitySetClient
- func (c *AvailabilitySetClient) CreateOrUpdate(ctx context.Context, resourceGroupName, availabilitySetName string, ...) (*armcompute.AvailabilitySet, error)
- func (c *AvailabilitySetClient) Delete(ctx context.Context, resourceGroupName, availabilitySetName string) error
- func (c *AvailabilitySetClient) Get(ctx context.Context, resourceGroupName, availabilitySetName string) (*armcompute.AvailabilitySet, error)
- type ContainerCheckExistenceFunc
- type ContainerCreateOrUpdateFunc
- type ContainerDeleteFunc
- type ContainerGetFunc
- type CreateOrUpdateFunc
- type DNSRecordSet
- type DNSRecordSetClient
- type DNSZone
- type DNSZoneClient
- type DeleteFunc
- type DeleteWithOptsFunc
- type Disk
- type DisksClient
- func (c *DisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, diskName string, ...) (*armcompute.Disk, error)
- func (c *DisksClient) Delete(ctx context.Context, resourceGroupName, name string) error
- func (c *DisksClient) Get(ctx context.Context, resourceGroupName string, name string) (*armcompute.Disk, error)
- type Factory
- func NewAzureClientFactory(ctx context.Context, client client.Client, secretRef corev1.SecretReference) (Factory, error)
- func NewAzureClientFactoryWithAuth(auth *internal.ClientAuth, client client.Client) (Factory, error)
- func NewAzureClientFactoryWithDNSSecret(ctx context.Context, client client.Client, secretRef corev1.SecretReference) (Factory, error)
- type GetFunc
- type GetWithExpandFunc
- type ListFunc
- type ManagedUserIdentity
- type ManagedUserIdentityClient
- type NatGateway
- type NatGatewayClient
- func (c *NatGatewayClient) CreateOrUpdate(ctx context.Context, resourceGroupName, natGatewayName string, ...) (*armnetwork.NatGateway, error)
- func (c *NatGatewayClient) Delete(ctx context.Context, resourceGroupName, natGatewayName string) error
- func (c *NatGatewayClient) Get(ctx context.Context, resourceGroupName, natGatewayName string, expand *string) (*armnetwork.NatGateway, error)
- func (c *NatGatewayClient) List(ctx context.Context, resourceGroupName string) ([]*armnetwork.NatGateway, error)
- type NetworkInterface
- type NetworkInterfaceClient
- func (c *NetworkInterfaceClient) CreateOrUpdate(ctx context.Context, resourceGroupName, name string, ...) (*armnetwork.Interface, error)
- func (c *NetworkInterfaceClient) Delete(ctx context.Context, resourceGroupName, name string) error
- func (c *NetworkInterfaceClient) Get(ctx context.Context, resourceGroupName string, name string) (*armnetwork.Interface, error)
- type NetworkSecurityGroup
- type NetworkSecurityGroupClient
- func (c *NetworkSecurityGroupClient) CreateOrUpdate(ctx context.Context, resourceGroupName, name string, ...) (*armnetwork.SecurityGroup, error)
- func (c *NetworkSecurityGroupClient) Delete(ctx context.Context, resourceGroupName, name string) error
- func (c *NetworkSecurityGroupClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (*armnetwork.SecurityGroup, error)
- type PublicIP
- type PublicIPClient
- func (c *PublicIPClient) CreateOrUpdate(ctx context.Context, resourceGroupName, name string, ...) (*armnetwork.PublicIPAddress, error)
- func (c *PublicIPClient) Delete(ctx context.Context, resourceGroupName, name string) error
- func (c *PublicIPClient) Get(ctx context.Context, resourceGroupName string, name string, opts *string) (*armnetwork.PublicIPAddress, error)
- func (c *PublicIPClient) List(ctx context.Context, resourceGroupName string) ([]*armnetwork.PublicIPAddress, error)
- type ResourceGroup
- type ResourceGroupClient
- func (c *ResourceGroupClient) CheckExistence(ctx context.Context, resourceGroupName string) (bool, error)
- func (c *ResourceGroupClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, ...) (*armresources.ResourceGroup, error)
- func (c *ResourceGroupClient) Delete(ctx context.Context, resourceGroupName string) error
- func (c *ResourceGroupClient) Get(ctx context.Context, resourceGroupName string) (*armresources.ResourceGroup, error)
- type RouteTables
- type RouteTablesClient
- func (c *RouteTablesClient) CreateOrUpdate(ctx context.Context, resourceGroupName, routeTableName string, ...) (*armnetwork.RouteTable, error)
- func (c *RouteTablesClient) Delete(ctx context.Context, resourceGroupName, name string) (err error)
- func (c *RouteTablesClient) Get(ctx context.Context, resourceGroupName, name string) (*armnetwork.RouteTable, error)
- type Storage
- type StorageAccount
- type StorageAccountClient
- type StorageClient
- type SubResourceCreateOrUpdateFunc
- type SubResourceDeleteFunc
- type SubResourceGetFunc
- type SubResourceGetWithExpandFunc
- type SubResourceListFunc
- type Subnet
- type SubnetsClient
- func (c *SubnetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName, vnetName, subnetName string, ...) (*armnetwork.Subnet, error)
- 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, ...) (*armnetwork.Subnet, error)
- func (c *SubnetsClient) List(ctx context.Context, resourceGroupName, vnetName string) ([]*armnetwork.Subnet, error)
- type VirtualMachine
- type VirtualMachineImageClient
- type VirtualMachineImages
- type VirtualMachinesClient
- func (c *VirtualMachinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, name string, ...) (*armcompute.VirtualMachine, error)
- func (c *VirtualMachinesClient) Delete(ctx context.Context, resourceGroupName, name string, forceDeletion *bool) error
- func (c *VirtualMachinesClient) Get(ctx context.Context, resourceGroupName string, resource string, ...) (*armcompute.VirtualMachine, error)
- type VirtualNetwork
- type Vmss
- type VmssClient
- func (c VmssClient) CreateOrUpdate(ctx context.Context, resourceGroupName, name string, ...) (*armcompute.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, ...) (*armcompute.VirtualMachineScaleSet, error)
- func (c VmssClient) List(ctx context.Context, resourceGroupName string) ([]*armcompute.VirtualMachineScaleSet, error)
- type VnetClient
- func (v *VnetClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, name string, ...) (*armnetwork.VirtualNetwork, error)
- func (v *VnetClient) Delete(ctx context.Context, resourceGroup, vnetName string) (err error)
- func (v *VnetClient) Get(ctx context.Context, resourceGroupName, name string) (*armnetwork.VirtualNetwork, error)
Constants ¶
const ( // DefaultMaxRetries is the default value for max retries on retryable operations. DefaultMaxRetries = 3 // DefaultMaxRetryDelay is the default maximum value for delay on retryable operations. DefaultMaxRetryDelay = math.MaxInt64 // DefaultRetryDelay is the default value for the initial delay on retry for retryable operations. DefaultRetryDelay = 5 * time.Second )
Variables ¶
var ( // DefaultAzureClientOpts generates clientOptions for the azure clients. DefaultAzureClientOpts func() *arm.ClientOptions )
Functions ¶
func FilterNotFoundError ¶ added in v1.40.0
FilterNotFoundError returns nil for NotFound errors.
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 AvailabilitySet ¶ added in v1.40.0
type AvailabilitySet interface { GetFunc[armcompute.AvailabilitySet] CreateOrUpdateFunc[armcompute.AvailabilitySet] DeleteFunc[armcompute.AvailabilitySet] }
AvailabilitySet is an interface for the Azure AvailabilitySet service.
type AvailabilitySetClient ¶ added in v1.40.0
type AvailabilitySetClient struct {
// contains filtered or unexported fields
}
AvailabilitySetClient is an implementation of AvailabilitySet for an availability set k8sClient.
func NewAvailabilitySetClient ¶ added in v1.40.0
func NewAvailabilitySetClient(auth internal.ClientAuth) (*AvailabilitySetClient, error)
NewAvailabilitySetClient creates a new AvailabilitySetClient.
func (*AvailabilitySetClient) CreateOrUpdate ¶ added in v1.40.0
func (c *AvailabilitySetClient) CreateOrUpdate(ctx context.Context, resourceGroupName, availabilitySetName string, parameters armcompute.AvailabilitySet) (*armcompute.AvailabilitySet, error)
CreateOrUpdate creates or updates a new availability set.
type ContainerCheckExistenceFunc ¶ added in v1.40.0
type ContainerCheckExistenceFunc[T any] interface { CheckExistence(ctx context.Context, container string) (bool, error) }
ContainerCheckExistenceFunc checks if the container resource exists in the infrastructure.
type ContainerCreateOrUpdateFunc ¶ added in v1.40.0
type ContainerCreateOrUpdateFunc[T any] interface { CreateOrUpdate(ctx context.Context, container string, resourceParam T) (*T, error) }
ContainerCreateOrUpdateFunc creates or updates a container resource for example resource groups.
type ContainerDeleteFunc ¶ added in v1.40.0
ContainerDeleteFunc deletes the specified container resource.
type ContainerGetFunc ¶ added in v1.40.0
ContainerGetFunc retrieves a container resource.
type CreateOrUpdateFunc ¶ added in v1.40.0
type CreateOrUpdateFunc[T any] interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, resourceParam T) (*T, error) }
CreateOrUpdateFunc creates or updates a resource.
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 k8sClient.
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 k8sClient.
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 k8sClient.
type DeleteFunc ¶ added in v1.40.0
type DeleteFunc[T any] interface { Delete(ctx context.Context, resourceGroupName string, resourceName string) error }
DeleteFunc deletes a resource.
type DeleteWithOptsFunc ¶ added in v1.40.0
type DeleteWithOptsFunc[T, O any] interface { Delete(ctx context.Context, resourceGroupName string, resourceName string, opts O) error }
DeleteWithOptsFunc deletes a resource with the specified deleteOpts.
type Disk ¶ added in v1.26.0
type Disk interface { GetFunc[armcompute.Disk] CreateOrUpdateFunc[armcompute.Disk] DeleteFunc[armcompute.Disk] }
Disk represents an Azure Disk k8sClient.
func NewDisksClient ¶ added in v1.40.0
func NewDisksClient(auth internal.ClientAuth, tc azcore.TokenCredential, opts *arm.ClientOptions) (Disk, error)
NewDisksClient creates a new 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 k8sClient.
func (*DisksClient) CreateOrUpdate ¶ added in v1.26.0
func (c *DisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, diskName string, disk armcompute.Disk) (*armcompute.Disk, error)
CreateOrUpdate will create or update a disk.
type Factory ¶ added in v1.15.0
type Factory interface { Auth() *internal.ClientAuth Storage(context.Context, corev1.SecretReference) (Storage, error) StorageAccount() (StorageAccount, error) Vmss() (Vmss, error) DNSZone() (DNSZone, error) DNSRecordSet() (DNSRecordSet, error) VirtualMachine() (VirtualMachine, error) NetworkInterface() (NetworkInterface, error) Disk() (Disk, error) Group() (ResourceGroup, error) NetworkSecurityGroup() (NetworkSecurityGroup, error) Subnet() (Subnet, error) PublicIP() (PublicIP, error) Vnet() (VirtualNetwork, error) RouteTables() (RouteTables, error) NatGateway() (NatGateway, error) AvailabilitySet() (AvailabilitySet, error) ManagedUserIdentity() (ManagedUserIdentity, error) VirtualMachineImages() (VirtualMachineImages, error) }
Factory represents a factory to produce clients for various Azure services.
func NewAzureClientFactory ¶ added in v1.15.0
func NewAzureClientFactory(ctx context.Context, client client.Client, secretRef corev1.SecretReference) (Factory, error)
NewAzureClientFactory creates a new Azure client factory with the passed secret reference.
func NewAzureClientFactoryWithAuth ¶ added in v1.40.0
func NewAzureClientFactoryWithAuth(auth *internal.ClientAuth, client client.Client) (Factory, error)
NewAzureClientFactoryWithAuth creates a new Azure client factory with the passed credentials.
func NewAzureClientFactoryWithDNSSecret ¶ added in v1.40.0
func NewAzureClientFactoryWithDNSSecret(ctx context.Context, client client.Client, secretRef corev1.SecretReference) (Factory, error)
NewAzureClientFactoryWithDNSSecret creates a new Azure client factory with the passed secret reference using the DNS secret keys.
type GetFunc ¶ added in v1.40.0
type GetFunc[T any] interface { Get(ctx context.Context, resourceGroupName string, resourceName string) (*T, error) }
GetFunc gets a resource of type T.
type GetWithExpandFunc ¶ added in v1.40.0
type GetWithExpandFunc[T, E any] interface { Get(ctx context.Context, resourceGroupName string, resourceName string, expand E) (*T, error) }
GetWithExpandFunc gets a resource and allows expansion of other referenced resources.
type ListFunc ¶ added in v1.40.0
type ListFunc[T any] interface { List(ctx context.Context, resourceGroupName string) (result []*T, err error) }
ListFunc gets a list of resources is the target resource group.
type ManagedUserIdentity ¶ added in v1.40.0
ManagedUserIdentity is a k8sClient for the Azure Managed User Identity service.
type ManagedUserIdentityClient ¶ added in v1.40.0
type ManagedUserIdentityClient struct {
// contains filtered or unexported fields
}
ManagedUserIdentityClient is an implementation of ManagedUserIdentity for a managed user identity k8sClient.
func NewManagedUserIdentityClient ¶ added in v1.40.0
func NewManagedUserIdentityClient(auth internal.ClientAuth) (*ManagedUserIdentityClient, error)
NewManagedUserIdentityClient creates a new ManagedUserIdentityClient
type NatGateway ¶ added in v1.40.0
type NatGateway interface { CreateOrUpdateFunc[armnetwork.NatGateway] GetWithExpandFunc[armnetwork.NatGateway, *string] ListFunc[armnetwork.NatGateway] DeleteFunc[armnetwork.NatGateway] }
NatGateway is an interface for the Azure NatGateway service.
type NatGatewayClient ¶ added in v1.40.0
type NatGatewayClient struct {
// contains filtered or unexported fields
}
NatGatewayClient is an implementation of NatGateway for a Nat Gateway k8sClient.
func NewNatGatewaysClient ¶ added in v1.40.0
func NewNatGatewaysClient(auth internal.ClientAuth, tc azcore.TokenCredential, opts *arm.ClientOptions) (*NatGatewayClient, error)
NewNatGatewaysClient creates a new NatGateway client.
func (*NatGatewayClient) CreateOrUpdate ¶ added in v1.40.0
func (c *NatGatewayClient) CreateOrUpdate(ctx context.Context, resourceGroupName, natGatewayName string, parameters armnetwork.NatGateway) (*armnetwork.NatGateway, error)
CreateOrUpdate creates or updates a NatGateway.
func (*NatGatewayClient) Delete ¶ added in v1.40.0
func (c *NatGatewayClient) Delete(ctx context.Context, resourceGroupName, natGatewayName string) error
Delete deletes the NatGateway with the given name.
type NetworkInterface ¶ added in v1.26.0
type NetworkInterface interface { GetFunc[armnetwork.Interface] CreateOrUpdateFunc[armnetwork.Interface] DeleteFunc[armnetwork.Interface] }
NetworkInterface represents an Azure Network Interface k8sClient.
type NetworkInterfaceClient ¶ added in v1.26.0
type NetworkInterfaceClient struct {
// contains filtered or unexported fields
}
NetworkInterfaceClient is an implementation of Network Interface.
func NewNetworkInterfaceClient ¶ added in v1.40.0
func NewNetworkInterfaceClient(auth internal.ClientAuth, tc azcore.TokenCredential, opts *arm.ClientOptions) (*NetworkInterfaceClient, error)
NewNetworkInterfaceClient creates a new NetworkInterfaceClient
func (*NetworkInterfaceClient) CreateOrUpdate ¶ added in v1.26.0
func (c *NetworkInterfaceClient) CreateOrUpdate(ctx context.Context, resourceGroupName, name string, parameters armnetwork.Interface) (*armnetwork.Interface, error)
CreateOrUpdate indicates an expected call of Network interface CreateOrUpdate.
type NetworkSecurityGroup ¶ added in v1.26.0
type NetworkSecurityGroup interface { GetFunc[armnetwork.SecurityGroup] CreateOrUpdateFunc[armnetwork.SecurityGroup] DeleteFunc[armnetwork.SecurityGroup] }
NetworkSecurityGroup represents an Azure Network security group k8sClient.
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 k8sClient.
func NewSecurityGroupClient ¶ added in v1.40.0
func NewSecurityGroupClient(auth internal.ClientAuth, tc azcore.TokenCredential, opts *arm.ClientOptions) (*NetworkSecurityGroupClient, error)
NewSecurityGroupClient creates a new SecurityGroupClient
func (*NetworkSecurityGroupClient) CreateOrUpdate ¶ added in v1.26.0
func (c *NetworkSecurityGroupClient) CreateOrUpdate(ctx context.Context, resourceGroupName, name string, parameters armnetwork.SecurityGroup) (*armnetwork.SecurityGroup, error)
CreateOrUpdate indicates an expected call of Network Security Group CreateOrUpdate.
type PublicIP ¶ added in v1.26.0
type PublicIP interface { GetWithExpandFunc[armnetwork.PublicIPAddress, *string] CreateOrUpdateFunc[armnetwork.PublicIPAddress] DeleteFunc[armnetwork.PublicIPAddress] ListFunc[armnetwork.PublicIPAddress] }
PublicIP represents an Azure Network Public IP k8sClient.
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 NewPublicIPClient ¶ added in v1.40.0
func NewPublicIPClient(auth internal.ClientAuth, tc azcore.TokenCredential, opts *arm.ClientOptions) (*PublicIPClient, error)
NewPublicIPClient creates a new PublicIPClient
func (*PublicIPClient) CreateOrUpdate ¶ added in v1.26.0
func (c *PublicIPClient) CreateOrUpdate(ctx context.Context, resourceGroupName, name string, parameters armnetwork.PublicIPAddress) (*armnetwork.PublicIPAddress, error)
CreateOrUpdate indicates an expected call of Network Public IP CreateOrUpdate.
func (*PublicIPClient) Delete ¶ added in v1.26.0
func (c *PublicIPClient) Delete(ctx context.Context, resourceGroupName, name string) error
Delete will delete a network Public IP Address.
type ResourceGroup ¶ added in v1.40.0
type ResourceGroup interface { ContainerCreateOrUpdateFunc[armresources.ResourceGroup] ContainerDeleteFunc[armresources.ResourceGroup] ContainerGetFunc[armresources.ResourceGroup] ContainerCheckExistenceFunc[armresources.ResourceGroup] }
ResourceGroup represents an Azure ResourceGroup k8sClient.
type ResourceGroupClient ¶ added in v1.40.0
type ResourceGroupClient struct {
// contains filtered or unexported fields
}
ResourceGroupClient is a client for resource groups.
func NewResourceGroupsClient ¶ added in v1.40.0
func NewResourceGroupsClient(auth *internal.ClientAuth, tc azcore.TokenCredential, opts *arm.ClientOptions) (*ResourceGroupClient, error)
NewResourceGroupsClient creates a new ResourceGroupClient
func (*ResourceGroupClient) CheckExistence ¶ added in v1.40.0
func (c *ResourceGroupClient) CheckExistence(ctx context.Context, resourceGroupName string) (bool, error)
CheckExistence checks if a resource group exists
func (*ResourceGroupClient) CreateOrUpdate ¶ added in v1.40.0
func (c *ResourceGroupClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resource armresources.ResourceGroup) (*armresources.ResourceGroup, error)
CreateOrUpdate creates or updates a resource group
func (*ResourceGroupClient) Delete ¶ added in v1.40.0
func (c *ResourceGroupClient) Delete(ctx context.Context, resourceGroupName string) error
Delete deletes a resource group if it exists.
func (*ResourceGroupClient) Get ¶ added in v1.40.0
func (c *ResourceGroupClient) Get(ctx context.Context, resourceGroupName string) (*armresources.ResourceGroup, error)
Get gets a resource group.
type RouteTables ¶ added in v1.40.0
type RouteTables interface { CreateOrUpdateFunc[armnetwork.RouteTable] DeleteFunc[armnetwork.RouteTable] GetFunc[armnetwork.RouteTable] }
RouteTables is a k8sClient for the Azure RouteTable service.
type RouteTablesClient ¶ added in v1.40.0
type RouteTablesClient struct {
// contains filtered or unexported fields
}
RouteTablesClient is an implementation of RouteTables for a RouteTables k8sClient.
func NewRouteTablesClient ¶ added in v1.40.0
func NewRouteTablesClient(auth internal.ClientAuth, tc azcore.TokenCredential, opts *arm.ClientOptions) (*RouteTablesClient, error)
NewRouteTablesClient creates a new RouteTables client.
func (*RouteTablesClient) CreateOrUpdate ¶ added in v1.40.0
func (c *RouteTablesClient) CreateOrUpdate(ctx context.Context, resourceGroupName, routeTableName string, parameters armnetwork.RouteTable) (*armnetwork.RouteTable, error)
CreateOrUpdate creates or updates a RouteTable.
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 k8sClient.
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 k8sClient.
type StorageAccountClient ¶ added in v1.15.0
type StorageAccountClient struct {
// contains filtered or unexported fields
}
StorageAccountClient is an implementation of StorageAccount for storage account k8sClient.
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 k8sClient.
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 SubResourceCreateOrUpdateFunc ¶ added in v1.40.0
type SubResourceCreateOrUpdateFunc[T any] interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, parentResourceName string, resourceName string, resourceParam T) (*T, error) }
SubResourceCreateOrUpdateFunc creates or updates a subresource.
type SubResourceDeleteFunc ¶ added in v1.40.0
type SubResourceDeleteFunc[T any] interface { Delete(ctx context.Context, resourceGroupName string, parentResourceName string, resourceName string) error }
SubResourceDeleteFunc deletes a resource.
type SubResourceGetFunc ¶ added in v1.40.0
type SubResourceGetFunc[T any] interface { Get(ctx context.Context, resourceGroupName string, parentResourceName string, resourceName string) (*T, error) }
SubResourceGetFunc gets a subresource of type T.
type SubResourceGetWithExpandFunc ¶ added in v1.40.0
type SubResourceGetWithExpandFunc[T, E any] interface { Get(ctx context.Context, resourceGroupName string, parentResourceName string, resourceName string, expand E) (*T, error) }
SubResourceGetWithExpandFunc gets a subresource and allows expansion of other referenced resources.
type SubResourceListFunc ¶ added in v1.40.0
type SubResourceListFunc[T any] interface { List(ctx context.Context, resourceGroupName string, parentResourceName string) ([]*T, error) }
SubResourceListFunc gets a list of subresources is the target resource.
type Subnet ¶ added in v1.26.0
type Subnet interface { SubResourceCreateOrUpdateFunc[armnetwork.Subnet] SubResourceGetWithExpandFunc[armnetwork.Subnet, *string] SubResourceListFunc[armnetwork.Subnet] SubResourceDeleteFunc[armnetwork.Subnet] }
Subnet represents an Azure Subnet k8sClient.
type SubnetsClient ¶ added in v1.26.0
type SubnetsClient struct {
// contains filtered or unexported fields
}
SubnetsClient implements the interface for the subnets client.
func NewSubnetsClient ¶ added in v1.40.0
func NewSubnetsClient(auth internal.ClientAuth, tc azcore.TokenCredential, opts *arm.ClientOptions) (*SubnetsClient, error)
NewSubnetsClient creates a new client for the subnets API.
func (*SubnetsClient) CreateOrUpdate ¶ added in v1.40.0
func (c *SubnetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName, vnetName, subnetName string, parameters armnetwork.Subnet) (*armnetwork.Subnet, error)
CreateOrUpdate creates or updates a subnet in a given virtual network.
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.
func (*SubnetsClient) Get ¶ added in v1.26.0
func (c *SubnetsClient) Get(ctx context.Context, resourceGroupName string, vnetName string, name string, expand *string) (*armnetwork.Subnet, error)
Get will get a subnet in a given virtual network. If the requested subnet not exists nil will be returned.
type VirtualMachine ¶ added in v1.26.0
type VirtualMachine interface { GetWithExpandFunc[armcompute.VirtualMachine, *armcompute.InstanceViewTypes] CreateOrUpdateFunc[armcompute.VirtualMachine] DeleteWithOptsFunc[armcompute.VirtualMachine, *bool] }
VirtualMachine represents an Azure virtual machine k8sClient.
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 k8sClient.
func NewVirtualMachineImagesClient ¶ added in v1.40.0
func NewVirtualMachineImagesClient(auth internal.ClientAuth) (*VirtualMachineImageClient, error)
NewVirtualMachineImagesClient creates a new VirtualMachineImagesClient 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 VirtualMachineImages ¶ added in v1.40.0
type VirtualMachineImages interface {
ListSkus(ctx context.Context, location string, publisherName string, offer string) (*compute.ListVirtualMachineImageResource, error)
}
VirtualMachineImages represents an Azure Virtual Machine Image k8sClient.
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 k8sClient.
func NewVMClient ¶ added in v1.40.0
func NewVMClient(auth internal.ClientAuth, tc azcore.TokenCredential, opts *arm.ClientOptions) (*VirtualMachinesClient, error)
NewVMClient creates a new VM client
func (*VirtualMachinesClient) CreateOrUpdate ¶ added in v1.40.0
func (c *VirtualMachinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, name string, parameters armcompute.VirtualMachine) (*armcompute.VirtualMachine, error)
CreateOrUpdate will Create a virtual machine or update an existing one.
type VirtualNetwork ¶ added in v1.40.0
type VirtualNetwork interface { CreateOrUpdateFunc[armnetwork.VirtualNetwork] GetFunc[armnetwork.VirtualNetwork] DeleteFunc[armnetwork.VirtualNetwork] }
VirtualNetwork represents an Azure Virtual Network k8sClient.
type Vmss ¶ added in v1.18.0
type Vmss interface { ListFunc[armcompute.VirtualMachineScaleSet] GetWithExpandFunc[armcompute.VirtualMachineScaleSet, *armcompute.ExpandTypesForGetVMScaleSets] CreateOrUpdateFunc[armcompute.VirtualMachineScaleSet] DeleteWithOptsFunc[armcompute.VirtualMachineScaleSet, *bool] }
Vmss represents an Azure virtual machine scale set k8sClient.
func NewVmssClient ¶ added in v1.40.0
func NewVmssClient(auth internal.ClientAuth, tc azcore.TokenCredential, opts *arm.ClientOptions) (Vmss, error)
NewVmssClient creates a new VmssClient
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 k8sClient.
func (VmssClient) CreateOrUpdate ¶ added in v1.40.0
func (c VmssClient) CreateOrUpdate(ctx context.Context, resourceGroupName, name string, properties armcompute.VirtualMachineScaleSet) (*armcompute.VirtualMachineScaleSet, error)
CreateOrUpdate will create a vmss or update an existing one.
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.
type VnetClient ¶ added in v1.40.0
type VnetClient struct {
// contains filtered or unexported fields
}
VnetClient is an implmenetation of VirtualNetwork for a virtual network k8sClient.
func NewVnetClient ¶ added in v1.40.0
func NewVnetClient(auth internal.ClientAuth, tc azcore.TokenCredential, opts *arm.ClientOptions) (*VnetClient, error)
NewVnetClient creates a new VnetClient.
func (*VnetClient) CreateOrUpdate ¶ added in v1.40.0
func (v *VnetClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, name string, parameters armnetwork.VirtualNetwork) (*armnetwork.VirtualNetwork, error)
CreateOrUpdate creates or updates a virtual network.
Source Files ¶
- availabilityset.go
- client_opts.go
- disk.go
- dnsrecordset.go
- dnszone.go
- factory.go
- helper.go
- interface.go
- natgateway.go
- networkinterface.go
- networksecuritygroup.go
- publicip.go
- resourcegroup.go
- routetables.go
- storage.go
- storageaccount.go
- subnet.go
- types.go
- useridentity.go
- vm.go
- vmImage.go
- vmss.go
- vnet.go