Documentation
¶
Index ¶
- type ActionType
- type ClientFactory
- type CreatedByType
- type CustomerManagedKeyEncryption
- type KeyEncryptionKeyIdentity
- type KeyEncryptionKeyIdentityType
- type ManagedServiceIdentity
- type ManagedServiceIdentityType
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type Origin
- type ResourceEncryptionConfiguration
- type ResourceProvisioningState
- type SystemData
- type UserAssignedIdentity
- type Workspace
- type WorkspaceListResult
- type WorkspacePatch
- type WorkspacePatchProperties
- type WorkspaceProperties
- type WorkspaceSKU
- type WorkspaceSKUName
- type WorkspaceSKUTier
- type WorkspacesClient
- func (client *WorkspacesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, ...) (*runtime.Poller[WorkspacesClientCreateOrUpdateResponse], error)
- func (client *WorkspacesClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, ...) (*runtime.Poller[WorkspacesClientDeleteResponse], error)
- func (client *WorkspacesClient) BeginUpdate(ctx context.Context, resourceGroupName string, workspaceName string, ...) (*runtime.Poller[WorkspacesClientUpdateResponse], error)
- func (client *WorkspacesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, ...) (WorkspacesClientGetResponse, error)
- func (client *WorkspacesClient) NewListByResourceGroupPager(resourceGroupName string, options *WorkspacesClientListByResourceGroupOptions) *runtime.Pager[WorkspacesClientListByResourceGroupResponse]
- func (client *WorkspacesClient) NewListBySubscriptionPager(options *WorkspacesClientListBySubscriptionOptions) *runtime.Pager[WorkspacesClientListBySubscriptionResponse]
- type WorkspacesClientBeginCreateOrUpdateOptions
- type WorkspacesClientBeginDeleteOptions
- type WorkspacesClientBeginUpdateOptions
- type WorkspacesClientCreateOrUpdateResponse
- type WorkspacesClientDeleteResponse
- type WorkspacesClientGetOptions
- type WorkspacesClientGetResponse
- type WorkspacesClientListByResourceGroupOptions
- type WorkspacesClientListByResourceGroupResponse
- type WorkspacesClientListBySubscriptionOptions
- type WorkspacesClientListBySubscriptionResponse
- type WorkspacesClientUpdateResponse
Examples ¶
- OperationsClient.NewListPager
- WorkspacesClient.BeginCreateOrUpdate (CreateOrUpdateAnOnlineExperimentationWorkspaceWithFreeSku)
- WorkspacesClient.BeginCreateOrUpdate (CreateOrUpdateAnOnlineExperimentationWorkspaceWithFreeSkuAndCustomerManagedKey)
- WorkspacesClient.BeginDelete
- WorkspacesClient.BeginUpdate (UpdateAnOnlineExperimentationWorkspace)
- WorkspacesClient.BeginUpdate (UpdateAnOnlineExperimentationWorkspaceWithCustomerManagedEncryptionKey)
- WorkspacesClient.Get
- WorkspacesClient.NewListByResourceGroupPager
- WorkspacesClient.NewListBySubscriptionPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionType ¶
type ActionType string
ActionType - Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
const ( // ActionTypeInternal - Actions are for internal-only APIs. ActionTypeInternal ActionType = "Internal" )
func PossibleActionTypeValues ¶
func PossibleActionTypeValues() []ActionType
PossibleActionTypeValues returns the possible values for the ActionType 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) NewOperationsClient ¶
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewWorkspacesClient ¶
func (c *ClientFactory) NewWorkspacesClient() *WorkspacesClient
NewWorkspacesClient creates a new instance of WorkspacesClient.
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 CustomerManagedKeyEncryption ¶
type CustomerManagedKeyEncryption struct {
// All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault.
KeyEncryptionKeyIdentity *KeyEncryptionKeyIdentity
// key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78
// or https://contosovault.vault.azure.net/keys/contosokek.
KeyEncryptionKeyURL *string
}
CustomerManagedKeyEncryption - Customer-managed key encryption properties for the resource.
func (CustomerManagedKeyEncryption) MarshalJSON ¶
func (c CustomerManagedKeyEncryption) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CustomerManagedKeyEncryption.
func (*CustomerManagedKeyEncryption) UnmarshalJSON ¶
func (c *CustomerManagedKeyEncryption) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CustomerManagedKeyEncryption.
type KeyEncryptionKeyIdentity ¶
type KeyEncryptionKeyIdentity struct {
// application client identity to use for accessing key encryption key Url in a different tenant. Ex: f83c6b1b-4d34-47e4-bb34-9d83df58b540
FederatedClientID *string
// The type of identity to use. Values can be systemAssignedIdentity, userAssignedIdentity, or delegatedResourceIdentity.
IdentityType *KeyEncryptionKeyIdentityType
// User assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/
// group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity.
UserAssignedIdentityResourceID *string
}
KeyEncryptionKeyIdentity - All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault.
func (KeyEncryptionKeyIdentity) MarshalJSON ¶
func (k KeyEncryptionKeyIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KeyEncryptionKeyIdentity.
func (*KeyEncryptionKeyIdentity) UnmarshalJSON ¶
func (k *KeyEncryptionKeyIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KeyEncryptionKeyIdentity.
type KeyEncryptionKeyIdentityType ¶
type KeyEncryptionKeyIdentityType string
KeyEncryptionKeyIdentityType - The type of identity to use.
const ( // KeyEncryptionKeyIdentityTypeSystemAssignedIdentity - System assigned identity KeyEncryptionKeyIdentityTypeSystemAssignedIdentity KeyEncryptionKeyIdentityType = "SystemAssignedIdentity" // KeyEncryptionKeyIdentityTypeUserAssignedIdentity - User assigned identity KeyEncryptionKeyIdentityTypeUserAssignedIdentity KeyEncryptionKeyIdentityType = "UserAssignedIdentity" )
func PossibleKeyEncryptionKeyIdentityTypeValues ¶
func PossibleKeyEncryptionKeyIdentityTypeValues() []KeyEncryptionKeyIdentityType
PossibleKeyEncryptionKeyIdentityTypeValues returns the possible values for the KeyEncryptionKeyIdentityType const type.
type ManagedServiceIdentity ¶
type ManagedServiceIdentity struct {
// REQUIRED; The type of managed identity assigned to this resource.
Type *ManagedServiceIdentityType
// The identities assigned to this resource by the user.
UserAssignedIdentities map[string]*UserAssignedIdentity
// READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned
// identity.
PrincipalID *string
// READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
TenantID *string
}
ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities)
func (ManagedServiceIdentity) MarshalJSON ¶
func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity.
func (*ManagedServiceIdentity) UnmarshalJSON ¶
func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity.
type ManagedServiceIdentityType ¶
type ManagedServiceIdentityType string
ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
const ( // ManagedServiceIdentityTypeNone - No managed identity. ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" // ManagedServiceIdentityTypeSystemAssigned - System assigned managed identity. ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned" // ManagedServiceIdentityTypeSystemAssignedUserAssigned - System and user assigned managed identity. ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned,UserAssigned" // ManagedServiceIdentityTypeUserAssigned - User assigned managed identity. ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" )
func PossibleManagedServiceIdentityTypeValues ¶
func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType
PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type.
type Operation ¶
type Operation struct {
// Localized display information for this particular operation.
Display *OperationDisplay
// READ-ONLY; Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
ActionType *ActionType
// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure
// Resource Manager/control-plane operations.
IsDataAction *bool
// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
// "Microsoft.Compute/virtualMachines/capture/action"
Name *string
// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
// value is "user,system"
Origin *Origin
}
Operation - REST API Operation
Details of a REST API operation, returned from the Resource Provider Operations API
func (Operation) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct {
// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views.
Description *string
// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual
// Machine", "Restart Virtual Machine".
Operation *string
// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft
// Compute".
Provider *string
// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job
// Schedule Collections".
Resource *string
}
OperationDisplay - Localized display information for an operation.
func (OperationDisplay) MarshalJSON ¶
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type OperationListResult ¶
type OperationListResult struct {
// REQUIRED; The Operation items on this page
Value []*Operation
// The link to the next page of items
NextLink *string
}
OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
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 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-05-31-preview
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: 2025-05-31-preview/OnlineExperimentationWorkspaces_OperationsList.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/onlineexperimentation/armonlineexperimentation"
"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 := armonlineexperimentation.NewClientFactory("", 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 = armonlineexperimentation.OperationsClientListResponse{
// OperationListResult: armonlineexperimentation.OperationListResult{
// Value: []*armonlineexperimentation.Operation{
// {
// Name: to.Ptr("aaaaaaaaa"),
// IsDataAction: to.Ptr(true),
// Display: &armonlineexperimentation.OperationDisplay{
// Provider: to.Ptr("aaaaaaaa"),
// Resource: to.Ptr("aaaaaaaaaaaaaaaaa"),
// Operation: to.Ptr("aaaaaaaaaaaaaaaaaaaa"),
// Description: to.Ptr("aaaaaaaaaaaaaaaaaaaa"),
// },
// Origin: to.Ptr(armonlineexperimentation.OriginUser),
// },
// },
// NextLink: to.Ptr("https://management.azure.com/providers/Microsoft.OnlineExperimentation/operations?api-version=2025-05-31-preview&$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa"),
// },
// }
}
}
Output:
type OperationsClientListOptions ¶
type OperationsClientListOptions struct {
}
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct {
// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
OperationListResult
}
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type Origin ¶
type Origin string
Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"
const ( // OriginSystem - Indicates the operation is initiated by a system. OriginSystem Origin = "system" // OriginUser - Indicates the operation is initiated by a user. OriginUser Origin = "user" // OriginUserSystem - Indicates the operation is initiated by a user or system. OriginUserSystem Origin = "user,system" )
func PossibleOriginValues ¶
func PossibleOriginValues() []Origin
PossibleOriginValues returns the possible values for the Origin const type.
type ResourceEncryptionConfiguration ¶
type ResourceEncryptionConfiguration struct {
// All Customer-managed key encryption properties for the resource.
CustomerManagedKeyEncryption *CustomerManagedKeyEncryption
}
ResourceEncryptionConfiguration - The encryption configuration for the online experimentation workspace resource.
func (ResourceEncryptionConfiguration) MarshalJSON ¶
func (r ResourceEncryptionConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceEncryptionConfiguration.
func (*ResourceEncryptionConfiguration) UnmarshalJSON ¶
func (r *ResourceEncryptionConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceEncryptionConfiguration.
type ResourceProvisioningState ¶
type ResourceProvisioningState string
ResourceProvisioningState - The provisioning state of a resource type.
const ( // ResourceProvisioningStateCanceled - Resource creation was canceled. ResourceProvisioningStateCanceled ResourceProvisioningState = "Canceled" // ResourceProvisioningStateFailed - Resource creation failed. ResourceProvisioningStateFailed ResourceProvisioningState = "Failed" // ResourceProvisioningStateSucceeded - Resource has been created. ResourceProvisioningStateSucceeded ResourceProvisioningState = "Succeeded" )
func PossibleResourceProvisioningStateValues ¶
func PossibleResourceProvisioningStateValues() []ResourceProvisioningState
PossibleResourceProvisioningStateValues returns the possible values for the ResourceProvisioningState const type.
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 UserAssignedIdentity ¶
type UserAssignedIdentity struct {
// READ-ONLY; The client ID of the assigned identity.
ClientID *string
// READ-ONLY; The principal ID of the assigned identity.
PrincipalID *string
}
UserAssignedIdentity - User assigned identity properties
func (UserAssignedIdentity) MarshalJSON ¶
func (u UserAssignedIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.
func (*UserAssignedIdentity) UnmarshalJSON ¶
func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.
type Workspace ¶
type Workspace struct {
// REQUIRED; The geo-location where the resource lives
Location *string
// The managed service identities assigned to this resource.
Identity *ManagedServiceIdentity
// The resource-specific properties for this resource.
Properties *WorkspaceProperties
// The SKU (Stock Keeping Unit) assigned to this resource.
SKU *WorkspaceSKU
// 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 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
}
Workspace - An online experimentation workspace resource.
func (Workspace) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Workspace.
func (*Workspace) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Workspace.
type WorkspaceListResult ¶
type WorkspaceListResult struct {
// REQUIRED; The OnlineExperimentationWorkspace items on this page
Value []*Workspace
// The link to the next page of items
NextLink *string
}
WorkspaceListResult - The response of a OnlineExperimentationWorkspace list operation.
func (WorkspaceListResult) MarshalJSON ¶
func (w WorkspaceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WorkspaceListResult.
func (*WorkspaceListResult) UnmarshalJSON ¶
func (w *WorkspaceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceListResult.
type WorkspacePatch ¶
type WorkspacePatch struct {
// The managed service identities assigned to this resource.
Identity *ManagedServiceIdentity
// Updatable properties of the online experimentation workspace resource.
Properties *WorkspacePatchProperties
// The SKU (Stock Keeping Unit) assigned to this resource.
SKU *WorkspaceSKU
// Resource tags.
Tags map[string]*string
}
WorkspacePatch - Partial update of an online experimentation workspace resource.
func (WorkspacePatch) MarshalJSON ¶
func (w WorkspacePatch) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WorkspacePatch.
func (*WorkspacePatch) UnmarshalJSON ¶
func (w *WorkspacePatch) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WorkspacePatch.
type WorkspacePatchProperties ¶
type WorkspacePatchProperties struct {
// The encryption configuration for the online experimentation workspace resource.
Encryption *ResourceEncryptionConfiguration
// The resource identifier of the Log Analytics workspace which online experimentation workspace uses for generating experiment
// analysis results.
LogAnalyticsWorkspaceResourceID *string
// The resource identifier of storage account where logs are exported from Log Analytics workspace. online experimentation
// workspace uses it generating experiment analysis results.
LogsExporterStorageAccountResourceID *string
}
func (WorkspacePatchProperties) MarshalJSON ¶
func (w WorkspacePatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WorkspacePatchProperties.
func (*WorkspacePatchProperties) UnmarshalJSON ¶
func (w *WorkspacePatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WorkspacePatchProperties.
type WorkspaceProperties ¶
type WorkspaceProperties struct {
// REQUIRED; The resource identifier of App Configuration with which this online experimentation workspace is tied for experimentation.
// This is a required field for creating an online experimentation workspace.
AppConfigurationResourceID *string
// REQUIRED; The resource identifier of the Log Analytics workspace which online experimentation workspace uses for generating
// experiment analysis results.
LogAnalyticsWorkspaceResourceID *string
// REQUIRED; The resource identifier of storage account where logs are exported from Log Analytics workspace. online experimentation
// workspace uses it generating experiment analysis results.
LogsExporterStorageAccountResourceID *string
// The encryption configuration for the online experimentation workspace resource.
Encryption *ResourceEncryptionConfiguration
// READ-ONLY; The data plane endpoint for the online experimentation workspace resource.
Endpoint *string
// READ-ONLY; The provisioning state for the resource
ProvisioningState *ResourceProvisioningState
// READ-ONLY; The Id of the workspace.
WorkspaceID *string
}
WorkspaceProperties - The properties of an online experimentation workspace.
func (WorkspaceProperties) MarshalJSON ¶
func (w WorkspaceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WorkspaceProperties.
func (*WorkspaceProperties) UnmarshalJSON ¶
func (w *WorkspaceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceProperties.
type WorkspaceSKU ¶
type WorkspaceSKU struct {
// REQUIRED; The name of the SKU. Ex - F0, P0. It is typically a letter+number code
Name *WorkspaceSKUName
// READ-ONLY; The name of the SKU tier
Tier *WorkspaceSKUTier
}
WorkspaceSKU - The SKU (Stock Keeping Unit) assigned to this resource.
func (WorkspaceSKU) MarshalJSON ¶
func (w WorkspaceSKU) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WorkspaceSKU.
func (*WorkspaceSKU) UnmarshalJSON ¶
func (w *WorkspaceSKU) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceSKU.
type WorkspaceSKUName ¶
type WorkspaceSKUName string
WorkspaceSKUName - The allowed SKU names for the online experimentation workspace.
const ( // WorkspaceSKUNameD0 - The Developer service sku name. WorkspaceSKUNameD0 WorkspaceSKUName = "D0" // WorkspaceSKUNameF0 - The Free service sku name. WorkspaceSKUNameF0 WorkspaceSKUName = "F0" // WorkspaceSKUNameP0 - The Premium service sku name. WorkspaceSKUNameP0 WorkspaceSKUName = "P0" // WorkspaceSKUNameS0 - The Standard service sku name. WorkspaceSKUNameS0 WorkspaceSKUName = "S0" )
func PossibleWorkspaceSKUNameValues ¶
func PossibleWorkspaceSKUNameValues() []WorkspaceSKUName
PossibleWorkspaceSKUNameValues returns the possible values for the WorkspaceSKUName const type.
type WorkspaceSKUTier ¶
type WorkspaceSKUTier string
WorkspaceSKUTier - The allowed SKU tiers for the online experimentation workspace.
const ( // WorkspaceSKUTierDeveloper - The Developer service tier. WorkspaceSKUTierDeveloper WorkspaceSKUTier = "Developer" // WorkspaceSKUTierFree - The Free service tier. WorkspaceSKUTierFree WorkspaceSKUTier = "Free" // WorkspaceSKUTierPremium - The Premium service tier. WorkspaceSKUTierPremium WorkspaceSKUTier = "Premium" // WorkspaceSKUTierStandard - The Standard service tier. WorkspaceSKUTierStandard WorkspaceSKUTier = "Standard" )
func PossibleWorkspaceSKUTierValues ¶
func PossibleWorkspaceSKUTierValues() []WorkspaceSKUTier
PossibleWorkspaceSKUTierValues returns the possible values for the WorkspaceSKUTier const type.
type WorkspacesClient ¶
type WorkspacesClient struct {
// contains filtered or unexported fields
}
WorkspacesClient contains the methods for the Workspaces group. Don't use this type directly, use NewWorkspacesClient() instead.
func NewWorkspacesClient ¶
func NewWorkspacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspacesClient, error)
NewWorkspacesClient creates a new instance of WorkspacesClient 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 (*WorkspacesClient) BeginCreateOrUpdate ¶
func (client *WorkspacesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, resource Workspace, options *WorkspacesClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkspacesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create an online experimentation workspace, or update an existing workspace. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-05-31-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- workspaceName - The name of the OnlineExperimentationWorkspace
- resource - Resource create parameters.
- options - WorkspacesClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspacesClient.BeginCreateOrUpdate method.
Example (CreateOrUpdateAnOnlineExperimentationWorkspaceWithFreeSku) ¶
Generated from example definition: 2025-05-31-preview/OnlineExperimentationWorkspaces_CreateOrUpdate.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/onlineexperimentation/armonlineexperimentation"
"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 := armonlineexperimentation.NewClientFactory("fa5fc227-a624-475e-b696-cdd604c735bc", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewWorkspacesClient().BeginCreateOrUpdate(ctx, "res9871", "expworkspace7", armonlineexperimentation.Workspace{
Location: to.Ptr("eastus2"),
Tags: map[string]*string{
"newKey": to.Ptr("newVal"),
},
Properties: &armonlineexperimentation.WorkspaceProperties{
LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
AppConfigurationResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
},
Identity: &armonlineexperimentation.ManagedServiceIdentity{
Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {},
},
},
SKU: &armonlineexperimentation.WorkspaceSKU{
Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
},
}, 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 = armonlineexperimentation.WorkspacesClientCreateOrUpdateResponse{
// Workspace: &armonlineexperimentation.Workspace{
// ID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OnlineExperimentation/workspaces/expworkspace7"),
// Name: to.Ptr("expworkspace7"),
// Type: to.Ptr("Microsoft.OnlineExperimentation/workspaces"),
// Location: to.Ptr("eastus2"),
// Tags: map[string]*string{
// "newKey": to.Ptr("newVal"),
// },
// Properties: &armonlineexperimentation.WorkspaceProperties{
// WorkspaceID: to.Ptr("02270d43-f68a-401b-b526-86942525c351"),
// ProvisioningState: to.Ptr(armonlineexperimentation.ResourceProvisioningStateSucceeded),
// LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
// LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
// AppConfigurationResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
// Endpoint: to.Ptr("https://expworkspace7.eastus2.exp.azure.net"),
// },
// Identity: &armonlineexperimentation.ManagedServiceIdentity{
// Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
// UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
// "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armonlineexperimentation.UserAssignedIdentity{
// ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
// PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
// },
// "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armonlineexperimentation.UserAssignedIdentity{
// ClientID: to.Ptr("47429305-c0d3-40bc-8595-61946c4df3dc"),
// PrincipalID: to.Ptr("bf9ebbc8-b92d-4752-8e66-c999000326e0"),
// },
// },
// },
// SKU: &armonlineexperimentation.WorkspaceSKU{
// Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
// Tier: to.Ptr(armonlineexperimentation.WorkspaceSKUTierFree),
// },
// },
// }
}
Output:
Example (CreateOrUpdateAnOnlineExperimentationWorkspaceWithFreeSkuAndCustomerManagedKey) ¶
Generated from example definition: 2025-05-31-preview/OnlineExperimentationWorkspaces_CreateOrUpdateWithEncryption.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/onlineexperimentation/armonlineexperimentation"
"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 := armonlineexperimentation.NewClientFactory("fa5fc227-a624-475e-b696-cdd604c735bc", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewWorkspacesClient().BeginCreateOrUpdate(ctx, "res9871", "expworkspace7", armonlineexperimentation.Workspace{
Location: to.Ptr("eastus2"),
Tags: map[string]*string{
"newKey": to.Ptr("newVal"),
},
Properties: &armonlineexperimentation.WorkspaceProperties{
LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
AppConfigurationResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
Encryption: &armonlineexperimentation.ResourceEncryptionConfiguration{
CustomerManagedKeyEncryption: &armonlineexperimentation.CustomerManagedKeyEncryption{
KeyEncryptionKeyIdentity: &armonlineexperimentation.KeyEncryptionKeyIdentity{
IdentityType: to.Ptr(armonlineexperimentation.KeyEncryptionKeyIdentityTypeUserAssignedIdentity),
UserAssignedIdentityResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"),
},
KeyEncryptionKeyURL: to.Ptr("https://contosovault.vault.azure.net/keys/contosokek"),
},
},
},
Identity: &armonlineexperimentation.ManagedServiceIdentity{
Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {},
},
},
SKU: &armonlineexperimentation.WorkspaceSKU{
Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
},
}, 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 = armonlineexperimentation.WorkspacesClientCreateOrUpdateResponse{
// Workspace: &armonlineexperimentation.Workspace{
// ID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OnlineExperimentation/workspaces/expworkspace7"),
// Name: to.Ptr("expworkspace7"),
// Type: to.Ptr("Microsoft.OnlineExperimentation/workspaces"),
// Location: to.Ptr("eastus2"),
// Tags: map[string]*string{
// "newKey": to.Ptr("newVal"),
// },
// Properties: &armonlineexperimentation.WorkspaceProperties{
// WorkspaceID: to.Ptr("02270d43-f68a-401b-b526-86942525c351"),
// ProvisioningState: to.Ptr(armonlineexperimentation.ResourceProvisioningStateSucceeded),
// LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
// LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
// AppConfigurationResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
// Encryption: &armonlineexperimentation.ResourceEncryptionConfiguration{
// CustomerManagedKeyEncryption: &armonlineexperimentation.CustomerManagedKeyEncryption{
// KeyEncryptionKeyIdentity: &armonlineexperimentation.KeyEncryptionKeyIdentity{
// IdentityType: to.Ptr(armonlineexperimentation.KeyEncryptionKeyIdentityTypeUserAssignedIdentity),
// UserAssignedIdentityResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"),
// },
// KeyEncryptionKeyURL: to.Ptr("https://contosovault.vault.azure.net/keys/contosokek"),
// },
// },
// Endpoint: to.Ptr("https://expworkspace7.eastus2.exp.azure.net"),
// },
// Identity: &armonlineexperimentation.ManagedServiceIdentity{
// Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
// UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
// "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armonlineexperimentation.UserAssignedIdentity{
// ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
// PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
// },
// "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armonlineexperimentation.UserAssignedIdentity{
// ClientID: to.Ptr("47429305-c0d3-40bc-8595-61946c4df3dc"),
// PrincipalID: to.Ptr("bf9ebbc8-b92d-4752-8e66-c999000326e0"),
// },
// },
// },
// SKU: &armonlineexperimentation.WorkspaceSKU{
// Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
// Tier: to.Ptr(armonlineexperimentation.WorkspaceSKUTierFree),
// },
// },
// }
}
Output:
func (*WorkspacesClient) BeginDelete ¶
func (client *WorkspacesClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginDeleteOptions) (*runtime.Poller[WorkspacesClientDeleteResponse], error)
BeginDelete - Deletes an online experimentation workspace. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-05-31-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- workspaceName - The name of the OnlineExperimentationWorkspace
- options - WorkspacesClientBeginDeleteOptions contains the optional parameters for the WorkspacesClient.BeginDelete method.
Example ¶
Generated from example definition: 2025-05-31-preview/OnlineExperimentationWorkspaces_Delete.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/onlineexperimentation/armonlineexperimentation"
"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 := armonlineexperimentation.NewClientFactory("fa5fc227-a624-475e-b696-cdd604c735bc", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewWorkspacesClient().BeginDelete(ctx, "res9871", "expworkspace3", 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 (*WorkspacesClient) BeginUpdate ¶
func (client *WorkspacesClient) BeginUpdate(ctx context.Context, resourceGroupName string, workspaceName string, properties WorkspacePatch, options *WorkspacesClientBeginUpdateOptions) (*runtime.Poller[WorkspacesClientUpdateResponse], error)
BeginUpdate - Patch an online experimentation workspace. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-05-31-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- workspaceName - The name of the OnlineExperimentationWorkspace
- properties - The resource properties to be updated.
- options - WorkspacesClientBeginUpdateOptions contains the optional parameters for the WorkspacesClient.BeginUpdate method.
Example (UpdateAnOnlineExperimentationWorkspace) ¶
Generated from example definition: 2025-05-31-preview/OnlineExperimentationWorkspaces_Update.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/onlineexperimentation/armonlineexperimentation"
"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 := armonlineexperimentation.NewClientFactory("fa5fc227-a624-475e-b696-cdd604c735bc", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewWorkspacesClient().BeginUpdate(ctx, "res9871", "expworkspace3", armonlineexperimentation.WorkspacePatch{
Tags: map[string]*string{
"newKey": to.Ptr("newVal"),
},
Identity: &armonlineexperimentation.ManagedServiceIdentity{
Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {},
},
},
}, 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 = armonlineexperimentation.WorkspacesClientUpdateResponse{
// Workspace: &armonlineexperimentation.Workspace{
// ID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OnlineExperimentation/workspaces/expworkspace3"),
// Name: to.Ptr("expworkspace3"),
// Type: to.Ptr("Microsoft.OnlineExperimentation/workspaces"),
// Location: to.Ptr("westus2"),
// Tags: map[string]*string{
// "supportTeam": to.Ptr("someteam@microsoft.com"),
// "newKey": to.Ptr("newVal"),
// },
// Properties: &armonlineexperimentation.WorkspaceProperties{
// WorkspaceID: to.Ptr("02270d43-f68a-401b-b526-86942525c350"),
// ProvisioningState: to.Ptr(armonlineexperimentation.ResourceProvisioningStateSucceeded),
// LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
// LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
// AppConfigurationResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
// Endpoint: to.Ptr("https://expworkspace3.westus2.exp.azure.net"),
// },
// Identity: &armonlineexperimentation.ManagedServiceIdentity{
// Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
// UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
// "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armonlineexperimentation.UserAssignedIdentity{
// ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
// PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
// },
// "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armonlineexperimentation.UserAssignedIdentity{
// ClientID: to.Ptr("47429305-c0d3-40bc-8595-61946c4df3dc"),
// PrincipalID: to.Ptr("bf9ebbc8-b92d-4752-8e66-c999000326e0"),
// },
// },
// },
// SKU: &armonlineexperimentation.WorkspaceSKU{
// Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
// Tier: to.Ptr(armonlineexperimentation.WorkspaceSKUTierFree),
// },
// },
// }
}
Output:
Example (UpdateAnOnlineExperimentationWorkspaceWithCustomerManagedEncryptionKey) ¶
Generated from example definition: 2025-05-31-preview/OnlineExperimentationWorkspaces_UpdateWithEncryption.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/onlineexperimentation/armonlineexperimentation"
"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 := armonlineexperimentation.NewClientFactory("fa5fc227-a624-475e-b696-cdd604c735bc", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewWorkspacesClient().BeginUpdate(ctx, "res9871", "expworkspace3", armonlineexperimentation.WorkspacePatch{
Tags: map[string]*string{
"newKey": to.Ptr("newVal"),
},
Identity: &armonlineexperimentation.ManagedServiceIdentity{
Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {},
},
},
Properties: &armonlineexperimentation.WorkspacePatchProperties{
LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
Encryption: &armonlineexperimentation.ResourceEncryptionConfiguration{
CustomerManagedKeyEncryption: &armonlineexperimentation.CustomerManagedKeyEncryption{
KeyEncryptionKeyIdentity: &armonlineexperimentation.KeyEncryptionKeyIdentity{
IdentityType: to.Ptr(armonlineexperimentation.KeyEncryptionKeyIdentityTypeUserAssignedIdentity),
UserAssignedIdentityResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"),
},
KeyEncryptionKeyURL: to.Ptr("https://contosovault.vault.azure.net/keys/contosokek"),
},
},
},
}, 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 = armonlineexperimentation.WorkspacesClientUpdateResponse{
// Workspace: &armonlineexperimentation.Workspace{
// ID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OnlineExperimentation/workspaces/expworkspace3"),
// Name: to.Ptr("expworkspace3"),
// Type: to.Ptr("Microsoft.OnlineExperimentation/workspaces"),
// Location: to.Ptr("westus2"),
// Tags: map[string]*string{
// "supportTeam": to.Ptr("someteam@microsoft.com"),
// "newKey": to.Ptr("newVal"),
// },
// Properties: &armonlineexperimentation.WorkspaceProperties{
// WorkspaceID: to.Ptr("02270d43-f68a-401b-b526-86942525c350"),
// ProvisioningState: to.Ptr(armonlineexperimentation.ResourceProvisioningStateSucceeded),
// LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
// LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
// AppConfigurationResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
// Encryption: &armonlineexperimentation.ResourceEncryptionConfiguration{
// CustomerManagedKeyEncryption: &armonlineexperimentation.CustomerManagedKeyEncryption{
// KeyEncryptionKeyIdentity: &armonlineexperimentation.KeyEncryptionKeyIdentity{
// IdentityType: to.Ptr(armonlineexperimentation.KeyEncryptionKeyIdentityTypeUserAssignedIdentity),
// UserAssignedIdentityResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"),
// },
// KeyEncryptionKeyURL: to.Ptr("https://contosovault.vault.azure.net/keys/contosokek"),
// },
// },
// Endpoint: to.Ptr("https://expworkspace3.westus2.exp.azure.net"),
// },
// Identity: &armonlineexperimentation.ManagedServiceIdentity{
// Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
// UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
// "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armonlineexperimentation.UserAssignedIdentity{
// ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
// PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
// },
// "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armonlineexperimentation.UserAssignedIdentity{
// ClientID: to.Ptr("47429305-c0d3-40bc-8595-61946c4df3dc"),
// PrincipalID: to.Ptr("bf9ebbc8-b92d-4752-8e66-c999000326e0"),
// },
// },
// },
// SKU: &armonlineexperimentation.WorkspaceSKU{
// Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
// Tier: to.Ptr(armonlineexperimentation.WorkspaceSKUTierFree),
// },
// },
// }
}
Output:
func (*WorkspacesClient) Get ¶
func (client *WorkspacesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientGetOptions) (WorkspacesClientGetResponse, error)
Get - Gets an online experimentation workspace. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-05-31-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- workspaceName - The name of the OnlineExperimentationWorkspace
- options - WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method.
Example ¶
Generated from example definition: 2025-05-31-preview/OnlineExperimentationWorkspaces_Get.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/onlineexperimentation/armonlineexperimentation"
"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 := armonlineexperimentation.NewClientFactory("fa5fc227-a624-475e-b696-cdd604c735bc", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewWorkspacesClient().Get(ctx, "res9871", "expworkspace3", 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 = armonlineexperimentation.WorkspacesClientGetResponse{
// Workspace: &armonlineexperimentation.Workspace{
// ID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OnlineExperimentation/workspaces/expworkspace3"),
// Name: to.Ptr("expworkspace3"),
// Type: to.Ptr("Microsoft.OnlineExperimentation/workspaces"),
// Location: to.Ptr("westus2"),
// Properties: &armonlineexperimentation.WorkspaceProperties{
// WorkspaceID: to.Ptr("02270d43-f68a-401b-b526-86942525c350"),
// ProvisioningState: to.Ptr(armonlineexperimentation.ResourceProvisioningStateSucceeded),
// LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
// LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
// AppConfigurationResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
// Endpoint: to.Ptr("https://expworkspace3.westus2.exp.azure.net"),
// },
// Identity: &armonlineexperimentation.ManagedServiceIdentity{
// Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
// UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
// "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armonlineexperimentation.UserAssignedIdentity{
// ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
// PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
// },
// "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armonlineexperimentation.UserAssignedIdentity{
// ClientID: to.Ptr("47429305-c0d3-40bc-8595-61946c4df3dc"),
// PrincipalID: to.Ptr("bf9ebbc8-b92d-4752-8e66-c999000326e0"),
// },
// },
// },
// SKU: &armonlineexperimentation.WorkspaceSKU{
// Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
// Tier: to.Ptr(armonlineexperimentation.WorkspaceSKUTierFree),
// },
// },
// }
}
Output:
func (*WorkspacesClient) NewListByResourceGroupPager ¶
func (client *WorkspacesClient) NewListByResourceGroupPager(resourceGroupName string, options *WorkspacesClientListByResourceGroupOptions) *runtime.Pager[WorkspacesClientListByResourceGroupResponse]
NewListByResourceGroupPager - Gets all online experimentation workspaces in a resource group.
Generated from API version 2025-05-31-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: 2025-05-31-preview/OnlineExperimentationWorkspaces_ListByResourceGroup.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/onlineexperimentation/armonlineexperimentation"
"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 := armonlineexperimentation.NewClientFactory("fa5fc227-a624-475e-b696-cdd604c735bc", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewWorkspacesClient().NewListByResourceGroupPager("res9871", 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 = armonlineexperimentation.WorkspacesClientListByResourceGroupResponse{
// WorkspaceListResult: armonlineexperimentation.WorkspaceListResult{
// Value: []*armonlineexperimentation.Workspace{
// {
// ID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OnlineExperimentation/workspaces/expworkspace3"),
// Name: to.Ptr("expworkspace3"),
// Type: to.Ptr("Microsoft.OnlineExperimentation/workspaces"),
// Location: to.Ptr("westus2"),
// Properties: &armonlineexperimentation.WorkspaceProperties{
// WorkspaceID: to.Ptr("02270d43-f68a-401b-b526-86942525c350"),
// ProvisioningState: to.Ptr(armonlineexperimentation.ResourceProvisioningStateSucceeded),
// LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
// LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
// AppConfigurationResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
// Endpoint: to.Ptr("https://expworkspace3.westus2.exp.azure.net"),
// },
// Identity: &armonlineexperimentation.ManagedServiceIdentity{
// Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
// UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
// "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armonlineexperimentation.UserAssignedIdentity{
// ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
// PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
// },
// "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armonlineexperimentation.UserAssignedIdentity{
// ClientID: to.Ptr("47429305-c0d3-40bc-8595-61946c4df3dc"),
// PrincipalID: to.Ptr("bf9ebbc8-b92d-4752-8e66-c999000326e0"),
// },
// },
// },
// SKU: &armonlineexperimentation.WorkspaceSKU{
// Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
// Tier: to.Ptr(armonlineexperimentation.WorkspaceSKUTierFree),
// },
// },
// {
// ID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OnlineExperimentation/workspaces/expworkspace2"),
// Name: to.Ptr("expworkspace2"),
// Type: to.Ptr("Microsoft.OnlineExperimentation/workspaces"),
// Location: to.Ptr("westus2"),
// Properties: &armonlineexperimentation.WorkspaceProperties{
// WorkspaceID: to.Ptr("02270d43-f68a-401b-b526-86942525c357"),
// ProvisioningState: to.Ptr(armonlineexperimentation.ResourceProvisioningStateSucceeded),
// LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
// LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
// AppConfigurationResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
// Endpoint: to.Ptr("https://expworkspace2.westus2.exp.azure.net"),
// },
// Identity: &armonlineexperimentation.ManagedServiceIdentity{
// Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
// UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
// "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armonlineexperimentation.UserAssignedIdentity{
// ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
// PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
// },
// "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armonlineexperimentation.UserAssignedIdentity{
// ClientID: to.Ptr("47429305-c0d3-40bc-8595-61946c4df3dc"),
// PrincipalID: to.Ptr("bf9ebbc8-b92d-4752-8e66-c999000326e0"),
// },
// },
// },
// SKU: &armonlineexperimentation.WorkspaceSKU{
// Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
// Tier: to.Ptr(armonlineexperimentation.WorkspaceSKUTierFree),
// },
// },
// },
// },
// }
}
}
Output:
func (*WorkspacesClient) NewListBySubscriptionPager ¶
func (client *WorkspacesClient) NewListBySubscriptionPager(options *WorkspacesClientListBySubscriptionOptions) *runtime.Pager[WorkspacesClientListBySubscriptionResponse]
NewListBySubscriptionPager - Gets all online experimentation workspaces in the specified subscription.
Generated from API version 2025-05-31-preview
- options - WorkspacesClientListBySubscriptionOptions contains the optional parameters for the WorkspacesClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: 2025-05-31-preview/OnlineExperimentationWorkspaces_ListBySubscription.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/onlineexperimentation/armonlineexperimentation"
"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 := armonlineexperimentation.NewClientFactory("fa5fc227-a624-475e-b696-cdd604c735bc", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewWorkspacesClient().NewListBySubscriptionPager(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 = armonlineexperimentation.WorkspacesClientListBySubscriptionResponse{
// WorkspaceListResult: armonlineexperimentation.WorkspaceListResult{
// Value: []*armonlineexperimentation.Workspace{
// {
// ID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OnlineExperimentation/workspaces/expworkspace3"),
// Name: to.Ptr("expworkspace3"),
// Type: to.Ptr("Microsoft.OnlineExperimentation/workspaces"),
// Location: to.Ptr("westus2"),
// Properties: &armonlineexperimentation.WorkspaceProperties{
// WorkspaceID: to.Ptr("02270d43-f68a-401b-b526-86942525c352"),
// ProvisioningState: to.Ptr(armonlineexperimentation.ResourceProvisioningStateSucceeded),
// LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
// LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
// AppConfigurationResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
// Endpoint: to.Ptr("https://expworkspace3.westus2.exp.azure.net"),
// },
// Identity: &armonlineexperimentation.ManagedServiceIdentity{
// Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
// UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
// "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armonlineexperimentation.UserAssignedIdentity{
// ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
// PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
// },
// "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armonlineexperimentation.UserAssignedIdentity{
// ClientID: to.Ptr("47429305-c0d3-40bc-8595-61946c4df3dc"),
// PrincipalID: to.Ptr("bf9ebbc8-b92d-4752-8e66-c999000326e0"),
// },
// },
// },
// SKU: &armonlineexperimentation.WorkspaceSKU{
// Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
// Tier: to.Ptr(armonlineexperimentation.WorkspaceSKUTierFree),
// },
// },
// {
// ID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OnlineExperimentation/workspaces/expworkspace2"),
// Name: to.Ptr("expworkspace2"),
// Type: to.Ptr("Microsoft.OnlineExperimentation/workspaces"),
// Location: to.Ptr("westus2"),
// Properties: &armonlineexperimentation.WorkspaceProperties{
// WorkspaceID: to.Ptr("02270d43-f68a-401b-b526-86942525c353"),
// ProvisioningState: to.Ptr(armonlineexperimentation.ResourceProvisioningStateSucceeded),
// LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
// LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
// AppConfigurationResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
// Endpoint: to.Ptr("https://expworkspace2.westus2.exp.azure.net"),
// },
// Identity: &armonlineexperimentation.ManagedServiceIdentity{
// Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
// UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
// "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armonlineexperimentation.UserAssignedIdentity{
// ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
// PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
// },
// "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armonlineexperimentation.UserAssignedIdentity{
// ClientID: to.Ptr("47429305-c0d3-40bc-8595-61946c4df3dc"),
// PrincipalID: to.Ptr("bf9ebbc8-b92d-4752-8e66-c999000326e0"),
// },
// },
// },
// SKU: &armonlineexperimentation.WorkspaceSKU{
// Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
// Tier: to.Ptr(armonlineexperimentation.WorkspaceSKUTierFree),
// },
// },
// {
// ID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OnlineExperimentation/workspaces/expworkspace4"),
// Name: to.Ptr("expworkspace4"),
// Type: to.Ptr("Microsoft.OnlineExperimentation/workspaces"),
// Location: to.Ptr("westus2"),
// Properties: &armonlineexperimentation.WorkspaceProperties{
// WorkspaceID: to.Ptr("02270d43-f68a-401b-b526-86942525c354"),
// ProvisioningState: to.Ptr(armonlineexperimentation.ResourceProvisioningStateSucceeded),
// LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
// LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
// AppConfigurationResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
// Endpoint: to.Ptr("https://expworkspace4.westus2.exp.azure.net"),
// },
// Identity: &armonlineexperimentation.ManagedServiceIdentity{
// Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
// UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
// "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armonlineexperimentation.UserAssignedIdentity{
// ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
// PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
// },
// "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armonlineexperimentation.UserAssignedIdentity{
// ClientID: to.Ptr("47429305-c0d3-40bc-8595-61946c4df3dc"),
// PrincipalID: to.Ptr("bf9ebbc8-b92d-4752-8e66-c999000326e0"),
// },
// },
// },
// SKU: &armonlineexperimentation.WorkspaceSKU{
// Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
// Tier: to.Ptr(armonlineexperimentation.WorkspaceSKUTierFree),
// },
// },
// {
// ID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OnlineExperimentation/workspaces/expworkspace5"),
// Name: to.Ptr("expworkspace5"),
// Type: to.Ptr("Microsoft.OnlineExperimentation/workspaces"),
// Location: to.Ptr("westus2"),
// Properties: &armonlineexperimentation.WorkspaceProperties{
// WorkspaceID: to.Ptr("02270d43-f68a-401b-b526-86942525c354"),
// ProvisioningState: to.Ptr(armonlineexperimentation.ResourceProvisioningStateSucceeded),
// LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
// LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
// AppConfigurationResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
// Endpoint: to.Ptr("https://expworkspace5.westus2.exp.azure.net"),
// },
// Identity: &armonlineexperimentation.ManagedServiceIdentity{
// Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
// UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
// "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armonlineexperimentation.UserAssignedIdentity{
// ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
// PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
// },
// "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armonlineexperimentation.UserAssignedIdentity{
// ClientID: to.Ptr("47429305-c0d3-40bc-8595-61946c4df3dc"),
// PrincipalID: to.Ptr("bf9ebbc8-b92d-4752-8e66-c999000326e0"),
// },
// },
// },
// SKU: &armonlineexperimentation.WorkspaceSKU{
// Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
// Tier: to.Ptr(armonlineexperimentation.WorkspaceSKUTierFree),
// },
// },
// },
// },
// }
}
}
Output:
type WorkspacesClientBeginCreateOrUpdateOptions ¶
type WorkspacesClientBeginCreateOrUpdateOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
WorkspacesClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspacesClient.BeginCreateOrUpdate method.
type WorkspacesClientBeginDeleteOptions ¶
type WorkspacesClientBeginDeleteOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
WorkspacesClientBeginDeleteOptions contains the optional parameters for the WorkspacesClient.BeginDelete method.
type WorkspacesClientBeginUpdateOptions ¶
type WorkspacesClientBeginUpdateOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
WorkspacesClientBeginUpdateOptions contains the optional parameters for the WorkspacesClient.BeginUpdate method.
type WorkspacesClientCreateOrUpdateResponse ¶
type WorkspacesClientCreateOrUpdateResponse struct {
// An online experimentation workspace resource.
Workspace
}
WorkspacesClientCreateOrUpdateResponse contains the response from method WorkspacesClient.BeginCreateOrUpdate.
type WorkspacesClientDeleteResponse ¶
type WorkspacesClientDeleteResponse struct {
}
WorkspacesClientDeleteResponse contains the response from method WorkspacesClient.BeginDelete.
type WorkspacesClientGetOptions ¶
type WorkspacesClientGetOptions struct {
}
WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method.
type WorkspacesClientGetResponse ¶
type WorkspacesClientGetResponse struct {
// An online experimentation workspace resource.
Workspace
}
WorkspacesClientGetResponse contains the response from method WorkspacesClient.Get.
type WorkspacesClientListByResourceGroupOptions ¶
type WorkspacesClientListByResourceGroupOptions struct {
}
WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.NewListByResourceGroupPager method.
type WorkspacesClientListByResourceGroupResponse ¶
type WorkspacesClientListByResourceGroupResponse struct {
// The response of a OnlineExperimentationWorkspace list operation.
WorkspaceListResult
}
WorkspacesClientListByResourceGroupResponse contains the response from method WorkspacesClient.NewListByResourceGroupPager.
type WorkspacesClientListBySubscriptionOptions ¶
type WorkspacesClientListBySubscriptionOptions struct {
}
WorkspacesClientListBySubscriptionOptions contains the optional parameters for the WorkspacesClient.NewListBySubscriptionPager method.
type WorkspacesClientListBySubscriptionResponse ¶
type WorkspacesClientListBySubscriptionResponse struct {
// The response of a OnlineExperimentationWorkspace list operation.
WorkspaceListResult
}
WorkspacesClientListBySubscriptionResponse contains the response from method WorkspacesClient.NewListBySubscriptionPager.
type WorkspacesClientUpdateResponse ¶
type WorkspacesClientUpdateResponse struct {
// An online experimentation workspace resource.
Workspace
}
WorkspacesClientUpdateResponse contains the response from method WorkspacesClient.BeginUpdate.