Documentation
¶
Index ¶
- func ExtractParentResourceNameFromID(resourceID string) string
- func ExtractResourceNameFromID(resourceID string) string
- func GetPowerState(states []*armcompute.InstanceViewStatus) string
- func GetResourceGroupsFromDB(ctx context.Context) ([]models.ResourceGroup, error)
- func GetStorageAccountsFromDB(ctx context.Context) ([]models.StorageAccount, error)
- func GetVPCsFromDB(ctx context.Context) ([]models.VPC, error)
- func MaybeSkipRetry(err error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractParentResourceNameFromID ¶ added in v0.1.20
ExtractParentResourceNameFromID extracts the parent resource name from an Azure resource ID. This is useful for nested resources like subnets, where you need the VNet name. For a subnet ID like: /subscriptions/.../virtualNetworks/{vnetName}/subnets/{subnetName} This returns {vnetName}
func ExtractResourceNameFromID ¶ added in v0.1.20
ExtractResourceNameFromID extracts the resource name from an Azure resource ID. Azure resource IDs have the format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{namespace}/{resourceType}/{resourceName}
func GetPowerState ¶
func GetPowerState(states []*armcompute.InstanceViewStatus) string
GetPowerState returns the power state of a Virtual Machine by looking up the provided states.
func GetResourceGroupsFromDB ¶
func GetResourceGroupsFromDB(ctx context.Context) ([]models.ResourceGroup, error)
GetResourceGroupsFromDB returns the models.ResourceGroup from the database.
func GetStorageAccountsFromDB ¶
func GetStorageAccountsFromDB(ctx context.Context) ([]models.StorageAccount, error)
GetStorageAccountsFromDB returns the models.StorageAccount from the database.
func GetVPCsFromDB ¶
GetVPCsFromDB returns the models.VPC from the database.
func MaybeSkipRetry ¶
MaybeSkipRetry wraps known "good" Azure errors with asynq.SkipRetry, so that the tasks from which these errors originate from won't be retried.
Types ¶
This section is empty.