Versions in this module Expand all Collapse all v1 v1.23.14 Apr 4, 2026 v1.23.13 Mar 26, 2026 Changes in this version + var ErrAzCliNotLoggedIn = errors.New("cli is not logged in. Try running \"az login\" to fix") + var ErrAzCliRefreshTokenExpired = errors.New("refresh token has expired. Try running \"az login\" to fix") + var ErrDeploymentNotFound = errors.New("deployment not found") + var ErrPreviewNotSupported = errors.New("preview not supported") + var FeatureDeploymentStacks = alpha.MustFeatureKey("deployment.stacks") + func CreateDeploymentOutput(rawOutputs any) (result map[string]AzCliDeploymentOutput) + func GetResourceTypeDisplayName(resourceType AzureResourceType) string + func GroupByResourceGroup(resources []*armresources.ResourceReference) (map[string][]*Resource, error) + type AppServiceSlot struct + Name string + type AzCliAccessToken struct + AccessToken string + ExpiresOn *time.Time + type AzCliApim struct + Id string + Location string + Name string + type AzCliAppConfig struct + Id string + Location string + Name string + Properties struct{ ... } + type AzCliAppServiceProperties struct + HostNames []string + type AzCliDeployment struct + Id string + Name string + Properties AzCliDeploymentProperties + type AzCliDeploymentAdditionalInfo struct + Info any + Type string + type AzCliDeploymentErrorResponse struct + AdditionalInfo AzCliDeploymentAdditionalInfo + Code string + Details []AzCliDeploymentErrorResponse + Message string + Target string + type AzCliDeploymentOutput struct + Type string + Value any + func (o AzCliDeploymentOutput) Secured() bool + type AzCliDeploymentProperties struct + CorrelationId string + Dependencies []AzCliDeploymentPropertiesDependency + Error AzCliDeploymentErrorResponse + OutputResources []AzCliDeploymentResourceReference + Outputs map[string]AzCliDeploymentOutput + type AzCliDeploymentPropertiesBasicDependency struct + Id string + ResourceName string + ResourceType string + type AzCliDeploymentPropertiesDependency struct + DependsOn []AzCliDeploymentPropertiesBasicDependency + type AzCliDeploymentResourceReference struct + Id string + type AzCliDeploymentResult struct + Properties AzCliDeploymentResultProperties + type AzCliDeploymentResultProperties struct + Outputs map[string]AzCliDeploymentOutput + type AzCliDeploymentStatusMessage struct + Err AzCliDeploymentErrorResponse + Status string + type AzCliFunctionAppProperties struct + HostNameSslStates []*armappservice.HostNameSSLState + HostNames []string + ServerFarmID string + type AzCliLogAnalyticsWorkspace struct + Id string + Name string + type AzCliManagedHSM struct + Id string + Location string + Name string + Properties struct{ ... } + type AzCliResourceOperation struct + Id string + OperationId string + Properties AzCliResourceOperationProperties + type AzCliResourceOperationProperties struct + ProvisioningOperation string + ProvisioningState string + StatusCode string + StatusMessage AzCliDeploymentStatusMessage + TargetResource AzCliResourceOperationTargetResource + Timestamp time.Time + type AzCliResourceOperationTargetResource struct + Id string + ResourceGroup string + ResourceName string + ResourceType string + type AzCliStaticWebAppEnvironmentProperties struct + Hostname string + Status string + type AzCliStaticWebAppProperties struct + DefaultHostname string + type AzureClient struct + func NewAzureClient(credentialProvider account.SubscriptionCredentialProvider, ...) *AzureClient + func (cli *AzureClient) DeployAppServiceSlotZip(ctx context.Context, subscriptionId string, resourceGroup string, ...) (*string, error) + func (cli *AzureClient) DeployAppServiceZip(ctx context.Context, subscriptionId string, resourceGroup string, ...) (*string, error) + func (cli *AzureClient) DeployFunctionAppUsingZipFileFlexConsumption(ctx context.Context, subscriptionId string, props *AzCliFunctionAppProperties, ...) (*string, error) + func (cli *AzureClient) DeployFunctionAppUsingZipFileRegular(ctx context.Context, subscriptionId string, props *AzCliFunctionAppProperties, ...) (*string, error) + func (cli *AzureClient) GetAiModels(ctx context.Context, subscriptionId string, location string) ([]*armcognitiveservices.Model, error) + func (cli *AzureClient) GetAiUsages(ctx context.Context, subscriptionId string, location string) ([]*armcognitiveservices.Usage, error) + func (cli *AzureClient) GetApim(ctx context.Context, subscriptionId string, resourceGroupName string, ...) (*AzCliApim, error) + func (cli *AzureClient) GetAppConfig(ctx context.Context, subscriptionId string, resourceGroupName string, ...) (*AzCliAppConfig, error) + func (cli *AzureClient) GetAppServiceProperties(ctx context.Context, subscriptionId string, resourceGroup string, ...) (*AzCliAppServiceProperties, error) + func (cli *AzureClient) GetAppServiceSlotProperties(ctx context.Context, subscriptionId string, resourceGroup string, ...) (*AzCliAppServiceProperties, error) + func (cli *AzureClient) GetAppServiceSlots(ctx context.Context, subscriptionId string, resourceGroup string, ...) ([]AppServiceSlot, error) + func (cli *AzureClient) GetCognitiveAccount(ctx context.Context, subscriptionId string, resourceGroupName string, ...) (armcognitiveservices.Account, error) + func (cli *AzureClient) GetFunctionAppPlan(ctx context.Context, props *AzCliFunctionAppProperties) (*armappservice.Plan, error) + func (cli *AzureClient) GetFunctionAppProperties(ctx context.Context, subscriptionId string, resourceGroup string, ...) (*AzCliFunctionAppProperties, error) + func (cli *AzureClient) GetLogAnalyticsWorkspace(ctx context.Context, subscriptionId string, resourceGroupName string, ...) (*AzCliLogAnalyticsWorkspace, error) + func (cli *AzureClient) GetManagedHSM(ctx context.Context, subscriptionId string, resourceGroupName string, ...) (*AzCliManagedHSM, error) + func (cli *AzureClient) GetResourceSkuLocations(ctx context.Context, subscriptionId string, ...) ([]string, error) + func (cli *AzureClient) GetStaticWebAppApiKey(ctx context.Context, subscriptionId string, resourceGroup string, ...) (*string, error) + func (cli *AzureClient) GetStaticWebAppEnvironmentProperties(ctx context.Context, subscriptionId string, resourceGroup string, ...) (*AzCliStaticWebAppEnvironmentProperties, error) + func (cli *AzureClient) GetStaticWebAppProperties(ctx context.Context, subscriptionId string, resourceGroup string, ...) (*AzCliStaticWebAppProperties, error) + func (cli *AzureClient) HasAppServiceDeployments(ctx context.Context, subscriptionId string, resourceGroup string, ...) (bool, error) + func (cli *AzureClient) PurgeApim(ctx context.Context, subscriptionId string, apimName string, location string) error + func (cli *AzureClient) PurgeAppConfig(ctx context.Context, subscriptionId string, configName string, location string) error + func (cli *AzureClient) PurgeCognitiveAccount(ctx context.Context, ...) error + func (cli *AzureClient) PurgeLogAnalyticsWorkspace(ctx context.Context, subscriptionId string, resourceGroupName string, ...) error + func (cli *AzureClient) PurgeManagedHSM(ctx context.Context, subscriptionId string, hsmName string, location string) error + type AzureDeploymentError struct + Details *DeploymentErrorLine + Inner error + Json string + Operation DeploymentOperation + Title string + func NewAzureDeploymentError(title string, jsonErrorResponse string, operation DeploymentOperation) *AzureDeploymentError + func (e *AzureDeploymentError) Error() string + func (e *AzureDeploymentError) Unwrap() []error + type AzureResourceType string + const AzureResourceTypeAgentPool + const AzureResourceTypeApim + const AzureResourceTypeAppConfig + const AzureResourceTypeAppInsightComponent + const AzureResourceTypeAutomationAccount + const AzureResourceTypeCDNProfile + const AzureResourceTypeCacheForRedis + const AzureResourceTypeCognitiveServiceAccount + const AzureResourceTypeCognitiveServiceAccountCapabilityHost + const AzureResourceTypeCognitiveServiceAccountDeployment + const AzureResourceTypeCognitiveServiceAccountProject + const AzureResourceTypeContainerApp + const AzureResourceTypeContainerAppEnvironment + const AzureResourceTypeContainerAppJob + const AzureResourceTypeContainerRegistry + const AzureResourceTypeCosmosDb + const AzureResourceTypeDeployment + const AzureResourceTypeDevCenter + const AzureResourceTypeDevCenterProject + const AzureResourceTypeDocumentDB + const AzureResourceTypeEventHubsNamespace + const AzureResourceTypeKeyVault + const AzureResourceTypeLoadTest + const AzureResourceTypeLogAnalyticsWorkspace + const AzureResourceTypeMachineLearningConnection + const AzureResourceTypeMachineLearningEndpoint + const AzureResourceTypeMachineLearningWorkspace + const AzureResourceTypeManagedCluster + const AzureResourceTypeManagedHSM + const AzureResourceTypeMySqlServer + const AzureResourceTypePortalDashboard + const AzureResourceTypePostgreSqlServer + const AzureResourceTypePrivateEndpoint + const AzureResourceTypeRedisEnterprise + const AzureResourceTypeResourceGroup + const AzureResourceTypeRoleAssignment + const AzureResourceTypeSearchService + const AzureResourceTypeServiceBusNamespace + const AzureResourceTypeServicePlan + const AzureResourceTypeSqlServer + const AzureResourceTypeSreAgent + const AzureResourceTypeStaticWebSite + const AzureResourceTypeStorageAccount + const AzureResourceTypeVideoIndexer + const AzureResourceTypeVirtualNetwork + const AzureResourceTypeWebSite + const AzureResourceTypeWebSiteSlot + type ContainerRegistryService interface + Credentials func(ctx context.Context, subscriptionId string, loginServer string) (*DockerCredentials, error) + FindContainerRegistryResourceGroup func(ctx context.Context, subscriptionId string, registryName string) (string, error) + GetContainerRegistries func(ctx context.Context, subscriptionId string) ([]*armcontainerregistry.Registry, error) + Login func(ctx context.Context, subscriptionId string, loginServer string) error + func NewContainerRegistryService(credentialProvider account.SubscriptionCredentialProvider, docker *docker.Cli, ...) ContainerRegistryService + type DeleteDeploymentProgress struct + Message string + Name string + State DeleteResourceState + type DeleteResourceState string + const DeleteResourceStateFailed + const DeleteResourceStateInProgress + const DeleteResourceStateSucceeded + type DeploymentErrorLine struct + Code string + Inner []*DeploymentErrorLine + Message string + func (e *DeploymentErrorLine) Error() string + func (e *DeploymentErrorLine) Unwrap() []error + type DeploymentOperation string + const DeploymentOperationDeploy + const DeploymentOperationPreview + const DeploymentOperationValidate + type DeploymentProvisioningState string + const DeploymentProvisioningStateAccepted + const DeploymentProvisioningStateCanceled + const DeploymentProvisioningStateCanceling + const DeploymentProvisioningStateCreating + const DeploymentProvisioningStateDeleted + const DeploymentProvisioningStateDeleting + const DeploymentProvisioningStateDeletingResources + const DeploymentProvisioningStateDeploying + const DeploymentProvisioningStateFailed + const DeploymentProvisioningStateNotSpecified + const DeploymentProvisioningStateReady + const DeploymentProvisioningStateRunning + const DeploymentProvisioningStateSucceeded + const DeploymentProvisioningStateUpdating + const DeploymentProvisioningStateUpdatingDenyAssignments + const DeploymentProvisioningStateValidating + const DeploymentProvisioningStateWaiting + type DeploymentService interface + CalculateTemplateHash func(ctx context.Context, subscriptionId string, template azure.RawArmTemplate) (string, error) + DeleteResourceGroupDeployment func(ctx context.Context, subscriptionId, resourceGroupName string, ...) error + DeleteSubscriptionDeployment func(ctx context.Context, subscriptionId string, deploymentName string, ...) error + DeployToResourceGroup func(ctx context.Context, subscriptionId, resourceGroup, deploymentName string, ...) (*ResourceDeployment, error) + DeployToSubscription func(ctx context.Context, subscriptionId string, location string, ...) (*ResourceDeployment, error) + GenerateDeploymentName func(baseName string) string + GetResourceGroupDeployment func(ctx context.Context, subscriptionId string, resourceGroupName string, ...) (*ResourceDeployment, error) + GetSubscriptionDeployment func(ctx context.Context, subscriptionId string, deploymentName string) (*ResourceDeployment, error) + ListResourceGroupDeploymentOperations func(ctx context.Context, subscriptionId string, resourceGroupName string, ...) ([]*armresources.DeploymentOperation, error) + ListResourceGroupDeploymentResources func(ctx context.Context, subscriptionId string, resourceGroupName string, ...) ([]*armresources.ResourceReference, error) + ListResourceGroupDeployments func(ctx context.Context, subscriptionId string, resourceGroupName string) ([]*ResourceDeployment, error) + ListSubscriptionDeploymentOperations func(ctx context.Context, subscriptionId string, deploymentName string) ([]*armresources.DeploymentOperation, error) + ListSubscriptionDeploymentResources func(ctx context.Context, subscriptionId string, deploymentName string) ([]*armresources.ResourceReference, error) + ListSubscriptionDeployments func(ctx context.Context, subscriptionId string) ([]*ResourceDeployment, error) + ValidatePreflightToResourceGroup func(ctx context.Context, subscriptionId, resourceGroup, deploymentName string, ...) error + ValidatePreflightToSubscription func(ctx context.Context, subscriptionId string, location string, ...) error + WhatIfDeployToResourceGroup func(ctx context.Context, subscriptionId, resourceGroup, deploymentName string, ...) (*armresources.WhatIfOperationResult, error) + WhatIfDeployToSubscription func(ctx context.Context, subscriptionId string, location string, ...) (*armresources.WhatIfOperationResult, error) + type DeploymentType string + const DeploymentTypeStacks + const DeploymentTypeStandard + type DockerCredentials struct + LoginServer string + Password string + Username string + type Filter struct + Key string + Value string + type ListResourceGroupOptions struct + Filter *string + TagFilter *Filter + type ListResourceGroupResourcesOptions struct + Filter *string + type ManagedClustersService interface + Get func(ctx context.Context, subscriptionId string, resourceGroupName string, ...) (*armcontainerservice.ManagedCluster, error) + GetUserCredentials func(ctx context.Context, subscriptionId string, resourceGroupName string, ...) (*armcontainerservice.CredentialResults, error) + func NewManagedClustersService(credentialProvider account.SubscriptionCredentialProvider, ...) ManagedClustersService + type PermissionCheckResult struct + Conditional bool + HasPermission bool + type PermissionsService struct + func NewPermissionsService(credentialProvider account.SubscriptionCredentialProvider, ...) *PermissionsService + func (s *PermissionsService) HasRequiredPermissions(ctx context.Context, subscriptionId string, principalId string, ...) (PermissionCheckResult, error) + type ReportDeleteProgress func(progress *DeleteDeploymentProgress) + type Resource struct + Id string + Location string + ManagedBy *string + Name string + Type string + type ResourceDeployment struct + Dependencies []*armresources.Dependency + DeploymentId string + DeploymentUrl string + Id string + Location string + Name string + Outputs any + OutputsUrl string + PortalUrl string + ProvisioningState DeploymentProvisioningState + Resources []*armresources.ResourceReference + Tags map[string]*string + TemplateHash *string + Timestamp time.Time + Type string + type ResourceExtended struct + Kind string + type ResourceGroup struct + Id string + Location string + Name string + type ResourceService struct + func NewResourceService(credentialProvider account.SubscriptionCredentialProvider, ...) *ResourceService + func (rs *ResourceService) CheckExistenceByID(ctx context.Context, resourceId arm.ResourceID, apiVersion string) (bool, error) + func (rs *ResourceService) CreateOrUpdateResourceGroup(ctx context.Context, subscriptionId string, resourceGroupName string, ...) (*ResourceGroup, error) + func (rs *ResourceService) DeleteResourceGroup(ctx context.Context, subscriptionId string, resourceGroupName string) error + func (rs *ResourceService) GetRawResource(ctx context.Context, resourceId arm.ResourceID, apiVersion string) (string, error) + func (rs *ResourceService) GetResource(ctx context.Context, subscriptionId string, resourceId string, ...) (ResourceExtended, error) + func (rs *ResourceService) ListResourceGroup(ctx context.Context, subscriptionId string, ...) ([]*Resource, error) + func (rs *ResourceService) ListResourceGroupResources(ctx context.Context, subscriptionId string, resourceGroupName string, ...) ([]*ResourceExtended, error) + func (rs *ResourceService) ListSubscriptionResources(ctx context.Context, subscriptionId string, ...) ([]*ResourceExtended, error) + type ResourceTypeLocationService struct + func NewResourceTypeLocationService(credentialProvider account.SubscriptionCredentialProvider, ...) *ResourceTypeLocationService + func (s *ResourceTypeLocationService) GetLocations(ctx context.Context, subscriptionID string, fullResourceType string) ([]string, error) + type StackDeployments struct + func NewStackDeployments(credentialProvider account.SubscriptionCredentialProvider, ...) *StackDeployments + func (d *StackDeployments) CalculateTemplateHash(ctx context.Context, subscriptionId string, template azure.RawArmTemplate) (string, error) + func (d *StackDeployments) DeleteResourceGroupDeployment(ctx context.Context, subscriptionId, resourceGroupName string, ...) error + func (d *StackDeployments) DeleteSubscriptionDeployment(ctx context.Context, subscriptionId string, deploymentName string, ...) error + func (d *StackDeployments) DeployToResourceGroup(ctx context.Context, subscriptionId string, resourceGroup string, ...) (*ResourceDeployment, error) + func (d *StackDeployments) DeployToSubscription(ctx context.Context, subscriptionId string, location string, ...) (*ResourceDeployment, error) + func (d *StackDeployments) GenerateDeploymentName(baseName string) string + func (d *StackDeployments) GetResourceGroupDeployment(ctx context.Context, subscriptionId string, resourceGroupName string, ...) (*ResourceDeployment, error) + func (d *StackDeployments) GetSubscriptionDeployment(ctx context.Context, subscriptionId string, deploymentName string) (*ResourceDeployment, error) + func (d *StackDeployments) ListResourceGroupDeploymentOperations(ctx context.Context, subscriptionId string, resourceGroupName string, ...) ([]*armresources.DeploymentOperation, error) + func (d *StackDeployments) ListResourceGroupDeploymentResources(ctx context.Context, subscriptionId string, resourceGroupName string, ...) ([]*armresources.ResourceReference, error) + func (d *StackDeployments) ListResourceGroupDeployments(ctx context.Context, subscriptionId string, resourceGroupName string) ([]*ResourceDeployment, error) + func (d *StackDeployments) ListSubscriptionDeploymentOperations(ctx context.Context, subscriptionId string, deploymentName string) ([]*armresources.DeploymentOperation, error) + func (d *StackDeployments) ListSubscriptionDeploymentResources(ctx context.Context, subscriptionId string, deploymentName string) ([]*armresources.ResourceReference, error) + func (d *StackDeployments) ListSubscriptionDeployments(ctx context.Context, subscriptionId string) ([]*ResourceDeployment, error) + func (d *StackDeployments) ValidatePreflightToResourceGroup(ctx context.Context, subscriptionId string, resourceGroup string, ...) error + func (d *StackDeployments) ValidatePreflightToSubscription(ctx context.Context, subscriptionId string, location string, ...) error + func (d *StackDeployments) WhatIfDeployToResourceGroup(ctx context.Context, subscriptionId string, resourceGroup string, ...) (*armresources.WhatIfOperationResult, error) + func (d *StackDeployments) WhatIfDeployToSubscription(ctx context.Context, subscriptionId string, location string, ...) (*armresources.WhatIfOperationResult, error) + type StandardDeployments struct + func NewStandardDeployments(credentialProvider account.SubscriptionCredentialProvider, ...) *StandardDeployments + func (ds *StandardDeployments) CalculateTemplateHash(ctx context.Context, subscriptionId string, template azure.RawArmTemplate) (string, error) + func (ds *StandardDeployments) DeleteResourceGroupDeployment(ctx context.Context, subscriptionId, resourceGroupName string, ...) error + func (ds *StandardDeployments) DeleteSubscriptionDeployment(ctx context.Context, subscriptionId string, deploymentName string, ...) error + func (ds *StandardDeployments) DeployToResourceGroup(ctx context.Context, subscriptionId, resourceGroup, deploymentName string, ...) (*ResourceDeployment, error) + func (ds *StandardDeployments) DeployToSubscription(ctx context.Context, subscriptionId string, location string, ...) (*ResourceDeployment, error) + func (ds *StandardDeployments) GenerateDeploymentName(baseName string) string + func (ds *StandardDeployments) GetResourceGroupDeployment(ctx context.Context, subscriptionId string, resourceGroupName string, ...) (*ResourceDeployment, error) + func (ds *StandardDeployments) GetSubscriptionDeployment(ctx context.Context, subscriptionId string, deploymentName string) (*ResourceDeployment, error) + func (ds *StandardDeployments) ListResourceGroupDeploymentOperations(ctx context.Context, subscriptionId string, resourceGroupName string, ...) ([]*armresources.DeploymentOperation, error) + func (ds *StandardDeployments) ListResourceGroupDeploymentResources(ctx context.Context, subscriptionId string, resourceGroupName string, ...) ([]*armresources.ResourceReference, error) + func (ds *StandardDeployments) ListResourceGroupDeployments(ctx context.Context, subscriptionId string, resourceGroupName string) ([]*ResourceDeployment, error) + func (ds *StandardDeployments) ListSubscriptionDeploymentOperations(ctx context.Context, subscriptionId string, deploymentName string) ([]*armresources.DeploymentOperation, error) + func (ds *StandardDeployments) ListSubscriptionDeploymentResources(ctx context.Context, subscriptionId string, deploymentName string) ([]*armresources.ResourceReference, error) + func (ds *StandardDeployments) ListSubscriptionDeployments(ctx context.Context, subscriptionId string) ([]*ResourceDeployment, error) + func (ds *StandardDeployments) ValidatePreflightToResourceGroup(ctx context.Context, subscriptionId, resourceGroup, deploymentName string, ...) error + func (ds *StandardDeployments) ValidatePreflightToSubscription(ctx context.Context, subscriptionId string, location string, ...) error + func (ds *StandardDeployments) WhatIfDeployToResourceGroup(ctx context.Context, subscriptionId, resourceGroup, deploymentName string, ...) (*armresources.WhatIfOperationResult, error) + func (ds *StandardDeployments) WhatIfDeployToSubscription(ctx context.Context, subscriptionId string, location string, ...) (*armresources.WhatIfOperationResult, error) + type UserProfileService struct + func NewUserProfileService(credentialProvider auth.MultiTenantCredentialProvider, ...) *UserProfileService + func (u *UserProfileService) GetAccessToken(ctx context.Context, tenantId string) (*AzCliAccessToken, error) + func (user *UserProfileService) GetSignedInUserId(ctx context.Context, tenantId string) (string, error)