azure

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package azure provides utility functions for interacting with Azure resources and the Azure SDK.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIPConfurationDetailsFromID added in v0.0.11

func GetIPConfurationDetailsFromID(ctx context.Context, clientFactory armnetwork.ClientFactory, id string) (*armnetwork.InterfaceIPConfiguration, error)

GetIPConfurationDetailsFromID returns the IP configuration details from a given IpConfiguration resource ID.

func GetNetworkInterfaceNameFromID added in v0.0.11

func GetNetworkInterfaceNameFromID(resourceID string) string

GetNetworkInterfaceNameFromID returns the network interface name from a given resource ID.

func GetPublicIPAddressDetailsFromID added in v0.0.11

func GetPublicIPAddressDetailsFromID(ctx context.Context, clientFactory armnetwork.ClientFactory, id string) (*armnetwork.PublicIPAddress, error)

GetPublicIPAddressDetailsFromID returns the public IP address details from a given public IP address resource ID.

func GetResourceGroupFromID

func GetResourceGroupFromID(resourceID string) string

GetResourceGroupFromID returns the resource group name from a given resource ID.

func GetResourceGroupIDFromName

func GetResourceGroupIDFromName(subID string, resourceGroupName string) string

GetResourceGroupIDFromName creates the resource group ID from a given subscription ID and resource group name.

func GetResourceNameFromID

func GetResourceNameFromID(resourceID string) string

GetResourceNameFromID returns the resource name from a given resource ID, assuming the last element

func GetStringEnumPtrValue added in v0.0.11

func GetStringEnumPtrValue(value interface{}) string

GetStringEnumPtrValue safely returns the value of a ptr string enum type or an empty string if it's nil

func GetStringPtrValue added in v0.0.3

func GetStringPtrValue(s *string) string

GetStringPtrValue safely returns the value of a string pointer or an empty string if it's nil

func GetSubnetDetailsFromID added in v0.0.11

func GetSubnetDetailsFromID(ctx context.Context, clientFactory armnetwork.ClientFactory, id string) (*armnetwork.Subnet, error)

GetSubnetDetailsFromID returns the subnet details from a given subnet resource ID.

func GetVNetIDFromVNetName

func GetVNetIDFromVNetName(ctx context.Context, cfg config.AzureConfig, resourceGroupName string, vnetName string) (string, error)

GetVNetIDFromVNetName returns the VNet ID from a given resource group name and VNet name.

func GetVNetNameFromID

func GetVNetNameFromID(resourceID string) string

GetVNetNameFromID returns the VNet name from a given resource ID.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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