Documentation
¶
Index ¶
- type Action
- type ActionsRequired
- type ActivationProperties
- type ActivationStatus
- type Actor
- type AuditLogStatus
- type AuthCredential
- type AzureADAuthenticationAsArmPolicy
- type AzureADAuthenticationAsArmPolicyStatus
- type CacheRule
- type CacheRuleProperties
- type CacheRuleUpdateParameters
- type CacheRuleUpdateProperties
- type CacheRulesClient
- func (client *CacheRulesClient) BeginCreate(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[CacheRulesClientCreateResponse], error)
- func (client *CacheRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[CacheRulesClientDeleteResponse], error)
- func (client *CacheRulesClient) BeginUpdate(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[CacheRulesClientUpdateResponse], error)
- func (client *CacheRulesClient) Get(ctx context.Context, resourceGroupName string, registryName string, ...) (CacheRulesClientGetResponse, error)
- func (client *CacheRulesClient) NewListPager(resourceGroupName string, registryName string, ...) *runtime.Pager[CacheRulesClientListResponse]
- type CacheRulesClientBeginCreateOptions
- type CacheRulesClientBeginDeleteOptions
- type CacheRulesClientBeginUpdateOptions
- type CacheRulesClientCreateResponse
- type CacheRulesClientDeleteResponse
- type CacheRulesClientGetOptions
- type CacheRulesClientGetResponse
- type CacheRulesClientListOptions
- type CacheRulesClientListResponse
- type CacheRulesClientUpdateResponse
- type CacheRulesListResult
- type CallbackConfig
- type CertificateType
- type ClientFactory
- func (c *ClientFactory) NewCacheRulesClient() *CacheRulesClient
- func (c *ClientFactory) NewConnectedRegistriesClient() *ConnectedRegistriesClient
- func (c *ClientFactory) NewCredentialSetsClient() *CredentialSetsClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient
- func (c *ClientFactory) NewRegistriesClient() *RegistriesClient
- func (c *ClientFactory) NewReplicationsClient() *ReplicationsClient
- func (c *ClientFactory) NewScopeMapsClient() *ScopeMapsClient
- func (c *ClientFactory) NewTokensClient() *TokensClient
- func (c *ClientFactory) NewWebhooksClient() *WebhooksClient
- type ConnectedRegistriesClient
- func (client *ConnectedRegistriesClient) BeginCreate(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[ConnectedRegistriesClientCreateResponse], error)
- func (client *ConnectedRegistriesClient) BeginDeactivate(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[ConnectedRegistriesClientDeactivateResponse], error)
- func (client *ConnectedRegistriesClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[ConnectedRegistriesClientDeleteResponse], error)
- func (client *ConnectedRegistriesClient) BeginUpdate(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[ConnectedRegistriesClientUpdateResponse], error)
- func (client *ConnectedRegistriesClient) Get(ctx context.Context, resourceGroupName string, registryName string, ...) (ConnectedRegistriesClientGetResponse, error)
- func (client *ConnectedRegistriesClient) NewListPager(resourceGroupName string, registryName string, ...) *runtime.Pager[ConnectedRegistriesClientListResponse]
- type ConnectedRegistriesClientBeginCreateOptions
- type ConnectedRegistriesClientBeginDeactivateOptions
- type ConnectedRegistriesClientBeginDeleteOptions
- type ConnectedRegistriesClientBeginUpdateOptions
- type ConnectedRegistriesClientCreateResponse
- type ConnectedRegistriesClientDeactivateResponse
- type ConnectedRegistriesClientDeleteResponse
- type ConnectedRegistriesClientGetOptions
- type ConnectedRegistriesClientGetResponse
- type ConnectedRegistriesClientListOptions
- type ConnectedRegistriesClientListResponse
- type ConnectedRegistriesClientUpdateResponse
- type ConnectedRegistry
- type ConnectedRegistryListResult
- type ConnectedRegistryMode
- type ConnectedRegistryProperties
- type ConnectedRegistryUpdateParameters
- type ConnectedRegistryUpdateProperties
- type ConnectionState
- type ConnectionStatus
- type CreatedByType
- type CredentialHealth
- type CredentialHealthStatus
- type CredentialName
- type CredentialSet
- type CredentialSetListResult
- type CredentialSetProperties
- type CredentialSetUpdateParameters
- type CredentialSetUpdateProperties
- type CredentialSetsClient
- func (client *CredentialSetsClient) BeginCreate(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[CredentialSetsClientCreateResponse], error)
- func (client *CredentialSetsClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[CredentialSetsClientDeleteResponse], error)
- func (client *CredentialSetsClient) BeginUpdate(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[CredentialSetsClientUpdateResponse], error)
- func (client *CredentialSetsClient) Get(ctx context.Context, resourceGroupName string, registryName string, ...) (CredentialSetsClientGetResponse, error)
- func (client *CredentialSetsClient) NewListPager(resourceGroupName string, registryName string, ...) *runtime.Pager[CredentialSetsClientListResponse]
- type CredentialSetsClientBeginCreateOptions
- type CredentialSetsClientBeginDeleteOptions
- type CredentialSetsClientBeginUpdateOptions
- type CredentialSetsClientCreateResponse
- type CredentialSetsClientDeleteResponse
- type CredentialSetsClientGetOptions
- type CredentialSetsClientGetResponse
- type CredentialSetsClientListOptions
- type CredentialSetsClientListResponse
- type CredentialSetsClientUpdateResponse
- type DefaultAction
- type EncryptionProperty
- type EncryptionStatus
- type Event
- type EventContent
- type EventInfo
- type EventListResult
- type EventRequestMessage
- type EventResponseMessage
- type ExportPolicy
- type ExportPolicyStatus
- type GarbageCollectionProperties
- type GenerateCredentialsParameters
- type GenerateCredentialsResult
- type IPRule
- type IdentityProperties
- type ImportImageParameters
- type ImportMode
- type ImportSource
- type ImportSourceCredentials
- type KeyVaultProperties
- type LogLevel
- type LoggingProperties
- type LoginServerProperties
- type NetworkRuleBypassOptions
- type NetworkRuleSet
- type OperationDefinition
- type OperationDisplayDefinition
- type OperationListResult
- type OperationLogSpecificationDefinition
- type OperationMetricSpecificationDefinition
- type OperationPropertiesDefinition
- type OperationServiceSpecificationDefinition
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type ParentProperties
- type PasswordName
- type Policies
- type PolicyStatus
- type PrivateEndpoint
- type PrivateEndpointConnection
- type PrivateEndpointConnectionListResult
- type PrivateEndpointConnectionProperties
- type PrivateEndpointConnectionsClient
- func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[PrivateEndpointConnectionsClientCreateOrUpdateResponse], error)
- func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)
- func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, registryName string, ...) (PrivateEndpointConnectionsClientGetResponse, error)
- func (client *PrivateEndpointConnectionsClient) NewListPager(resourceGroupName string, registryName string, ...) *runtime.Pager[PrivateEndpointConnectionsClientListResponse]
- type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions
- type PrivateEndpointConnectionsClientBeginDeleteOptions
- type PrivateEndpointConnectionsClientCreateOrUpdateResponse
- type PrivateEndpointConnectionsClientDeleteResponse
- type PrivateEndpointConnectionsClientGetOptions
- type PrivateEndpointConnectionsClientGetResponse
- type PrivateEndpointConnectionsClientListOptions
- type PrivateEndpointConnectionsClientListResponse
- type PrivateLinkResource
- type PrivateLinkResourceListResult
- type PrivateLinkResourceProperties
- type PrivateLinkServiceConnectionState
- type ProvisioningState
- type PublicNetworkAccess
- type QuarantinePolicy
- type RegenerateCredentialParameters
- type RegistriesClient
- func (client *RegistriesClient) BeginCreate(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[RegistriesClientCreateResponse], error)
- func (client *RegistriesClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[RegistriesClientDeleteResponse], error)
- func (client *RegistriesClient) BeginGenerateCredentials(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[RegistriesClientGenerateCredentialsResponse], error)
- func (client *RegistriesClient) BeginImportImage(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[RegistriesClientImportImageResponse], error)
- func (client *RegistriesClient) BeginUpdate(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[RegistriesClientUpdateResponse], error)
- func (client *RegistriesClient) CheckNameAvailability(ctx context.Context, registryNameCheckRequest RegistryNameCheckRequest, ...) (RegistriesClientCheckNameAvailabilityResponse, error)
- func (client *RegistriesClient) Get(ctx context.Context, resourceGroupName string, registryName string, ...) (RegistriesClientGetResponse, error)
- func (client *RegistriesClient) GetPrivateLinkResource(ctx context.Context, resourceGroupName string, registryName string, ...) (RegistriesClientGetPrivateLinkResourceResponse, error)
- func (client *RegistriesClient) ListCredentials(ctx context.Context, resourceGroupName string, registryName string, ...) (RegistriesClientListCredentialsResponse, error)
- func (client *RegistriesClient) ListUsages(ctx context.Context, resourceGroupName string, registryName string, ...) (RegistriesClientListUsagesResponse, error)
- func (client *RegistriesClient) NewListByResourceGroupPager(resourceGroupName string, options *RegistriesClientListByResourceGroupOptions) *runtime.Pager[RegistriesClientListByResourceGroupResponse]
- func (client *RegistriesClient) NewListPager(options *RegistriesClientListOptions) *runtime.Pager[RegistriesClientListResponse]
- func (client *RegistriesClient) NewListPrivateLinkResourcesPager(resourceGroupName string, registryName string, ...) *runtime.Pager[RegistriesClientListPrivateLinkResourcesResponse]
- func (client *RegistriesClient) RegenerateCredential(ctx context.Context, resourceGroupName string, registryName string, ...) (RegistriesClientRegenerateCredentialResponse, error)
- type RegistriesClientBeginCreateOptions
- type RegistriesClientBeginDeleteOptions
- type RegistriesClientBeginGenerateCredentialsOptions
- type RegistriesClientBeginImportImageOptions
- type RegistriesClientBeginUpdateOptions
- type RegistriesClientCheckNameAvailabilityOptions
- type RegistriesClientCheckNameAvailabilityResponse
- type RegistriesClientCreateResponse
- type RegistriesClientDeleteResponse
- type RegistriesClientGenerateCredentialsResponse
- type RegistriesClientGetOptions
- type RegistriesClientGetPrivateLinkResourceOptions
- type RegistriesClientGetPrivateLinkResourceResponse
- type RegistriesClientGetResponse
- type RegistriesClientImportImageResponse
- type RegistriesClientListByResourceGroupOptions
- type RegistriesClientListByResourceGroupResponse
- type RegistriesClientListCredentialsOptions
- type RegistriesClientListCredentialsResponse
- type RegistriesClientListOptions
- type RegistriesClientListPrivateLinkResourcesOptions
- type RegistriesClientListPrivateLinkResourcesResponse
- type RegistriesClientListResponse
- type RegistriesClientListUsagesOptions
- type RegistriesClientListUsagesResponse
- type RegistriesClientRegenerateCredentialOptions
- type RegistriesClientRegenerateCredentialResponse
- type RegistriesClientUpdateResponse
- type Registry
- type RegistryListCredentialsResult
- type RegistryListResult
- type RegistryNameCheckRequest
- type RegistryNameStatus
- type RegistryPassword
- type RegistryProperties
- type RegistryPropertiesUpdateParameters
- type RegistryUpdateParameters
- type RegistryUsage
- type RegistryUsageListResult
- type RegistryUsageUnit
- type Replication
- type ReplicationListResult
- type ReplicationProperties
- type ReplicationUpdateParameters
- type ReplicationUpdateParametersProperties
- type ReplicationsClient
- func (client *ReplicationsClient) BeginCreate(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[ReplicationsClientCreateResponse], error)
- func (client *ReplicationsClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[ReplicationsClientDeleteResponse], error)
- func (client *ReplicationsClient) BeginUpdate(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[ReplicationsClientUpdateResponse], error)
- func (client *ReplicationsClient) Get(ctx context.Context, resourceGroupName string, registryName string, ...) (ReplicationsClientGetResponse, error)
- func (client *ReplicationsClient) NewListPager(resourceGroupName string, registryName string, ...) *runtime.Pager[ReplicationsClientListResponse]
- type ReplicationsClientBeginCreateOptions
- type ReplicationsClientBeginDeleteOptions
- type ReplicationsClientBeginUpdateOptions
- type ReplicationsClientCreateResponse
- type ReplicationsClientDeleteResponse
- type ReplicationsClientGetOptions
- type ReplicationsClientGetResponse
- type ReplicationsClientListOptions
- type ReplicationsClientListResponse
- type ReplicationsClientUpdateResponse
- type Request
- type ResourceIdentityType
- type RetentionPolicy
- type RoleAssignmentMode
- type SKU
- type SKUName
- type SKUTier
- type ScopeMap
- type ScopeMapListResult
- type ScopeMapProperties
- type ScopeMapPropertiesUpdateParameters
- type ScopeMapUpdateParameters
- type ScopeMapsClient
- func (client *ScopeMapsClient) BeginCreate(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[ScopeMapsClientCreateResponse], error)
- func (client *ScopeMapsClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[ScopeMapsClientDeleteResponse], error)
- func (client *ScopeMapsClient) BeginUpdate(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[ScopeMapsClientUpdateResponse], error)
- func (client *ScopeMapsClient) Get(ctx context.Context, resourceGroupName string, registryName string, ...) (ScopeMapsClientGetResponse, error)
- func (client *ScopeMapsClient) NewListPager(resourceGroupName string, registryName string, ...) *runtime.Pager[ScopeMapsClientListResponse]
- type ScopeMapsClientBeginCreateOptions
- type ScopeMapsClientBeginDeleteOptions
- type ScopeMapsClientBeginUpdateOptions
- type ScopeMapsClientCreateResponse
- type ScopeMapsClientDeleteResponse
- type ScopeMapsClientGetOptions
- type ScopeMapsClientGetResponse
- type ScopeMapsClientListOptions
- type ScopeMapsClientListResponse
- type ScopeMapsClientUpdateResponse
- type Source
- type Status
- type StatusDetailProperties
- type SyncProperties
- type SyncUpdateProperties
- type SystemData
- type TLSCertificateProperties
- type TLSProperties
- type TLSStatus
- type Target
- type Token
- type TokenCertificate
- type TokenCertificateName
- type TokenCredentialsProperties
- type TokenListResult
- type TokenPassword
- type TokenPasswordName
- type TokenProperties
- type TokenStatus
- type TokenUpdateParameters
- type TokenUpdateProperties
- type TokensClient
- func (client *TokensClient) BeginCreate(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[TokensClientCreateResponse], error)
- func (client *TokensClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[TokensClientDeleteResponse], error)
- func (client *TokensClient) BeginUpdate(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[TokensClientUpdateResponse], error)
- func (client *TokensClient) Get(ctx context.Context, resourceGroupName string, registryName string, ...) (TokensClientGetResponse, error)
- func (client *TokensClient) NewListPager(resourceGroupName string, registryName string, ...) *runtime.Pager[TokensClientListResponse]
- type TokensClientBeginCreateOptions
- type TokensClientBeginDeleteOptions
- type TokensClientBeginUpdateOptions
- type TokensClientCreateResponse
- type TokensClientDeleteResponse
- type TokensClientGetOptions
- type TokensClientGetResponse
- type TokensClientListOptions
- type TokensClientListResponse
- type TokensClientUpdateResponse
- type TrustPolicy
- type TrustPolicyType
- type UserIdentityProperties
- type Webhook
- type WebhookAction
- type WebhookCreateParameters
- type WebhookListResult
- type WebhookProperties
- type WebhookPropertiesCreateParameters
- type WebhookPropertiesUpdateParameters
- type WebhookStatus
- type WebhookUpdateParameters
- type WebhooksClient
- func (client *WebhooksClient) BeginCreate(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[WebhooksClientCreateResponse], error)
- func (client *WebhooksClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[WebhooksClientDeleteResponse], error)
- func (client *WebhooksClient) BeginUpdate(ctx context.Context, resourceGroupName string, registryName string, ...) (*runtime.Poller[WebhooksClientUpdateResponse], error)
- func (client *WebhooksClient) Get(ctx context.Context, resourceGroupName string, registryName string, ...) (WebhooksClientGetResponse, error)
- func (client *WebhooksClient) GetCallbackConfig(ctx context.Context, resourceGroupName string, registryName string, ...) (WebhooksClientGetCallbackConfigResponse, error)
- func (client *WebhooksClient) NewListEventsPager(resourceGroupName string, registryName string, webhookName string, ...) *runtime.Pager[WebhooksClientListEventsResponse]
- func (client *WebhooksClient) NewListPager(resourceGroupName string, registryName string, ...) *runtime.Pager[WebhooksClientListResponse]
- func (client *WebhooksClient) Ping(ctx context.Context, resourceGroupName string, registryName string, ...) (WebhooksClientPingResponse, error)
- type WebhooksClientBeginCreateOptions
- type WebhooksClientBeginDeleteOptions
- type WebhooksClientBeginUpdateOptions
- type WebhooksClientCreateResponse
- type WebhooksClientDeleteResponse
- type WebhooksClientGetCallbackConfigOptions
- type WebhooksClientGetCallbackConfigResponse
- type WebhooksClientGetOptions
- type WebhooksClientGetResponse
- type WebhooksClientListEventsOptions
- type WebhooksClientListEventsResponse
- type WebhooksClientListOptions
- type WebhooksClientListResponse
- type WebhooksClientPingOptions
- type WebhooksClientPingResponse
- type WebhooksClientUpdateResponse
- type ZoneRedundancy
Examples ¶
- CacheRulesClient.BeginCreate
- CacheRulesClient.BeginDelete
- CacheRulesClient.BeginUpdate
- CacheRulesClient.Get
- CacheRulesClient.NewListPager
- ConnectedRegistriesClient.BeginCreate
- ConnectedRegistriesClient.BeginDeactivate
- ConnectedRegistriesClient.BeginDelete
- ConnectedRegistriesClient.BeginUpdate
- ConnectedRegistriesClient.Get
- ConnectedRegistriesClient.NewListPager
- CredentialSetsClient.BeginCreate
- CredentialSetsClient.BeginDelete
- CredentialSetsClient.BeginUpdate
- CredentialSetsClient.Get
- CredentialSetsClient.NewListPager
- OperationsClient.NewListPager
- PrivateEndpointConnectionsClient.BeginCreateOrUpdate
- PrivateEndpointConnectionsClient.BeginDelete
- PrivateEndpointConnectionsClient.Get
- PrivateEndpointConnectionsClient.NewListPager
- RegistriesClient.BeginCreate (RegistryCreate)
- RegistriesClient.BeginCreate (RegistryCreateAbac)
- RegistriesClient.BeginCreate (RegistryCreateZoneRedundant)
- RegistriesClient.BeginDelete
- RegistriesClient.BeginGenerateCredentials
- RegistriesClient.BeginImportImage (ImportImageByManifestDigest)
- RegistriesClient.BeginImportImage (ImportImageByTag)
- RegistriesClient.BeginImportImage (ImportImageFromPublicRegistry)
- RegistriesClient.BeginUpdate
- RegistriesClient.CheckNameAvailability (RegistryCheckNameAvailable)
- RegistriesClient.CheckNameAvailability (RegistryCheckNameNotAvailable)
- RegistriesClient.Get
- RegistriesClient.GetPrivateLinkResource
- RegistriesClient.ListCredentials
- RegistriesClient.ListUsages
- RegistriesClient.NewListByResourceGroupPager
- RegistriesClient.NewListPager
- RegistriesClient.NewListPrivateLinkResourcesPager
- RegistriesClient.RegenerateCredential
- ReplicationsClient.BeginCreate (ReplicationCreate)
- ReplicationsClient.BeginCreate (ReplicationCreateZoneRedundant)
- ReplicationsClient.BeginDelete
- ReplicationsClient.BeginUpdate
- ReplicationsClient.Get
- ReplicationsClient.NewListPager
- ScopeMapsClient.BeginCreate
- ScopeMapsClient.BeginDelete
- ScopeMapsClient.BeginUpdate
- ScopeMapsClient.Get
- ScopeMapsClient.NewListPager
- TokensClient.BeginCreate
- TokensClient.BeginDelete
- TokensClient.BeginUpdate
- TokensClient.Get
- TokensClient.NewListPager
- WebhooksClient.BeginCreate
- WebhooksClient.BeginDelete
- WebhooksClient.BeginUpdate
- WebhooksClient.Get
- WebhooksClient.GetCallbackConfig
- WebhooksClient.NewListEventsPager
- WebhooksClient.NewListPager
- WebhooksClient.Ping
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action string
Action - The action of IP ACL rule.
const (
ActionAllow Action = "Allow"
)
func PossibleActionValues ¶
func PossibleActionValues() []Action
PossibleActionValues returns the possible values for the Action const type.
type ActionsRequired ¶
type ActionsRequired string
ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
const ( ActionsRequiredNone ActionsRequired = "None" ActionsRequiredRecreate ActionsRequired = "Recreate" )
func PossibleActionsRequiredValues ¶
func PossibleActionsRequiredValues() []ActionsRequired
PossibleActionsRequiredValues returns the possible values for the ActionsRequired const type.
type ActivationProperties ¶
type ActivationProperties struct {
// READ-ONLY; The activation status of the connected registry.
Status *ActivationStatus
}
ActivationProperties - The activation properties of the connected registry.
func (ActivationProperties) MarshalJSON ¶
func (a ActivationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ActivationProperties.
func (*ActivationProperties) UnmarshalJSON ¶
func (a *ActivationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ActivationProperties.
type ActivationStatus ¶
type ActivationStatus string
ActivationStatus - The activation status of the connected registry.
const ( ActivationStatusActive ActivationStatus = "Active" ActivationStatusInactive ActivationStatus = "Inactive" )
func PossibleActivationStatusValues ¶
func PossibleActivationStatusValues() []ActivationStatus
PossibleActivationStatusValues returns the possible values for the ActivationStatus const type.
type Actor ¶
type Actor struct {
// The subject or username associated with the request context that generated the event.
Name *string
}
Actor - The agent that initiated the event. For most situations, this could be from the authorization context of the request.
func (Actor) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Actor.
func (*Actor) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Actor.
type AuditLogStatus ¶
type AuditLogStatus string
AuditLogStatus - Indicates whether audit logs are enabled on the connected registry.
const ( AuditLogStatusDisabled AuditLogStatus = "Disabled" AuditLogStatusEnabled AuditLogStatus = "Enabled" )
func PossibleAuditLogStatusValues ¶
func PossibleAuditLogStatusValues() []AuditLogStatus
PossibleAuditLogStatusValues returns the possible values for the AuditLogStatus const type.
type AuthCredential ¶
type AuthCredential struct {
// The name of the credential.
Name *CredentialName
// KeyVault Secret URI for accessing the password.
PasswordSecretIdentifier *string
// KeyVault Secret URI for accessing the username.
UsernameSecretIdentifier *string
// READ-ONLY; This provides data pertaining to the health of the auth credential.
CredentialHealth *CredentialHealth
}
AuthCredential - Authentication credential stored for an upstream.
func (AuthCredential) MarshalJSON ¶
func (a AuthCredential) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AuthCredential.
func (*AuthCredential) UnmarshalJSON ¶
func (a *AuthCredential) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AuthCredential.
type AzureADAuthenticationAsArmPolicy ¶
type AzureADAuthenticationAsArmPolicy struct {
// The value that indicates whether the policy is enabled or not.
Status *AzureADAuthenticationAsArmPolicyStatus
}
AzureADAuthenticationAsArmPolicy - The policy for using Azure Resource Manager audience token for a container registry.
func (AzureADAuthenticationAsArmPolicy) MarshalJSON ¶
func (a AzureADAuthenticationAsArmPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureADAuthenticationAsArmPolicy.
func (*AzureADAuthenticationAsArmPolicy) UnmarshalJSON ¶
func (a *AzureADAuthenticationAsArmPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureADAuthenticationAsArmPolicy.
type AzureADAuthenticationAsArmPolicyStatus ¶
type AzureADAuthenticationAsArmPolicyStatus string
AzureADAuthenticationAsArmPolicyStatus - The value that indicates whether the policy is enabled or not.
const ( AzureADAuthenticationAsArmPolicyStatusDisabled AzureADAuthenticationAsArmPolicyStatus = "disabled" AzureADAuthenticationAsArmPolicyStatusEnabled AzureADAuthenticationAsArmPolicyStatus = "enabled" )
func PossibleAzureADAuthenticationAsArmPolicyStatusValues ¶
func PossibleAzureADAuthenticationAsArmPolicyStatusValues() []AzureADAuthenticationAsArmPolicyStatus
PossibleAzureADAuthenticationAsArmPolicyStatusValues returns the possible values for the AzureADAuthenticationAsArmPolicyStatus const type.
type CacheRule ¶
type CacheRule struct {
// The properties of the cache rule.
Properties *CacheRuleProperties
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the private link resource.
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
CacheRule - An object that represents a cache rule for a container registry.
func (CacheRule) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type CacheRule.
func (*CacheRule) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type CacheRule.
type CacheRuleProperties ¶
type CacheRuleProperties struct {
// The ARM resource ID of the credential store which is associated with the cache rule.
CredentialSetResourceID *string
// Source repository pulled from upstream.
SourceRepository *string
// Target repository specified in docker pull command.
// Eg: docker pull myregistry.azurecr.io/{targetRepository}:{tag}
TargetRepository *string
// READ-ONLY; The creation date of the cache rule.
CreationDate *time.Time
// READ-ONLY; Provisioning state of the resource.
ProvisioningState *ProvisioningState
}
CacheRuleProperties - The properties of a cache rule.
func (CacheRuleProperties) MarshalJSON ¶
func (c CacheRuleProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CacheRuleProperties.
func (*CacheRuleProperties) UnmarshalJSON ¶
func (c *CacheRuleProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CacheRuleProperties.
type CacheRuleUpdateParameters ¶
type CacheRuleUpdateParameters struct {
// The properties of the cache rule update parameters.
Properties *CacheRuleUpdateProperties
}
CacheRuleUpdateParameters - The parameters for updating a cache rule.
func (CacheRuleUpdateParameters) MarshalJSON ¶
func (c CacheRuleUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CacheRuleUpdateParameters.
func (*CacheRuleUpdateParameters) UnmarshalJSON ¶
func (c *CacheRuleUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CacheRuleUpdateParameters.
type CacheRuleUpdateProperties ¶
type CacheRuleUpdateProperties struct {
// The ARM resource ID of the credential store which is associated with the Cache rule.
CredentialSetResourceID *string
}
CacheRuleUpdateProperties - The parameters for updating cache rule properties.
func (CacheRuleUpdateProperties) MarshalJSON ¶
func (c CacheRuleUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CacheRuleUpdateProperties.
func (*CacheRuleUpdateProperties) UnmarshalJSON ¶
func (c *CacheRuleUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CacheRuleUpdateProperties.
type CacheRulesClient ¶
type CacheRulesClient struct {
// contains filtered or unexported fields
}
CacheRulesClient contains the methods for the CacheRules group. Don't use this type directly, use NewCacheRulesClient() instead.
func NewCacheRulesClient ¶
func NewCacheRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CacheRulesClient, error)
NewCacheRulesClient creates a new instance of CacheRulesClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - Contains optional client configuration. Pass nil to accept the default values.
func (*CacheRulesClient) BeginCreate ¶
func (client *CacheRulesClient) BeginCreate(ctx context.Context, resourceGroupName string, registryName string, cacheRuleName string, cacheRuleCreateParameters CacheRule, options *CacheRulesClientBeginCreateOptions) (*runtime.Poller[CacheRulesClientCreateResponse], error)
BeginCreate - Creates a cache rule for a container registry with the specified parameters. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- cacheRuleName - The name of the cache rule.
- cacheRuleCreateParameters - The parameters for creating a cache rule.
- options - CacheRulesClientBeginCreateOptions contains the optional parameters for the CacheRulesClient.BeginCreate method.
Example ¶
Generated from example definition: 2025-11-01/CacheRuleCreate.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewCacheRulesClient().BeginCreate(ctx, "myResourceGroup", "myRegistry", "myCacheRule", armcontainerregistry.CacheRule{
Properties: &armcontainerregistry.CacheRuleProperties{
SourceRepository: to.Ptr("docker.io/library/hello-world"),
TargetRepository: to.Ptr("cached-docker-hub/hello-world"),
CredentialSetResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.CacheRulesClientCreateResponse{
// CacheRule: &armcontainerregistry.CacheRule{
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/cacheRules"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule"),
// Name: to.Ptr("myCacheRule"),
// Properties: &armcontainerregistry.CacheRuleProperties{
// CredentialSetResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet"),
// SourceRepository: to.Ptr("docker.io/library/hello-world"),
// TargetRepository: to.Ptr("cached-docker-hub/hello-world"),
// CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-07T18:20:33.8374968+00:00"); return t}()),
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// },
// },
// }
}
Output:
func (*CacheRulesClient) BeginDelete ¶
func (client *CacheRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, cacheRuleName string, options *CacheRulesClientBeginDeleteOptions) (*runtime.Poller[CacheRulesClientDeleteResponse], error)
BeginDelete - Deletes a cache rule resource from a container registry. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- cacheRuleName - The name of the cache rule.
- options - CacheRulesClientBeginDeleteOptions contains the optional parameters for the CacheRulesClient.BeginDelete method.
Example ¶
Generated from example definition: 2025-11-01/CacheRuleDelete.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewCacheRulesClient().BeginDelete(ctx, "myResourceGroup", "myRegistry", "myCacheRule", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
}
Output:
func (*CacheRulesClient) BeginUpdate ¶
func (client *CacheRulesClient) BeginUpdate(ctx context.Context, resourceGroupName string, registryName string, cacheRuleName string, cacheRuleUpdateParameters CacheRuleUpdateParameters, options *CacheRulesClientBeginUpdateOptions) (*runtime.Poller[CacheRulesClientUpdateResponse], error)
BeginUpdate - Updates a cache rule for a container registry with the specified parameters. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- cacheRuleName - The name of the cache rule.
- cacheRuleUpdateParameters - The parameters for updating a cache rule.
- options - CacheRulesClientBeginUpdateOptions contains the optional parameters for the CacheRulesClient.BeginUpdate method.
Example ¶
Generated from example definition: 2025-11-01/CacheRuleUpdate.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewCacheRulesClient().BeginUpdate(ctx, "myResourceGroup", "myRegistry", "myCacheRule", armcontainerregistry.CacheRuleUpdateParameters{
Properties: &armcontainerregistry.CacheRuleUpdateProperties{
CredentialSetResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.CacheRulesClientUpdateResponse{
// CacheRule: &armcontainerregistry.CacheRule{
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/cacheRules"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule"),
// Name: to.Ptr("myCacheRule"),
// Properties: &armcontainerregistry.CacheRuleProperties{
// CredentialSetResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet2"),
// SourceRepository: to.Ptr("docker.io/library/hello-world"),
// TargetRepository: to.Ptr("cached-docker-hub/hello-world"),
// CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-07T18:20:33.8374968+00:00"); return t}()),
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// },
// },
// }
}
Output:
func (*CacheRulesClient) Get ¶
func (client *CacheRulesClient) Get(ctx context.Context, resourceGroupName string, registryName string, cacheRuleName string, options *CacheRulesClientGetOptions) (CacheRulesClientGetResponse, error)
Get - Gets the properties of the specified cache rule resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- cacheRuleName - The name of the cache rule.
- options - CacheRulesClientGetOptions contains the optional parameters for the CacheRulesClient.Get method.
Example ¶
Generated from example definition: 2025-11-01/CacheRuleGet.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCacheRulesClient().Get(ctx, "myResourceGroup", "myRegistry", "myCacheRule", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.CacheRulesClientGetResponse{
// CacheRule: &armcontainerregistry.CacheRule{
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/cacheRules"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule"),
// Name: to.Ptr("myCacheRule"),
// Properties: &armcontainerregistry.CacheRuleProperties{
// CredentialSetResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet"),
// SourceRepository: to.Ptr("docker.io/library/hello-world"),
// TargetRepository: to.Ptr("cached-docker-hub/hello-world"),
// CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-07T18:20:33.8374968+00:00"); return t}()),
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// },
// },
// }
}
Output:
func (*CacheRulesClient) NewListPager ¶
func (client *CacheRulesClient) NewListPager(resourceGroupName string, registryName string, options *CacheRulesClientListOptions) *runtime.Pager[CacheRulesClientListResponse]
NewListPager - Lists all cache rule resources for the specified container registry.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- options - CacheRulesClientListOptions contains the optional parameters for the CacheRulesClient.NewListPager method.
Example ¶
Generated from example definition: 2025-11-01/CacheRuleList.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewCacheRulesClient().NewListPager("myResourceGroup", "myRegistry", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armcontainerregistry.CacheRulesClientListResponse{
// CacheRulesListResult: armcontainerregistry.CacheRulesListResult{
// Value: []*armcontainerregistry.CacheRule{
// {
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/cacheRules"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule"),
// Name: to.Ptr("myCacheRule"),
// Properties: &armcontainerregistry.CacheRuleProperties{
// CredentialSetResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet"),
// SourceRepository: to.Ptr("docker.io/library/hello-world"),
// TargetRepository: to.Ptr("cached-docker-hub/hello-world"),
// CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-07T18:20:33.8374968+00:00"); return t}()),
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// },
// },
// },
// },
// }
}
}
Output:
type CacheRulesClientBeginCreateOptions ¶
type CacheRulesClientBeginCreateOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
CacheRulesClientBeginCreateOptions contains the optional parameters for the CacheRulesClient.BeginCreate method.
type CacheRulesClientBeginDeleteOptions ¶
type CacheRulesClientBeginDeleteOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
CacheRulesClientBeginDeleteOptions contains the optional parameters for the CacheRulesClient.BeginDelete method.
type CacheRulesClientBeginUpdateOptions ¶
type CacheRulesClientBeginUpdateOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
CacheRulesClientBeginUpdateOptions contains the optional parameters for the CacheRulesClient.BeginUpdate method.
type CacheRulesClientCreateResponse ¶
type CacheRulesClientCreateResponse struct {
// An object that represents a cache rule for a container registry.
CacheRule
}
CacheRulesClientCreateResponse contains the response from method CacheRulesClient.BeginCreate.
type CacheRulesClientDeleteResponse ¶
type CacheRulesClientDeleteResponse struct {
}
CacheRulesClientDeleteResponse contains the response from method CacheRulesClient.BeginDelete.
type CacheRulesClientGetOptions ¶
type CacheRulesClientGetOptions struct {
}
CacheRulesClientGetOptions contains the optional parameters for the CacheRulesClient.Get method.
type CacheRulesClientGetResponse ¶
type CacheRulesClientGetResponse struct {
// An object that represents a cache rule for a container registry.
CacheRule
}
CacheRulesClientGetResponse contains the response from method CacheRulesClient.Get.
type CacheRulesClientListOptions ¶
type CacheRulesClientListOptions struct {
}
CacheRulesClientListOptions contains the optional parameters for the CacheRulesClient.NewListPager method.
type CacheRulesClientListResponse ¶
type CacheRulesClientListResponse struct {
// The result of a request to list cache rules for a container registry.
CacheRulesListResult
}
CacheRulesClientListResponse contains the response from method CacheRulesClient.NewListPager.
type CacheRulesClientUpdateResponse ¶
type CacheRulesClientUpdateResponse struct {
// An object that represents a cache rule for a container registry.
CacheRule
}
CacheRulesClientUpdateResponse contains the response from method CacheRulesClient.BeginUpdate.
type CacheRulesListResult ¶
type CacheRulesListResult struct {
// The URI that can be used to request the next list of cache rules.
NextLink *string
// The list of cache rules. Since this list may be incomplete, the nextLink field should be used to request the next list
// of cache rules.
Value []*CacheRule
}
CacheRulesListResult - The result of a request to list cache rules for a container registry.
func (CacheRulesListResult) MarshalJSON ¶
func (c CacheRulesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CacheRulesListResult.
func (*CacheRulesListResult) UnmarshalJSON ¶
func (c *CacheRulesListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CacheRulesListResult.
type CallbackConfig ¶
type CallbackConfig struct {
// REQUIRED; The service URI for the webhook to post notifications.
ServiceURI *string
// Custom headers that will be added to the webhook notifications.
CustomHeaders map[string]*string
}
CallbackConfig - The configuration of service URI and custom headers for the webhook.
func (CallbackConfig) MarshalJSON ¶
func (c CallbackConfig) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CallbackConfig.
func (*CallbackConfig) UnmarshalJSON ¶
func (c *CallbackConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CallbackConfig.
type CertificateType ¶
type CertificateType string
CertificateType - The type of certificate location.
const (
CertificateTypeLocalDirectory CertificateType = "LocalDirectory"
)
func PossibleCertificateTypeValues ¶
func PossibleCertificateTypeValues() []CertificateType
PossibleCertificateTypeValues returns the possible values for the CertificateType const type.
type ClientFactory ¶
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewCacheRulesClient ¶
func (c *ClientFactory) NewCacheRulesClient() *CacheRulesClient
NewCacheRulesClient creates a new instance of CacheRulesClient.
func (*ClientFactory) NewConnectedRegistriesClient ¶
func (c *ClientFactory) NewConnectedRegistriesClient() *ConnectedRegistriesClient
NewConnectedRegistriesClient creates a new instance of ConnectedRegistriesClient.
func (*ClientFactory) NewCredentialSetsClient ¶
func (c *ClientFactory) NewCredentialSetsClient() *CredentialSetsClient
NewCredentialSetsClient creates a new instance of CredentialSetsClient.
func (*ClientFactory) NewOperationsClient ¶
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewPrivateEndpointConnectionsClient ¶
func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient
NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.
func (*ClientFactory) NewRegistriesClient ¶
func (c *ClientFactory) NewRegistriesClient() *RegistriesClient
NewRegistriesClient creates a new instance of RegistriesClient.
func (*ClientFactory) NewReplicationsClient ¶
func (c *ClientFactory) NewReplicationsClient() *ReplicationsClient
NewReplicationsClient creates a new instance of ReplicationsClient.
func (*ClientFactory) NewScopeMapsClient ¶
func (c *ClientFactory) NewScopeMapsClient() *ScopeMapsClient
NewScopeMapsClient creates a new instance of ScopeMapsClient.
func (*ClientFactory) NewTokensClient ¶
func (c *ClientFactory) NewTokensClient() *TokensClient
NewTokensClient creates a new instance of TokensClient.
func (*ClientFactory) NewWebhooksClient ¶
func (c *ClientFactory) NewWebhooksClient() *WebhooksClient
NewWebhooksClient creates a new instance of WebhooksClient.
type ConnectedRegistriesClient ¶
type ConnectedRegistriesClient struct {
// contains filtered or unexported fields
}
ConnectedRegistriesClient contains the methods for the ConnectedRegistries group. Don't use this type directly, use NewConnectedRegistriesClient() instead.
func NewConnectedRegistriesClient ¶
func NewConnectedRegistriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectedRegistriesClient, error)
NewConnectedRegistriesClient creates a new instance of ConnectedRegistriesClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - Contains optional client configuration. Pass nil to accept the default values.
func (*ConnectedRegistriesClient) BeginCreate ¶
func (client *ConnectedRegistriesClient) BeginCreate(ctx context.Context, resourceGroupName string, registryName string, connectedRegistryName string, connectedRegistryCreateParameters ConnectedRegistry, options *ConnectedRegistriesClientBeginCreateOptions) (*runtime.Poller[ConnectedRegistriesClientCreateResponse], error)
BeginCreate - Creates a connected registry for a container registry with the specified parameters. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- connectedRegistryName - The name of the connected registry.
- connectedRegistryCreateParameters - The parameters for creating a connectedRegistry.
- options - ConnectedRegistriesClientBeginCreateOptions contains the optional parameters for the ConnectedRegistriesClient.BeginCreate method.
Example ¶
Generated from example definition: 2025-11-01/ConnectedRegistryCreate.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewConnectedRegistriesClient().BeginCreate(ctx, "myResourceGroup", "myRegistry", "myConnectedRegistry", armcontainerregistry.ConnectedRegistry{
Properties: &armcontainerregistry.ConnectedRegistryProperties{
Mode: to.Ptr(armcontainerregistry.ConnectedRegistryModeReadWrite),
Parent: &armcontainerregistry.ParentProperties{
SyncProperties: &armcontainerregistry.SyncProperties{
TokenID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/syncToken"),
Schedule: to.Ptr("0 9 * * *"),
MessageTTL: to.Ptr("P2D"),
SyncWindow: to.Ptr("PT3H"),
},
},
ClientTokenIDs: []*string{
to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token"),
},
NotificationsList: []*string{
to.Ptr("hello-world:*:*"),
to.Ptr("sample/repo/*:1.0:*"),
},
GarbageCollection: &armcontainerregistry.GarbageCollectionProperties{
Enabled: to.Ptr(true),
Schedule: to.Ptr("0 5 * * *"),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.ConnectedRegistriesClientCreateResponse{
// ConnectedRegistry: &armcontainerregistry.ConnectedRegistry{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry"),
// Name: to.Ptr("myConnectedRegistry"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/connectedRegistries"),
// Properties: &armcontainerregistry.ConnectedRegistryProperties{
// Mode: to.Ptr(armcontainerregistry.ConnectedRegistryModeReadWrite),
// Activation: &armcontainerregistry.ActivationProperties{
// Status: to.Ptr(armcontainerregistry.ActivationStatusInactive),
// },
// Parent: &armcontainerregistry.ParentProperties{
// SyncProperties: &armcontainerregistry.SyncProperties{
// TokenID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/syncToken"),
// Schedule: to.Ptr("0 9 * * *"),
// MessageTTL: to.Ptr("P2D"),
// SyncWindow: to.Ptr("PT3H"),
// },
// },
// ClientTokenIDs: []*string{
// to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token"),
// },
// Logging: &armcontainerregistry.LoggingProperties{
// LogLevel: to.Ptr(armcontainerregistry.LogLevelInformation),
// AuditLogStatus: to.Ptr(armcontainerregistry.AuditLogStatusDisabled),
// },
// NotificationsList: []*string{
// to.Ptr("hello-world:*:*"),
// to.Ptr("sample/repo/*:1.0:*"),
// },
// GarbageCollection: &armcontainerregistry.GarbageCollectionProperties{
// Enabled: to.Ptr(true),
// Schedule: to.Ptr("0 5 * * *"),
// },
// },
// },
// }
}
Output:
func (*ConnectedRegistriesClient) BeginDeactivate ¶
func (client *ConnectedRegistriesClient) BeginDeactivate(ctx context.Context, resourceGroupName string, registryName string, connectedRegistryName string, options *ConnectedRegistriesClientBeginDeactivateOptions) (*runtime.Poller[ConnectedRegistriesClientDeactivateResponse], error)
BeginDeactivate - Deactivates the connected registry instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- connectedRegistryName - The name of the connected registry.
- options - ConnectedRegistriesClientBeginDeactivateOptions contains the optional parameters for the ConnectedRegistriesClient.BeginDeactivate method.
Example ¶
Generated from example definition: 2025-11-01/ConnectedRegistryDeactivate.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewConnectedRegistriesClient().BeginDeactivate(ctx, "myResourceGroup", "myRegistry", "myConnectedRegistry", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.ConnectedRegistriesClientDeactivateResponse{
// }
}
Output:
func (*ConnectedRegistriesClient) BeginDelete ¶
func (client *ConnectedRegistriesClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, connectedRegistryName string, options *ConnectedRegistriesClientBeginDeleteOptions) (*runtime.Poller[ConnectedRegistriesClientDeleteResponse], error)
BeginDelete - Deletes a connected registry from a container registry. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- connectedRegistryName - The name of the connected registry.
- options - ConnectedRegistriesClientBeginDeleteOptions contains the optional parameters for the ConnectedRegistriesClient.BeginDelete method.
Example ¶
Generated from example definition: 2025-11-01/ConnectedRegistryDelete.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewConnectedRegistriesClient().BeginDelete(ctx, "myResourceGroup", "myRegistry", "myConnectedRegistry", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.ConnectedRegistriesClientDeleteResponse{
// }
}
Output:
func (*ConnectedRegistriesClient) BeginUpdate ¶
func (client *ConnectedRegistriesClient) BeginUpdate(ctx context.Context, resourceGroupName string, registryName string, connectedRegistryName string, connectedRegistryUpdateParameters ConnectedRegistryUpdateParameters, options *ConnectedRegistriesClientBeginUpdateOptions) (*runtime.Poller[ConnectedRegistriesClientUpdateResponse], error)
BeginUpdate - Updates a connected registry with the specified parameters. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- connectedRegistryName - The name of the connected registry.
- connectedRegistryUpdateParameters - The parameters for updating a connectedRegistry.
- options - ConnectedRegistriesClientBeginUpdateOptions contains the optional parameters for the ConnectedRegistriesClient.BeginUpdate method.
Example ¶
Generated from example definition: 2025-11-01/ConnectedRegistryUpdate.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewConnectedRegistriesClient().BeginUpdate(ctx, "myResourceGroup", "myRegistry", "myScopeMap", armcontainerregistry.ConnectedRegistryUpdateParameters{
Properties: &armcontainerregistry.ConnectedRegistryUpdateProperties{
SyncProperties: &armcontainerregistry.SyncUpdateProperties{
Schedule: to.Ptr("0 0 */10 * *"),
MessageTTL: to.Ptr("P30D"),
SyncWindow: to.Ptr("P2D"),
},
Logging: &armcontainerregistry.LoggingProperties{
LogLevel: to.Ptr(armcontainerregistry.LogLevelDebug),
AuditLogStatus: to.Ptr(armcontainerregistry.AuditLogStatusEnabled),
},
ClientTokenIDs: []*string{
to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token"),
to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client2Token"),
},
NotificationsList: []*string{
to.Ptr("hello-world:*:*"),
to.Ptr("sample/repo/*:1.0:*"),
},
GarbageCollection: &armcontainerregistry.GarbageCollectionProperties{
Enabled: to.Ptr(true),
Schedule: to.Ptr("0 5 * * *"),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.ConnectedRegistriesClientUpdateResponse{
// ConnectedRegistry: &armcontainerregistry.ConnectedRegistry{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry"),
// Name: to.Ptr("myConnectedRegistry"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/connectedRegistries"),
// Properties: &armcontainerregistry.ConnectedRegistryProperties{
// Mode: to.Ptr(armcontainerregistry.ConnectedRegistryModeReadWrite),
// Parent: &armcontainerregistry.ParentProperties{
// SyncProperties: &armcontainerregistry.SyncProperties{
// TokenID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/syncToken"),
// Schedule: to.Ptr("0 0 */10 * *"),
// MessageTTL: to.Ptr("P30D"),
// SyncWindow: to.Ptr("P2D"),
// },
// },
// ClientTokenIDs: []*string{
// to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token"),
// to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client2Token"),
// },
// Logging: &armcontainerregistry.LoggingProperties{
// LogLevel: to.Ptr(armcontainerregistry.LogLevelDebug),
// AuditLogStatus: to.Ptr(armcontainerregistry.AuditLogStatusEnabled),
// },
// NotificationsList: []*string{
// to.Ptr("hello-world:*:*"),
// to.Ptr("sample/repo/*:1.0:*"),
// },
// GarbageCollection: &armcontainerregistry.GarbageCollectionProperties{
// Enabled: to.Ptr(true),
// Schedule: to.Ptr("0 5 * * *"),
// },
// },
// },
// }
}
Output:
func (*ConnectedRegistriesClient) Get ¶
func (client *ConnectedRegistriesClient) Get(ctx context.Context, resourceGroupName string, registryName string, connectedRegistryName string, options *ConnectedRegistriesClientGetOptions) (ConnectedRegistriesClientGetResponse, error)
Get - Gets the properties of the connected registry. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- connectedRegistryName - The name of the connected registry.
- options - ConnectedRegistriesClientGetOptions contains the optional parameters for the ConnectedRegistriesClient.Get method.
Example ¶
Generated from example definition: 2025-11-01/ConnectedRegistryGet.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewConnectedRegistriesClient().Get(ctx, "myResourceGroup", "myRegistry", "myConnectedRegistry", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.ConnectedRegistriesClientGetResponse{
// ConnectedRegistry: &armcontainerregistry.ConnectedRegistry{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry"),
// Name: to.Ptr("myConnectedRegistry"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/connectedRegistries"),
// Properties: &armcontainerregistry.ConnectedRegistryProperties{
// Mode: to.Ptr(armcontainerregistry.ConnectedRegistryModeReadWrite),
// Activation: &armcontainerregistry.ActivationProperties{
// Status: to.Ptr(armcontainerregistry.ActivationStatusInactive),
// },
// Parent: &armcontainerregistry.ParentProperties{
// SyncProperties: &armcontainerregistry.SyncProperties{
// TokenID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/syncToken"),
// Schedule: to.Ptr("0 9 * * *"),
// MessageTTL: to.Ptr("P2D"),
// SyncWindow: to.Ptr("PT3H"),
// },
// },
// ClientTokenIDs: []*string{
// to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token"),
// },
// Logging: &armcontainerregistry.LoggingProperties{
// LogLevel: to.Ptr(armcontainerregistry.LogLevelInformation),
// AuditLogStatus: to.Ptr(armcontainerregistry.AuditLogStatusDisabled),
// },
// NotificationsList: []*string{
// to.Ptr("hello-world:*:*"),
// to.Ptr("sample/repo/*:1.0:*"),
// },
// GarbageCollection: &armcontainerregistry.GarbageCollectionProperties{
// Enabled: to.Ptr(true),
// Schedule: to.Ptr("0 5 * * *"),
// },
// },
// },
// }
}
Output:
func (*ConnectedRegistriesClient) NewListPager ¶
func (client *ConnectedRegistriesClient) NewListPager(resourceGroupName string, registryName string, options *ConnectedRegistriesClientListOptions) *runtime.Pager[ConnectedRegistriesClientListResponse]
NewListPager - Lists all connected registries for the specified container registry.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- options - ConnectedRegistriesClientListOptions contains the optional parameters for the ConnectedRegistriesClient.NewListPager method.
Example ¶
Generated from example definition: 2025-11-01/ConnectedRegistryList.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewConnectedRegistriesClient().NewListPager("myResourceGroup", "myRegistry", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armcontainerregistry.ConnectedRegistriesClientListResponse{
// ConnectedRegistryListResult: armcontainerregistry.ConnectedRegistryListResult{
// Value: []*armcontainerregistry.ConnectedRegistry{
// {
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry"),
// Name: to.Ptr("myConnectedRegistry"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/connectedRegistries"),
// Properties: &armcontainerregistry.ConnectedRegistryProperties{
// Mode: to.Ptr(armcontainerregistry.ConnectedRegistryModeReadWrite),
// Activation: &armcontainerregistry.ActivationProperties{
// Status: to.Ptr(armcontainerregistry.ActivationStatusInactive),
// },
// Parent: &armcontainerregistry.ParentProperties{
// SyncProperties: &armcontainerregistry.SyncProperties{
// TokenID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/syncToken"),
// Schedule: to.Ptr("0 9 * * *"),
// MessageTTL: to.Ptr("P2D"),
// SyncWindow: to.Ptr("PT3H"),
// },
// },
// ClientTokenIDs: []*string{
// to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token"),
// },
// Logging: &armcontainerregistry.LoggingProperties{
// LogLevel: to.Ptr(armcontainerregistry.LogLevelInformation),
// AuditLogStatus: to.Ptr(armcontainerregistry.AuditLogStatusDisabled),
// },
// NotificationsList: []*string{
// to.Ptr("hello-world:*:*"),
// to.Ptr("sample/repo/*:1.0:*"),
// },
// GarbageCollection: &armcontainerregistry.GarbageCollectionProperties{
// Enabled: to.Ptr(true),
// Schedule: to.Ptr("0 5 * * *"),
// },
// },
// },
// },
// },
// }
}
}
Output:
type ConnectedRegistriesClientBeginCreateOptions ¶
type ConnectedRegistriesClientBeginCreateOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
ConnectedRegistriesClientBeginCreateOptions contains the optional parameters for the ConnectedRegistriesClient.BeginCreate method.
type ConnectedRegistriesClientBeginDeactivateOptions ¶
type ConnectedRegistriesClientBeginDeactivateOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
ConnectedRegistriesClientBeginDeactivateOptions contains the optional parameters for the ConnectedRegistriesClient.BeginDeactivate method.
type ConnectedRegistriesClientBeginDeleteOptions ¶
type ConnectedRegistriesClientBeginDeleteOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
ConnectedRegistriesClientBeginDeleteOptions contains the optional parameters for the ConnectedRegistriesClient.BeginDelete method.
type ConnectedRegistriesClientBeginUpdateOptions ¶
type ConnectedRegistriesClientBeginUpdateOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
ConnectedRegistriesClientBeginUpdateOptions contains the optional parameters for the ConnectedRegistriesClient.BeginUpdate method.
type ConnectedRegistriesClientCreateResponse ¶
type ConnectedRegistriesClientCreateResponse struct {
// An object that represents a connected registry for a container registry.
ConnectedRegistry
}
ConnectedRegistriesClientCreateResponse contains the response from method ConnectedRegistriesClient.BeginCreate.
type ConnectedRegistriesClientDeactivateResponse ¶
type ConnectedRegistriesClientDeactivateResponse struct {
}
ConnectedRegistriesClientDeactivateResponse contains the response from method ConnectedRegistriesClient.BeginDeactivate.
type ConnectedRegistriesClientDeleteResponse ¶
type ConnectedRegistriesClientDeleteResponse struct {
}
ConnectedRegistriesClientDeleteResponse contains the response from method ConnectedRegistriesClient.BeginDelete.
type ConnectedRegistriesClientGetOptions ¶
type ConnectedRegistriesClientGetOptions struct {
}
ConnectedRegistriesClientGetOptions contains the optional parameters for the ConnectedRegistriesClient.Get method.
type ConnectedRegistriesClientGetResponse ¶
type ConnectedRegistriesClientGetResponse struct {
// An object that represents a connected registry for a container registry.
ConnectedRegistry
}
ConnectedRegistriesClientGetResponse contains the response from method ConnectedRegistriesClient.Get.
type ConnectedRegistriesClientListOptions ¶
type ConnectedRegistriesClientListOptions struct {
// An OData filter expression that describes a subset of connectedRegistries to return. The parameters that can be filtered
// are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. The supported operator is eq.
Filter *string
}
ConnectedRegistriesClientListOptions contains the optional parameters for the ConnectedRegistriesClient.NewListPager method.
type ConnectedRegistriesClientListResponse ¶
type ConnectedRegistriesClientListResponse struct {
// The result of a request to list connected registries for a container registry.
ConnectedRegistryListResult
}
ConnectedRegistriesClientListResponse contains the response from method ConnectedRegistriesClient.NewListPager.
type ConnectedRegistriesClientUpdateResponse ¶
type ConnectedRegistriesClientUpdateResponse struct {
// An object that represents a connected registry for a container registry.
ConnectedRegistry
}
ConnectedRegistriesClientUpdateResponse contains the response from method ConnectedRegistriesClient.BeginUpdate.
type ConnectedRegistry ¶
type ConnectedRegistry struct {
// The properties of the connected registry.
Properties *ConnectedRegistryProperties
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the private link resource.
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
ConnectedRegistry - An object that represents a connected registry for a container registry.
func (ConnectedRegistry) MarshalJSON ¶
func (c ConnectedRegistry) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConnectedRegistry.
func (*ConnectedRegistry) UnmarshalJSON ¶
func (c *ConnectedRegistry) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedRegistry.
type ConnectedRegistryListResult ¶
type ConnectedRegistryListResult struct {
// The URI that can be used to request the next list of connected registries.
NextLink *string
// The list of connected registries. Since this list may be incomplete, the nextLink field should be used to request the next
// list of connected registries.
Value []*ConnectedRegistry
}
ConnectedRegistryListResult - The result of a request to list connected registries for a container registry.
func (ConnectedRegistryListResult) MarshalJSON ¶
func (c ConnectedRegistryListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConnectedRegistryListResult.
func (*ConnectedRegistryListResult) UnmarshalJSON ¶
func (c *ConnectedRegistryListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedRegistryListResult.
type ConnectedRegistryMode ¶
type ConnectedRegistryMode string
ConnectedRegistryMode - The mode of the connected registry resource that indicates the permissions of the registry.
const ( ConnectedRegistryModeMirror ConnectedRegistryMode = "Mirror" ConnectedRegistryModeReadOnly ConnectedRegistryMode = "ReadOnly" ConnectedRegistryModeReadWrite ConnectedRegistryMode = "ReadWrite" ConnectedRegistryModeRegistry ConnectedRegistryMode = "Registry" )
func PossibleConnectedRegistryModeValues ¶
func PossibleConnectedRegistryModeValues() []ConnectedRegistryMode
PossibleConnectedRegistryModeValues returns the possible values for the ConnectedRegistryMode const type.
type ConnectedRegistryProperties ¶
type ConnectedRegistryProperties struct {
// REQUIRED; The mode of the connected registry resource that indicates the permissions of the registry.
Mode *ConnectedRegistryMode
// REQUIRED; The parent of the connected registry.
Parent *ParentProperties
// The list of the ACR token resource IDs used to authenticate clients to the connected registry.
ClientTokenIDs []*string
// The garbage collection properties of the connected registry.
GarbageCollection *GarbageCollectionProperties
// The logging properties of the connected registry.
Logging *LoggingProperties
// The login server properties of the connected registry.
LoginServer *LoginServerProperties
// The list of notifications subscription information for the connected registry.
NotificationsList []*string
// READ-ONLY; The activation properties of the connected registry.
Activation *ActivationProperties
// READ-ONLY; The current connection state of the connected registry.
ConnectionState *ConnectionState
// READ-ONLY; The last activity time of the connected registry.
LastActivityTime *time.Time
// READ-ONLY; Provisioning state of the resource.
ProvisioningState *ProvisioningState
// READ-ONLY; The list of current statuses of the connected registry.
StatusDetails []*StatusDetailProperties
// READ-ONLY; The current version of ACR runtime on the connected registry.
Version *string
}
ConnectedRegistryProperties - The properties of a connected registry.
func (ConnectedRegistryProperties) MarshalJSON ¶
func (c ConnectedRegistryProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConnectedRegistryProperties.
func (*ConnectedRegistryProperties) UnmarshalJSON ¶
func (c *ConnectedRegistryProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedRegistryProperties.
type ConnectedRegistryUpdateParameters ¶
type ConnectedRegistryUpdateParameters struct {
// The properties of the connected registry update parameters.
Properties *ConnectedRegistryUpdateProperties
}
ConnectedRegistryUpdateParameters - The parameters for updating a connected registry.
func (ConnectedRegistryUpdateParameters) MarshalJSON ¶
func (c ConnectedRegistryUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConnectedRegistryUpdateParameters.
func (*ConnectedRegistryUpdateParameters) UnmarshalJSON ¶
func (c *ConnectedRegistryUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedRegistryUpdateParameters.
type ConnectedRegistryUpdateProperties ¶
type ConnectedRegistryUpdateProperties struct {
// The list of the ACR token resource IDs used to authenticate clients to the connected registry.
ClientTokenIDs []*string
// The garbage collection properties of the connected registry.
GarbageCollection *GarbageCollectionProperties
// The logging properties of the connected registry.
Logging *LoggingProperties
// The list of notifications subscription information for the connected registry.
NotificationsList []*string
// The sync properties of the connected registry with its parent.
SyncProperties *SyncUpdateProperties
}
ConnectedRegistryUpdateProperties - The parameters for updating token properties.
func (ConnectedRegistryUpdateProperties) MarshalJSON ¶
func (c ConnectedRegistryUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConnectedRegistryUpdateProperties.
func (*ConnectedRegistryUpdateProperties) UnmarshalJSON ¶
func (c *ConnectedRegistryUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedRegistryUpdateProperties.
type ConnectionState ¶
type ConnectionState string
ConnectionState - The current connection state of the connected registry.
const ( ConnectionStateOffline ConnectionState = "Offline" ConnectionStateOnline ConnectionState = "Online" ConnectionStateSyncing ConnectionState = "Syncing" ConnectionStateUnhealthy ConnectionState = "Unhealthy" )
func PossibleConnectionStateValues ¶
func PossibleConnectionStateValues() []ConnectionState
PossibleConnectionStateValues returns the possible values for the ConnectionState const type.
type ConnectionStatus ¶
type ConnectionStatus string
ConnectionStatus - The private link service connection status.
const ( ConnectionStatusApproved ConnectionStatus = "Approved" ConnectionStatusDisconnected ConnectionStatus = "Disconnected" ConnectionStatusPending ConnectionStatus = "Pending" ConnectionStatusRejected ConnectionStatus = "Rejected" )
func PossibleConnectionStatusValues ¶
func PossibleConnectionStatusValues() []ConnectionStatus
PossibleConnectionStatusValues returns the possible values for the ConnectionStatus const type.
type CreatedByType ¶
type CreatedByType string
CreatedByType - The kind of entity that created the resource.
const ( // CreatedByTypeApplication - The entity was created by an application. CreatedByTypeApplication CreatedByType = "Application" // CreatedByTypeKey - The entity was created by a key. CreatedByTypeKey CreatedByType = "Key" // CreatedByTypeManagedIdentity - The entity was created by a managed identity. CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" // CreatedByTypeUser - The entity was created by a user. CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type CredentialHealth ¶
type CredentialHealth struct {
// Error code representing the health check error.
ErrorCode *string
// Descriptive message representing the health check error.
ErrorMessage *string
// The health status of credential.
Status *CredentialHealthStatus
}
CredentialHealth - The health of the auth credential.
func (CredentialHealth) MarshalJSON ¶
func (c CredentialHealth) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CredentialHealth.
func (*CredentialHealth) UnmarshalJSON ¶
func (c *CredentialHealth) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CredentialHealth.
type CredentialHealthStatus ¶
type CredentialHealthStatus string
CredentialHealthStatus - The health status of credential.
const ( CredentialHealthStatusHealthy CredentialHealthStatus = "Healthy" CredentialHealthStatusUnhealthy CredentialHealthStatus = "Unhealthy" )
func PossibleCredentialHealthStatusValues ¶
func PossibleCredentialHealthStatusValues() []CredentialHealthStatus
PossibleCredentialHealthStatusValues returns the possible values for the CredentialHealthStatus const type.
type CredentialName ¶
type CredentialName string
CredentialName - The name of the credential.
const (
CredentialNameCredential1 CredentialName = "Credential1"
)
func PossibleCredentialNameValues ¶
func PossibleCredentialNameValues() []CredentialName
PossibleCredentialNameValues returns the possible values for the CredentialName const type.
type CredentialSet ¶
type CredentialSet struct {
// Identities associated with the resource. This is used to access the KeyVault secrets.
Identity *IdentityProperties
// The properties of the credential set.
Properties *CredentialSetProperties
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the private link resource.
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
CredentialSet - An object that represents a credential set resource for a container registry.
func (CredentialSet) MarshalJSON ¶
func (c CredentialSet) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CredentialSet.
func (*CredentialSet) UnmarshalJSON ¶
func (c *CredentialSet) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CredentialSet.
type CredentialSetListResult ¶
type CredentialSetListResult struct {
// The URI that can be used to request the next list of credential sets.
NextLink *string
// The list of credential sets. Since this list may be incomplete, the nextLink field should be used to request the next list
// of credential sets.
Value []*CredentialSet
}
CredentialSetListResult - The result of a request to list credential sets for a container registry.
func (CredentialSetListResult) MarshalJSON ¶
func (c CredentialSetListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CredentialSetListResult.
func (*CredentialSetListResult) UnmarshalJSON ¶
func (c *CredentialSetListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CredentialSetListResult.
type CredentialSetProperties ¶
type CredentialSetProperties struct {
// List of authentication credentials stored for an upstream.
// Usually consists of a primary and an optional secondary credential.
AuthCredentials []*AuthCredential
// The credentials are stored for this upstream or login server.
LoginServer *string
// READ-ONLY; The creation date of credential store resource.
CreationDate *time.Time
// READ-ONLY; Provisioning state of the resource.
ProvisioningState *ProvisioningState
}
CredentialSetProperties - The properties of a credential set resource.
func (CredentialSetProperties) MarshalJSON ¶
func (c CredentialSetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CredentialSetProperties.
func (*CredentialSetProperties) UnmarshalJSON ¶
func (c *CredentialSetProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CredentialSetProperties.
type CredentialSetUpdateParameters ¶
type CredentialSetUpdateParameters struct {
// Identities associated with the resource. This is used to access the KeyVault secrets.
Identity *IdentityProperties
// The properties of the credential set update parameters
Properties *CredentialSetUpdateProperties
}
CredentialSetUpdateParameters - The parameters for updating a credential set
func (CredentialSetUpdateParameters) MarshalJSON ¶
func (c CredentialSetUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CredentialSetUpdateParameters.
func (*CredentialSetUpdateParameters) UnmarshalJSON ¶
func (c *CredentialSetUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CredentialSetUpdateParameters.
type CredentialSetUpdateProperties ¶
type CredentialSetUpdateProperties struct {
// List of authentication credentials stored for an upstream.
// Usually consists of a primary and an optional secondary credential.
AuthCredentials []*AuthCredential
}
CredentialSetUpdateProperties - The parameters for updating credential set properties.
func (CredentialSetUpdateProperties) MarshalJSON ¶
func (c CredentialSetUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CredentialSetUpdateProperties.
func (*CredentialSetUpdateProperties) UnmarshalJSON ¶
func (c *CredentialSetUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CredentialSetUpdateProperties.
type CredentialSetsClient ¶
type CredentialSetsClient struct {
// contains filtered or unexported fields
}
CredentialSetsClient contains the methods for the CredentialSets group. Don't use this type directly, use NewCredentialSetsClient() instead.
func NewCredentialSetsClient ¶
func NewCredentialSetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CredentialSetsClient, error)
NewCredentialSetsClient creates a new instance of CredentialSetsClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - Contains optional client configuration. Pass nil to accept the default values.
func (*CredentialSetsClient) BeginCreate ¶
func (client *CredentialSetsClient) BeginCreate(ctx context.Context, resourceGroupName string, registryName string, credentialSetName string, credentialSetCreateParameters CredentialSet, options *CredentialSetsClientBeginCreateOptions) (*runtime.Poller[CredentialSetsClientCreateResponse], error)
BeginCreate - Creates a credential set for a container registry with the specified parameters. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- credentialSetName - The name of the credential set.
- credentialSetCreateParameters - The parameters for creating a credential set.
- options - CredentialSetsClientBeginCreateOptions contains the optional parameters for the CredentialSetsClient.BeginCreate method.
Example ¶
Generated from example definition: 2025-11-01/CredentialSetCreate.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewCredentialSetsClient().BeginCreate(ctx, "myResourceGroup", "myRegistry", "myCredentialSet", armcontainerregistry.CredentialSet{
Properties: &armcontainerregistry.CredentialSetProperties{
LoginServer: to.Ptr("docker.io"),
AuthCredentials: []*armcontainerregistry.AuthCredential{
{
Name: to.Ptr(armcontainerregistry.CredentialNameCredential1),
UsernameSecretIdentifier: to.Ptr("https://myvault.vault.azure.net/secrets/username"),
PasswordSecretIdentifier: to.Ptr("https://myvault.vault.azure.net/secrets/password"),
},
},
},
Identity: &armcontainerregistry.IdentityProperties{
Type: to.Ptr(armcontainerregistry.ResourceIdentityTypeSystemAssigned),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.CredentialSetsClientCreateResponse{
// CredentialSet: &armcontainerregistry.CredentialSet{
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/credentialSets"),
// Identity: &armcontainerregistry.IdentityProperties{
// PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// Type: to.Ptr(armcontainerregistry.ResourceIdentityTypeSystemAssigned),
// },
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet"),
// Name: to.Ptr("myCredentialSet"),
// Properties: &armcontainerregistry.CredentialSetProperties{
// LoginServer: to.Ptr("docker.io"),
// AuthCredentials: []*armcontainerregistry.AuthCredential{
// {
// Name: to.Ptr(armcontainerregistry.CredentialNameCredential1),
// UsernameSecretIdentifier: to.Ptr("https://myvault.vault.azure.net/secrets/username"),
// PasswordSecretIdentifier: to.Ptr("https://myvault.vault.azure.net/secrets/password"),
// CredentialHealth: &armcontainerregistry.CredentialHealth{
// Status: to.Ptr(armcontainerregistry.CredentialHealthStatusHealthy),
// },
// },
// },
// CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-07T18:20:08.012276+00:00"); return t}()),
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// },
// },
// }
}
Output:
func (*CredentialSetsClient) BeginDelete ¶
func (client *CredentialSetsClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, credentialSetName string, options *CredentialSetsClientBeginDeleteOptions) (*runtime.Poller[CredentialSetsClientDeleteResponse], error)
BeginDelete - Deletes a credential set from a container registry. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- credentialSetName - The name of the credential set.
- options - CredentialSetsClientBeginDeleteOptions contains the optional parameters for the CredentialSetsClient.BeginDelete method.
Example ¶
Generated from example definition: 2025-11-01/CredentialSetDelete.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewCredentialSetsClient().BeginDelete(ctx, "myResourceGroup", "myRegistry", "myCredentialSet", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
}
Output:
func (*CredentialSetsClient) BeginUpdate ¶
func (client *CredentialSetsClient) BeginUpdate(ctx context.Context, resourceGroupName string, registryName string, credentialSetName string, credentialSetUpdateParameters CredentialSetUpdateParameters, options *CredentialSetsClientBeginUpdateOptions) (*runtime.Poller[CredentialSetsClientUpdateResponse], error)
BeginUpdate - Updates a credential set for a container registry with the specified parameters. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- credentialSetName - The name of the credential set.
- credentialSetUpdateParameters - The parameters for updating a credential set.
- options - CredentialSetsClientBeginUpdateOptions contains the optional parameters for the CredentialSetsClient.BeginUpdate method.
Example ¶
Generated from example definition: 2025-11-01/CredentialSetUpdate.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewCredentialSetsClient().BeginUpdate(ctx, "myResourceGroup", "myRegistry", "myCredentialSet", armcontainerregistry.CredentialSetUpdateParameters{
Properties: &armcontainerregistry.CredentialSetUpdateProperties{
AuthCredentials: []*armcontainerregistry.AuthCredential{
{
Name: to.Ptr(armcontainerregistry.CredentialNameCredential1),
UsernameSecretIdentifier: to.Ptr("https://myvault.vault.azure.net/secrets/username2"),
PasswordSecretIdentifier: to.Ptr("https://myvault.vault.azure.net/secrets/password2"),
},
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.CredentialSetsClientUpdateResponse{
// CredentialSet: &armcontainerregistry.CredentialSet{
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/credentialSets"),
// Identity: &armcontainerregistry.IdentityProperties{
// PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// Type: to.Ptr(armcontainerregistry.ResourceIdentityTypeSystemAssigned),
// },
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet"),
// Name: to.Ptr("myCredentialSet"),
// Properties: &armcontainerregistry.CredentialSetProperties{
// LoginServer: to.Ptr("docker.io"),
// AuthCredentials: []*armcontainerregistry.AuthCredential{
// {
// Name: to.Ptr(armcontainerregistry.CredentialNameCredential1),
// UsernameSecretIdentifier: to.Ptr("https://myvault.vault.azure.net/secrets/username2"),
// PasswordSecretIdentifier: to.Ptr("https://myvault.vault.azure.net/secrets/password2"),
// CredentialHealth: &armcontainerregistry.CredentialHealth{
// Status: to.Ptr(armcontainerregistry.CredentialHealthStatusHealthy),
// },
// },
// },
// CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-07T18:20:08.012276+00:00"); return t}()),
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// },
// },
// }
}
Output:
func (*CredentialSetsClient) Get ¶
func (client *CredentialSetsClient) Get(ctx context.Context, resourceGroupName string, registryName string, credentialSetName string, options *CredentialSetsClientGetOptions) (CredentialSetsClientGetResponse, error)
Get - Gets the properties of the specified credential set resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- credentialSetName - The name of the credential set.
- options - CredentialSetsClientGetOptions contains the optional parameters for the CredentialSetsClient.Get method.
Example ¶
Generated from example definition: 2025-11-01/CredentialSetGet.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCredentialSetsClient().Get(ctx, "myResourceGroup", "myRegistry", "myCredentialSet", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.CredentialSetsClientGetResponse{
// CredentialSet: &armcontainerregistry.CredentialSet{
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/credentialSets"),
// Identity: &armcontainerregistry.IdentityProperties{
// PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// Type: to.Ptr(armcontainerregistry.ResourceIdentityTypeSystemAssigned),
// },
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet"),
// Name: to.Ptr("myCredentialSet"),
// Properties: &armcontainerregistry.CredentialSetProperties{
// LoginServer: to.Ptr("docker.io"),
// AuthCredentials: []*armcontainerregistry.AuthCredential{
// {
// Name: to.Ptr(armcontainerregistry.CredentialNameCredential1),
// UsernameSecretIdentifier: to.Ptr("https://myvault.vault.azure.net/secrets/username"),
// PasswordSecretIdentifier: to.Ptr("https://myvault.vault.azure.net/secrets/password"),
// CredentialHealth: &armcontainerregistry.CredentialHealth{
// Status: to.Ptr(armcontainerregistry.CredentialHealthStatusHealthy),
// },
// },
// },
// CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-07T18:20:08.012276+00:00"); return t}()),
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// },
// },
// }
}
Output:
func (*CredentialSetsClient) NewListPager ¶
func (client *CredentialSetsClient) NewListPager(resourceGroupName string, registryName string, options *CredentialSetsClientListOptions) *runtime.Pager[CredentialSetsClientListResponse]
NewListPager - Lists all credential set resources for the specified container registry.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- options - CredentialSetsClientListOptions contains the optional parameters for the CredentialSetsClient.NewListPager method.
Example ¶
Generated from example definition: 2025-11-01/CredentialSetList.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewCredentialSetsClient().NewListPager("myResourceGroup", "myRegistry", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armcontainerregistry.CredentialSetsClientListResponse{
// CredentialSetListResult: armcontainerregistry.CredentialSetListResult{
// Value: []*armcontainerregistry.CredentialSet{
// {
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/credentialSets"),
// Identity: &armcontainerregistry.IdentityProperties{
// PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// Type: to.Ptr(armcontainerregistry.ResourceIdentityTypeSystemAssigned),
// },
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet"),
// Name: to.Ptr("myCredentialSet"),
// Properties: &armcontainerregistry.CredentialSetProperties{
// LoginServer: to.Ptr("docker.io"),
// AuthCredentials: []*armcontainerregistry.AuthCredential{
// {
// Name: to.Ptr(armcontainerregistry.CredentialNameCredential1),
// UsernameSecretIdentifier: to.Ptr("https://myvault.vault.azure.net/secrets/username"),
// PasswordSecretIdentifier: to.Ptr("https://myvault.vault.azure.net/secrets/password"),
// CredentialHealth: &armcontainerregistry.CredentialHealth{
// Status: to.Ptr(armcontainerregistry.CredentialHealthStatusHealthy),
// },
// },
// },
// CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-07T18:20:08.012276+00:00"); return t}()),
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// },
// },
// },
// },
// }
}
}
Output:
type CredentialSetsClientBeginCreateOptions ¶
type CredentialSetsClientBeginCreateOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
CredentialSetsClientBeginCreateOptions contains the optional parameters for the CredentialSetsClient.BeginCreate method.
type CredentialSetsClientBeginDeleteOptions ¶
type CredentialSetsClientBeginDeleteOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
CredentialSetsClientBeginDeleteOptions contains the optional parameters for the CredentialSetsClient.BeginDelete method.
type CredentialSetsClientBeginUpdateOptions ¶
type CredentialSetsClientBeginUpdateOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
CredentialSetsClientBeginUpdateOptions contains the optional parameters for the CredentialSetsClient.BeginUpdate method.
type CredentialSetsClientCreateResponse ¶
type CredentialSetsClientCreateResponse struct {
// An object that represents a credential set resource for a container registry.
CredentialSet
}
CredentialSetsClientCreateResponse contains the response from method CredentialSetsClient.BeginCreate.
type CredentialSetsClientDeleteResponse ¶
type CredentialSetsClientDeleteResponse struct {
}
CredentialSetsClientDeleteResponse contains the response from method CredentialSetsClient.BeginDelete.
type CredentialSetsClientGetOptions ¶
type CredentialSetsClientGetOptions struct {
}
CredentialSetsClientGetOptions contains the optional parameters for the CredentialSetsClient.Get method.
type CredentialSetsClientGetResponse ¶
type CredentialSetsClientGetResponse struct {
// An object that represents a credential set resource for a container registry.
CredentialSet
}
CredentialSetsClientGetResponse contains the response from method CredentialSetsClient.Get.
type CredentialSetsClientListOptions ¶
type CredentialSetsClientListOptions struct {
}
CredentialSetsClientListOptions contains the optional parameters for the CredentialSetsClient.NewListPager method.
type CredentialSetsClientListResponse ¶
type CredentialSetsClientListResponse struct {
// The result of a request to list credential sets for a container registry.
CredentialSetListResult
}
CredentialSetsClientListResponse contains the response from method CredentialSetsClient.NewListPager.
type CredentialSetsClientUpdateResponse ¶
type CredentialSetsClientUpdateResponse struct {
// An object that represents a credential set resource for a container registry.
CredentialSet
}
CredentialSetsClientUpdateResponse contains the response from method CredentialSetsClient.BeginUpdate.
type DefaultAction ¶
type DefaultAction string
DefaultAction - The default action of allow or deny when no other rules match.
const ( DefaultActionAllow DefaultAction = "Allow" DefaultActionDeny DefaultAction = "Deny" )
func PossibleDefaultActionValues ¶
func PossibleDefaultActionValues() []DefaultAction
PossibleDefaultActionValues returns the possible values for the DefaultAction const type.
type EncryptionProperty ¶
type EncryptionProperty struct {
// Key vault properties.
KeyVaultProperties *KeyVaultProperties
// Indicates whether or not the encryption is enabled for container registry.
Status *EncryptionStatus
}
func (EncryptionProperty) MarshalJSON ¶
func (e EncryptionProperty) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EncryptionProperty.
func (*EncryptionProperty) UnmarshalJSON ¶
func (e *EncryptionProperty) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionProperty.
type EncryptionStatus ¶
type EncryptionStatus string
EncryptionStatus - Indicates whether or not the encryption is enabled for container registry.
const ( EncryptionStatusDisabled EncryptionStatus = "disabled" EncryptionStatusEnabled EncryptionStatus = "enabled" )
func PossibleEncryptionStatusValues ¶
func PossibleEncryptionStatusValues() []EncryptionStatus
PossibleEncryptionStatusValues returns the possible values for the EncryptionStatus const type.
type Event ¶
type Event struct {
// The event request message sent to the service URI.
EventRequestMessage *EventRequestMessage
// The event response message received from the service URI.
EventResponseMessage *EventResponseMessage
// The event ID.
ID *string
}
Event - The event for a webhook.
func (Event) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Event.
func (*Event) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Event.
type EventContent ¶
type EventContent struct {
// The action that encompasses the provided event.
Action *string
// The agent that initiated the event. For most situations, this could be from the authorization context of the request.
Actor *Actor
// The event ID.
ID *string
// The request that generated the event.
Request *Request
// The registry node that generated the event. Put differently, while the actor initiates the event, the source generates
// it.
Source *Source
// The target of the event.
Target *Target
// The time at which the event occurred.
Timestamp *time.Time
}
EventContent - The content of the event request message.
func (EventContent) MarshalJSON ¶
func (e EventContent) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EventContent.
func (*EventContent) UnmarshalJSON ¶
func (e *EventContent) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EventContent.
type EventInfo ¶
type EventInfo struct {
// The event ID.
ID *string
}
EventInfo - The basic information of an event.
func (EventInfo) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type EventInfo.
func (*EventInfo) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type EventInfo.
type EventListResult ¶
type EventListResult struct {
// The URI that can be used to request the next list of events.
NextLink *string
// The list of events. Since this list may be incomplete, the nextLink field should be used to request the next list of events.
Value []*Event
}
EventListResult - The result of a request to list events for a webhook.
func (EventListResult) MarshalJSON ¶
func (e EventListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EventListResult.
func (*EventListResult) UnmarshalJSON ¶
func (e *EventListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EventListResult.
type EventRequestMessage ¶
type EventRequestMessage struct {
// The content of the event request message.
Content *EventContent
// The headers of the event request message.
Headers map[string]*string
// The HTTP method used to send the event request message.
Method *string
// The URI used to send the event request message.
RequestURI *string
// The HTTP message version.
Version *string
}
EventRequestMessage - The event request message sent to the service URI.
func (EventRequestMessage) MarshalJSON ¶
func (e EventRequestMessage) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EventRequestMessage.
func (*EventRequestMessage) UnmarshalJSON ¶
func (e *EventRequestMessage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EventRequestMessage.
type EventResponseMessage ¶
type EventResponseMessage struct {
// The content of the event response message.
Content *string
// The headers of the event response message.
Headers map[string]*string
// The reason phrase of the event response message.
ReasonPhrase *string
// The status code of the event response message.
StatusCode *string
// The HTTP message version.
Version *string
}
EventResponseMessage - The event response message received from the service URI.
func (EventResponseMessage) MarshalJSON ¶
func (e EventResponseMessage) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EventResponseMessage.
func (*EventResponseMessage) UnmarshalJSON ¶
func (e *EventResponseMessage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EventResponseMessage.
type ExportPolicy ¶
type ExportPolicy struct {
// The value that indicates whether the policy is enabled or not.
Status *ExportPolicyStatus
}
ExportPolicy - The export policy for a container registry.
func (ExportPolicy) MarshalJSON ¶
func (e ExportPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExportPolicy.
func (*ExportPolicy) UnmarshalJSON ¶
func (e *ExportPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExportPolicy.
type ExportPolicyStatus ¶
type ExportPolicyStatus string
ExportPolicyStatus - The value that indicates whether the policy is enabled or not.
const ( ExportPolicyStatusDisabled ExportPolicyStatus = "disabled" ExportPolicyStatusEnabled ExportPolicyStatus = "enabled" )
func PossibleExportPolicyStatusValues ¶
func PossibleExportPolicyStatusValues() []ExportPolicyStatus
PossibleExportPolicyStatusValues returns the possible values for the ExportPolicyStatus const type.
type GarbageCollectionProperties ¶
type GarbageCollectionProperties struct {
// Indicates whether garbage collection is enabled for the connected registry.
Enabled *bool
// The cron expression indicating the schedule that the connected registry will run garbage collection.
Schedule *string
}
GarbageCollectionProperties - The garbage collection properties of the connected registry.
func (GarbageCollectionProperties) MarshalJSON ¶
func (g GarbageCollectionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GarbageCollectionProperties.
func (*GarbageCollectionProperties) UnmarshalJSON ¶
func (g *GarbageCollectionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GarbageCollectionProperties.
type GenerateCredentialsParameters ¶
type GenerateCredentialsParameters struct {
// The expiry date of the generated credentials after which the credentials become invalid.
Expiry *time.Time
// Specifies name of the password which should be regenerated if any -- password1 or password2.
Name *TokenPasswordName
// The resource ID of the token for which credentials have to be generated.
TokenID *string
}
GenerateCredentialsParameters - The parameters used to generate credentials for a specified token or user of a container registry.
func (GenerateCredentialsParameters) MarshalJSON ¶
func (g GenerateCredentialsParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GenerateCredentialsParameters.
func (*GenerateCredentialsParameters) UnmarshalJSON ¶
func (g *GenerateCredentialsParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GenerateCredentialsParameters.
type GenerateCredentialsResult ¶
type GenerateCredentialsResult struct {
// The list of passwords for a container registry.
Passwords []*TokenPassword
// The username for a container registry.
Username *string
}
GenerateCredentialsResult - The response from the GenerateCredentials operation.
func (GenerateCredentialsResult) MarshalJSON ¶
func (g GenerateCredentialsResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GenerateCredentialsResult.
func (*GenerateCredentialsResult) UnmarshalJSON ¶
func (g *GenerateCredentialsResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GenerateCredentialsResult.
type IPRule ¶
type IPRule struct {
// REQUIRED; Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.
IPAddressOrRange *string
// The action of IP ACL rule.
Action *Action
}
IPRule - IP rule with specific IP or IP range in CIDR format.
func (IPRule) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type IPRule.
func (*IPRule) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type IPRule.
type IdentityProperties ¶
type IdentityProperties struct {
// The identity type.
Type *ResourceIdentityType
// The list of user identities associated with the resource. The user identity
// dictionary key references will be ARM resource ids in the form:
// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/
// providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
UserAssignedIdentities map[string]*UserIdentityProperties
// READ-ONLY; The principal ID of resource identity.
PrincipalID *string
// READ-ONLY; The tenant ID of resource.
TenantID *string
}
IdentityProperties - Managed identity for the resource.
func (IdentityProperties) MarshalJSON ¶
func (i IdentityProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IdentityProperties.
func (*IdentityProperties) UnmarshalJSON ¶
func (i *IdentityProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProperties.
type ImportImageParameters ¶
type ImportImageParameters struct {
// REQUIRED; The source of the image.
Source *ImportSource
// When Force, any existing target tags will be overwritten. When NoForce, any existing target tags will fail the operation
// before any copying begins.
Mode *ImportMode
// List of strings of the form repo[:tag]. When tag is omitted the source will be used (or 'latest' if source tag is also
// omitted).
TargetTags []*string
// List of strings of repository names to do a manifest only copy. No tag will be created.
UntaggedTargetRepositories []*string
}
func (ImportImageParameters) MarshalJSON ¶
func (i ImportImageParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImportImageParameters.
func (*ImportImageParameters) UnmarshalJSON ¶
func (i *ImportImageParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImportImageParameters.
type ImportMode ¶
type ImportMode string
ImportMode - When Force, any existing target tags will be overwritten. When NoForce, any existing target tags will fail the operation before any copying begins.
const ( ImportModeForce ImportMode = "Force" ImportModeNoForce ImportMode = "NoForce" )
func PossibleImportModeValues ¶
func PossibleImportModeValues() []ImportMode
PossibleImportModeValues returns the possible values for the ImportMode const type.
type ImportSource ¶
type ImportSource struct {
// REQUIRED; Repository name of the source image.
// Specify an image by repository ('hello-world'). This will use the 'latest' tag.
// Specify an image by tag ('hello-world:latest').
// Specify an image by sha256-based manifest digest ('hello-world@sha256:abc123').
SourceImage *string
// Credentials used when importing from a registry uri.
Credentials *ImportSourceCredentials
// The address of the source registry (e.g. 'mcr.microsoft.com').
RegistryURI *string
// The resource identifier of the source Azure Container Registry.
ResourceID *string
}
func (ImportSource) MarshalJSON ¶
func (i ImportSource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImportSource.
func (*ImportSource) UnmarshalJSON ¶
func (i *ImportSource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImportSource.
type ImportSourceCredentials ¶
type ImportSourceCredentials struct {
// REQUIRED; The password used to authenticate with the source registry.
Password *string
// The username to authenticate with the source registry.
Username *string
}
func (ImportSourceCredentials) MarshalJSON ¶
func (i ImportSourceCredentials) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImportSourceCredentials.
func (*ImportSourceCredentials) UnmarshalJSON ¶
func (i *ImportSourceCredentials) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImportSourceCredentials.
type KeyVaultProperties ¶
type KeyVaultProperties struct {
// The client id of the identity which will be used to access key vault.
Identity *string
// Key vault uri to access the encryption key.
KeyIdentifier *string
// READ-ONLY; Auto key rotation status for a CMK enabled registry.
KeyRotationEnabled *bool
// READ-ONLY; Timestamp of the last successful key rotation.
LastKeyRotationTimestamp *time.Time
// READ-ONLY; The fully qualified key identifier that includes the version of the key that is actually used for encryption.
VersionedKeyIdentifier *string
}
func (KeyVaultProperties) MarshalJSON ¶
func (k KeyVaultProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KeyVaultProperties.
func (*KeyVaultProperties) UnmarshalJSON ¶
func (k *KeyVaultProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultProperties.
type LogLevel ¶
type LogLevel string
LogLevel - The verbosity of logs persisted on the connected registry.
func PossibleLogLevelValues ¶
func PossibleLogLevelValues() []LogLevel
PossibleLogLevelValues returns the possible values for the LogLevel const type.
type LoggingProperties ¶
type LoggingProperties struct {
// Indicates whether audit logs are enabled on the connected registry.
AuditLogStatus *AuditLogStatus
// The verbosity of logs persisted on the connected registry.
LogLevel *LogLevel
}
LoggingProperties - The logging properties of the connected registry.
func (LoggingProperties) MarshalJSON ¶
func (l LoggingProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LoggingProperties.
func (*LoggingProperties) UnmarshalJSON ¶
func (l *LoggingProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LoggingProperties.
type LoginServerProperties ¶
type LoginServerProperties struct {
// READ-ONLY; The host of the connected registry. Can be FQDN or IP.
Host *string
// READ-ONLY; The TLS properties of the connected registry login server.
TLS *TLSProperties
}
LoginServerProperties - The login server properties of the connected registry.
func (LoginServerProperties) MarshalJSON ¶
func (l LoginServerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LoginServerProperties.
func (*LoginServerProperties) UnmarshalJSON ¶
func (l *LoginServerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LoginServerProperties.
type NetworkRuleBypassOptions ¶
type NetworkRuleBypassOptions string
NetworkRuleBypassOptions - Whether to allow trusted Azure services to access a network restricted registry.
const ( NetworkRuleBypassOptionsAzureServices NetworkRuleBypassOptions = "AzureServices" NetworkRuleBypassOptionsNone NetworkRuleBypassOptions = "None" )
func PossibleNetworkRuleBypassOptionsValues ¶
func PossibleNetworkRuleBypassOptionsValues() []NetworkRuleBypassOptions
PossibleNetworkRuleBypassOptionsValues returns the possible values for the NetworkRuleBypassOptions const type.
type NetworkRuleSet ¶
type NetworkRuleSet struct {
// REQUIRED; The default action of allow or deny when no other rules match.
DefaultAction *DefaultAction
// The IP ACL rules.
IPRules []*IPRule
}
NetworkRuleSet - The network rule set for a container registry.
func (NetworkRuleSet) MarshalJSON ¶
func (n NetworkRuleSet) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkRuleSet.
func (*NetworkRuleSet) UnmarshalJSON ¶
func (n *NetworkRuleSet) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkRuleSet.
type OperationDefinition ¶
type OperationDefinition struct {
// The display information for the container registry operation.
Display *OperationDisplayDefinition
// This property indicates if the operation is an action or a data action
// ref: https://docs.microsoft.com/en-us/azure/role-based-access-control/role-definitions#management-and-data-operations
IsDataAction *bool
// Operation name: {provider}/{resource}/{operation}.
Name *string
// The origin information of the container registry operation.
Origin *string
// The properties information for the container registry operation.
Properties *OperationPropertiesDefinition
}
OperationDefinition - The definition of a container registry operation.
func (OperationDefinition) MarshalJSON ¶
func (o OperationDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDefinition.
func (*OperationDefinition) UnmarshalJSON ¶
func (o *OperationDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDefinition.
type OperationDisplayDefinition ¶
type OperationDisplayDefinition struct {
// The description for the operation.
Description *string
// The operation that users can perform.
Operation *string
// The resource provider name: Microsoft.ContainerRegistry.
Provider *string
// The resource on which the operation is performed.
Resource *string
}
OperationDisplayDefinition - The display information for a container registry operation.
func (OperationDisplayDefinition) MarshalJSON ¶
func (o OperationDisplayDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplayDefinition.
func (*OperationDisplayDefinition) UnmarshalJSON ¶
func (o *OperationDisplayDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplayDefinition.
type OperationListResult ¶
type OperationListResult struct {
// The URI that can be used to request the next list of container registry operations.
NextLink *string
// The list of container registry operations. Since this list may be incomplete, the nextLink field should be used to request
// the next list of operations.
Value []*OperationDefinition
}
OperationListResult - The result of a request to list container registry operations.
func (OperationListResult) MarshalJSON ¶
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
type OperationLogSpecificationDefinition ¶
type OperationLogSpecificationDefinition struct {
// Log blob duration.
BlobDuration *string
// Log display name.
DisplayName *string
// Log name.
Name *string
}
OperationLogSpecificationDefinition - The definition of Azure Monitoring log.
func (OperationLogSpecificationDefinition) MarshalJSON ¶
func (o OperationLogSpecificationDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationLogSpecificationDefinition.
func (*OperationLogSpecificationDefinition) UnmarshalJSON ¶
func (o *OperationLogSpecificationDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationLogSpecificationDefinition.
type OperationMetricSpecificationDefinition ¶
type OperationMetricSpecificationDefinition struct {
// Metric aggregation type.
AggregationType *string
// Metric description.
DisplayDescription *string
// Metric display name.
DisplayName *string
// Internal metric name.
InternalMetricName *string
// Metric name.
Name *string
// Metric unit.
Unit *string
}
OperationMetricSpecificationDefinition - The definition of Azure Monitoring metric.
func (OperationMetricSpecificationDefinition) MarshalJSON ¶
func (o OperationMetricSpecificationDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationMetricSpecificationDefinition.
func (*OperationMetricSpecificationDefinition) UnmarshalJSON ¶
func (o *OperationMetricSpecificationDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationMetricSpecificationDefinition.
type OperationPropertiesDefinition ¶
type OperationPropertiesDefinition struct {
// The definition of Azure Monitoring service.
ServiceSpecification *OperationServiceSpecificationDefinition
}
OperationPropertiesDefinition - The definition of Azure Monitoring properties.
func (OperationPropertiesDefinition) MarshalJSON ¶
func (o OperationPropertiesDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationPropertiesDefinition.
func (*OperationPropertiesDefinition) UnmarshalJSON ¶
func (o *OperationPropertiesDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationPropertiesDefinition.
type OperationServiceSpecificationDefinition ¶
type OperationServiceSpecificationDefinition struct {
// A list of Azure Monitoring log definitions.
LogSpecifications []*OperationLogSpecificationDefinition
// A list of Azure Monitoring metrics definition.
MetricSpecifications []*OperationMetricSpecificationDefinition
}
OperationServiceSpecificationDefinition - The definition of Azure Monitoring list.
func (OperationServiceSpecificationDefinition) MarshalJSON ¶
func (o OperationServiceSpecificationDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationServiceSpecificationDefinition.
func (*OperationServiceSpecificationDefinition) UnmarshalJSON ¶
func (o *OperationServiceSpecificationDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationServiceSpecificationDefinition.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - Contains optional client configuration. Pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - List the operations for the provider
Generated from API version 2025-11-01
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: 2025-11-01/OperationList.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewOperationsClient().NewListPager(nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armcontainerregistry.OperationsClientListResponse{
// OperationListResult: armcontainerregistry.OperationListResult{
// Value: []*armcontainerregistry.OperationDefinition{
// {
// Name: to.Ptr("Microsoft.ContainerRegistry/locations/deleteVirtualNetworkOrSubnets/action"),
// Display: &armcontainerregistry.OperationDisplayDefinition{
// Provider: to.Ptr("Microsoft ContainerRegistry"),
// Resource: to.Ptr(""),
// Operation: to.Ptr("Delete virtual network or subnets notifications"),
// Description: to.Ptr("Notifies Microsoft.ContainerRegistry that virtual network or subnet is being deleted"),
// },
// },
// },
// },
// }
}
}
Output:
type OperationsClientListOptions ¶
type OperationsClientListOptions struct {
}
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct {
// The result of a request to list container registry operations.
OperationListResult
}
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type ParentProperties ¶
type ParentProperties struct {
// REQUIRED; The sync properties of the connected registry with its parent.
SyncProperties *SyncProperties
// The resource ID of the parent to which the connected registry will be associated.
ID *string
}
ParentProperties - The properties of the connected registry parent.
func (ParentProperties) MarshalJSON ¶
func (p ParentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ParentProperties.
func (*ParentProperties) UnmarshalJSON ¶
func (p *ParentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ParentProperties.
type PasswordName ¶
type PasswordName string
PasswordName - The password name.
const ( PasswordNamePassword PasswordName = "password" PasswordNamePassword2 PasswordName = "password2" )
func PossiblePasswordNameValues ¶
func PossiblePasswordNameValues() []PasswordName
PossiblePasswordNameValues returns the possible values for the PasswordName const type.
type Policies ¶
type Policies struct {
// The policy for using Azure Resource Manager audience token for a container registry.
AzureADAuthenticationAsArmPolicy *AzureADAuthenticationAsArmPolicy
// The export policy for a container registry.
ExportPolicy *ExportPolicy
// The quarantine policy for a container registry.
QuarantinePolicy *QuarantinePolicy
// The retention policy for a container registry.
RetentionPolicy *RetentionPolicy
// The content trust policy for a container registry.
TrustPolicy *TrustPolicy
}
Policies - The policies for a container registry.
func (Policies) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Policies.
func (*Policies) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Policies.
type PolicyStatus ¶
type PolicyStatus string
PolicyStatus - The value that indicates whether the policy is enabled or not.
const ( PolicyStatusDisabled PolicyStatus = "disabled" PolicyStatusEnabled PolicyStatus = "enabled" )
func PossiblePolicyStatusValues ¶
func PossiblePolicyStatusValues() []PolicyStatus
PossiblePolicyStatusValues returns the possible values for the PolicyStatus const type.
type PrivateEndpoint ¶
type PrivateEndpoint struct {
// This is private endpoint resource created with Microsoft.Network resource provider.
ID *string
}
PrivateEndpoint - The Private Endpoint resource.
func (PrivateEndpoint) MarshalJSON ¶
func (p PrivateEndpoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint.
func (*PrivateEndpoint) UnmarshalJSON ¶
func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint.
type PrivateEndpointConnection ¶
type PrivateEndpointConnection struct {
// The properties of a private endpoint connection.
Properties *PrivateEndpointConnectionProperties
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the private link resource.
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
PrivateEndpointConnection - An object that represents a private endpoint connection for a container registry.
func (PrivateEndpointConnection) MarshalJSON ¶
func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.
func (*PrivateEndpointConnection) UnmarshalJSON ¶
func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.
type PrivateEndpointConnectionListResult ¶
type PrivateEndpointConnectionListResult struct {
// The URI that can be used to request the next list of private endpoint connections.
NextLink *string
// The list of private endpoint connections. Since this list may be incomplete, the nextLink field should be used to request
// the next list of private endpoint connections.
Value []*PrivateEndpointConnection
}
PrivateEndpointConnectionListResult - The result of a request to list private endpoint connections for a container registry.
func (PrivateEndpointConnectionListResult) MarshalJSON ¶
func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult.
func (*PrivateEndpointConnectionListResult) UnmarshalJSON ¶
func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult.
type PrivateEndpointConnectionProperties ¶
type PrivateEndpointConnectionProperties struct {
// The resource of private endpoint.
PrivateEndpoint *PrivateEndpoint
// A collection of information about the state of the connection between service consumer and provider.
PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState
// READ-ONLY; The provisioning state of private endpoint connection resource.
ProvisioningState *ProvisioningState
}
PrivateEndpointConnectionProperties - The properties of a private endpoint connection.
func (PrivateEndpointConnectionProperties) MarshalJSON ¶
func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.
func (*PrivateEndpointConnectionProperties) UnmarshalJSON ¶
func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.
type PrivateEndpointConnectionsClient ¶
type PrivateEndpointConnectionsClient struct {
// contains filtered or unexported fields
}
PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead.
func NewPrivateEndpointConnectionsClient ¶
func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error)
NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - Contains optional client configuration. Pass nil to accept the default values.
func (*PrivateEndpointConnectionsClient) BeginCreateOrUpdate ¶
func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, privateEndpointConnectionName string, privateEndpointConnection PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateEndpointConnectionsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Update the state of specified private endpoint connection associated with the container registry. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- privateEndpointConnectionName - The name of the private endpoint connection.
- privateEndpointConnection - The parameters for creating a private endpoint connection.
- options - PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: 2025-11-01/PrivateEndpointConnectionCreateOrUpdate.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myRegistry", "myConnection", armcontainerregistry.PrivateEndpointConnection{
Properties: &armcontainerregistry.PrivateEndpointConnectionProperties{
PrivateLinkServiceConnectionState: &armcontainerregistry.PrivateLinkServiceConnectionState{
Status: to.Ptr(armcontainerregistry.ConnectionStatusApproved),
Description: to.Ptr("Auto-Approved"),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.PrivateEndpointConnectionsClientCreateOrUpdateResponse{
// PrivateEndpointConnection: &armcontainerregistry.PrivateEndpointConnection{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/privateEndpointConnections/myConnection"),
// Name: to.Ptr("myConnection"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/privateEndpointConnections"),
// Properties: &armcontainerregistry.PrivateEndpointConnectionProperties{
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// PrivateEndpoint: &armcontainerregistry.PrivateEndpoint{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/peexample01"),
// },
// PrivateLinkServiceConnectionState: &armcontainerregistry.PrivateLinkServiceConnectionState{
// Status: to.Ptr(armcontainerregistry.ConnectionStatusApproved),
// Description: to.Ptr("Auto-Approved"),
// ActionsRequired: to.Ptr(armcontainerregistry.ActionsRequiredNone),
// },
// },
// },
// }
}
Output:
func (*PrivateEndpointConnectionsClient) BeginDelete ¶
func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)
BeginDelete - Deletes the specified private endpoint connection associated with the container registry. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- privateEndpointConnectionName - The name of the private endpoint connection.
- options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
Example ¶
Generated from example definition: 2025-11-01/PrivateEndpointConnectionDelete.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginDelete(ctx, "myResourceGroup", "myRegistry", "myConnection", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.PrivateEndpointConnectionsClientDeleteResponse{
// }
}
Output:
func (*PrivateEndpointConnectionsClient) Get ¶
func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, registryName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error)
Get - Get the specified private endpoint connection associated with the container registry. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- privateEndpointConnectionName - The name of the private endpoint connection.
- options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
Example ¶
Generated from example definition: 2025-11-01/PrivateEndpointConnectionGet.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "myResourceGroup", "myRegistry", "myConnection", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.PrivateEndpointConnectionsClientGetResponse{
// PrivateEndpointConnection: &armcontainerregistry.PrivateEndpointConnection{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/privateEndpointConnections/myConnection"),
// Name: to.Ptr("myConnection"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/privateEndpointConnections"),
// Properties: &armcontainerregistry.PrivateEndpointConnectionProperties{
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// PrivateEndpoint: &armcontainerregistry.PrivateEndpoint{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/peexample01"),
// },
// PrivateLinkServiceConnectionState: &armcontainerregistry.PrivateLinkServiceConnectionState{
// Status: to.Ptr(armcontainerregistry.ConnectionStatusApproved),
// Description: to.Ptr("Auto-Approved"),
// ActionsRequired: to.Ptr(armcontainerregistry.ActionsRequiredNone),
// },
// },
// },
// }
}
Output:
func (*PrivateEndpointConnectionsClient) NewListPager ¶
func (client *PrivateEndpointConnectionsClient) NewListPager(resourceGroupName string, registryName string, options *PrivateEndpointConnectionsClientListOptions) *runtime.Pager[PrivateEndpointConnectionsClientListResponse]
NewListPager - List all private endpoint connections in a container registry.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager method.
Example ¶
Generated from example definition: 2025-11-01/PrivateEndpointConnectionList.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListPager("myResourceGroup", "myRegistry", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armcontainerregistry.PrivateEndpointConnectionsClientListResponse{
// PrivateEndpointConnectionListResult: armcontainerregistry.PrivateEndpointConnectionListResult{
// Value: []*armcontainerregistry.PrivateEndpointConnection{
// {
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/privateEndpointConnections/myConnection"),
// Name: to.Ptr("myConnection"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/privateEndpointConnections"),
// Properties: &armcontainerregistry.PrivateEndpointConnectionProperties{
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// PrivateEndpoint: &armcontainerregistry.PrivateEndpoint{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/peexample01"),
// },
// PrivateLinkServiceConnectionState: &armcontainerregistry.PrivateLinkServiceConnectionState{
// Status: to.Ptr(armcontainerregistry.ConnectionStatusApproved),
// Description: to.Ptr("Auto-Approved"),
// ActionsRequired: to.Ptr(armcontainerregistry.ActionsRequiredNone),
// },
// },
// },
// },
// },
// }
}
}
Output:
type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions ¶
type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate method.
type PrivateEndpointConnectionsClientBeginDeleteOptions ¶
type PrivateEndpointConnectionsClientBeginDeleteOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
type PrivateEndpointConnectionsClientCreateOrUpdateResponse ¶
type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct {
// An object that represents a private endpoint connection for a container registry.
PrivateEndpointConnection
}
PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.BeginCreateOrUpdate.
type PrivateEndpointConnectionsClientDeleteResponse ¶
type PrivateEndpointConnectionsClientDeleteResponse struct {
}
PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete.
type PrivateEndpointConnectionsClientGetOptions ¶
type PrivateEndpointConnectionsClientGetOptions struct {
}
PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
type PrivateEndpointConnectionsClientGetResponse ¶
type PrivateEndpointConnectionsClientGetResponse struct {
// An object that represents a private endpoint connection for a container registry.
PrivateEndpointConnection
}
PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.
type PrivateEndpointConnectionsClientListOptions ¶
type PrivateEndpointConnectionsClientListOptions struct {
}
PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager method.
type PrivateEndpointConnectionsClientListResponse ¶
type PrivateEndpointConnectionsClientListResponse struct {
// The result of a request to list private endpoint connections for a container registry.
PrivateEndpointConnectionListResult
}
PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.NewListPager.
type PrivateLinkResource ¶
type PrivateLinkResource struct {
// A resource that supports private link capabilities.
Properties *PrivateLinkResourceProperties
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the private link resource.
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
PrivateLinkResource - A private link resource.
func (PrivateLinkResource) MarshalJSON ¶
func (p PrivateLinkResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.
func (*PrivateLinkResource) UnmarshalJSON ¶
func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.
type PrivateLinkResourceListResult ¶
type PrivateLinkResourceListResult struct {
// The URI that can be used to request the next list of private link resources.
NextLink *string
// The list of private link resources. Since this list may be incomplete, the nextLink field should be used to request the
// next list of private link resources.
Value []*PrivateLinkResource
}
PrivateLinkResourceListResult - The result of a request to list private link resources for a container registry.
func (PrivateLinkResourceListResult) MarshalJSON ¶
func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult.
func (*PrivateLinkResourceListResult) UnmarshalJSON ¶
func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult.
type PrivateLinkResourceProperties ¶
type PrivateLinkResourceProperties struct {
// The private link resource private link DNS zone name.
RequiredZoneNames []*string
// READ-ONLY; The private link resource group id.
GroupID *string
// READ-ONLY; The private link resource required member names.
RequiredMembers []*string
}
PrivateLinkResourceProperties - Properties of a private link resource.
func (PrivateLinkResourceProperties) MarshalJSON ¶
func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.
func (*PrivateLinkResourceProperties) UnmarshalJSON ¶
func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.
type PrivateLinkServiceConnectionState ¶
type PrivateLinkServiceConnectionState struct {
// A message indicating if changes on the service provider require any updates on the consumer.
ActionsRequired *ActionsRequired
// The description for connection status. For example if connection is rejected it can indicate reason for rejection.
Description *string
// The private link service connection status.
Status *ConnectionStatus
}
PrivateLinkServiceConnectionState - The state of a private link service connection.
func (PrivateLinkServiceConnectionState) MarshalJSON ¶
func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState.
func (*PrivateLinkServiceConnectionState) UnmarshalJSON ¶
func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState.
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState - The provisioning state of the archive at the time the operation was called.
const ( ProvisioningStateCanceled ProvisioningState = "Canceled" ProvisioningStateCreating ProvisioningState = "Creating" ProvisioningStateDeleting ProvisioningState = "Deleting" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateSucceeded ProvisioningState = "Succeeded" ProvisioningStateUpdating ProvisioningState = "Updating" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type PublicNetworkAccess ¶
type PublicNetworkAccess string
PublicNetworkAccess - Whether or not public network access is allowed for the container registry.
const ( PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" )
func PossiblePublicNetworkAccessValues ¶
func PossiblePublicNetworkAccessValues() []PublicNetworkAccess
PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type.
type QuarantinePolicy ¶
type QuarantinePolicy struct {
// The value that indicates whether the policy is enabled or not.
Status *PolicyStatus
}
QuarantinePolicy - The quarantine policy for a container registry.
func (QuarantinePolicy) MarshalJSON ¶
func (q QuarantinePolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type QuarantinePolicy.
func (*QuarantinePolicy) UnmarshalJSON ¶
func (q *QuarantinePolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type QuarantinePolicy.
type RegenerateCredentialParameters ¶
type RegenerateCredentialParameters struct {
// REQUIRED; Specifies name of the password which should be regenerated -- password or password2.
Name *PasswordName
}
RegenerateCredentialParameters - The parameters used to regenerate the login credential.
func (RegenerateCredentialParameters) MarshalJSON ¶
func (r RegenerateCredentialParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RegenerateCredentialParameters.
func (*RegenerateCredentialParameters) UnmarshalJSON ¶
func (r *RegenerateCredentialParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RegenerateCredentialParameters.
type RegistriesClient ¶
type RegistriesClient struct {
// contains filtered or unexported fields
}
RegistriesClient contains the methods for the Registries group. Don't use this type directly, use NewRegistriesClient() instead.
func NewRegistriesClient ¶
func NewRegistriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistriesClient, error)
NewRegistriesClient creates a new instance of RegistriesClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - Contains optional client configuration. Pass nil to accept the default values.
func (*RegistriesClient) BeginCreate ¶
func (client *RegistriesClient) BeginCreate(ctx context.Context, resourceGroupName string, registryName string, registry Registry, options *RegistriesClientBeginCreateOptions) (*runtime.Poller[RegistriesClientCreateResponse], error)
BeginCreate - Creates a container registry with the specified parameters. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- registry - The parameters for creating a container registry.
- options - RegistriesClientBeginCreateOptions contains the optional parameters for the RegistriesClient.BeginCreate method.
Example (RegistryCreate) ¶
Generated from example definition: 2025-11-01/RegistryCreate.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewRegistriesClient().BeginCreate(ctx, "myResourceGroup", "myRegistry", armcontainerregistry.Registry{
Location: to.Ptr("westus"),
Tags: map[string]*string{
"key": to.Ptr("value"),
},
SKU: &armcontainerregistry.SKU{
Name: to.Ptr(armcontainerregistry.SKUNameStandard),
},
Properties: &armcontainerregistry.RegistryProperties{
AdminUserEnabled: to.Ptr(true),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.RegistriesClientCreateResponse{
// Registry: &armcontainerregistry.Registry{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry"),
// Name: to.Ptr("myRegistry"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries"),
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "key": to.Ptr("value"),
// },
// SKU: &armcontainerregistry.SKU{
// Name: to.Ptr(armcontainerregistry.SKUNameStandard),
// Tier: to.Ptr(armcontainerregistry.SKUTierStandard),
// },
// Properties: &armcontainerregistry.RegistryProperties{
// LoginServer: to.Ptr("myRegistry.azurecr.io"),
// CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-15T21:38:26.1537861Z"); return t}()),
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// AdminUserEnabled: to.Ptr(true),
// NetworkRuleSet: &armcontainerregistry.NetworkRuleSet{
// DefaultAction: to.Ptr(armcontainerregistry.DefaultActionAllow),
// IPRules: []*armcontainerregistry.IPRule{
// },
// },
// Policies: &armcontainerregistry.Policies{
// QuarantinePolicy: &armcontainerregistry.QuarantinePolicy{
// Status: to.Ptr(armcontainerregistry.PolicyStatusDisabled),
// },
// TrustPolicy: &armcontainerregistry.TrustPolicy{
// Type: to.Ptr(armcontainerregistry.TrustPolicyTypeNotary),
// Status: to.Ptr(armcontainerregistry.PolicyStatusDisabled),
// },
// RetentionPolicy: &armcontainerregistry.RetentionPolicy{
// Days: to.Ptr[int32](7),
// LastUpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-15T21:40:12.8506835+00:00"); return t}()),
// Status: to.Ptr(armcontainerregistry.PolicyStatusDisabled),
// },
// ExportPolicy: &armcontainerregistry.ExportPolicy{
// Status: to.Ptr(armcontainerregistry.ExportPolicyStatusEnabled),
// },
// AzureADAuthenticationAsArmPolicy: &armcontainerregistry.AzureADAuthenticationAsArmPolicy{
// Status: to.Ptr(armcontainerregistry.AzureADAuthenticationAsArmPolicyStatusEnabled),
// },
// },
// Encryption: &armcontainerregistry.EncryptionProperty{
// Status: to.Ptr(armcontainerregistry.EncryptionStatusDisabled),
// },
// DataEndpointEnabled: to.Ptr(false),
// DataEndpointHostNames: []*string{
// },
// PrivateEndpointConnections: []*armcontainerregistry.PrivateEndpointConnection{
// },
// PublicNetworkAccess: to.Ptr(armcontainerregistry.PublicNetworkAccessEnabled),
// NetworkRuleBypassOptions: to.Ptr(armcontainerregistry.NetworkRuleBypassOptionsAzureServices),
// NetworkRuleBypassAllowedForTasks: to.Ptr(false),
// ZoneRedundancy: to.Ptr(armcontainerregistry.ZoneRedundancyDisabled),
// AnonymousPullEnabled: to.Ptr(false),
// RoleAssignmentMode: to.Ptr(armcontainerregistry.RoleAssignmentModeLegacyRegistryPermissions),
// },
// },
// }
}
Output:
Example (RegistryCreateAbac) ¶
Generated from example definition: 2025-11-01/RegistryCreateAbac.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewRegistriesClient().BeginCreate(ctx, "myResourceGroup", "myRegistry", armcontainerregistry.Registry{
Location: to.Ptr("westus"),
Tags: map[string]*string{
"key": to.Ptr("value"),
},
SKU: &armcontainerregistry.SKU{
Name: to.Ptr(armcontainerregistry.SKUNameStandard),
},
Properties: &armcontainerregistry.RegistryProperties{
RoleAssignmentMode: to.Ptr(armcontainerregistry.RoleAssignmentModeAbacRepositoryPermissions),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.RegistriesClientCreateResponse{
// Registry: &armcontainerregistry.Registry{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry"),
// Name: to.Ptr("myRegistry"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries"),
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "key": to.Ptr("value"),
// },
// SKU: &armcontainerregistry.SKU{
// Name: to.Ptr(armcontainerregistry.SKUNameStandard),
// Tier: to.Ptr(armcontainerregistry.SKUTierStandard),
// },
// Properties: &armcontainerregistry.RegistryProperties{
// LoginServer: to.Ptr("myRegistry.azurecr.io"),
// CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-15T21:38:26.1537861Z"); return t}()),
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// AdminUserEnabled: to.Ptr(true),
// NetworkRuleSet: &armcontainerregistry.NetworkRuleSet{
// DefaultAction: to.Ptr(armcontainerregistry.DefaultActionAllow),
// IPRules: []*armcontainerregistry.IPRule{
// },
// },
// Policies: &armcontainerregistry.Policies{
// QuarantinePolicy: &armcontainerregistry.QuarantinePolicy{
// Status: to.Ptr(armcontainerregistry.PolicyStatusDisabled),
// },
// TrustPolicy: &armcontainerregistry.TrustPolicy{
// Type: to.Ptr(armcontainerregistry.TrustPolicyTypeNotary),
// Status: to.Ptr(armcontainerregistry.PolicyStatusDisabled),
// },
// RetentionPolicy: &armcontainerregistry.RetentionPolicy{
// Days: to.Ptr[int32](7),
// LastUpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-15T21:40:12.8506835+00:00"); return t}()),
// Status: to.Ptr(armcontainerregistry.PolicyStatusDisabled),
// },
// ExportPolicy: &armcontainerregistry.ExportPolicy{
// Status: to.Ptr(armcontainerregistry.ExportPolicyStatusEnabled),
// },
// },
// Encryption: &armcontainerregistry.EncryptionProperty{
// Status: to.Ptr(armcontainerregistry.EncryptionStatusDisabled),
// },
// DataEndpointEnabled: to.Ptr(false),
// DataEndpointHostNames: []*string{
// },
// PrivateEndpointConnections: []*armcontainerregistry.PrivateEndpointConnection{
// },
// PublicNetworkAccess: to.Ptr(armcontainerregistry.PublicNetworkAccessEnabled),
// NetworkRuleBypassOptions: to.Ptr(armcontainerregistry.NetworkRuleBypassOptionsAzureServices),
// NetworkRuleBypassAllowedForTasks: to.Ptr(false),
// ZoneRedundancy: to.Ptr(armcontainerregistry.ZoneRedundancyDisabled),
// AnonymousPullEnabled: to.Ptr(false),
// RoleAssignmentMode: to.Ptr(armcontainerregistry.RoleAssignmentModeAbacRepositoryPermissions),
// },
// },
// }
}
Output:
Example (RegistryCreateZoneRedundant) ¶
Generated from example definition: 2025-11-01/RegistryCreateZoneRedundant.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewRegistriesClient().BeginCreate(ctx, "myResourceGroup", "myRegistry", armcontainerregistry.Registry{
Location: to.Ptr("westus"),
Tags: map[string]*string{
"key": to.Ptr("value"),
},
SKU: &armcontainerregistry.SKU{
Name: to.Ptr(armcontainerregistry.SKUNameStandard),
},
Properties: &armcontainerregistry.RegistryProperties{
ZoneRedundancy: to.Ptr(armcontainerregistry.ZoneRedundancyEnabled),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.RegistriesClientCreateResponse{
// Registry: &armcontainerregistry.Registry{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry"),
// Name: to.Ptr("myRegistry"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries"),
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "key": to.Ptr("value"),
// },
// SKU: &armcontainerregistry.SKU{
// Name: to.Ptr(armcontainerregistry.SKUNameStandard),
// Tier: to.Ptr(armcontainerregistry.SKUTierStandard),
// },
// Properties: &armcontainerregistry.RegistryProperties{
// LoginServer: to.Ptr("myRegistry.azurecr.io"),
// CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-15T21:38:26.1537861Z"); return t}()),
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// AdminUserEnabled: to.Ptr(false),
// NetworkRuleSet: &armcontainerregistry.NetworkRuleSet{
// DefaultAction: to.Ptr(armcontainerregistry.DefaultActionAllow),
// IPRules: []*armcontainerregistry.IPRule{
// },
// },
// Policies: &armcontainerregistry.Policies{
// QuarantinePolicy: &armcontainerregistry.QuarantinePolicy{
// Status: to.Ptr(armcontainerregistry.PolicyStatusDisabled),
// },
// TrustPolicy: &armcontainerregistry.TrustPolicy{
// Type: to.Ptr(armcontainerregistry.TrustPolicyTypeNotary),
// Status: to.Ptr(armcontainerregistry.PolicyStatusDisabled),
// },
// RetentionPolicy: &armcontainerregistry.RetentionPolicy{
// Days: to.Ptr[int32](7),
// LastUpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-15T21:40:12.8506835+00:00"); return t}()),
// Status: to.Ptr(armcontainerregistry.PolicyStatusDisabled),
// },
// ExportPolicy: &armcontainerregistry.ExportPolicy{
// Status: to.Ptr(armcontainerregistry.ExportPolicyStatusEnabled),
// },
// AzureADAuthenticationAsArmPolicy: &armcontainerregistry.AzureADAuthenticationAsArmPolicy{
// Status: to.Ptr(armcontainerregistry.AzureADAuthenticationAsArmPolicyStatusEnabled),
// },
// },
// Encryption: &armcontainerregistry.EncryptionProperty{
// Status: to.Ptr(armcontainerregistry.EncryptionStatusDisabled),
// },
// DataEndpointEnabled: to.Ptr(false),
// DataEndpointHostNames: []*string{
// },
// PrivateEndpointConnections: []*armcontainerregistry.PrivateEndpointConnection{
// },
// PublicNetworkAccess: to.Ptr(armcontainerregistry.PublicNetworkAccessEnabled),
// NetworkRuleBypassOptions: to.Ptr(armcontainerregistry.NetworkRuleBypassOptionsAzureServices),
// NetworkRuleBypassAllowedForTasks: to.Ptr(false),
// ZoneRedundancy: to.Ptr(armcontainerregistry.ZoneRedundancyEnabled),
// AnonymousPullEnabled: to.Ptr(false),
// RoleAssignmentMode: to.Ptr(armcontainerregistry.RoleAssignmentModeLegacyRegistryPermissions),
// },
// },
// }
}
Output:
func (*RegistriesClient) BeginDelete ¶
func (client *RegistriesClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, options *RegistriesClientBeginDeleteOptions) (*runtime.Poller[RegistriesClientDeleteResponse], error)
BeginDelete - Deletes a container registry. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- options - RegistriesClientBeginDeleteOptions contains the optional parameters for the RegistriesClient.BeginDelete method.
Example ¶
Generated from example definition: 2025-11-01/RegistryDelete.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewRegistriesClient().BeginDelete(ctx, "myResourceGroup", "myRegistry", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.RegistriesClientDeleteResponse{
// }
}
Output:
func (*RegistriesClient) BeginGenerateCredentials ¶
func (client *RegistriesClient) BeginGenerateCredentials(ctx context.Context, resourceGroupName string, registryName string, generateCredentialsParameters GenerateCredentialsParameters, options *RegistriesClientBeginGenerateCredentialsOptions) (*runtime.Poller[RegistriesClientGenerateCredentialsResponse], error)
BeginGenerateCredentials - Generate keys for a token of a specified container registry. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- generateCredentialsParameters - The parameters for generating credentials.
- options - RegistriesClientBeginGenerateCredentialsOptions contains the optional parameters for the RegistriesClient.BeginGenerateCredentials method.
Example ¶
Generated from example definition: 2025-11-01/RegistryGenerateCredentials.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
"time"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewRegistriesClient().BeginGenerateCredentials(ctx, "myResourceGroup", "myRegistry", armcontainerregistry.GenerateCredentialsParameters{
TokenID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken"),
Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-31T15:59:59.0707808Z"); return t }()),
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.RegistriesClientGenerateCredentialsResponse{
// GenerateCredentialsResult: &armcontainerregistry.GenerateCredentialsResult{
// Username: to.Ptr("myToken"),
// Passwords: []*armcontainerregistry.TokenPassword{
// {
// Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-31T15:59:59.0707808Z"); return t}()),
// Name: to.Ptr(armcontainerregistry.TokenPasswordNamePassword1),
// Value: to.Ptr("00000000000000000000000000000000"),
// },
// {
// Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-31T15:59:59.0707808Z"); return t}()),
// Name: to.Ptr(armcontainerregistry.TokenPasswordNamePassword2),
// Value: to.Ptr("00000000000000000000000000000000"),
// },
// },
// },
// }
}
Output:
func (*RegistriesClient) BeginImportImage ¶
func (client *RegistriesClient) BeginImportImage(ctx context.Context, resourceGroupName string, registryName string, parameters ImportImageParameters, options *RegistriesClientBeginImportImageOptions) (*runtime.Poller[RegistriesClientImportImageResponse], error)
BeginImportImage - Copies an image to this container registry from the specified container registry. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- parameters - The parameters specifying the image to copy and the source container registry.
- options - RegistriesClientBeginImportImageOptions contains the optional parameters for the RegistriesClient.BeginImportImage method.
Example (ImportImageByManifestDigest) ¶
Generated from example definition: 2025-11-01/ImportImageByManifestDigest.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewRegistriesClient().BeginImportImage(ctx, "myResourceGroup", "myRegistry", armcontainerregistry.ImportImageParameters{
Source: &armcontainerregistry.ImportSource{
ResourceID: to.Ptr("/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/sourceResourceGroup/providers/Microsoft.ContainerRegistry/registries/sourceRegistry"),
SourceImage: to.Ptr("sourceRepository@sha256:0000000000000000000000000000000000000000000000000000000000000000"),
},
TargetTags: []*string{
to.Ptr("targetRepository:targetTag"),
},
UntaggedTargetRepositories: []*string{
to.Ptr("targetRepository1"),
},
Mode: to.Ptr(armcontainerregistry.ImportModeForce),
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.RegistriesClientImportImageResponse{
// }
}
Output:
Example (ImportImageByTag) ¶
Generated from example definition: 2025-11-01/ImportImageByTag.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewRegistriesClient().BeginImportImage(ctx, "myResourceGroup", "myRegistry", armcontainerregistry.ImportImageParameters{
Source: &armcontainerregistry.ImportSource{
ResourceID: to.Ptr("/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/sourceResourceGroup/providers/Microsoft.ContainerRegistry/registries/sourceRegistry"),
SourceImage: to.Ptr("sourceRepository:sourceTag"),
},
TargetTags: []*string{
to.Ptr("targetRepository:targetTag"),
},
UntaggedTargetRepositories: []*string{
to.Ptr("targetRepository1"),
},
Mode: to.Ptr(armcontainerregistry.ImportModeForce),
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.RegistriesClientImportImageResponse{
// }
}
Output:
Example (ImportImageFromPublicRegistry) ¶
Generated from example definition: 2025-11-01/ImportImageFromPublicRegistry.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewRegistriesClient().BeginImportImage(ctx, "myResourceGroup", "myRegistry", armcontainerregistry.ImportImageParameters{
Source: &armcontainerregistry.ImportSource{
RegistryURI: to.Ptr("registry.hub.docker.com"),
SourceImage: to.Ptr("library/hello-world"),
},
TargetTags: []*string{
to.Ptr("targetRepository:targetTag"),
},
UntaggedTargetRepositories: []*string{
to.Ptr("targetRepository1"),
},
Mode: to.Ptr(armcontainerregistry.ImportModeForce),
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.RegistriesClientImportImageResponse{
// }
}
Output:
func (*RegistriesClient) BeginUpdate ¶
func (client *RegistriesClient) BeginUpdate(ctx context.Context, resourceGroupName string, registryName string, registryUpdateParameters RegistryUpdateParameters, options *RegistriesClientBeginUpdateOptions) (*runtime.Poller[RegistriesClientUpdateResponse], error)
BeginUpdate - Updates a container registry with the specified parameters. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- registryUpdateParameters - The parameters for updating a container registry.
- options - RegistriesClientBeginUpdateOptions contains the optional parameters for the RegistriesClient.BeginUpdate method.
Example ¶
Generated from example definition: 2025-11-01/RegistryUpdate.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewRegistriesClient().BeginUpdate(ctx, "myResourceGroup", "myRegistry", armcontainerregistry.RegistryUpdateParameters{
Tags: map[string]*string{
"key": to.Ptr("value"),
},
SKU: &armcontainerregistry.SKU{
Name: to.Ptr(armcontainerregistry.SKUNameStandard),
},
Properties: &armcontainerregistry.RegistryPropertiesUpdateParameters{
AdminUserEnabled: to.Ptr(true),
RoleAssignmentMode: to.Ptr(armcontainerregistry.RoleAssignmentModeAbacRepositoryPermissions),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.RegistriesClientUpdateResponse{
// Registry: &armcontainerregistry.Registry{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry"),
// Name: to.Ptr("myRegistry"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries"),
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "key": to.Ptr("value"),
// },
// SKU: &armcontainerregistry.SKU{
// Name: to.Ptr(armcontainerregistry.SKUNameStandard),
// Tier: to.Ptr(armcontainerregistry.SKUTierStandard),
// },
// Properties: &armcontainerregistry.RegistryProperties{
// LoginServer: to.Ptr("myRegistry.azurecr.io"),
// CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-15T21:38:26.1537861Z"); return t}()),
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// AdminUserEnabled: to.Ptr(true),
// NetworkRuleSet: &armcontainerregistry.NetworkRuleSet{
// DefaultAction: to.Ptr(armcontainerregistry.DefaultActionAllow),
// IPRules: []*armcontainerregistry.IPRule{
// },
// },
// Policies: &armcontainerregistry.Policies{
// QuarantinePolicy: &armcontainerregistry.QuarantinePolicy{
// Status: to.Ptr(armcontainerregistry.PolicyStatusDisabled),
// },
// TrustPolicy: &armcontainerregistry.TrustPolicy{
// Type: to.Ptr(armcontainerregistry.TrustPolicyTypeNotary),
// Status: to.Ptr(armcontainerregistry.PolicyStatusDisabled),
// },
// RetentionPolicy: &armcontainerregistry.RetentionPolicy{
// Days: to.Ptr[int32](7),
// LastUpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-15T21:40:12.8506835+00:00"); return t}()),
// Status: to.Ptr(armcontainerregistry.PolicyStatusDisabled),
// },
// ExportPolicy: &armcontainerregistry.ExportPolicy{
// Status: to.Ptr(armcontainerregistry.ExportPolicyStatusEnabled),
// },
// AzureADAuthenticationAsArmPolicy: &armcontainerregistry.AzureADAuthenticationAsArmPolicy{
// Status: to.Ptr(armcontainerregistry.AzureADAuthenticationAsArmPolicyStatusEnabled),
// },
// },
// Encryption: &armcontainerregistry.EncryptionProperty{
// Status: to.Ptr(armcontainerregistry.EncryptionStatusDisabled),
// },
// DataEndpointEnabled: to.Ptr(false),
// DataEndpointHostNames: []*string{
// },
// PrivateEndpointConnections: []*armcontainerregistry.PrivateEndpointConnection{
// },
// PublicNetworkAccess: to.Ptr(armcontainerregistry.PublicNetworkAccessEnabled),
// NetworkRuleBypassOptions: to.Ptr(armcontainerregistry.NetworkRuleBypassOptionsAzureServices),
// NetworkRuleBypassAllowedForTasks: to.Ptr(false),
// ZoneRedundancy: to.Ptr(armcontainerregistry.ZoneRedundancyDisabled),
// AnonymousPullEnabled: to.Ptr(false),
// RoleAssignmentMode: to.Ptr(armcontainerregistry.RoleAssignmentModeAbacRepositoryPermissions),
// },
// },
// }
}
Output:
func (*RegistriesClient) CheckNameAvailability ¶
func (client *RegistriesClient) CheckNameAvailability(ctx context.Context, registryNameCheckRequest RegistryNameCheckRequest, options *RegistriesClientCheckNameAvailabilityOptions) (RegistriesClientCheckNameAvailabilityResponse, error)
CheckNameAvailability - Checks whether the container registry name is available for use. The name must contain only alphanumeric characters, be globally unique, and between 5 and 50 characters in length. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- registryNameCheckRequest - The request body
- options - RegistriesClientCheckNameAvailabilityOptions contains the optional parameters for the RegistriesClient.CheckNameAvailability method.
Example (RegistryCheckNameAvailable) ¶
Generated from example definition: 2025-11-01/RegistryCheckNameAvailable.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewRegistriesClient().CheckNameAvailability(ctx, armcontainerregistry.RegistryNameCheckRequest{
Name: to.Ptr("myRegistry"),
Type: to.Ptr("Microsoft.ContainerRegistry/registries"),
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.RegistriesClientCheckNameAvailabilityResponse{
// RegistryNameStatus: &armcontainerregistry.RegistryNameStatus{
// NameAvailable: to.Ptr(true),
// },
// }
}
Output:
Example (RegistryCheckNameNotAvailable) ¶
Generated from example definition: 2025-11-01/RegistryCheckNameNotAvailable.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewRegistriesClient().CheckNameAvailability(ctx, armcontainerregistry.RegistryNameCheckRequest{
Name: to.Ptr("myRegistry"),
Type: to.Ptr("Microsoft.ContainerRegistry/registries"),
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.RegistriesClientCheckNameAvailabilityResponse{
// RegistryNameStatus: &armcontainerregistry.RegistryNameStatus{
// NameAvailable: to.Ptr(false),
// Reason: to.Ptr("AlreadyExists"),
// Message: to.Ptr("The registry myRegistry is already in use."),
// },
// }
}
Output:
func (*RegistriesClient) Get ¶
func (client *RegistriesClient) Get(ctx context.Context, resourceGroupName string, registryName string, options *RegistriesClientGetOptions) (RegistriesClientGetResponse, error)
Get - Gets the properties of the specified container registry. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- options - RegistriesClientGetOptions contains the optional parameters for the RegistriesClient.Get method.
Example ¶
Generated from example definition: 2025-11-01/RegistryGet.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewRegistriesClient().Get(ctx, "myResourceGroup", "myRegistry", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.RegistriesClientGetResponse{
// Registry: &armcontainerregistry.Registry{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry"),
// Name: to.Ptr("myRegistry"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries"),
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "key": to.Ptr("value"),
// },
// SKU: &armcontainerregistry.SKU{
// Name: to.Ptr(armcontainerregistry.SKUNameStandard),
// Tier: to.Ptr(armcontainerregistry.SKUTierStandard),
// },
// Properties: &armcontainerregistry.RegistryProperties{
// LoginServer: to.Ptr("myRegistry.azurecr.io"),
// CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-15T21:38:26.1537861Z"); return t}()),
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// AdminUserEnabled: to.Ptr(false),
// NetworkRuleSet: &armcontainerregistry.NetworkRuleSet{
// DefaultAction: to.Ptr(armcontainerregistry.DefaultActionAllow),
// IPRules: []*armcontainerregistry.IPRule{
// },
// },
// Policies: &armcontainerregistry.Policies{
// QuarantinePolicy: &armcontainerregistry.QuarantinePolicy{
// Status: to.Ptr(armcontainerregistry.PolicyStatusDisabled),
// },
// TrustPolicy: &armcontainerregistry.TrustPolicy{
// Type: to.Ptr(armcontainerregistry.TrustPolicyTypeNotary),
// Status: to.Ptr(armcontainerregistry.PolicyStatusDisabled),
// },
// RetentionPolicy: &armcontainerregistry.RetentionPolicy{
// Days: to.Ptr[int32](7),
// LastUpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-15T21:40:12.8506835+00:00"); return t}()),
// Status: to.Ptr(armcontainerregistry.PolicyStatusDisabled),
// },
// ExportPolicy: &armcontainerregistry.ExportPolicy{
// Status: to.Ptr(armcontainerregistry.ExportPolicyStatusEnabled),
// },
// AzureADAuthenticationAsArmPolicy: &armcontainerregistry.AzureADAuthenticationAsArmPolicy{
// Status: to.Ptr(armcontainerregistry.AzureADAuthenticationAsArmPolicyStatusEnabled),
// },
// },
// Encryption: &armcontainerregistry.EncryptionProperty{
// Status: to.Ptr(armcontainerregistry.EncryptionStatusDisabled),
// },
// DataEndpointEnabled: to.Ptr(false),
// DataEndpointHostNames: []*string{
// },
// PrivateEndpointConnections: []*armcontainerregistry.PrivateEndpointConnection{
// },
// PublicNetworkAccess: to.Ptr(armcontainerregistry.PublicNetworkAccessEnabled),
// NetworkRuleBypassOptions: to.Ptr(armcontainerregistry.NetworkRuleBypassOptionsAzureServices),
// NetworkRuleBypassAllowedForTasks: to.Ptr(false),
// ZoneRedundancy: to.Ptr(armcontainerregistry.ZoneRedundancyDisabled),
// AnonymousPullEnabled: to.Ptr(false),
// RoleAssignmentMode: to.Ptr(armcontainerregistry.RoleAssignmentModeLegacyRegistryPermissions),
// },
// },
// }
}
Output:
func (*RegistriesClient) GetPrivateLinkResource ¶
func (client *RegistriesClient) GetPrivateLinkResource(ctx context.Context, resourceGroupName string, registryName string, groupName string, options *RegistriesClientGetPrivateLinkResourceOptions) (RegistriesClientGetPrivateLinkResourceResponse, error)
GetPrivateLinkResource - Gets a private link resource by a specified group name for a container registry. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- groupName - The name of the private link associated with the Azure resource.
- options - RegistriesClientGetPrivateLinkResourceOptions contains the optional parameters for the RegistriesClient.GetPrivateLinkResource method.
Example ¶
Generated from example definition: 2025-11-01/RegistryGetPrivateLinkResource.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewRegistriesClient().GetPrivateLinkResource(ctx, "myResourceGroup", "myRegistry", "registry", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.RegistriesClientGetPrivateLinkResourceResponse{
// PrivateLinkResource: &armcontainerregistry.PrivateLinkResource{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/privateLinkResources/registry"),
// Name: to.Ptr("registry"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/privateLinkResources"),
// Properties: &armcontainerregistry.PrivateLinkResourceProperties{
// GroupID: to.Ptr("registry"),
// RequiredMembers: []*string{
// to.Ptr("registry"),
// to.Ptr("registry_data_myregion"),
// },
// RequiredZoneNames: []*string{
// to.Ptr("privatelink.azurecr.io"),
// },
// },
// },
// }
}
Output:
func (*RegistriesClient) ListCredentials ¶
func (client *RegistriesClient) ListCredentials(ctx context.Context, resourceGroupName string, registryName string, options *RegistriesClientListCredentialsOptions) (RegistriesClientListCredentialsResponse, error)
ListCredentials - Lists the login credentials for the specified container registry. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- options - RegistriesClientListCredentialsOptions contains the optional parameters for the RegistriesClient.ListCredentials method.
Example ¶
Generated from example definition: 2025-11-01/RegistryListCredentials.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewRegistriesClient().ListCredentials(ctx, "myResourceGroup", "myRegistry", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.RegistriesClientListCredentialsResponse{
// RegistryListCredentialsResult: &armcontainerregistry.RegistryListCredentialsResult{
// Username: to.Ptr("myRegistry"),
// Passwords: []*armcontainerregistry.RegistryPassword{
// {
// Name: to.Ptr(armcontainerregistry.PasswordNamePassword),
// Value: to.Ptr("00000000000000000000000000000000"),
// },
// {
// Name: to.Ptr(armcontainerregistry.PasswordNamePassword2),
// Value: to.Ptr("00000000000000000000000000000000"),
// },
// },
// },
// }
}
Output:
func (*RegistriesClient) ListUsages ¶
func (client *RegistriesClient) ListUsages(ctx context.Context, resourceGroupName string, registryName string, options *RegistriesClientListUsagesOptions) (RegistriesClientListUsagesResponse, error)
ListUsages - Gets the quota usages for the specified container registry. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- options - RegistriesClientListUsagesOptions contains the optional parameters for the RegistriesClient.ListUsages method.
Example ¶
Generated from example definition: 2025-11-01/RegistryListUsages.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewRegistriesClient().ListUsages(ctx, "myResourceGroup", "myRegistry", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.RegistriesClientListUsagesResponse{
// RegistryUsageListResult: &armcontainerregistry.RegistryUsageListResult{
// Value: []*armcontainerregistry.RegistryUsage{
// {
// Name: to.Ptr("Size"),
// Limit: to.Ptr[int64](107374182400),
// CurrentValue: to.Ptr[int64](12345678),
// Unit: to.Ptr(armcontainerregistry.RegistryUsageUnitBytes),
// },
// {
// Name: to.Ptr("Webhooks"),
// Limit: to.Ptr[int64](10),
// CurrentValue: to.Ptr[int64](2),
// Unit: to.Ptr(armcontainerregistry.RegistryUsageUnitCount),
// },
// },
// },
// }
}
Output:
func (*RegistriesClient) NewListByResourceGroupPager ¶
func (client *RegistriesClient) NewListByResourceGroupPager(resourceGroupName string, options *RegistriesClientListByResourceGroupOptions) *runtime.Pager[RegistriesClientListByResourceGroupResponse]
NewListByResourceGroupPager - Lists all the container registries under the specified resource group.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - RegistriesClientListByResourceGroupOptions contains the optional parameters for the RegistriesClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: 2025-11-01/RegistryListByResourceGroup.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewRegistriesClient().NewListByResourceGroupPager("myResourceGroup", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armcontainerregistry.RegistriesClientListByResourceGroupResponse{
// RegistryListResult: armcontainerregistry.RegistryListResult{
// Value: []*armcontainerregistry.Registry{
// {
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry"),
// Name: to.Ptr("myRegistry"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries"),
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "key": to.Ptr("value"),
// },
// SKU: &armcontainerregistry.SKU{
// Name: to.Ptr(armcontainerregistry.SKUNameStandard),
// Tier: to.Ptr(armcontainerregistry.SKUTierStandard),
// },
// Properties: &armcontainerregistry.RegistryProperties{
// LoginServer: to.Ptr("myRegistry.azurecr.io"),
// CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-15T21:38:26.1537861Z"); return t}()),
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// AdminUserEnabled: to.Ptr(false),
// NetworkRuleSet: &armcontainerregistry.NetworkRuleSet{
// DefaultAction: to.Ptr(armcontainerregistry.DefaultActionAllow),
// IPRules: []*armcontainerregistry.IPRule{
// },
// },
// Policies: &armcontainerregistry.Policies{
// QuarantinePolicy: &armcontainerregistry.QuarantinePolicy{
// Status: to.Ptr(armcontainerregistry.PolicyStatusDisabled),
// },
// TrustPolicy: &armcontainerregistry.TrustPolicy{
// Type: to.Ptr(armcontainerregistry.TrustPolicyTypeNotary),
// Status: to.Ptr(armcontainerregistry.PolicyStatusDisabled),
// },
// RetentionPolicy: &armcontainerregistry.RetentionPolicy{
// Days: to.Ptr[int32](7),
// LastUpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-15T21:40:12.8506835+00:00"); return t}()),
// Status: to.Ptr(armcontainerregistry.PolicyStatusDisabled),
// },
// ExportPolicy: &armcontainerregistry.ExportPolicy{
// Status: to.Ptr(armcontainerregistry.ExportPolicyStatusEnabled),
// },
// AzureADAuthenticationAsArmPolicy: &armcontainerregistry.AzureADAuthenticationAsArmPolicy{
// Status: to.Ptr(armcontainerregistry.AzureADAuthenticationAsArmPolicyStatusEnabled),
// },
// },
// Encryption: &armcontainerregistry.EncryptionProperty{
// Status: to.Ptr(armcontainerregistry.EncryptionStatusDisabled),
// },
// DataEndpointEnabled: to.Ptr(false),
// DataEndpointHostNames: []*string{
// },
// PrivateEndpointConnections: []*armcontainerregistry.PrivateEndpointConnection{
// },
// PublicNetworkAccess: to.Ptr(armcontainerregistry.PublicNetworkAccessEnabled),
// NetworkRuleBypassOptions: to.Ptr(armcontainerregistry.NetworkRuleBypassOptionsAzureServices),
// NetworkRuleBypassAllowedForTasks: to.Ptr(false),
// ZoneRedundancy: to.Ptr(armcontainerregistry.ZoneRedundancyDisabled),
// AnonymousPullEnabled: to.Ptr(false),
// RoleAssignmentMode: to.Ptr(armcontainerregistry.RoleAssignmentModeLegacyRegistryPermissions),
// },
// },
// },
// },
// }
}
}
Output:
func (*RegistriesClient) NewListPager ¶
func (client *RegistriesClient) NewListPager(options *RegistriesClientListOptions) *runtime.Pager[RegistriesClientListResponse]
NewListPager - Lists all the container registries under the specified subscription.
Generated from API version 2025-11-01
- options - RegistriesClientListOptions contains the optional parameters for the RegistriesClient.NewListPager method.
Example ¶
Generated from example definition: 2025-11-01/RegistryList.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewRegistriesClient().NewListPager(nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armcontainerregistry.RegistriesClientListResponse{
// RegistryListResult: armcontainerregistry.RegistryListResult{
// Value: []*armcontainerregistry.Registry{
// {
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry"),
// Name: to.Ptr("myRegistry"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries"),
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "key": to.Ptr("value"),
// },
// SKU: &armcontainerregistry.SKU{
// Name: to.Ptr(armcontainerregistry.SKUNameStandard),
// Tier: to.Ptr(armcontainerregistry.SKUTierStandard),
// },
// Properties: &armcontainerregistry.RegistryProperties{
// LoginServer: to.Ptr("myRegistry.azurecr.io"),
// CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-15T21:38:26.1537861Z"); return t}()),
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// AdminUserEnabled: to.Ptr(false),
// NetworkRuleSet: &armcontainerregistry.NetworkRuleSet{
// DefaultAction: to.Ptr(armcontainerregistry.DefaultActionAllow),
// IPRules: []*armcontainerregistry.IPRule{
// },
// },
// Policies: &armcontainerregistry.Policies{
// QuarantinePolicy: &armcontainerregistry.QuarantinePolicy{
// Status: to.Ptr(armcontainerregistry.PolicyStatusDisabled),
// },
// TrustPolicy: &armcontainerregistry.TrustPolicy{
// Type: to.Ptr(armcontainerregistry.TrustPolicyTypeNotary),
// Status: to.Ptr(armcontainerregistry.PolicyStatusDisabled),
// },
// RetentionPolicy: &armcontainerregistry.RetentionPolicy{
// Days: to.Ptr[int32](7),
// LastUpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-15T21:40:12.8506835+00:00"); return t}()),
// Status: to.Ptr(armcontainerregistry.PolicyStatusDisabled),
// },
// ExportPolicy: &armcontainerregistry.ExportPolicy{
// Status: to.Ptr(armcontainerregistry.ExportPolicyStatusEnabled),
// },
// AzureADAuthenticationAsArmPolicy: &armcontainerregistry.AzureADAuthenticationAsArmPolicy{
// Status: to.Ptr(armcontainerregistry.AzureADAuthenticationAsArmPolicyStatusEnabled),
// },
// },
// Encryption: &armcontainerregistry.EncryptionProperty{
// Status: to.Ptr(armcontainerregistry.EncryptionStatusDisabled),
// },
// DataEndpointEnabled: to.Ptr(false),
// DataEndpointHostNames: []*string{
// },
// PrivateEndpointConnections: []*armcontainerregistry.PrivateEndpointConnection{
// },
// PublicNetworkAccess: to.Ptr(armcontainerregistry.PublicNetworkAccessEnabled),
// NetworkRuleBypassOptions: to.Ptr(armcontainerregistry.NetworkRuleBypassOptionsAzureServices),
// NetworkRuleBypassAllowedForTasks: to.Ptr(false),
// ZoneRedundancy: to.Ptr(armcontainerregistry.ZoneRedundancyDisabled),
// AnonymousPullEnabled: to.Ptr(false),
// RoleAssignmentMode: to.Ptr(armcontainerregistry.RoleAssignmentModeLegacyRegistryPermissions),
// },
// },
// },
// },
// }
}
}
Output:
func (*RegistriesClient) NewListPrivateLinkResourcesPager ¶
func (client *RegistriesClient) NewListPrivateLinkResourcesPager(resourceGroupName string, registryName string, options *RegistriesClientListPrivateLinkResourcesOptions) *runtime.Pager[RegistriesClientListPrivateLinkResourcesResponse]
NewListPrivateLinkResourcesPager - Lists the private link resources for a container registry.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- options - RegistriesClientListPrivateLinkResourcesOptions contains the optional parameters for the RegistriesClient.NewListPrivateLinkResourcesPager method.
Example ¶
Generated from example definition: 2025-11-01/RegistryListPrivateLinkResources.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewRegistriesClient().NewListPrivateLinkResourcesPager("myResourceGroup", "myRegistry", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armcontainerregistry.RegistriesClientListPrivateLinkResourcesResponse{
// PrivateLinkResourceListResult: armcontainerregistry.PrivateLinkResourceListResult{
// Value: []*armcontainerregistry.PrivateLinkResource{
// {
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/privateLinkResources/registry"),
// Name: to.Ptr("registry"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/privateLinkResources"),
// Properties: &armcontainerregistry.PrivateLinkResourceProperties{
// GroupID: to.Ptr("registry"),
// RequiredMembers: []*string{
// to.Ptr("registry"),
// to.Ptr("registry_data_myregion"),
// },
// RequiredZoneNames: []*string{
// to.Ptr("privatelink.azurecr.io"),
// },
// },
// },
// },
// },
// }
}
}
Output:
func (*RegistriesClient) RegenerateCredential ¶
func (client *RegistriesClient) RegenerateCredential(ctx context.Context, resourceGroupName string, registryName string, regenerateCredentialParameters RegenerateCredentialParameters, options *RegistriesClientRegenerateCredentialOptions) (RegistriesClientRegenerateCredentialResponse, error)
RegenerateCredential - Regenerates one of the login credentials for the specified container registry. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- regenerateCredentialParameters - Specifies name of the password which should be regenerated -- password or password2.
- options - RegistriesClientRegenerateCredentialOptions contains the optional parameters for the RegistriesClient.RegenerateCredential method.
Example ¶
Generated from example definition: 2025-11-01/RegistryRegenerateCredential.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewRegistriesClient().RegenerateCredential(ctx, "myResourceGroup", "myRegistry", armcontainerregistry.RegenerateCredentialParameters{
Name: to.Ptr(armcontainerregistry.PasswordNamePassword),
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.RegistriesClientRegenerateCredentialResponse{
// RegistryListCredentialsResult: &armcontainerregistry.RegistryListCredentialsResult{
// Username: to.Ptr("myRegistry"),
// Passwords: []*armcontainerregistry.RegistryPassword{
// {
// Name: to.Ptr(armcontainerregistry.PasswordNamePassword),
// Value: to.Ptr("00000000000000000000000000000000"),
// },
// {
// Name: to.Ptr(armcontainerregistry.PasswordNamePassword2),
// Value: to.Ptr("00000000000000000000000000000000"),
// },
// },
// },
// }
}
Output:
type RegistriesClientBeginCreateOptions ¶
type RegistriesClientBeginCreateOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
RegistriesClientBeginCreateOptions contains the optional parameters for the RegistriesClient.BeginCreate method.
type RegistriesClientBeginDeleteOptions ¶
type RegistriesClientBeginDeleteOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
RegistriesClientBeginDeleteOptions contains the optional parameters for the RegistriesClient.BeginDelete method.
type RegistriesClientBeginGenerateCredentialsOptions ¶
type RegistriesClientBeginGenerateCredentialsOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
RegistriesClientBeginGenerateCredentialsOptions contains the optional parameters for the RegistriesClient.BeginGenerateCredentials method.
type RegistriesClientBeginImportImageOptions ¶
type RegistriesClientBeginImportImageOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
RegistriesClientBeginImportImageOptions contains the optional parameters for the RegistriesClient.BeginImportImage method.
type RegistriesClientBeginUpdateOptions ¶
type RegistriesClientBeginUpdateOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
RegistriesClientBeginUpdateOptions contains the optional parameters for the RegistriesClient.BeginUpdate method.
type RegistriesClientCheckNameAvailabilityOptions ¶
type RegistriesClientCheckNameAvailabilityOptions struct {
}
RegistriesClientCheckNameAvailabilityOptions contains the optional parameters for the RegistriesClient.CheckNameAvailability method.
type RegistriesClientCheckNameAvailabilityResponse ¶
type RegistriesClientCheckNameAvailabilityResponse struct {
// The result of a request to check the availability of a container registry name.
RegistryNameStatus
}
RegistriesClientCheckNameAvailabilityResponse contains the response from method RegistriesClient.CheckNameAvailability.
type RegistriesClientCreateResponse ¶
type RegistriesClientCreateResponse struct {
// An object that represents a container registry.
Registry
}
RegistriesClientCreateResponse contains the response from method RegistriesClient.BeginCreate.
type RegistriesClientDeleteResponse ¶
type RegistriesClientDeleteResponse struct {
}
RegistriesClientDeleteResponse contains the response from method RegistriesClient.BeginDelete.
type RegistriesClientGenerateCredentialsResponse ¶
type RegistriesClientGenerateCredentialsResponse struct {
// The response from the GenerateCredentials operation.
GenerateCredentialsResult
}
RegistriesClientGenerateCredentialsResponse contains the response from method RegistriesClient.BeginGenerateCredentials.
type RegistriesClientGetOptions ¶
type RegistriesClientGetOptions struct {
}
RegistriesClientGetOptions contains the optional parameters for the RegistriesClient.Get method.
type RegistriesClientGetPrivateLinkResourceOptions ¶
type RegistriesClientGetPrivateLinkResourceOptions struct {
}
RegistriesClientGetPrivateLinkResourceOptions contains the optional parameters for the RegistriesClient.GetPrivateLinkResource method.
type RegistriesClientGetPrivateLinkResourceResponse ¶
type RegistriesClientGetPrivateLinkResourceResponse struct {
// A private link resource.
PrivateLinkResource
}
RegistriesClientGetPrivateLinkResourceResponse contains the response from method RegistriesClient.GetPrivateLinkResource.
type RegistriesClientGetResponse ¶
type RegistriesClientGetResponse struct {
// An object that represents a container registry.
Registry
}
RegistriesClientGetResponse contains the response from method RegistriesClient.Get.
type RegistriesClientImportImageResponse ¶
type RegistriesClientImportImageResponse struct {
}
RegistriesClientImportImageResponse contains the response from method RegistriesClient.BeginImportImage.
type RegistriesClientListByResourceGroupOptions ¶
type RegistriesClientListByResourceGroupOptions struct {
}
RegistriesClientListByResourceGroupOptions contains the optional parameters for the RegistriesClient.NewListByResourceGroupPager method.
type RegistriesClientListByResourceGroupResponse ¶
type RegistriesClientListByResourceGroupResponse struct {
// The result of a request to list container registries.
RegistryListResult
}
RegistriesClientListByResourceGroupResponse contains the response from method RegistriesClient.NewListByResourceGroupPager.
type RegistriesClientListCredentialsOptions ¶
type RegistriesClientListCredentialsOptions struct {
}
RegistriesClientListCredentialsOptions contains the optional parameters for the RegistriesClient.ListCredentials method.
type RegistriesClientListCredentialsResponse ¶
type RegistriesClientListCredentialsResponse struct {
// The response from the ListCredentials operation.
RegistryListCredentialsResult
}
RegistriesClientListCredentialsResponse contains the response from method RegistriesClient.ListCredentials.
type RegistriesClientListOptions ¶
type RegistriesClientListOptions struct {
}
RegistriesClientListOptions contains the optional parameters for the RegistriesClient.NewListPager method.
type RegistriesClientListPrivateLinkResourcesOptions ¶
type RegistriesClientListPrivateLinkResourcesOptions struct {
}
RegistriesClientListPrivateLinkResourcesOptions contains the optional parameters for the RegistriesClient.NewListPrivateLinkResourcesPager method.
type RegistriesClientListPrivateLinkResourcesResponse ¶
type RegistriesClientListPrivateLinkResourcesResponse struct {
// The result of a request to list private link resources for a container registry.
PrivateLinkResourceListResult
}
RegistriesClientListPrivateLinkResourcesResponse contains the response from method RegistriesClient.NewListPrivateLinkResourcesPager.
type RegistriesClientListResponse ¶
type RegistriesClientListResponse struct {
// The result of a request to list container registries.
RegistryListResult
}
RegistriesClientListResponse contains the response from method RegistriesClient.NewListPager.
type RegistriesClientListUsagesOptions ¶
type RegistriesClientListUsagesOptions struct {
}
RegistriesClientListUsagesOptions contains the optional parameters for the RegistriesClient.ListUsages method.
type RegistriesClientListUsagesResponse ¶
type RegistriesClientListUsagesResponse struct {
// The result of a request to get container registry quota usages.
RegistryUsageListResult
}
RegistriesClientListUsagesResponse contains the response from method RegistriesClient.ListUsages.
type RegistriesClientRegenerateCredentialOptions ¶
type RegistriesClientRegenerateCredentialOptions struct {
}
RegistriesClientRegenerateCredentialOptions contains the optional parameters for the RegistriesClient.RegenerateCredential method.
type RegistriesClientRegenerateCredentialResponse ¶
type RegistriesClientRegenerateCredentialResponse struct {
// The response from the ListCredentials operation.
RegistryListCredentialsResult
}
RegistriesClientRegenerateCredentialResponse contains the response from method RegistriesClient.RegenerateCredential.
type RegistriesClientUpdateResponse ¶
type RegistriesClientUpdateResponse struct {
// An object that represents a container registry.
Registry
}
RegistriesClientUpdateResponse contains the response from method RegistriesClient.BeginUpdate.
type Registry ¶
type Registry struct {
// REQUIRED; The geo-location where the resource lives
Location *string
// REQUIRED; The SKU of the container registry.
SKU *SKU
// The identity of the container registry.
Identity *IdentityProperties
// The properties of the container registry.
Properties *RegistryProperties
// Resource tags.
Tags map[string]*string
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the private link resource.
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
Registry - An object that represents a container registry.
func (Registry) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Registry.
func (*Registry) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Registry.
type RegistryListCredentialsResult ¶
type RegistryListCredentialsResult struct {
// The list of passwords for a container registry.
Passwords []*RegistryPassword
// The username for a container registry.
Username *string
}
RegistryListCredentialsResult - The response from the ListCredentials operation.
func (RegistryListCredentialsResult) MarshalJSON ¶
func (r RegistryListCredentialsResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RegistryListCredentialsResult.
func (*RegistryListCredentialsResult) UnmarshalJSON ¶
func (r *RegistryListCredentialsResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RegistryListCredentialsResult.
type RegistryListResult ¶
type RegistryListResult struct {
// The URI that can be used to request the next list of container registries.
NextLink *string
// The list of container registries. Since this list may be incomplete, the nextLink field should be used to request the next
// list of container registries.
Value []*Registry
}
RegistryListResult - The result of a request to list container registries.
func (RegistryListResult) MarshalJSON ¶
func (r RegistryListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RegistryListResult.
func (*RegistryListResult) UnmarshalJSON ¶
func (r *RegistryListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RegistryListResult.
type RegistryNameCheckRequest ¶
type RegistryNameCheckRequest struct {
// REQUIRED; The name of the container registry.
Name *string
// CONSTANT; The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'.
// Field has constant value "Microsoft.ContainerRegistry/registries", any specified value is ignored.
Type *string
}
RegistryNameCheckRequest - A request to check whether a container registry name is available.
func (RegistryNameCheckRequest) MarshalJSON ¶
func (r RegistryNameCheckRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RegistryNameCheckRequest.
func (*RegistryNameCheckRequest) UnmarshalJSON ¶
func (r *RegistryNameCheckRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RegistryNameCheckRequest.
type RegistryNameStatus ¶
type RegistryNameStatus struct {
// If any, the error message that provides more detail for the reason that the name is not available.
Message *string
// The value that indicates whether the name is available.
NameAvailable *bool
// If any, the reason that the name is not available.
Reason *string
}
RegistryNameStatus - The result of a request to check the availability of a container registry name.
func (RegistryNameStatus) MarshalJSON ¶
func (r RegistryNameStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RegistryNameStatus.
func (*RegistryNameStatus) UnmarshalJSON ¶
func (r *RegistryNameStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RegistryNameStatus.
type RegistryPassword ¶
type RegistryPassword struct {
// The password name.
Name *PasswordName
// The password value.
Value *string
}
RegistryPassword - The login password for the container registry.
func (RegistryPassword) MarshalJSON ¶
func (r RegistryPassword) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RegistryPassword.
func (*RegistryPassword) UnmarshalJSON ¶
func (r *RegistryPassword) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RegistryPassword.
type RegistryProperties ¶
type RegistryProperties struct {
// The value that indicates whether the admin user is enabled.
AdminUserEnabled *bool
// Enables registry-wide pull from unauthenticated clients.
AnonymousPullEnabled *bool
// Enable a single data endpoint per region for serving data.
DataEndpointEnabled *bool
// The encryption settings of container registry.
Encryption *EncryptionProperty
// Whether or not Tasks allowed to bypass the network rules for this container registry.
NetworkRuleBypassAllowedForTasks *bool
// Whether to allow trusted Azure services to access a network restricted registry.
NetworkRuleBypassOptions *NetworkRuleBypassOptions
// The network rule set for a container registry.
NetworkRuleSet *NetworkRuleSet
// The policies for a container registry.
Policies *Policies
// Whether or not public network access is allowed for the container registry.
PublicNetworkAccess *PublicNetworkAccess
// Determines registry role assignment mode.
RoleAssignmentMode *RoleAssignmentMode
// Whether or not zone redundancy is enabled for this container registry
ZoneRedundancy *ZoneRedundancy
// READ-ONLY; The creation date of the container registry in ISO8601 format.
CreationDate *time.Time
// READ-ONLY; List of host names that will serve data when dataEndpointEnabled is true.
DataEndpointHostNames []*string
// READ-ONLY; The URL that can be used to log into the container registry.
LoginServer *string
// READ-ONLY; List of private endpoint connections for a container registry.
PrivateEndpointConnections []*PrivateEndpointConnection
// READ-ONLY; The provisioning state of the container registry at the time the operation was called.
ProvisioningState *ProvisioningState
// READ-ONLY; The status of the container registry at the time the operation was called.
Status *Status
}
RegistryProperties - The properties of a container registry.
func (RegistryProperties) MarshalJSON ¶
func (r RegistryProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RegistryProperties.
func (*RegistryProperties) UnmarshalJSON ¶
func (r *RegistryProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RegistryProperties.
type RegistryPropertiesUpdateParameters ¶
type RegistryPropertiesUpdateParameters struct {
// The value that indicates whether the admin user is enabled.
AdminUserEnabled *bool
// Enables registry-wide pull from unauthenticated clients.
AnonymousPullEnabled *bool
// Enable a single data endpoint per region for serving data.
DataEndpointEnabled *bool
// The encryption settings of container registry.
Encryption *EncryptionProperty
// Whether to allow ACR Tasks service to access a network restricted registry.
NetworkRuleBypassAllowedForTasks *bool
// Whether to allow trusted Azure services to access a network restricted registry.
NetworkRuleBypassOptions *NetworkRuleBypassOptions
// The network rule set for a container registry.
NetworkRuleSet *NetworkRuleSet
// The policies for a container registry.
Policies *Policies
// Whether or not public network access is allowed for the container registry.
PublicNetworkAccess *PublicNetworkAccess
// Determines registry role assignment mode.
RoleAssignmentMode *RoleAssignmentMode
}
RegistryPropertiesUpdateParameters - The parameters for updating the properties of a container registry.
func (RegistryPropertiesUpdateParameters) MarshalJSON ¶
func (r RegistryPropertiesUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RegistryPropertiesUpdateParameters.
func (*RegistryPropertiesUpdateParameters) UnmarshalJSON ¶
func (r *RegistryPropertiesUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RegistryPropertiesUpdateParameters.
type RegistryUpdateParameters ¶
type RegistryUpdateParameters struct {
// The identity of the container registry.
Identity *IdentityProperties
// The properties that the container registry will be updated with.
Properties *RegistryPropertiesUpdateParameters
// The SKU of the container registry.
SKU *SKU
// The tags for the container registry.
Tags map[string]*string
}
RegistryUpdateParameters - The parameters for updating a container registry.
func (RegistryUpdateParameters) MarshalJSON ¶
func (r RegistryUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RegistryUpdateParameters.
func (*RegistryUpdateParameters) UnmarshalJSON ¶
func (r *RegistryUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RegistryUpdateParameters.
type RegistryUsage ¶
type RegistryUsage struct {
// The current value of the usage.
CurrentValue *int64
// The limit of the usage.
Limit *int64
// The name of the usage.
Name *string
// The unit of measurement.
Unit *RegistryUsageUnit
}
RegistryUsage - The quota usage for a container registry.
func (RegistryUsage) MarshalJSON ¶
func (r RegistryUsage) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RegistryUsage.
func (*RegistryUsage) UnmarshalJSON ¶
func (r *RegistryUsage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RegistryUsage.
type RegistryUsageListResult ¶
type RegistryUsageListResult struct {
// The list of container registry quota usages.
Value []*RegistryUsage
}
RegistryUsageListResult - The result of a request to get container registry quota usages.
func (RegistryUsageListResult) MarshalJSON ¶
func (r RegistryUsageListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RegistryUsageListResult.
func (*RegistryUsageListResult) UnmarshalJSON ¶
func (r *RegistryUsageListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RegistryUsageListResult.
type RegistryUsageUnit ¶
type RegistryUsageUnit string
RegistryUsageUnit - The unit of measurement.
const ( RegistryUsageUnitBytes RegistryUsageUnit = "Bytes" RegistryUsageUnitCount RegistryUsageUnit = "Count" )
func PossibleRegistryUsageUnitValues ¶
func PossibleRegistryUsageUnitValues() []RegistryUsageUnit
PossibleRegistryUsageUnitValues returns the possible values for the RegistryUsageUnit const type.
type Replication ¶
type Replication struct {
// REQUIRED; The geo-location where the resource lives
Location *string
// The properties of the replication.
Properties *ReplicationProperties
// Resource tags.
Tags map[string]*string
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the private link resource.
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
Replication - An object that represents a replication for a container registry.
func (Replication) MarshalJSON ¶
func (r Replication) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Replication.
func (*Replication) UnmarshalJSON ¶
func (r *Replication) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Replication.
type ReplicationListResult ¶
type ReplicationListResult struct {
// The URI that can be used to request the next list of replications.
NextLink *string
// The list of replications. Since this list may be incomplete, the nextLink field should be used to request the next list
// of replications.
Value []*Replication
}
ReplicationListResult - The result of a request to list replications for a container registry.
func (ReplicationListResult) MarshalJSON ¶
func (r ReplicationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ReplicationListResult.
func (*ReplicationListResult) UnmarshalJSON ¶
func (r *ReplicationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationListResult.
type ReplicationProperties ¶
type ReplicationProperties struct {
// Specifies whether the replication's regional endpoint is enabled. Requests will not be routed to a replication whose regional
// endpoint is disabled, however its data will continue to be synced with other replications.
RegionEndpointEnabled *bool
// Whether or not zone redundancy is enabled for this container registry replication
ZoneRedundancy *ZoneRedundancy
// READ-ONLY; The provisioning state of the replication at the time the operation was called.
ProvisioningState *ProvisioningState
// READ-ONLY; The status of the replication at the time the operation was called.
Status *Status
}
ReplicationProperties - The properties of a replication.
func (ReplicationProperties) MarshalJSON ¶
func (r ReplicationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ReplicationProperties.
func (*ReplicationProperties) UnmarshalJSON ¶
func (r *ReplicationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProperties.
type ReplicationUpdateParameters ¶
type ReplicationUpdateParameters struct {
// The parameters for updating a replication's properties
Properties *ReplicationUpdateParametersProperties
// The tags for the replication.
Tags map[string]*string
}
ReplicationUpdateParameters - The parameters for updating a replication.
func (ReplicationUpdateParameters) MarshalJSON ¶
func (r ReplicationUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ReplicationUpdateParameters.
func (*ReplicationUpdateParameters) UnmarshalJSON ¶
func (r *ReplicationUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationUpdateParameters.
type ReplicationUpdateParametersProperties ¶
type ReplicationUpdateParametersProperties struct {
// Specifies whether the replication's regional endpoint is enabled. Requests will not be routed to a replication whose regional
// endpoint is disabled, however its data will continue to be synced with other replications.
RegionEndpointEnabled *bool
}
func (ReplicationUpdateParametersProperties) MarshalJSON ¶
func (r ReplicationUpdateParametersProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ReplicationUpdateParametersProperties.
func (*ReplicationUpdateParametersProperties) UnmarshalJSON ¶
func (r *ReplicationUpdateParametersProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationUpdateParametersProperties.
type ReplicationsClient ¶
type ReplicationsClient struct {
// contains filtered or unexported fields
}
ReplicationsClient contains the methods for the Replications group. Don't use this type directly, use NewReplicationsClient() instead.
func NewReplicationsClient ¶
func NewReplicationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationsClient, error)
NewReplicationsClient creates a new instance of ReplicationsClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - Contains optional client configuration. Pass nil to accept the default values.
func (*ReplicationsClient) BeginCreate ¶
func (client *ReplicationsClient) BeginCreate(ctx context.Context, resourceGroupName string, registryName string, replicationName string, replication Replication, options *ReplicationsClientBeginCreateOptions) (*runtime.Poller[ReplicationsClientCreateResponse], error)
BeginCreate - Creates a replication for a container registry with the specified parameters. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- replicationName - The name of the replication.
- replication - The parameters for creating a replication.
- options - ReplicationsClientBeginCreateOptions contains the optional parameters for the ReplicationsClient.BeginCreate method.
Example (ReplicationCreate) ¶
Generated from example definition: 2025-11-01/ReplicationCreate.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewReplicationsClient().BeginCreate(ctx, "myResourceGroup", "myRegistry", "myReplication", armcontainerregistry.Replication{
Location: to.Ptr("eastus"),
Tags: map[string]*string{
"key": to.Ptr("value"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.ReplicationsClientCreateResponse{
// Replication: &armcontainerregistry.Replication{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication"),
// Name: to.Ptr("myReplication"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/replications"),
// Location: to.Ptr("eastus"),
// Tags: map[string]*string{
// "key": to.Ptr("value"),
// },
// Properties: &armcontainerregistry.ReplicationProperties{
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// Status: &armcontainerregistry.Status{
// DisplayStatus: to.Ptr("Ready"),
// Message: to.Ptr("The replication is ready."),
// Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T23:15:37.0707808Z"); return t}()),
// },
// RegionEndpointEnabled: to.Ptr(true),
// ZoneRedundancy: to.Ptr(armcontainerregistry.ZoneRedundancyDisabled),
// },
// },
// }
}
Output:
Example (ReplicationCreateZoneRedundant) ¶
Generated from example definition: 2025-11-01/ReplicationCreateZoneRedundant.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewReplicationsClient().BeginCreate(ctx, "myResourceGroup", "myRegistry", "myReplication", armcontainerregistry.Replication{
Location: to.Ptr("eastus"),
Tags: map[string]*string{
"key": to.Ptr("value"),
},
Properties: &armcontainerregistry.ReplicationProperties{
RegionEndpointEnabled: to.Ptr(true),
ZoneRedundancy: to.Ptr(armcontainerregistry.ZoneRedundancyEnabled),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.ReplicationsClientCreateResponse{
// Replication: &armcontainerregistry.Replication{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication"),
// Name: to.Ptr("myReplication"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/replications"),
// Location: to.Ptr("eastus"),
// Tags: map[string]*string{
// "key": to.Ptr("value"),
// },
// Properties: &armcontainerregistry.ReplicationProperties{
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// Status: &armcontainerregistry.Status{
// DisplayStatus: to.Ptr("Ready"),
// Message: to.Ptr("The replication is ready."),
// Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T23:15:37.0707808Z"); return t}()),
// },
// RegionEndpointEnabled: to.Ptr(true),
// ZoneRedundancy: to.Ptr(armcontainerregistry.ZoneRedundancyEnabled),
// },
// },
// }
}
Output:
func (*ReplicationsClient) BeginDelete ¶
func (client *ReplicationsClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, replicationName string, options *ReplicationsClientBeginDeleteOptions) (*runtime.Poller[ReplicationsClientDeleteResponse], error)
BeginDelete - Deletes a replication from a container registry. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- replicationName - The name of the replication.
- options - ReplicationsClientBeginDeleteOptions contains the optional parameters for the ReplicationsClient.BeginDelete method.
Example ¶
Generated from example definition: 2025-11-01/ReplicationDelete.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewReplicationsClient().BeginDelete(ctx, "myResourceGroup", "myRegistry", "myReplication", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.ReplicationsClientDeleteResponse{
// }
}
Output:
func (*ReplicationsClient) BeginUpdate ¶
func (client *ReplicationsClient) BeginUpdate(ctx context.Context, resourceGroupName string, registryName string, replicationName string, replicationUpdateParameters ReplicationUpdateParameters, options *ReplicationsClientBeginUpdateOptions) (*runtime.Poller[ReplicationsClientUpdateResponse], error)
BeginUpdate - Updates a replication for a container registry with the specified parameters. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- replicationName - The name of the replication.
- replicationUpdateParameters - The parameters for updating a replication.
- options - ReplicationsClientBeginUpdateOptions contains the optional parameters for the ReplicationsClient.BeginUpdate method.
Example ¶
Generated from example definition: 2025-11-01/ReplicationUpdate.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewReplicationsClient().BeginUpdate(ctx, "myResourceGroup", "myRegistry", "myReplication", armcontainerregistry.ReplicationUpdateParameters{
Tags: map[string]*string{
"key": to.Ptr("value"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.ReplicationsClientUpdateResponse{
// Replication: &armcontainerregistry.Replication{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication"),
// Name: to.Ptr("myReplication"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/replications"),
// Location: to.Ptr("eastus"),
// Tags: map[string]*string{
// "key": to.Ptr("value"),
// },
// Properties: &armcontainerregistry.ReplicationProperties{
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// Status: &armcontainerregistry.Status{
// DisplayStatus: to.Ptr("Ready"),
// Message: to.Ptr("The replication is ready."),
// Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T23:15:37.0707808Z"); return t}()),
// },
// RegionEndpointEnabled: to.Ptr(true),
// ZoneRedundancy: to.Ptr(armcontainerregistry.ZoneRedundancyDisabled),
// },
// },
// }
}
Output:
func (*ReplicationsClient) Get ¶
func (client *ReplicationsClient) Get(ctx context.Context, resourceGroupName string, registryName string, replicationName string, options *ReplicationsClientGetOptions) (ReplicationsClientGetResponse, error)
Get - Gets the properties of the specified replication. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- replicationName - The name of the replication.
- options - ReplicationsClientGetOptions contains the optional parameters for the ReplicationsClient.Get method.
Example ¶
Generated from example definition: 2025-11-01/ReplicationGet.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewReplicationsClient().Get(ctx, "myResourceGroup", "myRegistry", "myReplication", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.ReplicationsClientGetResponse{
// Replication: &armcontainerregistry.Replication{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication"),
// Name: to.Ptr("myReplication"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/replications"),
// Location: to.Ptr("eastus"),
// Tags: map[string]*string{
// "key": to.Ptr("value"),
// },
// Properties: &armcontainerregistry.ReplicationProperties{
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// Status: &armcontainerregistry.Status{
// DisplayStatus: to.Ptr("Ready"),
// Message: to.Ptr("The replication is ready."),
// Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T23:15:37.0707808Z"); return t}()),
// },
// RegionEndpointEnabled: to.Ptr(true),
// ZoneRedundancy: to.Ptr(armcontainerregistry.ZoneRedundancyDisabled),
// },
// },
// }
}
Output:
func (*ReplicationsClient) NewListPager ¶
func (client *ReplicationsClient) NewListPager(resourceGroupName string, registryName string, options *ReplicationsClientListOptions) *runtime.Pager[ReplicationsClientListResponse]
NewListPager - Lists all the replications for the specified container registry.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- options - ReplicationsClientListOptions contains the optional parameters for the ReplicationsClient.NewListPager method.
Example ¶
Generated from example definition: 2025-11-01/ReplicationList.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewReplicationsClient().NewListPager("myResourceGroup", "myRegistry", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armcontainerregistry.ReplicationsClientListResponse{
// ReplicationListResult: armcontainerregistry.ReplicationListResult{
// Value: []*armcontainerregistry.Replication{
// {
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication"),
// Name: to.Ptr("myReplication"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/replications"),
// Location: to.Ptr("eastus"),
// Tags: map[string]*string{
// "key": to.Ptr("value"),
// },
// Properties: &armcontainerregistry.ReplicationProperties{
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// Status: &armcontainerregistry.Status{
// DisplayStatus: to.Ptr("Ready"),
// Message: to.Ptr("The replication is ready."),
// Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T23:15:37.0707808Z"); return t}()),
// },
// RegionEndpointEnabled: to.Ptr(true),
// ZoneRedundancy: to.Ptr(armcontainerregistry.ZoneRedundancyDisabled),
// },
// },
// },
// },
// }
}
}
Output:
type ReplicationsClientBeginCreateOptions ¶
type ReplicationsClientBeginCreateOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
ReplicationsClientBeginCreateOptions contains the optional parameters for the ReplicationsClient.BeginCreate method.
type ReplicationsClientBeginDeleteOptions ¶
type ReplicationsClientBeginDeleteOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
ReplicationsClientBeginDeleteOptions contains the optional parameters for the ReplicationsClient.BeginDelete method.
type ReplicationsClientBeginUpdateOptions ¶
type ReplicationsClientBeginUpdateOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
ReplicationsClientBeginUpdateOptions contains the optional parameters for the ReplicationsClient.BeginUpdate method.
type ReplicationsClientCreateResponse ¶
type ReplicationsClientCreateResponse struct {
// An object that represents a replication for a container registry.
Replication
}
ReplicationsClientCreateResponse contains the response from method ReplicationsClient.BeginCreate.
type ReplicationsClientDeleteResponse ¶
type ReplicationsClientDeleteResponse struct {
}
ReplicationsClientDeleteResponse contains the response from method ReplicationsClient.BeginDelete.
type ReplicationsClientGetOptions ¶
type ReplicationsClientGetOptions struct {
}
ReplicationsClientGetOptions contains the optional parameters for the ReplicationsClient.Get method.
type ReplicationsClientGetResponse ¶
type ReplicationsClientGetResponse struct {
// An object that represents a replication for a container registry.
Replication
}
ReplicationsClientGetResponse contains the response from method ReplicationsClient.Get.
type ReplicationsClientListOptions ¶
type ReplicationsClientListOptions struct {
}
ReplicationsClientListOptions contains the optional parameters for the ReplicationsClient.NewListPager method.
type ReplicationsClientListResponse ¶
type ReplicationsClientListResponse struct {
// The result of a request to list replications for a container registry.
ReplicationListResult
}
ReplicationsClientListResponse contains the response from method ReplicationsClient.NewListPager.
type ReplicationsClientUpdateResponse ¶
type ReplicationsClientUpdateResponse struct {
// An object that represents a replication for a container registry.
Replication
}
ReplicationsClientUpdateResponse contains the response from method ReplicationsClient.BeginUpdate.
type Request ¶
type Request struct {
// The IP or hostname and possibly port of the client connection that initiated the event. This is the RemoteAddr from the
// standard http request.
Addr *string
// The externally accessible hostname of the registry instance, as specified by the http host header on incoming requests.
Host *string
// The ID of the request that initiated the event.
ID *string
// The request method that generated the event.
Method *string
// The user agent header of the request.
Useragent *string
}
Request - The request that generated the event.
func (Request) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Request.
func (*Request) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Request.
type ResourceIdentityType ¶
type ResourceIdentityType string
ResourceIdentityType - The identity type.
const ( ResourceIdentityTypeNone ResourceIdentityType = "None" ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned" ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" )
func PossibleResourceIdentityTypeValues ¶
func PossibleResourceIdentityTypeValues() []ResourceIdentityType
PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type.
type RetentionPolicy ¶
type RetentionPolicy struct {
// The number of days to retain an untagged manifest after which it gets purged.
Days *int32
// The value that indicates whether the policy is enabled or not.
Status *PolicyStatus
// READ-ONLY; The timestamp when the policy was last updated.
LastUpdatedTime *time.Time
}
RetentionPolicy - The retention policy for a container registry.
func (RetentionPolicy) MarshalJSON ¶
func (r RetentionPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RetentionPolicy.
func (*RetentionPolicy) UnmarshalJSON ¶
func (r *RetentionPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RetentionPolicy.
type RoleAssignmentMode ¶
type RoleAssignmentMode string
RoleAssignmentMode - Determines registry role assignment mode.
const ( RoleAssignmentModeAbacRepositoryPermissions RoleAssignmentMode = "AbacRepositoryPermissions" RoleAssignmentModeLegacyRegistryPermissions RoleAssignmentMode = "LegacyRegistryPermissions" )
func PossibleRoleAssignmentModeValues ¶
func PossibleRoleAssignmentModeValues() []RoleAssignmentMode
PossibleRoleAssignmentModeValues returns the possible values for the RoleAssignmentMode const type.
type SKU ¶
type SKU struct {
// REQUIRED; The SKU name of the container registry. Required for registry creation.
Name *SKUName
// READ-ONLY; The SKU tier based on the SKU name.
Tier *SKUTier
}
SKU - The SKU of a container registry.
func (SKU) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type SKU.
func (*SKU) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type SKU.
type SKUName ¶
type SKUName string
SKUName - The SKU name of the container registry. Required for registry creation.
func PossibleSKUNameValues ¶
func PossibleSKUNameValues() []SKUName
PossibleSKUNameValues returns the possible values for the SKUName const type.
type SKUTier ¶
type SKUTier string
SKUTier - The SKU tier based on the SKU name.
func PossibleSKUTierValues ¶
func PossibleSKUTierValues() []SKUTier
PossibleSKUTierValues returns the possible values for the SKUTier const type.
type ScopeMap ¶
type ScopeMap struct {
// The properties of the scope map.
Properties *ScopeMapProperties
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the private link resource.
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
ScopeMap - An object that represents a scope map for a container registry.
func (ScopeMap) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type ScopeMap.
func (*ScopeMap) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type ScopeMap.
type ScopeMapListResult ¶
type ScopeMapListResult struct {
// The URI that can be used to request the next list of scope maps.
NextLink *string
// The list of scope maps. Since this list may be incomplete, the nextLink field should be used to request the next list of
// scope maps.
Value []*ScopeMap
}
ScopeMapListResult - The result of a request to list scope maps for a container registry.
func (ScopeMapListResult) MarshalJSON ¶
func (s ScopeMapListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScopeMapListResult.
func (*ScopeMapListResult) UnmarshalJSON ¶
func (s *ScopeMapListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScopeMapListResult.
type ScopeMapProperties ¶
type ScopeMapProperties struct {
// REQUIRED; The list of scoped permissions for registry artifacts.
// E.g. repositories/repository-name/content/read,
// repositories/repository-name/metadata/write
Actions []*string
// The user friendly description of the scope map.
Description *string
// READ-ONLY; The creation date of scope map.
CreationDate *time.Time
// READ-ONLY; Provisioning state of the resource.
ProvisioningState *ProvisioningState
// READ-ONLY; The type of the scope map. E.g. BuildIn scope map.
Type *string
}
ScopeMapProperties - The properties of a scope map.
func (ScopeMapProperties) MarshalJSON ¶
func (s ScopeMapProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScopeMapProperties.
func (*ScopeMapProperties) UnmarshalJSON ¶
func (s *ScopeMapProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScopeMapProperties.
type ScopeMapPropertiesUpdateParameters ¶
type ScopeMapPropertiesUpdateParameters struct {
// The list of scope permissions for registry artifacts.
// E.g. repositories/repository-name/pull,
// repositories/repository-name/delete
Actions []*string
// The user friendly description of the scope map.
Description *string
}
ScopeMapPropertiesUpdateParameters - The update parameters for scope map properties.
func (ScopeMapPropertiesUpdateParameters) MarshalJSON ¶
func (s ScopeMapPropertiesUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScopeMapPropertiesUpdateParameters.
func (*ScopeMapPropertiesUpdateParameters) UnmarshalJSON ¶
func (s *ScopeMapPropertiesUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScopeMapPropertiesUpdateParameters.
type ScopeMapUpdateParameters ¶
type ScopeMapUpdateParameters struct {
// The update parameters for scope map properties.
Properties *ScopeMapPropertiesUpdateParameters
}
ScopeMapUpdateParameters - The properties for updating the scope map.
func (ScopeMapUpdateParameters) MarshalJSON ¶
func (s ScopeMapUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScopeMapUpdateParameters.
func (*ScopeMapUpdateParameters) UnmarshalJSON ¶
func (s *ScopeMapUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScopeMapUpdateParameters.
type ScopeMapsClient ¶
type ScopeMapsClient struct {
// contains filtered or unexported fields
}
ScopeMapsClient contains the methods for the ScopeMaps group. Don't use this type directly, use NewScopeMapsClient() instead.
func NewScopeMapsClient ¶
func NewScopeMapsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScopeMapsClient, error)
NewScopeMapsClient creates a new instance of ScopeMapsClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - Contains optional client configuration. Pass nil to accept the default values.
func (*ScopeMapsClient) BeginCreate ¶
func (client *ScopeMapsClient) BeginCreate(ctx context.Context, resourceGroupName string, registryName string, scopeMapName string, scopeMapCreateParameters ScopeMap, options *ScopeMapsClientBeginCreateOptions) (*runtime.Poller[ScopeMapsClientCreateResponse], error)
BeginCreate - Creates a scope map for a container registry with the specified parameters. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- scopeMapName - The name of the scope map.
- scopeMapCreateParameters - The parameters for creating a scope map.
- options - ScopeMapsClientBeginCreateOptions contains the optional parameters for the ScopeMapsClient.BeginCreate method.
Example ¶
Generated from example definition: 2025-11-01/ScopeMapCreate.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewScopeMapsClient().BeginCreate(ctx, "myResourceGroup", "myRegistry", "myScopeMap", armcontainerregistry.ScopeMap{
Properties: &armcontainerregistry.ScopeMapProperties{
Description: to.Ptr("Developer Scopes"),
Actions: []*string{
to.Ptr("repositories/myrepository/contentWrite"),
to.Ptr("repositories/myrepository/delete"),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.ScopeMapsClientCreateResponse{
// ScopeMap: &armcontainerregistry.ScopeMap{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap"),
// Name: to.Ptr("myScopeMap"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/scopeMaps"),
// Properties: &armcontainerregistry.ScopeMapProperties{
// CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T23:14:37.0707808Z"); return t}()),
// Type: to.Ptr("IsUserDefined"),
// Actions: []*string{
// to.Ptr("repositories/myrepository/contentWrite"),
// to.Ptr("repositories/myrepository/delete"),
// },
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// },
// },
// }
}
Output:
func (*ScopeMapsClient) BeginDelete ¶
func (client *ScopeMapsClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, scopeMapName string, options *ScopeMapsClientBeginDeleteOptions) (*runtime.Poller[ScopeMapsClientDeleteResponse], error)
BeginDelete - Deletes a scope map from a container registry. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- scopeMapName - The name of the scope map.
- options - ScopeMapsClientBeginDeleteOptions contains the optional parameters for the ScopeMapsClient.BeginDelete method.
Example ¶
Generated from example definition: 2025-11-01/ScopeMapDelete.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewScopeMapsClient().BeginDelete(ctx, "myResourceGroup", "myRegistry", "myScopeMap", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.ScopeMapsClientDeleteResponse{
// }
}
Output:
func (*ScopeMapsClient) BeginUpdate ¶
func (client *ScopeMapsClient) BeginUpdate(ctx context.Context, resourceGroupName string, registryName string, scopeMapName string, scopeMapUpdateParameters ScopeMapUpdateParameters, options *ScopeMapsClientBeginUpdateOptions) (*runtime.Poller[ScopeMapsClientUpdateResponse], error)
BeginUpdate - Updates a scope map with the specified parameters. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- scopeMapName - The name of the scope map.
- scopeMapUpdateParameters - The parameters for updating a scope map.
- options - ScopeMapsClientBeginUpdateOptions contains the optional parameters for the ScopeMapsClient.BeginUpdate method.
Example ¶
Generated from example definition: 2025-11-01/ScopeMapUpdate.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewScopeMapsClient().BeginUpdate(ctx, "myResourceGroup", "myRegistry", "myScopeMap", armcontainerregistry.ScopeMapUpdateParameters{
Properties: &armcontainerregistry.ScopeMapPropertiesUpdateParameters{
Description: to.Ptr("Developer Scopes"),
Actions: []*string{
to.Ptr("repositories/myrepository/contentWrite"),
to.Ptr("repositories/myrepository/contentRead"),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.ScopeMapsClientUpdateResponse{
// ScopeMap: &armcontainerregistry.ScopeMap{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap"),
// Name: to.Ptr("myScopeMap"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/scopeMaps"),
// Properties: &armcontainerregistry.ScopeMapProperties{
// CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T23:14:37.0707808Z"); return t}()),
// Type: to.Ptr("IsUserDefined"),
// Actions: []*string{
// to.Ptr("repositories/myrepository/contentWrite"),
// to.Ptr("repositories/myrepository/contentRead"),
// },
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// },
// },
// }
}
Output:
func (*ScopeMapsClient) Get ¶
func (client *ScopeMapsClient) Get(ctx context.Context, resourceGroupName string, registryName string, scopeMapName string, options *ScopeMapsClientGetOptions) (ScopeMapsClientGetResponse, error)
Get - Gets the properties of the specified scope map. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- scopeMapName - The name of the scope map.
- options - ScopeMapsClientGetOptions contains the optional parameters for the ScopeMapsClient.Get method.
Example ¶
Generated from example definition: 2025-11-01/ScopeMapGet.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewScopeMapsClient().Get(ctx, "myResourceGroup", "myRegistry", "myScopeMap", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.ScopeMapsClientGetResponse{
// ScopeMap: &armcontainerregistry.ScopeMap{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap"),
// Name: to.Ptr("myScopeMap"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/scopeMaps"),
// Properties: &armcontainerregistry.ScopeMapProperties{
// CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T23:14:37.0707808Z"); return t}()),
// Type: to.Ptr("IsUserDefined"),
// Actions: []*string{
// to.Ptr("repositories/myrepository/contentWrite"),
// to.Ptr("repositories/myrepository/delete"),
// },
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// },
// },
// }
}
Output:
func (*ScopeMapsClient) NewListPager ¶
func (client *ScopeMapsClient) NewListPager(resourceGroupName string, registryName string, options *ScopeMapsClientListOptions) *runtime.Pager[ScopeMapsClientListResponse]
NewListPager - Lists all the scope maps for the specified container registry.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- options - ScopeMapsClientListOptions contains the optional parameters for the ScopeMapsClient.NewListPager method.
Example ¶
Generated from example definition: 2025-11-01/ScopeMapList.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewScopeMapsClient().NewListPager("myResourceGroup", "myRegistry", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armcontainerregistry.ScopeMapsClientListResponse{
// ScopeMapListResult: armcontainerregistry.ScopeMapListResult{
// Value: []*armcontainerregistry.ScopeMap{
// {
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap"),
// Name: to.Ptr("myScopeMap"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/scopeMaps"),
// Properties: &armcontainerregistry.ScopeMapProperties{
// CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T23:14:37.0707808Z"); return t}()),
// Type: to.Ptr("IsUserDefined"),
// Actions: []*string{
// to.Ptr("repositories/myrepository/contentWrite"),
// to.Ptr("repositories/myrepository/delete"),
// },
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// },
// },
// },
// },
// }
}
}
Output:
type ScopeMapsClientBeginCreateOptions ¶
type ScopeMapsClientBeginCreateOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
ScopeMapsClientBeginCreateOptions contains the optional parameters for the ScopeMapsClient.BeginCreate method.
type ScopeMapsClientBeginDeleteOptions ¶
type ScopeMapsClientBeginDeleteOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
ScopeMapsClientBeginDeleteOptions contains the optional parameters for the ScopeMapsClient.BeginDelete method.
type ScopeMapsClientBeginUpdateOptions ¶
type ScopeMapsClientBeginUpdateOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
ScopeMapsClientBeginUpdateOptions contains the optional parameters for the ScopeMapsClient.BeginUpdate method.
type ScopeMapsClientCreateResponse ¶
type ScopeMapsClientCreateResponse struct {
// An object that represents a scope map for a container registry.
ScopeMap
}
ScopeMapsClientCreateResponse contains the response from method ScopeMapsClient.BeginCreate.
type ScopeMapsClientDeleteResponse ¶
type ScopeMapsClientDeleteResponse struct {
}
ScopeMapsClientDeleteResponse contains the response from method ScopeMapsClient.BeginDelete.
type ScopeMapsClientGetOptions ¶
type ScopeMapsClientGetOptions struct {
}
ScopeMapsClientGetOptions contains the optional parameters for the ScopeMapsClient.Get method.
type ScopeMapsClientGetResponse ¶
type ScopeMapsClientGetResponse struct {
// An object that represents a scope map for a container registry.
ScopeMap
}
ScopeMapsClientGetResponse contains the response from method ScopeMapsClient.Get.
type ScopeMapsClientListOptions ¶
type ScopeMapsClientListOptions struct {
}
ScopeMapsClientListOptions contains the optional parameters for the ScopeMapsClient.NewListPager method.
type ScopeMapsClientListResponse ¶
type ScopeMapsClientListResponse struct {
// The result of a request to list scope maps for a container registry.
ScopeMapListResult
}
ScopeMapsClientListResponse contains the response from method ScopeMapsClient.NewListPager.
type ScopeMapsClientUpdateResponse ¶
type ScopeMapsClientUpdateResponse struct {
// An object that represents a scope map for a container registry.
ScopeMap
}
ScopeMapsClientUpdateResponse contains the response from method ScopeMapsClient.BeginUpdate.
type Source ¶
type Source struct {
// The IP or hostname and the port of the registry node that generated the event. Generally, this will be resolved by os.Hostname()
// along with the running port.
Addr *string
// The running instance of an application. Changes after each restart.
InstanceID *string
}
Source - The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it.
func (Source) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Source.
func (*Source) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Source.
type Status ¶
type Status struct {
// READ-ONLY; The short label for the status.
DisplayStatus *string
// READ-ONLY; The detailed message for the status, including alerts and error messages.
Message *string
// READ-ONLY; The timestamp when the status was changed to the current value.
Timestamp *time.Time
}
Status - The status of an Azure resource at the time the operation was called.
func (Status) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Status.
func (*Status) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Status.
type StatusDetailProperties ¶
type StatusDetailProperties struct {
// READ-ONLY; The HTTP status code.
Code *string
// READ-ONLY; The correlation ID of the status.
CorrelationID *string
// READ-ONLY; The description of the status.
Description *string
// READ-ONLY; The timestamp of the status.
Timestamp *time.Time
// READ-ONLY; The component of the connected registry corresponding to the status.
Type *string
}
StatusDetailProperties - The status detail properties of the connected registry.
func (StatusDetailProperties) MarshalJSON ¶
func (s StatusDetailProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StatusDetailProperties.
func (*StatusDetailProperties) UnmarshalJSON ¶
func (s *StatusDetailProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StatusDetailProperties.
type SyncProperties ¶
type SyncProperties struct {
// REQUIRED; The period of time for which a message is available to sync before it is expired. Specify the duration using
// the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601.
MessageTTL *string
// REQUIRED; The resource ID of the ACR token used to authenticate the connected registry to its parent during sync.
TokenID *string
// The cron expression indicating the schedule that the connected registry will sync with its parent.
Schedule *string
// The time window during which sync is enabled for each schedule occurrence. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S
// as per ISO8601.
SyncWindow *string
// READ-ONLY; The gateway endpoint used by the connected registry to communicate with its parent.
GatewayEndpoint *string
// READ-ONLY; The last time a sync occurred between the connected registry and its parent.
LastSyncTime *time.Time
}
SyncProperties - The sync properties of the connected registry with its parent.
func (SyncProperties) MarshalJSON ¶
func (s SyncProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncProperties.
func (*SyncProperties) UnmarshalJSON ¶
func (s *SyncProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SyncProperties.
type SyncUpdateProperties ¶
type SyncUpdateProperties struct {
// The period of time for which a message is available to sync before it is expired. Specify the duration using the format
// P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601.
MessageTTL *string
// The cron expression indicating the schedule that the connected registry will sync with its parent.
Schedule *string
// The time window during which sync is enabled for each schedule occurrence. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S
// as per ISO8601.
SyncWindow *string
}
SyncUpdateProperties - The parameters for updating the sync properties of the connected registry with its parent.
func (SyncUpdateProperties) MarshalJSON ¶
func (s SyncUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncUpdateProperties.
func (*SyncUpdateProperties) UnmarshalJSON ¶
func (s *SyncUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SyncUpdateProperties.
type SystemData ¶
type SystemData struct {
// The timestamp of resource creation (UTC).
CreatedAt *time.Time
// The identity that created the resource.
CreatedBy *string
// The type of identity that created the resource.
CreatedByType *CreatedByType
// The timestamp of resource last modification (UTC)
LastModifiedAt *time.Time
// The identity that last modified the resource.
LastModifiedBy *string
// The type of identity that last modified the resource.
LastModifiedByType *CreatedByType
}
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
type TLSCertificateProperties ¶
type TLSCertificateProperties struct {
// READ-ONLY; Indicates the location of the certificates.
Location *string
// READ-ONLY; The type of certificate location.
Type *CertificateType
}
TLSCertificateProperties - The TLS certificate properties of the connected registry login server.
func (TLSCertificateProperties) MarshalJSON ¶
func (t TLSCertificateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TLSCertificateProperties.
func (*TLSCertificateProperties) UnmarshalJSON ¶
func (t *TLSCertificateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TLSCertificateProperties.
type TLSProperties ¶
type TLSProperties struct {
// READ-ONLY; The certificate used to configure HTTPS for the login server.
Certificate *TLSCertificateProperties
// READ-ONLY; Indicates whether HTTPS is enabled for the login server.
Status *TLSStatus
}
TLSProperties - The TLS properties of the connected registry login server.
func (TLSProperties) MarshalJSON ¶
func (t TLSProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TLSProperties.
func (*TLSProperties) UnmarshalJSON ¶
func (t *TLSProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TLSProperties.
type TLSStatus ¶
type TLSStatus string
TLSStatus - Indicates whether HTTPS is enabled for the login server.
func PossibleTLSStatusValues ¶
func PossibleTLSStatusValues() []TLSStatus
PossibleTLSStatusValues returns the possible values for the TLSStatus const type.
type Target ¶
type Target struct {
// The digest of the content, as defined by the Registry V2 HTTP API Specification.
Digest *string
// The number of bytes of the content. Same as Size field.
Length *int64
// The MIME type of the referenced object.
MediaType *string
// The name of the artifact.
Name *string
// The repository name.
Repository *string
// The number of bytes of the content. Same as Length field.
Size *int64
// The tag name.
Tag *string
// The direct URL to the content.
URL *string
// The version of the artifact.
Version *string
}
Target - The target of the event.
func (Target) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Target.
func (*Target) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Target.
type Token ¶
type Token struct {
// The properties of the token.
Properties *TokenProperties
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the private link resource.
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
Token - An object that represents a token for a container registry.
func (Token) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Token.
func (*Token) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Token.
type TokenCertificate ¶
type TokenCertificate struct {
// Base 64 encoded string of the public certificate1 in PEM format that will be used for authenticating the token.
EncodedPemCertificate *string
// The expiry datetime of the certificate.
Expiry *time.Time
Name *TokenCertificateName
// The thumbprint of the certificate.
Thumbprint *string
}
TokenCertificate - The properties of a certificate used for authenticating a token.
func (TokenCertificate) MarshalJSON ¶
func (t TokenCertificate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TokenCertificate.
func (*TokenCertificate) UnmarshalJSON ¶
func (t *TokenCertificate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TokenCertificate.
type TokenCertificateName ¶
type TokenCertificateName string
const ( TokenCertificateNameCertificate1 TokenCertificateName = "certificate1" TokenCertificateNameCertificate2 TokenCertificateName = "certificate2" )
func PossibleTokenCertificateNameValues ¶
func PossibleTokenCertificateNameValues() []TokenCertificateName
PossibleTokenCertificateNameValues returns the possible values for the TokenCertificateName const type.
type TokenCredentialsProperties ¶
type TokenCredentialsProperties struct {
Certificates []*TokenCertificate
Passwords []*TokenPassword
}
TokenCredentialsProperties - The properties of the credentials that can be used for authenticating the token.
func (TokenCredentialsProperties) MarshalJSON ¶
func (t TokenCredentialsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TokenCredentialsProperties.
func (*TokenCredentialsProperties) UnmarshalJSON ¶
func (t *TokenCredentialsProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TokenCredentialsProperties.
type TokenListResult ¶
type TokenListResult struct {
// The URI that can be used to request the next list of tokens.
NextLink *string
// The list of tokens. Since this list may be incomplete, the nextLink field should be used to request the next list of tokens.
Value []*Token
}
TokenListResult - The result of a request to list tokens for a container registry.
func (TokenListResult) MarshalJSON ¶
func (t TokenListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TokenListResult.
func (*TokenListResult) UnmarshalJSON ¶
func (t *TokenListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TokenListResult.
type TokenPassword ¶
type TokenPassword struct {
// The creation datetime of the password.
CreationTime *time.Time
// The expiry datetime of the password.
Expiry *time.Time
// The password name "password1" or "password2"
Name *TokenPasswordName
// READ-ONLY; The password value.
Value *string
}
TokenPassword - The password that will be used for authenticating the token of a container registry.
func (TokenPassword) MarshalJSON ¶
func (t TokenPassword) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TokenPassword.
func (*TokenPassword) UnmarshalJSON ¶
func (t *TokenPassword) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TokenPassword.
type TokenPasswordName ¶
type TokenPasswordName string
TokenPasswordName - The password name "password1" or "password2"
const ( TokenPasswordNamePassword1 TokenPasswordName = "password1" TokenPasswordNamePassword2 TokenPasswordName = "password2" )
func PossibleTokenPasswordNameValues ¶
func PossibleTokenPasswordNameValues() []TokenPasswordName
PossibleTokenPasswordNameValues returns the possible values for the TokenPasswordName const type.
type TokenProperties ¶
type TokenProperties struct {
// The credentials that can be used for authenticating the token.
Credentials *TokenCredentialsProperties
// The resource ID of the scope map to which the token will be associated with.
ScopeMapID *string
// The status of the token example enabled or disabled.
Status *TokenStatus
// READ-ONLY; The creation date of scope map.
CreationDate *time.Time
// READ-ONLY; Provisioning state of the resource.
ProvisioningState *ProvisioningState
}
TokenProperties - The properties of a token.
func (TokenProperties) MarshalJSON ¶
func (t TokenProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TokenProperties.
func (*TokenProperties) UnmarshalJSON ¶
func (t *TokenProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TokenProperties.
type TokenStatus ¶
type TokenStatus string
TokenStatus - The status of the token example enabled or disabled.
const ( TokenStatusDisabled TokenStatus = "disabled" TokenStatusEnabled TokenStatus = "enabled" )
func PossibleTokenStatusValues ¶
func PossibleTokenStatusValues() []TokenStatus
PossibleTokenStatusValues returns the possible values for the TokenStatus const type.
type TokenUpdateParameters ¶
type TokenUpdateParameters struct {
// The properties of the token update parameters.
Properties *TokenUpdateProperties
}
TokenUpdateParameters - The parameters for updating a token.
func (TokenUpdateParameters) MarshalJSON ¶
func (t TokenUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TokenUpdateParameters.
func (*TokenUpdateParameters) UnmarshalJSON ¶
func (t *TokenUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TokenUpdateParameters.
type TokenUpdateProperties ¶
type TokenUpdateProperties struct {
// The credentials that can be used for authenticating the token.
Credentials *TokenCredentialsProperties
// The resource ID of the scope map to which the token will be associated with.
ScopeMapID *string
// The status of the token example enabled or disabled.
Status *TokenStatus
}
TokenUpdateProperties - The parameters for updating token properties.
func (TokenUpdateProperties) MarshalJSON ¶
func (t TokenUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TokenUpdateProperties.
func (*TokenUpdateProperties) UnmarshalJSON ¶
func (t *TokenUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TokenUpdateProperties.
type TokensClient ¶
type TokensClient struct {
// contains filtered or unexported fields
}
TokensClient contains the methods for the Tokens group. Don't use this type directly, use NewTokensClient() instead.
func NewTokensClient ¶
func NewTokensClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TokensClient, error)
NewTokensClient creates a new instance of TokensClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - Contains optional client configuration. Pass nil to accept the default values.
func (*TokensClient) BeginCreate ¶
func (client *TokensClient) BeginCreate(ctx context.Context, resourceGroupName string, registryName string, tokenName string, tokenCreateParameters Token, options *TokensClientBeginCreateOptions) (*runtime.Poller[TokensClientCreateResponse], error)
BeginCreate - Creates a token for a container registry with the specified parameters. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- tokenName - The name of the token.
- tokenCreateParameters - The parameters for creating a token.
- options - TokensClientBeginCreateOptions contains the optional parameters for the TokensClient.BeginCreate method.
Example ¶
Generated from example definition: 2025-11-01/TokenCreate.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewTokensClient().BeginCreate(ctx, "myResourceGroup", "myRegistry", "myToken", armcontainerregistry.Token{
Properties: &armcontainerregistry.TokenProperties{
ScopeMapID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap"),
Status: to.Ptr(armcontainerregistry.TokenStatusDisabled),
Credentials: &armcontainerregistry.TokenCredentialsProperties{
Certificates: []*armcontainerregistry.TokenCertificate{
{
Name: to.Ptr(armcontainerregistry.TokenCertificateNameCertificate1),
EncodedPemCertificate: to.Ptr("LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUc3akNDQk5hZ0F3SUJBZ0lURmdBQlR3UVpyZGdmdmhxdzBnQUFBQUZQQkRBTkJna3Foa2lHOXcwQkFRc0YKQURDQml6RUxNQWtHQTFVRUJoTUNWVk14RXpBUkJnTlZCQWdUQ2xkaGMyaHBibWQwYjI0eEVEQU9CZ05WQkFjVApCMUpsWkcxdmJtUXhIakFjQmdOVkJBb1RGVTFwWTNKdmMyOW1kQ0JEYjNKd2IzSmhkR2x2YmpFVk1CTUdBMVVFCkN4TU1UV2xqY205emIyWjBJRWxVTVI0d0hBWURWUVFERXhWTmFXTnliM052Wm5RZ1NWUWdWRXhUSUVOQklEUXcKSGhjTk1UZ3dOREV5TWpJek1qUTRXaGNOTWpBd05ERXlNakl6TWpRNFdqQTVNVGN3TlFZRFZRUURFeTV6WlhKMgphV05sWTJ4cFpXNTBZMlZ5ZEMxd1lYSjBibVZ5TG0xaGJtRm5aVzFsYm5RdVlYcDFjbVV1WTI5dE1JSUJJakFOCkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQTBSYjdJcHpxMmR4emhhbVpyS1ZDakMzeTQyYlYKUnNIY2pCUTFuSDBHZ1puUDhXeDZDSE1mWThybkVJQzRLeVRRYkJXVzhnNXlmc3NSQ0ZXbFpxYjR6SkRXS0pmTgpGSmNMUm9LNnhwTktZYVZVTkVlT25IdUxHYTM0ZlA0VjBFRjZybzdvbkRLME5zanhjY1dZVzRNVXVzc0xrQS94CkUrM2RwU1REdk1KcjJoWUpsVnFDcVR6blQvbmZaVUZzQUVEQnp5MUpOOHZiZDlIR2czc2Myd0x4dk95cFJOc0gKT1V3V2pmN2xzWWZleEVlcWkzY29EeHc2alpLVWEyVkdsUnBpTkowMjhBQitYSi9TU1FVNVBsd0JBbU9TT3ovRApGY0NKdGpPZlBqU1NKckFIQVV3SHU3RzlSV05JTFBwYU9zQ1J5eitETE5zNGpvNlEvUUg4d1lManJRSURBUUFCCm80SUNtakNDQXBZd0N3WURWUjBQQkFRREFnU3dNQjBHQTFVZEpRUVdNQlFHQ0NzR0FRVUZCd01DQmdnckJnRUYKQlFjREFUQWRCZ05WSFE0RUZnUVVlbEdkVVJrZzJoSFFOWEQ4WUc4L3drdjJVT0F3SHdZRFZSMGpCQmd3Rm9BVQplbnVNd2Mvbm9Nb2MxR3Y2KytFend3OGFvcDB3Z2F3R0ExVWRId1NCcERDQm9UQ0JucUNCbTZDQm1JWkxhSFIwCmNEb3ZMMjF6WTNKc0xtMXBZM0p2YzI5bWRDNWpiMjB2Y0d0cEwyMXpZMjl5Y0M5amNtd3ZUV2xqY205emIyWjAKSlRJd1NWUWxNakJVVEZNbE1qQkRRU1V5TURRdVkzSnNoa2xvZEhSd09pOHZZM0pzTG0xcFkzSnZjMjltZEM1agpiMjB2Y0d0cEwyMXpZMjl5Y0M5amNtd3ZUV2xqY205emIyWjBKVEl3U1ZRbE1qQlVURk1sTWpCRFFTVXlNRFF1ClkzSnNNSUdGQmdnckJnRUZCUWNCQVFSNU1IY3dVUVlJS3dZQkJRVUhNQUtHUldoMGRIQTZMeTkzZDNjdWJXbGoKY205emIyWjBMbU52YlM5d2Eya3ZiWE5qYjNKd0wwMXBZM0p2YzI5bWRDVXlNRWxVSlRJd1ZFeFRKVEl3UTBFbApNakEwTG1OeWREQWlCZ2dyQmdFRkJRY3dBWVlXYUhSMGNEb3ZMMjlqYzNBdWJYTnZZM053TG1OdmJUQStCZ2tyCkJnRUVBWUkzRlFjRU1UQXZCaWNyQmdFRUFZSTNGUWlIMm9aMWcrN1pBWUxKaFJ1QnRaNWhoZlRyWUlGZGhOTGYKUW9Mbmszb0NBV1FDQVIwd1RRWURWUjBnQkVZd1JEQkNCZ2tyQmdFRUFZSTNLZ0V3TlRBekJnZ3JCZ0VGQlFjQwpBUlluYUhSMGNEb3ZMM2QzZHk1dGFXTnliM052Wm5RdVkyOXRMM0JyYVM5dGMyTnZjbkF2WTNCek1DY0dDU3NHCkFRUUJnamNWQ2dRYU1CZ3dDZ1lJS3dZQkJRVUhBd0l3Q2dZSUt3WUJCUVVIQXdFd09RWURWUjBSQkRJd01JSXUKYzJWeWRtbGpaV05zYVdWdWRHTmxjblF0Y0dGeWRHNWxjaTV0WVc1aFoyVnRaVzUwTG1GNmRYSmxMbU52YlRBTgpCZ2txaGtpRzl3MEJBUXNGQUFPQ0FnRUFIVXIzbk1vdUI5WWdDUlRWYndUTllIS2RkWGJkSW1GUXNDYys4T1g1CjE5c0N6dFFSR05iSXEwVW1Ba01MbFVvWTIxckh4ZXdxU2hWczFhL2RwaFh5Tk1pcUdaU2QzU1BtYzZscitqUFQKNXVEREs0MUlWeXN0K2VUNlpyazFvcCtMVmdkeS9EU2lyNzVqcWZFY016bS82bU8rNnFNeWRLTWtVYmM5K3JHVwphUkpUcjRWUUdIRmEwNEIwZVZpNUd4MG9pL2RpZDNSaXg2aXJMMjFJSGEwYjN6c1hzZHpHU0R2K3hqL2Q2S0l4Ckdrd2FhYmZvU1NoQnFqaFNlQ0VyZXFlb1RpYjljdGw0MGRVdUp3THl4bjhHS2N6K3AvMEJUOEIxU3lYK01OQ2wKY0pkMjVtMjhLajY2TGUxOEVyeFlJYXZJVGVGa3Y2eGZjdkEvcHladDdPaU41QTlGQk1IUmpQK1kyZ2tvdjMrcQpISFRUZG4xNnlRajduNit3YlFHNGVleXc0YisyQkRLcUxNVFU2ZmlSQ3ZPM2FPZVBLSFVNN3R4b1FidWl6Z3NzCkNiMzl3QnJOTEZsMkJLQ1RkSCtkSU9oZVJiSkZvbmlwOGRPOUVFZWdSSG9lQW54ZUlYTFBrdXMzTzEvZjRhNkIKWHQ3RG5BUm8xSzJmeEp3VXRaU2MvR3dFSjU5NzlnRXlEa3pDZEVsLzdpWE9QZXVjTXhlM2xVM2pweUtsNERUaApjSkJqQytqNGpLWTFrK1U4b040aGdqYnJISUx6Vnd2eU15OU5KS290U3BMSjQxeHdPOHlGangxalFTT3Bxc0N1ClFhUFUvTjhSZ0hxWjBGTkFzS3dNUmZ6WmdXanRCNzRzYUVEdk5jVmNuNFhCQnFNSG0ydHo2Uzk3d3kxZGt0cTgKSE5BPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg=="),
},
},
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.TokensClientCreateResponse{
// Token: &armcontainerregistry.Token{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken"),
// Name: to.Ptr("myToken"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/tokens"),
// Properties: &armcontainerregistry.TokenProperties{
// CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T23:14:37.0707808Z"); return t}()),
// ScopeMapID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap"),
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// Status: to.Ptr(armcontainerregistry.TokenStatusDisabled),
// Credentials: &armcontainerregistry.TokenCredentialsProperties{
// Certificates: []*armcontainerregistry.TokenCertificate{
// {
// Name: to.Ptr(armcontainerregistry.TokenCertificateNameCertificate1),
// Thumbprint: to.Ptr("feeb79a888bf1415f8e17c4965a2a5bb5c8a2ff7"),
// Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-04T15:32:48.0707808Z"); return t}()),
// },
// },
// },
// },
// },
// }
}
Output:
func (*TokensClient) BeginDelete ¶
func (client *TokensClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, tokenName string, options *TokensClientBeginDeleteOptions) (*runtime.Poller[TokensClientDeleteResponse], error)
BeginDelete - Deletes a token from a container registry. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- tokenName - The name of the token.
- options - TokensClientBeginDeleteOptions contains the optional parameters for the TokensClient.BeginDelete method.
Example ¶
Generated from example definition: 2025-11-01/TokenDelete.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewTokensClient().BeginDelete(ctx, "myResourceGroup", "myRegistry", "myToken", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.TokensClientDeleteResponse{
// }
}
Output:
func (*TokensClient) BeginUpdate ¶
func (client *TokensClient) BeginUpdate(ctx context.Context, resourceGroupName string, registryName string, tokenName string, tokenUpdateParameters TokenUpdateParameters, options *TokensClientBeginUpdateOptions) (*runtime.Poller[TokensClientUpdateResponse], error)
BeginUpdate - Updates a token with the specified parameters. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- tokenName - The name of the token.
- tokenUpdateParameters - The parameters for updating a token.
- options - TokensClientBeginUpdateOptions contains the optional parameters for the TokensClient.BeginUpdate method.
Example ¶
Generated from example definition: 2025-11-01/TokenUpdate.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewTokensClient().BeginUpdate(ctx, "myResourceGroup", "myRegistry", "myToken", armcontainerregistry.TokenUpdateParameters{
Properties: &armcontainerregistry.TokenUpdateProperties{
ScopeMapID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myNewScopeMap"),
Credentials: &armcontainerregistry.TokenCredentialsProperties{
Certificates: []*armcontainerregistry.TokenCertificate{
{
Name: to.Ptr(armcontainerregistry.TokenCertificateNameCertificate1),
EncodedPemCertificate: to.Ptr("LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUc3akNDQk5hZ0F3SUJBZ0lURmdBQlR3UVpyZGdmdmhxdzBnQUFBQUZQQkRBTkJna3Foa2lHOXcwQkFRc0YKQURDQml6RUxNQWtHQTFVRUJoTUNWVk14RXpBUkJnTlZCQWdUQ2xkaGMyaHBibWQwYjI0eEVEQU9CZ05WQkFjVApCMUpsWkcxdmJtUXhIakFjQmdOVkJBb1RGVTFwWTNKdmMyOW1kQ0JEYjNKd2IzSmhkR2x2YmpFVk1CTUdBMVVFCkN4TU1UV2xqY205emIyWjBJRWxVTVI0d0hBWURWUVFERXhWTmFXTnliM052Wm5RZ1NWUWdWRXhUSUVOQklEUXcKSGhjTk1UZ3dOREV5TWpJek1qUTRXaGNOTWpBd05ERXlNakl6TWpRNFdqQTVNVGN3TlFZRFZRUURFeTV6WlhKMgphV05sWTJ4cFpXNTBZMlZ5ZEMxd1lYSjBibVZ5TG0xaGJtRm5aVzFsYm5RdVlYcDFjbVV1WTI5dE1JSUJJakFOCkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQTBSYjdJcHpxMmR4emhhbVpyS1ZDakMzeTQyYlYKUnNIY2pCUTFuSDBHZ1puUDhXeDZDSE1mWThybkVJQzRLeVRRYkJXVzhnNXlmc3NSQ0ZXbFpxYjR6SkRXS0pmTgpGSmNMUm9LNnhwTktZYVZVTkVlT25IdUxHYTM0ZlA0VjBFRjZybzdvbkRLME5zanhjY1dZVzRNVXVzc0xrQS94CkUrM2RwU1REdk1KcjJoWUpsVnFDcVR6blQvbmZaVUZzQUVEQnp5MUpOOHZiZDlIR2czc2Myd0x4dk95cFJOc0gKT1V3V2pmN2xzWWZleEVlcWkzY29EeHc2alpLVWEyVkdsUnBpTkowMjhBQitYSi9TU1FVNVBsd0JBbU9TT3ovRApGY0NKdGpPZlBqU1NKckFIQVV3SHU3RzlSV05JTFBwYU9zQ1J5eitETE5zNGpvNlEvUUg4d1lManJRSURBUUFCCm80SUNtakNDQXBZd0N3WURWUjBQQkFRREFnU3dNQjBHQTFVZEpRUVdNQlFHQ0NzR0FRVUZCd01DQmdnckJnRUYKQlFjREFUQWRCZ05WSFE0RUZnUVVlbEdkVVJrZzJoSFFOWEQ4WUc4L3drdjJVT0F3SHdZRFZSMGpCQmd3Rm9BVQplbnVNd2Mvbm9Nb2MxR3Y2KytFend3OGFvcDB3Z2F3R0ExVWRId1NCcERDQm9UQ0JucUNCbTZDQm1JWkxhSFIwCmNEb3ZMMjF6WTNKc0xtMXBZM0p2YzI5bWRDNWpiMjB2Y0d0cEwyMXpZMjl5Y0M5amNtd3ZUV2xqY205emIyWjAKSlRJd1NWUWxNakJVVEZNbE1qQkRRU1V5TURRdVkzSnNoa2xvZEhSd09pOHZZM0pzTG0xcFkzSnZjMjltZEM1agpiMjB2Y0d0cEwyMXpZMjl5Y0M5amNtd3ZUV2xqY205emIyWjBKVEl3U1ZRbE1qQlVURk1sTWpCRFFTVXlNRFF1ClkzSnNNSUdGQmdnckJnRUZCUWNCQVFSNU1IY3dVUVlJS3dZQkJRVUhNQUtHUldoMGRIQTZMeTkzZDNjdWJXbGoKY205emIyWjBMbU52YlM5d2Eya3ZiWE5qYjNKd0wwMXBZM0p2YzI5bWRDVXlNRWxVSlRJd1ZFeFRKVEl3UTBFbApNakEwTG1OeWREQWlCZ2dyQmdFRkJRY3dBWVlXYUhSMGNEb3ZMMjlqYzNBdWJYTnZZM053TG1OdmJUQStCZ2tyCkJnRUVBWUkzRlFjRU1UQXZCaWNyQmdFRUFZSTNGUWlIMm9aMWcrN1pBWUxKaFJ1QnRaNWhoZlRyWUlGZGhOTGYKUW9Mbmszb0NBV1FDQVIwd1RRWURWUjBnQkVZd1JEQkNCZ2tyQmdFRUFZSTNLZ0V3TlRBekJnZ3JCZ0VGQlFjQwpBUlluYUhSMGNEb3ZMM2QzZHk1dGFXTnliM052Wm5RdVkyOXRMM0JyYVM5dGMyTnZjbkF2WTNCek1DY0dDU3NHCkFRUUJnamNWQ2dRYU1CZ3dDZ1lJS3dZQkJRVUhBd0l3Q2dZSUt3WUJCUVVIQXdFd09RWURWUjBSQkRJd01JSXUKYzJWeWRtbGpaV05zYVdWdWRHTmxjblF0Y0dGeWRHNWxjaTV0WVc1aFoyVnRaVzUwTG1GNmRYSmxMbU52YlRBTgpCZ2txaGtpRzl3MEJBUXNGQUFPQ0FnRUFIVXIzbk1vdUI5WWdDUlRWYndUTllIS2RkWGJkSW1GUXNDYys4T1g1CjE5c0N6dFFSR05iSXEwVW1Ba01MbFVvWTIxckh4ZXdxU2hWczFhL2RwaFh5Tk1pcUdaU2QzU1BtYzZscitqUFQKNXVEREs0MUlWeXN0K2VUNlpyazFvcCtMVmdkeS9EU2lyNzVqcWZFY016bS82bU8rNnFNeWRLTWtVYmM5K3JHVwphUkpUcjRWUUdIRmEwNEIwZVZpNUd4MG9pL2RpZDNSaXg2aXJMMjFJSGEwYjN6c1hzZHpHU0R2K3hqL2Q2S0l4Ckdrd2FhYmZvU1NoQnFqaFNlQ0VyZXFlb1RpYjljdGw0MGRVdUp3THl4bjhHS2N6K3AvMEJUOEIxU3lYK01OQ2wKY0pkMjVtMjhLajY2TGUxOEVyeFlJYXZJVGVGa3Y2eGZjdkEvcHladDdPaU41QTlGQk1IUmpQK1kyZ2tvdjMrcQpISFRUZG4xNnlRajduNit3YlFHNGVleXc0YisyQkRLcUxNVFU2ZmlSQ3ZPM2FPZVBLSFVNN3R4b1FidWl6Z3NzCkNiMzl3QnJOTEZsMkJLQ1RkSCtkSU9oZVJiSkZvbmlwOGRPOUVFZWdSSG9lQW54ZUlYTFBrdXMzTzEvZjRhNkIKWHQ3RG5BUm8xSzJmeEp3VXRaU2MvR3dFSjU5NzlnRXlEa3pDZEVsLzdpWE9QZXVjTXhlM2xVM2pweUtsNERUaApjSkJqQytqNGpLWTFrK1U4b040aGdqYnJISUx6Vnd2eU15OU5KS290U3BMSjQxeHdPOHlGangxalFTT3Bxc0N1ClFhUFUvTjhSZ0hxWjBGTkFzS3dNUmZ6WmdXanRCNzRzYUVEdk5jVmNuNFhCQnFNSG0ydHo2Uzk3d3kxZGt0cTgKSE5BPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg=="),
},
},
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.TokensClientUpdateResponse{
// Token: &armcontainerregistry.Token{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken"),
// Name: to.Ptr("myToken"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/tokens"),
// Properties: &armcontainerregistry.TokenProperties{
// CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T23:14:37.0707808Z"); return t}()),
// ScopeMapID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myNewScopeMap"),
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// Status: to.Ptr(armcontainerregistry.TokenStatusEnabled),
// Credentials: &armcontainerregistry.TokenCredentialsProperties{
// Certificates: []*armcontainerregistry.TokenCertificate{
// {
// Name: to.Ptr(armcontainerregistry.TokenCertificateNameCertificate1),
// EncodedPemCertificate: to.Ptr("LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUc3akNDQk5hZ0F3SUJBZ0lURmdBQlR3UVpyZGdmdmhxdzBnQUFBQUZQQkRBTkJna3Foa2lHOXcwQkFRc0YKQURDQml6RUxNQWtHQTFVRUJoTUNWVk14RXpBUkJnTlZCQWdUQ2xkaGMyaHBibWQwYjI0eEVEQU9CZ05WQkFjVApCMUpsWkcxdmJtUXhIakFjQmdOVkJBb1RGVTFwWTNKdmMyOW1kQ0JEYjNKd2IzSmhkR2x2YmpFVk1CTUdBMVVFCkN4TU1UV2xqY205emIyWjBJRWxVTVI0d0hBWURWUVFERXhWTmFXTnliM052Wm5RZ1NWUWdWRXhUSUVOQklEUXcKSGhjTk1UZ3dOREV5TWpJek1qUTRXaGNOTWpBd05ERXlNakl6TWpRNFdqQTVNVGN3TlFZRFZRUURFeTV6WlhKMgphV05sWTJ4cFpXNTBZMlZ5ZEMxd1lYSjBibVZ5TG0xaGJtRm5aVzFsYm5RdVlYcDFjbVV1WTI5dE1JSUJJakFOCkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQTBSYjdJcHpxMmR4emhhbVpyS1ZDakMzeTQyYlYKUnNIY2pCUTFuSDBHZ1puUDhXeDZDSE1mWThybkVJQzRLeVRRYkJXVzhnNXlmc3NSQ0ZXbFpxYjR6SkRXS0pmTgpGSmNMUm9LNnhwTktZYVZVTkVlT25IdUxHYTM0ZlA0VjBFRjZybzdvbkRLME5zanhjY1dZVzRNVXVzc0xrQS94CkUrM2RwU1REdk1KcjJoWUpsVnFDcVR6blQvbmZaVUZzQUVEQnp5MUpOOHZiZDlIR2czc2Myd0x4dk95cFJOc0gKT1V3V2pmN2xzWWZleEVlcWkzY29EeHc2alpLVWEyVkdsUnBpTkowMjhBQitYSi9TU1FVNVBsd0JBbU9TT3ovRApGY0NKdGpPZlBqU1NKckFIQVV3SHU3RzlSV05JTFBwYU9zQ1J5eitETE5zNGpvNlEvUUg4d1lManJRSURBUUFCCm80SUNtakNDQXBZd0N3WURWUjBQQkFRREFnU3dNQjBHQTFVZEpRUVdNQlFHQ0NzR0FRVUZCd01DQmdnckJnRUYKQlFjREFUQWRCZ05WSFE0RUZnUVVlbEdkVVJrZzJoSFFOWEQ4WUc4L3drdjJVT0F3SHdZRFZSMGpCQmd3Rm9BVQplbnVNd2Mvbm9Nb2MxR3Y2KytFend3OGFvcDB3Z2F3R0ExVWRId1NCcERDQm9UQ0JucUNCbTZDQm1JWkxhSFIwCmNEb3ZMMjF6WTNKc0xtMXBZM0p2YzI5bWRDNWpiMjB2Y0d0cEwyMXpZMjl5Y0M5amNtd3ZUV2xqY205emIyWjAKSlRJd1NWUWxNakJVVEZNbE1qQkRRU1V5TURRdVkzSnNoa2xvZEhSd09pOHZZM0pzTG0xcFkzSnZjMjltZEM1agpiMjB2Y0d0cEwyMXpZMjl5Y0M5amNtd3ZUV2xqY205emIyWjBKVEl3U1ZRbE1qQlVURk1sTWpCRFFTVXlNRFF1ClkzSnNNSUdGQmdnckJnRUZCUWNCQVFSNU1IY3dVUVlJS3dZQkJRVUhNQUtHUldoMGRIQTZMeTkzZDNjdWJXbGoKY205emIyWjBMbU52YlM5d2Eya3ZiWE5qYjNKd0wwMXBZM0p2YzI5bWRDVXlNRWxVSlRJd1ZFeFRKVEl3UTBFbApNakEwTG1OeWREQWlCZ2dyQmdFRkJRY3dBWVlXYUhSMGNEb3ZMMjlqYzNBdWJYTnZZM053TG1OdmJUQStCZ2tyCkJnRUVBWUkzRlFjRU1UQXZCaWNyQmdFRUFZSTNGUWlIMm9aMWcrN1pBWUxKaFJ1QnRaNWhoZlRyWUlGZGhOTGYKUW9Mbmszb0NBV1FDQVIwd1RRWURWUjBnQkVZd1JEQkNCZ2tyQmdFRUFZSTNLZ0V3TlRBekJnZ3JCZ0VGQlFjQwpBUlluYUhSMGNEb3ZMM2QzZHk1dGFXTnliM052Wm5RdVkyOXRMM0JyYVM5dGMyTnZjbkF2WTNCek1DY0dDU3NHCkFRUUJnamNWQ2dRYU1CZ3dDZ1lJS3dZQkJRVUhBd0l3Q2dZSUt3WUJCUVVIQXdFd09RWURWUjBSQkRJd01JSXUKYzJWeWRtbGpaV05zYVdWdWRHTmxjblF0Y0dGeWRHNWxjaTV0WVc1aFoyVnRaVzUwTG1GNmRYSmxMbU52YlRBTgpCZ2txaGtpRzl3MEJBUXNGQUFPQ0FnRUFIVXIzbk1vdUI5WWdDUlRWYndUTllIS2RkWGJkSW1GUXNDYys4T1g1CjE5c0N6dFFSR05iSXEwVW1Ba01MbFVvWTIxckh4ZXdxU2hWczFhL2RwaFh5Tk1pcUdaU2QzU1BtYzZscitqUFQKNXVEREs0MUlWeXN0K2VUNlpyazFvcCtMVmdkeS9EU2lyNzVqcWZFY016bS82bU8rNnFNeWRLTWtVYmM5K3JHVwphUkpUcjRWUUdIRmEwNEIwZVZpNUd4MG9pL2RpZDNSaXg2aXJMMjFJSGEwYjN6c1hzZHpHU0R2K3hqL2Q2S0l4Ckdrd2FhYmZvU1NoQnFqaFNlQ0VyZXFlb1RpYjljdGw0MGRVdUp3THl4bjhHS2N6K3AvMEJUOEIxU3lYK01OQ2wKY0pkMjVtMjhLajY2TGUxOEVyeFlJYXZJVGVGa3Y2eGZjdkEvcHladDdPaU41QTlGQk1IUmpQK1kyZ2tvdjMrcQpISFRUZG4xNnlRajduNit3YlFHNGVleXc0YisyQkRLcUxNVFU2ZmlSQ3ZPM2FPZVBLSFVNN3R4b1FidWl6Z3NzCkNiMzl3QnJOTEZsMkJLQ1RkSCtkSU9oZVJiSkZvbmlwOGRPOUVFZWdSSG9lQW54ZUlYTFBrdXMzTzEvZjRhNkIKWHQ3RG5BUm8xSzJmeEp3VXRaU2MvR3dFSjU5NzlnRXlEa3pDZEVsLzdpWE9QZXVjTXhlM2xVM2pweUtsNERUaApjSkJqQytqNGpLWTFrK1U4b040aGdqYnJISUx6Vnd2eU15OU5KS290U3BMSjQxeHdPOHlGangxalFTT3Bxc0N1ClFhUFUvTjhSZ0hxWjBGTkFzS3dNUmZ6WmdXanRCNzRzYUVEdk5jVmNuNFhCQnFNSG0ydHo2Uzk3d3kxZGt0cTgKSE5BPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg=="),
// },
// },
// },
// },
// },
// }
}
Output:
func (*TokensClient) Get ¶
func (client *TokensClient) Get(ctx context.Context, resourceGroupName string, registryName string, tokenName string, options *TokensClientGetOptions) (TokensClientGetResponse, error)
Get - Gets the properties of the specified token. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- tokenName - The name of the token.
- options - TokensClientGetOptions contains the optional parameters for the TokensClient.Get method.
Example ¶
Generated from example definition: 2025-11-01/TokenGet.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewTokensClient().Get(ctx, "myResourceGroup", "myRegistry", "myToken", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.TokensClientGetResponse{
// Token: &armcontainerregistry.Token{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken"),
// Name: to.Ptr("myToken"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/tokens"),
// Properties: &armcontainerregistry.TokenProperties{
// CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T23:14:37.0707808Z"); return t}()),
// ScopeMapID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap"),
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// Status: to.Ptr(armcontainerregistry.TokenStatusEnabled),
// },
// },
// }
}
Output:
func (*TokensClient) NewListPager ¶
func (client *TokensClient) NewListPager(resourceGroupName string, registryName string, options *TokensClientListOptions) *runtime.Pager[TokensClientListResponse]
NewListPager - Lists all the tokens for the specified container registry.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- options - TokensClientListOptions contains the optional parameters for the TokensClient.NewListPager method.
Example ¶
Generated from example definition: 2025-11-01/TokenList.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewTokensClient().NewListPager("myResourceGroup", "myRegistry", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armcontainerregistry.TokensClientListResponse{
// TokenListResult: armcontainerregistry.TokenListResult{
// Value: []*armcontainerregistry.Token{
// {
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken"),
// Name: to.Ptr("myToken"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/tokens"),
// Properties: &armcontainerregistry.TokenProperties{
// CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T23:14:37.0707808Z"); return t}()),
// ScopeMapID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap"),
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// Status: to.Ptr(armcontainerregistry.TokenStatusEnabled),
// },
// },
// },
// },
// }
}
}
Output:
type TokensClientBeginCreateOptions ¶
type TokensClientBeginCreateOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
TokensClientBeginCreateOptions contains the optional parameters for the TokensClient.BeginCreate method.
type TokensClientBeginDeleteOptions ¶
type TokensClientBeginDeleteOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
TokensClientBeginDeleteOptions contains the optional parameters for the TokensClient.BeginDelete method.
type TokensClientBeginUpdateOptions ¶
type TokensClientBeginUpdateOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
TokensClientBeginUpdateOptions contains the optional parameters for the TokensClient.BeginUpdate method.
type TokensClientCreateResponse ¶
type TokensClientCreateResponse struct {
// An object that represents a token for a container registry.
Token
}
TokensClientCreateResponse contains the response from method TokensClient.BeginCreate.
type TokensClientDeleteResponse ¶
type TokensClientDeleteResponse struct {
}
TokensClientDeleteResponse contains the response from method TokensClient.BeginDelete.
type TokensClientGetOptions ¶
type TokensClientGetOptions struct {
}
TokensClientGetOptions contains the optional parameters for the TokensClient.Get method.
type TokensClientGetResponse ¶
type TokensClientGetResponse struct {
// An object that represents a token for a container registry.
Token
}
TokensClientGetResponse contains the response from method TokensClient.Get.
type TokensClientListOptions ¶
type TokensClientListOptions struct {
}
TokensClientListOptions contains the optional parameters for the TokensClient.NewListPager method.
type TokensClientListResponse ¶
type TokensClientListResponse struct {
// The result of a request to list tokens for a container registry.
TokenListResult
}
TokensClientListResponse contains the response from method TokensClient.NewListPager.
type TokensClientUpdateResponse ¶
type TokensClientUpdateResponse struct {
// An object that represents a token for a container registry.
Token
}
TokensClientUpdateResponse contains the response from method TokensClient.BeginUpdate.
type TrustPolicy ¶
type TrustPolicy struct {
// The value that indicates whether the policy is enabled or not.
Status *PolicyStatus
// The type of trust policy.
Type *TrustPolicyType
}
TrustPolicy - The content trust policy for a container registry.
func (TrustPolicy) MarshalJSON ¶
func (t TrustPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TrustPolicy.
func (*TrustPolicy) UnmarshalJSON ¶
func (t *TrustPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TrustPolicy.
type TrustPolicyType ¶
type TrustPolicyType string
TrustPolicyType - The type of trust policy.
const (
TrustPolicyTypeNotary TrustPolicyType = "Notary"
)
func PossibleTrustPolicyTypeValues ¶
func PossibleTrustPolicyTypeValues() []TrustPolicyType
PossibleTrustPolicyTypeValues returns the possible values for the TrustPolicyType const type.
type UserIdentityProperties ¶
type UserIdentityProperties struct {
// READ-ONLY; The client id of user assigned identity.
ClientID *string
// READ-ONLY; The principal id of user assigned identity.
PrincipalID *string
}
func (UserIdentityProperties) MarshalJSON ¶
func (u UserIdentityProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserIdentityProperties.
func (*UserIdentityProperties) UnmarshalJSON ¶
func (u *UserIdentityProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserIdentityProperties.
type Webhook ¶
type Webhook struct {
// REQUIRED; The geo-location where the resource lives
Location *string
// The properties of the webhook.
Properties *WebhookProperties
// Resource tags.
Tags map[string]*string
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the private link resource.
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
Webhook - An object that represents a webhook for a container registry.
func (Webhook) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Webhook.
func (*Webhook) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Webhook.
type WebhookAction ¶
type WebhookAction string
const ( WebhookActionChartDelete WebhookAction = "chart_delete" WebhookActionChartPush WebhookAction = "chart_push" WebhookActionDelete WebhookAction = "delete" WebhookActionPush WebhookAction = "push" WebhookActionQuarantine WebhookAction = "quarantine" )
func PossibleWebhookActionValues ¶
func PossibleWebhookActionValues() []WebhookAction
PossibleWebhookActionValues returns the possible values for the WebhookAction const type.
type WebhookCreateParameters ¶
type WebhookCreateParameters struct {
// REQUIRED; The location of the webhook. This cannot be changed after the resource is created.
Location *string
// The properties that the webhook will be created with.
Properties *WebhookPropertiesCreateParameters
// The tags for the webhook.
Tags map[string]*string
}
WebhookCreateParameters - The parameters for creating a webhook.
func (WebhookCreateParameters) MarshalJSON ¶
func (w WebhookCreateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WebhookCreateParameters.
func (*WebhookCreateParameters) UnmarshalJSON ¶
func (w *WebhookCreateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WebhookCreateParameters.
type WebhookListResult ¶
type WebhookListResult struct {
// The URI that can be used to request the next list of webhooks.
NextLink *string
// The list of webhooks. Since this list may be incomplete, the nextLink field should be used to request the next list of
// webhooks.
Value []*Webhook
}
WebhookListResult - The result of a request to list webhooks for a container registry.
func (WebhookListResult) MarshalJSON ¶
func (w WebhookListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WebhookListResult.
func (*WebhookListResult) UnmarshalJSON ¶
func (w *WebhookListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WebhookListResult.
type WebhookProperties ¶
type WebhookProperties struct {
// REQUIRED; The list of actions that trigger the webhook to post notifications.
Actions []*WebhookAction
// The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository
// 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all events.
Scope *string
// The status of the webhook at the time the operation was called.
Status *WebhookStatus
// READ-ONLY; The provisioning state of the webhook at the time the operation was called.
ProvisioningState *ProvisioningState
}
WebhookProperties - The properties of a webhook.
func (WebhookProperties) MarshalJSON ¶
func (w WebhookProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WebhookProperties.
func (*WebhookProperties) UnmarshalJSON ¶
func (w *WebhookProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WebhookProperties.
type WebhookPropertiesCreateParameters ¶
type WebhookPropertiesCreateParameters struct {
// REQUIRED; The list of actions that trigger the webhook to post notifications.
Actions []*WebhookAction
// REQUIRED; The service URI for the webhook to post notifications.
ServiceURI *string
// Custom headers that will be added to the webhook notifications.
CustomHeaders map[string]*string
// The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository
// 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all events.
Scope *string
// The status of the webhook at the time the operation was called.
Status *WebhookStatus
}
WebhookPropertiesCreateParameters - The parameters for creating the properties of a webhook.
func (WebhookPropertiesCreateParameters) MarshalJSON ¶
func (w WebhookPropertiesCreateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WebhookPropertiesCreateParameters.
func (*WebhookPropertiesCreateParameters) UnmarshalJSON ¶
func (w *WebhookPropertiesCreateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WebhookPropertiesCreateParameters.
type WebhookPropertiesUpdateParameters ¶
type WebhookPropertiesUpdateParameters struct {
// The list of actions that trigger the webhook to post notifications.
Actions []*WebhookAction
// Custom headers that will be added to the webhook notifications.
CustomHeaders map[string]*string
// The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository
// 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all events.
Scope *string
// The service URI for the webhook to post notifications.
ServiceURI *string
// The status of the webhook at the time the operation was called.
Status *WebhookStatus
}
WebhookPropertiesUpdateParameters - The parameters for updating the properties of a webhook.
func (WebhookPropertiesUpdateParameters) MarshalJSON ¶
func (w WebhookPropertiesUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WebhookPropertiesUpdateParameters.
func (*WebhookPropertiesUpdateParameters) UnmarshalJSON ¶
func (w *WebhookPropertiesUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WebhookPropertiesUpdateParameters.
type WebhookStatus ¶
type WebhookStatus string
WebhookStatus - The status of the webhook at the time the operation was called.
const ( WebhookStatusDisabled WebhookStatus = "disabled" WebhookStatusEnabled WebhookStatus = "enabled" )
func PossibleWebhookStatusValues ¶
func PossibleWebhookStatusValues() []WebhookStatus
PossibleWebhookStatusValues returns the possible values for the WebhookStatus const type.
type WebhookUpdateParameters ¶
type WebhookUpdateParameters struct {
// The properties that the webhook will be updated with.
Properties *WebhookPropertiesUpdateParameters
// The tags for the webhook.
Tags map[string]*string
}
WebhookUpdateParameters - The parameters for updating a webhook.
func (WebhookUpdateParameters) MarshalJSON ¶
func (w WebhookUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WebhookUpdateParameters.
func (*WebhookUpdateParameters) UnmarshalJSON ¶
func (w *WebhookUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WebhookUpdateParameters.
type WebhooksClient ¶
type WebhooksClient struct {
// contains filtered or unexported fields
}
WebhooksClient contains the methods for the Webhooks group. Don't use this type directly, use NewWebhooksClient() instead.
func NewWebhooksClient ¶
func NewWebhooksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WebhooksClient, error)
NewWebhooksClient creates a new instance of WebhooksClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - Contains optional client configuration. Pass nil to accept the default values.
func (*WebhooksClient) BeginCreate ¶
func (client *WebhooksClient) BeginCreate(ctx context.Context, resourceGroupName string, registryName string, webhookName string, webhookCreateParameters WebhookCreateParameters, options *WebhooksClientBeginCreateOptions) (*runtime.Poller[WebhooksClientCreateResponse], error)
BeginCreate - Creates a webhook for a container registry with the specified parameters. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- webhookName - The name of the webhook.
- webhookCreateParameters - The parameters for creating a webhook.
- options - WebhooksClientBeginCreateOptions contains the optional parameters for the WebhooksClient.BeginCreate method.
Example ¶
Generated from example definition: 2025-11-01/WebhookCreate.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewWebhooksClient().BeginCreate(ctx, "myResourceGroup", "myRegistry", "myWebhook", armcontainerregistry.WebhookCreateParameters{
Location: to.Ptr("westus"),
Tags: map[string]*string{
"key": to.Ptr("value"),
},
Properties: &armcontainerregistry.WebhookPropertiesCreateParameters{
ServiceURI: to.Ptr("http://myservice.com"),
CustomHeaders: map[string]*string{
"Authorization": to.Ptr("******"),
},
Status: to.Ptr(armcontainerregistry.WebhookStatusEnabled),
Scope: to.Ptr("myRepository"),
Actions: []*armcontainerregistry.WebhookAction{
to.Ptr(armcontainerregistry.WebhookActionPush),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.WebhooksClientCreateResponse{
// Webhook: &armcontainerregistry.Webhook{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/webhooks/myWebhook"),
// Name: to.Ptr("myWebhook"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/webhooks"),
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "key": to.Ptr("value"),
// },
// Properties: &armcontainerregistry.WebhookProperties{
// Status: to.Ptr(armcontainerregistry.WebhookStatusEnabled),
// Scope: to.Ptr("myRepository"),
// Actions: []*armcontainerregistry.WebhookAction{
// to.Ptr(armcontainerregistry.WebhookActionPush),
// },
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// },
// },
// }
}
Output:
func (*WebhooksClient) BeginDelete ¶
func (client *WebhooksClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, webhookName string, options *WebhooksClientBeginDeleteOptions) (*runtime.Poller[WebhooksClientDeleteResponse], error)
BeginDelete - Deletes a webhook from a container registry. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- webhookName - The name of the webhook.
- options - WebhooksClientBeginDeleteOptions contains the optional parameters for the WebhooksClient.BeginDelete method.
Example ¶
Generated from example definition: 2025-11-01/WebhookDelete.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewWebhooksClient().BeginDelete(ctx, "myResourceGroup", "myRegistry", "myWebhook", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.WebhooksClientDeleteResponse{
// }
}
Output:
func (*WebhooksClient) BeginUpdate ¶
func (client *WebhooksClient) BeginUpdate(ctx context.Context, resourceGroupName string, registryName string, webhookName string, webhookUpdateParameters WebhookUpdateParameters, options *WebhooksClientBeginUpdateOptions) (*runtime.Poller[WebhooksClientUpdateResponse], error)
BeginUpdate - Updates a webhook with the specified parameters. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- webhookName - The name of the webhook.
- webhookUpdateParameters - The parameters for updating a webhook.
- options - WebhooksClientBeginUpdateOptions contains the optional parameters for the WebhooksClient.BeginUpdate method.
Example ¶
Generated from example definition: 2025-11-01/WebhookUpdate.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewWebhooksClient().BeginUpdate(ctx, "myResourceGroup", "myRegistry", "myWebhook", armcontainerregistry.WebhookUpdateParameters{
Tags: map[string]*string{
"key": to.Ptr("value"),
},
Properties: &armcontainerregistry.WebhookPropertiesUpdateParameters{
ServiceURI: to.Ptr("http://myservice.com"),
CustomHeaders: map[string]*string{
"Authorization": to.Ptr("******"),
},
Status: to.Ptr(armcontainerregistry.WebhookStatusEnabled),
Scope: to.Ptr("myRepository"),
Actions: []*armcontainerregistry.WebhookAction{
to.Ptr(armcontainerregistry.WebhookActionPush),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.WebhooksClientUpdateResponse{
// Webhook: &armcontainerregistry.Webhook{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/webhooks/myWebhook"),
// Name: to.Ptr("myWebhook"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/webhooks"),
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "key": to.Ptr("value"),
// },
// Properties: &armcontainerregistry.WebhookProperties{
// Status: to.Ptr(armcontainerregistry.WebhookStatusEnabled),
// Scope: to.Ptr("myRepository"),
// Actions: []*armcontainerregistry.WebhookAction{
// to.Ptr(armcontainerregistry.WebhookActionPush),
// },
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// },
// },
// }
}
Output:
func (*WebhooksClient) Get ¶
func (client *WebhooksClient) Get(ctx context.Context, resourceGroupName string, registryName string, webhookName string, options *WebhooksClientGetOptions) (WebhooksClientGetResponse, error)
Get - Gets the properties of the specified webhook. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- webhookName - The name of the webhook.
- options - WebhooksClientGetOptions contains the optional parameters for the WebhooksClient.Get method.
Example ¶
Generated from example definition: 2025-11-01/WebhookGet.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewWebhooksClient().Get(ctx, "myResourceGroup", "myRegistry", "myWebhook", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.WebhooksClientGetResponse{
// Webhook: &armcontainerregistry.Webhook{
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/webhooks/myWebhook"),
// Name: to.Ptr("myWebhook"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/webhooks"),
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "key": to.Ptr("value"),
// },
// Properties: &armcontainerregistry.WebhookProperties{
// Status: to.Ptr(armcontainerregistry.WebhookStatusEnabled),
// Scope: to.Ptr("myRepository"),
// Actions: []*armcontainerregistry.WebhookAction{
// to.Ptr(armcontainerregistry.WebhookActionPush),
// },
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// },
// },
// }
}
Output:
func (*WebhooksClient) GetCallbackConfig ¶
func (client *WebhooksClient) GetCallbackConfig(ctx context.Context, resourceGroupName string, registryName string, webhookName string, options *WebhooksClientGetCallbackConfigOptions) (WebhooksClientGetCallbackConfigResponse, error)
GetCallbackConfig - Gets the configuration of service URI and custom headers for the webhook. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- webhookName - The name of the webhook.
- options - WebhooksClientGetCallbackConfigOptions contains the optional parameters for the WebhooksClient.GetCallbackConfig method.
Example ¶
Generated from example definition: 2025-11-01/WebhookGetCallbackConfig.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewWebhooksClient().GetCallbackConfig(ctx, "myResourceGroup", "myRegistry", "myWebhook", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.WebhooksClientGetCallbackConfigResponse{
// CallbackConfig: &armcontainerregistry.CallbackConfig{
// ServiceURI: to.Ptr("http://myservice.com"),
// CustomHeaders: map[string]*string{
// "Authorization": to.Ptr("******"),
// },
// },
// }
}
Output:
func (*WebhooksClient) NewListEventsPager ¶
func (client *WebhooksClient) NewListEventsPager(resourceGroupName string, registryName string, webhookName string, options *WebhooksClientListEventsOptions) *runtime.Pager[WebhooksClientListEventsResponse]
NewListEventsPager - Lists recent events for the specified webhook.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- webhookName - The name of the webhook.
- options - WebhooksClientListEventsOptions contains the optional parameters for the WebhooksClient.NewListEventsPager method.
Example ¶
Generated from example definition: 2025-11-01/WebhookListEvents.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewWebhooksClient().NewListEventsPager("myResourceGroup", "myRegistry", "myWebhook", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armcontainerregistry.WebhooksClientListEventsResponse{
// EventListResult: armcontainerregistry.EventListResult{
// Value: []*armcontainerregistry.Event{
// {
// ID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// EventRequestMessage: &armcontainerregistry.EventRequestMessage{
// Content: &armcontainerregistry.EventContent{
// ID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T23:14:37.0707808Z"); return t}()),
// Action: to.Ptr("push"),
// Target: &armcontainerregistry.Target{
// MediaType: to.Ptr("application/vnd.docker.distribution.manifest.v2+json"),
// Size: to.Ptr[int64](708),
// Digest: to.Ptr("sha256:fea8895f450959fa676bcc1df0611ea93823a735a01205fd8622846041d0c7cf"),
// Length: to.Ptr[int64](708),
// Repository: to.Ptr("hello-world"),
// URL: to.Ptr("http://192.168.100.227:5000/v2/hello-world/manifests/sha256:fea8895f450959fa676bcc1df0611ea93823a735a01205fd8622846041d0c7cf"),
// Tag: to.Ptr("latest"),
// },
// Request: &armcontainerregistry.Request{
// ID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// Addr: to.Ptr("192.168.64.11:42961"),
// Host: to.Ptr("192.168.100.227:5000"),
// Method: to.Ptr("GET"),
// Useragent: to.Ptr("curl/7.38.0"),
// },
// Actor: &armcontainerregistry.Actor{
// },
// Source: &armcontainerregistry.Source{
// Addr: to.Ptr("xtal.local:5000"),
// InstanceID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// },
// },
// Headers: map[string]*string{
// "Content-Type": to.Ptr("application/json"),
// "Content-Length": to.Ptr("719"),
// "Authorization": to.Ptr("******"),
// },
// Method: to.Ptr("POST"),
// RequestURI: to.Ptr("http://myservice.com"),
// Version: to.Ptr("1.1"),
// },
// EventResponseMessage: &armcontainerregistry.EventResponseMessage{
// Headers: map[string]*string{
// "Content-Length": to.Ptr("0"),
// },
// StatusCode: to.Ptr("200"),
// Version: to.Ptr("1.1"),
// },
// },
// },
// },
// }
}
}
Output:
func (*WebhooksClient) NewListPager ¶
func (client *WebhooksClient) NewListPager(resourceGroupName string, registryName string, options *WebhooksClientListOptions) *runtime.Pager[WebhooksClientListResponse]
NewListPager - Lists all the webhooks for the specified container registry.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- options - WebhooksClientListOptions contains the optional parameters for the WebhooksClient.NewListPager method.
Example ¶
Generated from example definition: 2025-11-01/WebhookList.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewWebhooksClient().NewListPager("myResourceGroup", "myRegistry", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armcontainerregistry.WebhooksClientListResponse{
// WebhookListResult: armcontainerregistry.WebhookListResult{
// Value: []*armcontainerregistry.Webhook{
// {
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/webhooks/myWebhook"),
// Name: to.Ptr("myWebhook"),
// Type: to.Ptr("Microsoft.ContainerRegistry/registries/webhooks"),
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "key": to.Ptr("value"),
// },
// Properties: &armcontainerregistry.WebhookProperties{
// Status: to.Ptr(armcontainerregistry.WebhookStatusEnabled),
// Scope: to.Ptr("myRepository"),
// Actions: []*armcontainerregistry.WebhookAction{
// to.Ptr(armcontainerregistry.WebhookActionPush),
// },
// ProvisioningState: to.Ptr(armcontainerregistry.ProvisioningStateSucceeded),
// },
// },
// },
// },
// }
}
}
Output:
func (*WebhooksClient) Ping ¶
func (client *WebhooksClient) Ping(ctx context.Context, resourceGroupName string, registryName string, webhookName string, options *WebhooksClientPingOptions) (WebhooksClientPingResponse, error)
Ping - Triggers a ping event to be sent to the webhook. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-11-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- registryName - The name of the container registry.
- webhookName - The name of the webhook.
- options - WebhooksClientPingOptions contains the optional parameters for the WebhooksClient.Ping method.
Example ¶
Generated from example definition: 2025-11-01/WebhookPing.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerregistry.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewWebhooksClient().Ping(ctx, "myResourceGroup", "myRegistry", "myWebhook", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerregistry.WebhooksClientPingResponse{
// EventInfo: &armcontainerregistry.EventInfo{
// ID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// },
// }
}
Output:
type WebhooksClientBeginCreateOptions ¶
type WebhooksClientBeginCreateOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
WebhooksClientBeginCreateOptions contains the optional parameters for the WebhooksClient.BeginCreate method.
type WebhooksClientBeginDeleteOptions ¶
type WebhooksClientBeginDeleteOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
WebhooksClientBeginDeleteOptions contains the optional parameters for the WebhooksClient.BeginDelete method.
type WebhooksClientBeginUpdateOptions ¶
type WebhooksClientBeginUpdateOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
WebhooksClientBeginUpdateOptions contains the optional parameters for the WebhooksClient.BeginUpdate method.
type WebhooksClientCreateResponse ¶
type WebhooksClientCreateResponse struct {
// An object that represents a webhook for a container registry.
Webhook
}
WebhooksClientCreateResponse contains the response from method WebhooksClient.BeginCreate.
type WebhooksClientDeleteResponse ¶
type WebhooksClientDeleteResponse struct {
}
WebhooksClientDeleteResponse contains the response from method WebhooksClient.BeginDelete.
type WebhooksClientGetCallbackConfigOptions ¶
type WebhooksClientGetCallbackConfigOptions struct {
}
WebhooksClientGetCallbackConfigOptions contains the optional parameters for the WebhooksClient.GetCallbackConfig method.
type WebhooksClientGetCallbackConfigResponse ¶
type WebhooksClientGetCallbackConfigResponse struct {
// The configuration of service URI and custom headers for the webhook.
CallbackConfig
}
WebhooksClientGetCallbackConfigResponse contains the response from method WebhooksClient.GetCallbackConfig.
type WebhooksClientGetOptions ¶
type WebhooksClientGetOptions struct {
}
WebhooksClientGetOptions contains the optional parameters for the WebhooksClient.Get method.
type WebhooksClientGetResponse ¶
type WebhooksClientGetResponse struct {
// An object that represents a webhook for a container registry.
Webhook
}
WebhooksClientGetResponse contains the response from method WebhooksClient.Get.
type WebhooksClientListEventsOptions ¶
type WebhooksClientListEventsOptions struct {
}
WebhooksClientListEventsOptions contains the optional parameters for the WebhooksClient.NewListEventsPager method.
type WebhooksClientListEventsResponse ¶
type WebhooksClientListEventsResponse struct {
// The result of a request to list events for a webhook.
EventListResult
}
WebhooksClientListEventsResponse contains the response from method WebhooksClient.NewListEventsPager.
type WebhooksClientListOptions ¶
type WebhooksClientListOptions struct {
}
WebhooksClientListOptions contains the optional parameters for the WebhooksClient.NewListPager method.
type WebhooksClientListResponse ¶
type WebhooksClientListResponse struct {
// The result of a request to list webhooks for a container registry.
WebhookListResult
}
WebhooksClientListResponse contains the response from method WebhooksClient.NewListPager.
type WebhooksClientPingOptions ¶
type WebhooksClientPingOptions struct {
}
WebhooksClientPingOptions contains the optional parameters for the WebhooksClient.Ping method.
type WebhooksClientPingResponse ¶
type WebhooksClientPingResponse struct {
// The basic information of an event.
EventInfo
}
WebhooksClientPingResponse contains the response from method WebhooksClient.Ping.
type WebhooksClientUpdateResponse ¶
type WebhooksClientUpdateResponse struct {
// An object that represents a webhook for a container registry.
Webhook
}
WebhooksClientUpdateResponse contains the response from method WebhooksClient.BeginUpdate.
type ZoneRedundancy ¶
type ZoneRedundancy string
ZoneRedundancy - Whether or not zone redundancy is enabled for this container registry
const ( ZoneRedundancyDisabled ZoneRedundancy = "Disabled" ZoneRedundancyEnabled ZoneRedundancy = "Enabled" )
func PossibleZoneRedundancyValues ¶
func PossibleZoneRedundancyValues() []ZoneRedundancy
PossibleZoneRedundancyValues returns the possible values for the ZoneRedundancy const type.
Source Files
¶
- cacherules_client.go
- client_factory.go
- connectedregistries_client.go
- constants.go
- credentialsets_client.go
- models.go
- models_serde.go
- operations_client.go
- options.go
- privateendpointconnections_client.go
- registries_client.go
- replications_client.go
- responses.go
- scopemaps_client.go
- tokens_client.go
- version.go
- webhooks_client.go