armmanagedservices

package module
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 15 Imported by: 8

README

Azure Managed Services Module for Go

PkgGoDev

The armmanagedservices module provides operations for working with Azure Managed Services.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Managed Services module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managedservices/armmanagedservices

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Managed Services. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure Managed Services module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armmanagedservices.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armmanagedservices.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewRegistrationDefinitionsClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Managed Services label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorization

type Authorization struct {
	// REQUIRED; The identifier of the Azure Active Directory principal.
	PrincipalID *string

	// REQUIRED; The identifier of the Azure built-in role that defines the permissions that the Azure Active Directory principal
	// will have on the projected scope.
	RoleDefinitionID *string

	// The delegatedRoleDefinitionIds field is required when the roleDefinitionId refers to the User Access Administrator Role.
	// It is the list of role definition ids which define all the permissions that the
	// user in the authorization can assign to other principals.
	DelegatedRoleDefinitionIDs []*string

	// The display name of the Azure Active Directory principal.
	PrincipalIDDisplayName *string
}

Authorization - The Azure Active Directory principal identifier and Azure built-in role that describes the access the principal will receive on the delegated resource in the managed tenant.

func (Authorization) MarshalJSON

func (a Authorization) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Authorization.

func (*Authorization) UnmarshalJSON added in v0.6.0

func (a *Authorization) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Authorization.

type ClientFactory added in v0.6.0

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 added in v0.6.0

func NewClientFactory(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.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewMarketplaceRegistrationDefinitionsClient added in v0.6.0

func (c *ClientFactory) NewMarketplaceRegistrationDefinitionsClient() *MarketplaceRegistrationDefinitionsClient

NewMarketplaceRegistrationDefinitionsClient creates a new instance of MarketplaceRegistrationDefinitionsClient.

func (*ClientFactory) NewMarketplaceRegistrationDefinitionsWithoutScopeClient added in v0.6.0

func (c *ClientFactory) NewMarketplaceRegistrationDefinitionsWithoutScopeClient() *MarketplaceRegistrationDefinitionsWithoutScopeClient

NewMarketplaceRegistrationDefinitionsWithoutScopeClient creates a new instance of MarketplaceRegistrationDefinitionsWithoutScopeClient.

func (*ClientFactory) NewOperationsClient added in v0.6.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewOperationsWithScopeClient added in v0.6.0

func (c *ClientFactory) NewOperationsWithScopeClient() *OperationsWithScopeClient

NewOperationsWithScopeClient creates a new instance of OperationsWithScopeClient.

func (*ClientFactory) NewRegistrationAssignmentsClient added in v0.6.0

func (c *ClientFactory) NewRegistrationAssignmentsClient() *RegistrationAssignmentsClient

NewRegistrationAssignmentsClient creates a new instance of RegistrationAssignmentsClient.

func (*ClientFactory) NewRegistrationDefinitionsClient added in v0.6.0

func (c *ClientFactory) NewRegistrationDefinitionsClient() *RegistrationDefinitionsClient

NewRegistrationDefinitionsClient creates a new instance of RegistrationDefinitionsClient.

type CreatedByType added in v0.3.0

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues added in v0.3.0

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type EligibleApprover

type EligibleApprover struct {
	// REQUIRED; The identifier of the Azure Active Directory principal.
	PrincipalID *string

	// The display name of the Azure Active Directory principal.
	PrincipalIDDisplayName *string
}

EligibleApprover - Defines the Azure Active Directory principal that can approve any just-in-time access requests by the principal defined in the EligibleAuthorization.

func (EligibleApprover) MarshalJSON added in v0.6.0

func (e EligibleApprover) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EligibleApprover.

func (*EligibleApprover) UnmarshalJSON added in v0.6.0

func (e *EligibleApprover) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EligibleApprover.

type EligibleAuthorization

type EligibleAuthorization struct {
	// REQUIRED; The identifier of the Azure Active Directory principal.
	PrincipalID *string

	// REQUIRED; The identifier of the Azure built-in role that defines the permissions that the Azure Active Directory principal
	// will have on the projected scope.
	RoleDefinitionID *string

	// The just-in-time access policy setting.
	JustInTimeAccessPolicy *JustInTimeAccessPolicy

	// The display name of the Azure Active Directory principal.
	PrincipalIDDisplayName *string
}

EligibleAuthorization - The Azure Active Directory principal identifier, Azure built-in role, and just-in-time access policy that describes the just-in-time access the principal will receive on the delegated resource in the managed tenant.

func (EligibleAuthorization) MarshalJSON added in v0.6.0

func (e EligibleAuthorization) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EligibleAuthorization.

func (*EligibleAuthorization) UnmarshalJSON added in v0.6.0

func (e *EligibleAuthorization) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EligibleAuthorization.

type ErrorDefinition

type ErrorDefinition struct {
	// REQUIRED; The error code.
	Code *string

	// REQUIRED; The error message indicating why the operation failed.
	Message *string

	// The internal error details.
	Details []*ErrorDefinition
}

ErrorDefinition - The error response indicating why the incoming request wasn’t able to be processed

func (ErrorDefinition) MarshalJSON

func (e ErrorDefinition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorDefinition.

func (*ErrorDefinition) UnmarshalJSON added in v0.6.0

func (e *ErrorDefinition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDefinition.

type ErrorResponse

type ErrorResponse struct {
	// The error details.
	Error *ErrorDefinition
}

ErrorResponse - Error response.

func (ErrorResponse) MarshalJSON added in v0.6.0

func (e ErrorResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON added in v0.6.0

func (e *ErrorResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

type JustInTimeAccessPolicy

type JustInTimeAccessPolicy struct {
	// REQUIRED; The multi-factor authorization provider to be used for just-in-time access requests.
	MultiFactorAuthProvider *MultiFactorAuthProvider

	// The list of managedByTenant approvers for the eligible authorization.
	ManagedByTenantApprovers []*EligibleApprover

	// The maximum access duration in ISO 8601 format for just-in-time access requests.
	MaximumActivationDuration *string
}

JustInTimeAccessPolicy - Just-in-time access policy setting.

func (JustInTimeAccessPolicy) MarshalJSON

func (j JustInTimeAccessPolicy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JustInTimeAccessPolicy.

func (*JustInTimeAccessPolicy) UnmarshalJSON added in v0.6.0

func (j *JustInTimeAccessPolicy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JustInTimeAccessPolicy.

type MarketplaceRegistrationDefinition

type MarketplaceRegistrationDefinition struct {
	// The details for the Managed Services offer’s plan in Azure Marketplace.
	Plan *Plan

	// The properties of the marketplace registration definition.
	Properties *MarketplaceRegistrationDefinitionProperties

	// READ-ONLY; The fully qualified path of the marketplace registration definition.
	ID *string

	// READ-ONLY; The name of the marketplace registration definition.
	Name *string

	// READ-ONLY; The type of the Azure resource (Microsoft.ManagedServices/marketplaceRegistrationDefinitions).
	Type *string
}

func (MarketplaceRegistrationDefinition) MarshalJSON added in v0.6.0

func (m MarketplaceRegistrationDefinition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MarketplaceRegistrationDefinition.

func (*MarketplaceRegistrationDefinition) UnmarshalJSON added in v0.6.0

func (m *MarketplaceRegistrationDefinition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MarketplaceRegistrationDefinition.

type MarketplaceRegistrationDefinitionList

type MarketplaceRegistrationDefinitionList struct {
	// READ-ONLY; The link to the next page of marketplace registration definitions.
	NextLink *string

	// READ-ONLY; The list of marketplace registration definitions.
	Value []*MarketplaceRegistrationDefinition
}

MarketplaceRegistrationDefinitionList - The list of marketplace registration definitions.

func (MarketplaceRegistrationDefinitionList) MarshalJSON

func (m MarketplaceRegistrationDefinitionList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MarketplaceRegistrationDefinitionList.

func (*MarketplaceRegistrationDefinitionList) UnmarshalJSON added in v0.6.0

func (m *MarketplaceRegistrationDefinitionList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MarketplaceRegistrationDefinitionList.

type MarketplaceRegistrationDefinitionProperties

type MarketplaceRegistrationDefinitionProperties struct {
	// REQUIRED; The collection of authorization objects describing the access Azure Active Directory principals in the managedBy
	// tenant will receive on the delegated resource in the managed tenant.
	Authorizations []*Authorization

	// REQUIRED; The identifier of the managedBy tenant.
	ManagedByTenantID *string

	// The collection of eligible authorization objects describing the just-in-time access Azure Active Directory principals in
	// the managedBy tenant will receive on the delegated resource in the managed
	// tenant.
	EligibleAuthorizations []*EligibleAuthorization

	// The marketplace offer display name.
	OfferDisplayName *string

	// The marketplace plan display name.
	PlanDisplayName *string

	// The marketplace publisher display name.
	PublisherDisplayName *string
}

MarketplaceRegistrationDefinitionProperties - The properties of the marketplace registration definition.

func (MarketplaceRegistrationDefinitionProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type MarketplaceRegistrationDefinitionProperties.

func (*MarketplaceRegistrationDefinitionProperties) UnmarshalJSON added in v0.6.0

func (m *MarketplaceRegistrationDefinitionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MarketplaceRegistrationDefinitionProperties.

type MarketplaceRegistrationDefinitionsClient

type MarketplaceRegistrationDefinitionsClient struct {
	// contains filtered or unexported fields
}

MarketplaceRegistrationDefinitionsClient contains the methods for the MarketplaceRegistrationDefinitions group. Don't use this type directly, use NewMarketplaceRegistrationDefinitionsClient() instead.

func NewMarketplaceRegistrationDefinitionsClient

func NewMarketplaceRegistrationDefinitionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*MarketplaceRegistrationDefinitionsClient, error)

NewMarketplaceRegistrationDefinitionsClient creates a new instance of MarketplaceRegistrationDefinitionsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*MarketplaceRegistrationDefinitionsClient) Get

Get - Get the marketplace registration definition for the marketplace identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-01-preview

  • scope - The scope of the resource.
  • marketplaceIdentifier - The Azure Marketplace identifier. Expected formats: {publisher}.{product[-preview]}.{planName}.{version} or {publisher}.{product[-preview]}.{planName} or {publisher}.{product[-preview]} or {publisher}).
  • options - MarketplaceRegistrationDefinitionsClientGetOptions contains the optional parameters for the MarketplaceRegistrationDefinitionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managedservices/resource-manager/Microsoft.ManagedServices/preview/2022-01-01-preview/examples/GetMarketplaceRegistrationDefinition.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managedservices/armmanagedservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmanagedservices.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMarketplaceRegistrationDefinitionsClient().Get(ctx, "subscription/0afefe50-734e-4610-8a82-a144ahf49dea", "publisher.product.planName.version", 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.MarketplaceRegistrationDefinition = armmanagedservices.MarketplaceRegistrationDefinition{
	// 	Name: to.Ptr("marketplace-test.test.test-plan.1.0.0"),
	// 	Type: to.Ptr("Microsoft.ManagedServices/marketplaceRegistrationDefinitions"),
	// 	ID: to.Ptr("/subscriptions/0afefe50-734e-4610-8a82-a144ahf49dea/providers/Microsoft.ManagedServices/marketplaceRegistrationDefinitions/marketplace-test.test.test-plan.1.0.0"),
	// 	Plan: &armmanagedservices.Plan{
	// 		Name: to.Ptr("test-plan"),
	// 		Product: to.Ptr("test"),
	// 		Publisher: to.Ptr("marketplace-test"),
	// 		Version: to.Ptr("1.0.0"),
	// 	},
	// 	Properties: &armmanagedservices.MarketplaceRegistrationDefinitionProperties{
	// 		Authorizations: []*armmanagedservices.Authorization{
	// 			{
	// 				PrincipalID: to.Ptr("f98g86a2-4cc4-4e6d-ad47-b3e80a1bcdfc"),
	// 				PrincipalIDDisplayName: to.Ptr("Support User"),
	// 				RoleDefinitionID: to.Ptr("acdd72a7-3385-48ef-bd42-f606fba81ae7"),
	// 			},
	// 			{
	// 				DelegatedRoleDefinitionIDs: []*string{
	// 					to.Ptr("b24988ac-6180-42a0-ab88-20f7382dd24c")},
	// 					PrincipalID: to.Ptr("f98d86a2-4cc4-4e9d-ad47-b3e80a1bcdfc"),
	// 					PrincipalIDDisplayName: to.Ptr("User Access Administrator"),
	// 					RoleDefinitionID: to.Ptr("18d7d88d-d35e-4fb5-a5c3-7773c20a72d9"),
	// 			}},
	// 			ManagedByTenantID: to.Ptr("83ace5cd-bcc3-441a-hd86-e6a75360cecc"),
	// 			OfferDisplayName: to.Ptr("Marketplace Test Offer"),
	// 			PlanDisplayName: to.Ptr("Test Plan"),
	// 			PublisherDisplayName: to.Ptr("Marketplace Test Publisher"),
	// 		},
	// 	}
}
Output:

func (*MarketplaceRegistrationDefinitionsClient) NewListPager added in v0.4.0

NewListPager - Gets a list of the marketplace registration definitions for the marketplace identifier.

Generated from API version 2022-01-01-preview

  • scope - The scope of the resource.
  • options - MarketplaceRegistrationDefinitionsClientListOptions contains the optional parameters for the MarketplaceRegistrationDefinitionsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managedservices/resource-manager/Microsoft.ManagedServices/preview/2022-01-01-preview/examples/GetMarketplaceRegistrationDefinitions.json

package main

import (
	"context"
	"log"

	"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/managedservices/armmanagedservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmanagedservices.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewMarketplaceRegistrationDefinitionsClient().NewListPager("subscription/0afefe50-734e-4610-8a82-a144ahf49dea", &armmanagedservices.MarketplaceRegistrationDefinitionsClientListOptions{Filter: to.Ptr("planIdentifier eq 'publisher.offerIdentifier.planName.version'")})
	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.MarketplaceRegistrationDefinitionList = armmanagedservices.MarketplaceRegistrationDefinitionList{
		// 	Value: []*armmanagedservices.MarketplaceRegistrationDefinition{
		// 		{
		// 			Name: to.Ptr("marketplace-test.test.test-plan.1.0.0"),
		// 			Type: to.Ptr("Microsoft.ManagedServices/marketplaceRegistrationDefinitions"),
		// 			ID: to.Ptr("/subscriptions/0afefe50-734e-4610-8a82-a144ahf49dea/providers/Microsoft.ManagedServices/marketplaceRegistrationDefinitions/marketplace-test.test.test-plan.1.0.0"),
		// 			Plan: &armmanagedservices.Plan{
		// 				Name: to.Ptr("test-plan"),
		// 				Product: to.Ptr("test"),
		// 				Publisher: to.Ptr("marketplace-test"),
		// 				Version: to.Ptr("1.0.0"),
		// 			},
		// 			Properties: &armmanagedservices.MarketplaceRegistrationDefinitionProperties{
		// 				Authorizations: []*armmanagedservices.Authorization{
		// 					{
		// 						PrincipalID: to.Ptr("f98g86a2-4cc4-4e6d-ad47-b3e80a1bcdfc"),
		// 						PrincipalIDDisplayName: to.Ptr("Support User"),
		// 						RoleDefinitionID: to.Ptr("acdd72a7-3385-48ef-bd42-f606fba81ae7"),
		// 					},
		// 					{
		// 						DelegatedRoleDefinitionIDs: []*string{
		// 							to.Ptr("b24988ac-6180-42a0-ab88-20f7382dd24c")},
		// 							PrincipalID: to.Ptr("f98d86a2-4cc4-4e9d-ad47-b3e80a1bcdfc"),
		// 							PrincipalIDDisplayName: to.Ptr("User Access Administrator"),
		// 							RoleDefinitionID: to.Ptr("18d7d88d-d35e-4fb5-a5c3-7773c20a72d9"),
		// 					}},
		// 					ManagedByTenantID: to.Ptr("83ace5cd-bcc3-441a-hd86-e6a75360cecc"),
		// 					OfferDisplayName: to.Ptr("Marketplace Test Offer"),
		// 					PlanDisplayName: to.Ptr("Test Plan"),
		// 					PublisherDisplayName: to.Ptr("Marketplace Test Publisher"),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

type MarketplaceRegistrationDefinitionsClientGetOptions added in v0.2.0

type MarketplaceRegistrationDefinitionsClientGetOptions struct {
}

MarketplaceRegistrationDefinitionsClientGetOptions contains the optional parameters for the MarketplaceRegistrationDefinitionsClient.Get method.

type MarketplaceRegistrationDefinitionsClientGetResponse added in v0.2.0

type MarketplaceRegistrationDefinitionsClientGetResponse struct {
	MarketplaceRegistrationDefinition
}

MarketplaceRegistrationDefinitionsClientGetResponse contains the response from method MarketplaceRegistrationDefinitionsClient.Get.

type MarketplaceRegistrationDefinitionsClientListOptions added in v0.2.0

type MarketplaceRegistrationDefinitionsClientListOptions struct {
	// The filter query parameter to filter managed services resources by.
	Filter *string
}

MarketplaceRegistrationDefinitionsClientListOptions contains the optional parameters for the MarketplaceRegistrationDefinitionsClient.NewListPager method.

type MarketplaceRegistrationDefinitionsClientListResponse added in v0.2.0

type MarketplaceRegistrationDefinitionsClientListResponse struct {
	// The list of marketplace registration definitions.
	MarketplaceRegistrationDefinitionList
}

MarketplaceRegistrationDefinitionsClientListResponse contains the response from method MarketplaceRegistrationDefinitionsClient.NewListPager.

type MarketplaceRegistrationDefinitionsWithoutScopeClient

type MarketplaceRegistrationDefinitionsWithoutScopeClient struct {
	// contains filtered or unexported fields
}

MarketplaceRegistrationDefinitionsWithoutScopeClient contains the methods for the MarketplaceRegistrationDefinitionsWithoutScope group. Don't use this type directly, use NewMarketplaceRegistrationDefinitionsWithoutScopeClient() instead.

func NewMarketplaceRegistrationDefinitionsWithoutScopeClient

func NewMarketplaceRegistrationDefinitionsWithoutScopeClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*MarketplaceRegistrationDefinitionsWithoutScopeClient, error)

NewMarketplaceRegistrationDefinitionsWithoutScopeClient creates a new instance of MarketplaceRegistrationDefinitionsWithoutScopeClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*MarketplaceRegistrationDefinitionsWithoutScopeClient) Get

Get - Get the marketplace registration definition for the marketplace identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-01-preview

  • marketplaceIdentifier - The Azure Marketplace identifier. Expected formats: {publisher}.{product[-preview]}.{planName}.{version} or {publisher}.{product[-preview]}.{planName} or {publisher}.{product[-preview]} or {publisher}).
  • options - MarketplaceRegistrationDefinitionsWithoutScopeClientGetOptions contains the optional parameters for the MarketplaceRegistrationDefinitionsWithoutScopeClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managedservices/resource-manager/Microsoft.ManagedServices/preview/2022-01-01-preview/examples/GetMarketplaceRegistrationDefinitionAtTenantScope.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managedservices/armmanagedservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmanagedservices.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMarketplaceRegistrationDefinitionsWithoutScopeClient().Get(ctx, "publisher.product.planName.version", 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.MarketplaceRegistrationDefinition = armmanagedservices.MarketplaceRegistrationDefinition{
	// 	Name: to.Ptr("marketplace-test.test.test-plan.1.0.0"),
	// 	Type: to.Ptr("Microsoft.ManagedServices/marketplaceRegistrationDefinitions"),
	// 	ID: to.Ptr("/providers/Microsoft.ManagedServices/marketplaceRegistrationDefinitions/marketplace-test.test.test-plan.1.0.0"),
	// 	Plan: &armmanagedservices.Plan{
	// 		Name: to.Ptr("test-plan"),
	// 		Product: to.Ptr("test"),
	// 		Publisher: to.Ptr("marketplace-test"),
	// 		Version: to.Ptr("1.0.0"),
	// 	},
	// 	Properties: &armmanagedservices.MarketplaceRegistrationDefinitionProperties{
	// 		Authorizations: []*armmanagedservices.Authorization{
	// 			{
	// 				PrincipalID: to.Ptr("f98g86a2-4cc4-4e6d-ad47-b3e80a1bcdfc"),
	// 				PrincipalIDDisplayName: to.Ptr("Support User"),
	// 				RoleDefinitionID: to.Ptr("acdd72a7-3385-48ef-bd42-f606fba81ae7"),
	// 			},
	// 			{
	// 				DelegatedRoleDefinitionIDs: []*string{
	// 					to.Ptr("b24988ac-6180-42a0-ab88-20f7382dd24c")},
	// 					PrincipalID: to.Ptr("f98d86a2-4cc4-4e9d-ad47-b3e80a1bcdfc"),
	// 					PrincipalIDDisplayName: to.Ptr("User Access Administrator"),
	// 					RoleDefinitionID: to.Ptr("18d7d88d-d35e-4fb5-a5c3-7773c20a72d9"),
	// 			}},
	// 			EligibleAuthorizations: []*armmanagedservices.EligibleAuthorization{
	// 			},
	// 			ManagedByTenantID: to.Ptr("83ace5cd-bcc3-441a-hd86-e6a75360cecc"),
	// 			OfferDisplayName: to.Ptr("Marketplace Test Offer"),
	// 			PlanDisplayName: to.Ptr("Test Plan"),
	// 			PublisherDisplayName: to.Ptr("Marketplace Test Publisher"),
	// 		},
	// 	}
}
Output:

func (*MarketplaceRegistrationDefinitionsWithoutScopeClient) NewListPager added in v0.4.0

NewListPager - Gets a list of the marketplace registration definitions for the marketplace identifier.

Generated from API version 2022-01-01-preview

  • options - MarketplaceRegistrationDefinitionsWithoutScopeClientListOptions contains the optional parameters for the MarketplaceRegistrationDefinitionsWithoutScopeClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managedservices/resource-manager/Microsoft.ManagedServices/preview/2022-01-01-preview/examples/GetMarketplaceRegistrationDefinitionsAtTenantScope.json

package main

import (
	"context"
	"log"

	"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/managedservices/armmanagedservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmanagedservices.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewMarketplaceRegistrationDefinitionsWithoutScopeClient().NewListPager(&armmanagedservices.MarketplaceRegistrationDefinitionsWithoutScopeClientListOptions{Filter: to.Ptr("planIdentifier eq 'publisher.offerIdentifier.planName.version'")})
	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.MarketplaceRegistrationDefinitionList = armmanagedservices.MarketplaceRegistrationDefinitionList{
		// 	Value: []*armmanagedservices.MarketplaceRegistrationDefinition{
		// 		{
		// 			Name: to.Ptr("marketplace-test.test.test-plan.1.0.0"),
		// 			Type: to.Ptr("Microsoft.ManagedServices/marketplaceRegistrationDefinitions"),
		// 			ID: to.Ptr("/providers/Microsoft.ManagedServices/marketplaceRegistrationDefinitions/marketplace-test.test.test-plan.1.0.0"),
		// 			Plan: &armmanagedservices.Plan{
		// 				Name: to.Ptr("test-plan"),
		// 				Product: to.Ptr("test"),
		// 				Publisher: to.Ptr("marketplace-test"),
		// 				Version: to.Ptr("1.0.0"),
		// 			},
		// 			Properties: &armmanagedservices.MarketplaceRegistrationDefinitionProperties{
		// 				Authorizations: []*armmanagedservices.Authorization{
		// 					{
		// 						PrincipalID: to.Ptr("f98g86a2-4cc4-4e6d-ad47-b3e80a1bcdfc"),
		// 						PrincipalIDDisplayName: to.Ptr("Support User"),
		// 						RoleDefinitionID: to.Ptr("acdd72a7-3385-48ef-bd42-f606fba81ae7"),
		// 					},
		// 					{
		// 						DelegatedRoleDefinitionIDs: []*string{
		// 							to.Ptr("b24988ac-6180-42a0-ab88-20f7382dd24c")},
		// 							PrincipalID: to.Ptr("f98d86a2-4cc4-4e9d-ad47-b3e80a1bcdfc"),
		// 							PrincipalIDDisplayName: to.Ptr("User Access Administrator"),
		// 							RoleDefinitionID: to.Ptr("18d7d88d-d35e-4fb5-a5c3-7773c20a72d9"),
		// 					}},
		// 					EligibleAuthorizations: []*armmanagedservices.EligibleAuthorization{
		// 					},
		// 					ManagedByTenantID: to.Ptr("83ace5cd-bcc3-441a-hd86-e6a75360cecc"),
		// 					OfferDisplayName: to.Ptr("Marketplace Test Offer"),
		// 					PlanDisplayName: to.Ptr("Test Plan"),
		// 					PublisherDisplayName: to.Ptr("Marketplace Test Publisher"),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

type MarketplaceRegistrationDefinitionsWithoutScopeClientGetOptions added in v0.2.0

type MarketplaceRegistrationDefinitionsWithoutScopeClientGetOptions struct {
}

MarketplaceRegistrationDefinitionsWithoutScopeClientGetOptions contains the optional parameters for the MarketplaceRegistrationDefinitionsWithoutScopeClient.Get method.

type MarketplaceRegistrationDefinitionsWithoutScopeClientGetResponse added in v0.2.0

type MarketplaceRegistrationDefinitionsWithoutScopeClientGetResponse struct {
	MarketplaceRegistrationDefinition
}

MarketplaceRegistrationDefinitionsWithoutScopeClientGetResponse contains the response from method MarketplaceRegistrationDefinitionsWithoutScopeClient.Get.

type MarketplaceRegistrationDefinitionsWithoutScopeClientListOptions added in v0.2.0

type MarketplaceRegistrationDefinitionsWithoutScopeClientListOptions struct {
	// The filter query parameter to filter managed services resources by.
	Filter *string
}

MarketplaceRegistrationDefinitionsWithoutScopeClientListOptions contains the optional parameters for the MarketplaceRegistrationDefinitionsWithoutScopeClient.NewListPager method.

type MarketplaceRegistrationDefinitionsWithoutScopeClientListResponse added in v0.2.0

type MarketplaceRegistrationDefinitionsWithoutScopeClientListResponse struct {
	// The list of marketplace registration definitions.
	MarketplaceRegistrationDefinitionList
}

MarketplaceRegistrationDefinitionsWithoutScopeClientListResponse contains the response from method MarketplaceRegistrationDefinitionsWithoutScopeClient.NewListPager.

type MultiFactorAuthProvider

type MultiFactorAuthProvider string

MultiFactorAuthProvider - The multi-factor authorization provider to be used for just-in-time access requests.

const (
	MultiFactorAuthProviderAzure MultiFactorAuthProvider = "Azure"
	MultiFactorAuthProviderNone  MultiFactorAuthProvider = "None"
)

func PossibleMultiFactorAuthProviderValues

func PossibleMultiFactorAuthProviderValues() []MultiFactorAuthProvider

PossibleMultiFactorAuthProviderValues returns the possible values for the MultiFactorAuthProvider const type.

type Operation

type Operation struct {
	// READ-ONLY; The object that represents the operation.
	Display *OperationDisplay

	// READ-ONLY; The operation name with the format: {provider}/{resource}/{operation}
	Name *string
}

Operation - The object that describes a single Microsoft.ManagedServices operation.

func (Operation) MarshalJSON added in v0.6.0

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON added in v0.6.0

func (o *Operation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// The description of the operation.
	Description *string

	// The operation type.
	Operation *string

	// The service provider.
	Provider *string

	// The resource on which the operation is performed.
	Resource *string
}

OperationDisplay - The object that represents the operation.

func (OperationDisplay) MarshalJSON added in v0.6.0

func (o OperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v0.6.0

func (o *OperationDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationList

type OperationList struct {
	// READ-ONLY; The list of Microsoft.ManagedServices operations.
	Value []*Operation
}

OperationList - The list of the operations.

func (OperationList) MarshalJSON

func (o OperationList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationList.

func (*OperationList) UnmarshalJSON added in v0.6.0

func (o *OperationList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationList.

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 - pass nil to accept the default values.

func (*OperationsClient) List

List - Gets a list of the operations. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-01-preview

  • options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managedservices/resource-manager/Microsoft.ManagedServices/preview/2022-01-01-preview/examples/GetOperations.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managedservices/armmanagedservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmanagedservices.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewOperationsClient().List(ctx, 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.OperationList = armmanagedservices.OperationList{
	// 	Value: []*armmanagedservices.Operation{
	// 		{
	// 			Name: to.Ptr("Microsoft.ManagedServices/registrationDefinitions/read"),
	// 			Display: &armmanagedservices.OperationDisplay{
	// 				Description: to.Ptr("Retrieves a list of Managed Services registration definitions."),
	// 				Operation: to.Ptr("List Managed Services Registration Definitions"),
	// 				Provider: to.Ptr("Microsoft Managed Services"),
	// 				Resource: to.Ptr("Managed Services Registration Definition"),
	// 			},
	// 	}},
	// }
}
Output:

type OperationsClientListOptions added in v0.2.0

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

type OperationsClientListResponse added in v0.2.0

type OperationsClientListResponse struct {
	// The list of the operations.
	OperationList
}

OperationsClientListResponse contains the response from method OperationsClient.List.

type OperationsWithScopeClient added in v0.3.0

type OperationsWithScopeClient struct {
	// contains filtered or unexported fields
}

OperationsWithScopeClient contains the methods for the OperationsWithScope group. Don't use this type directly, use NewOperationsWithScopeClient() instead.

func NewOperationsWithScopeClient added in v0.3.0

func NewOperationsWithScopeClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsWithScopeClient, error)

NewOperationsWithScopeClient creates a new instance of OperationsWithScopeClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OperationsWithScopeClient) List added in v0.3.0

List - Gets a list of the operations with the scope. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-01-preview

  • scope - The scope of the resource.
  • options - OperationsWithScopeClientListOptions contains the optional parameters for the OperationsWithScopeClient.List method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managedservices/resource-manager/Microsoft.ManagedServices/preview/2022-01-01-preview/examples/GetOperationsWithScope.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managedservices/armmanagedservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmanagedservices.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewOperationsWithScopeClient().List(ctx, "subscription/0afefe50-734e-4610-8a82-a144ahf49dea", 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.OperationList = armmanagedservices.OperationList{
	// 	Value: []*armmanagedservices.Operation{
	// 		{
	// 			Name: to.Ptr("Microsoft.ManagedServices/registrationDefinitions/read"),
	// 			Display: &armmanagedservices.OperationDisplay{
	// 				Description: to.Ptr("Retrieves a list of Managed Services registration definitions."),
	// 				Operation: to.Ptr("List Managed Services Registration Definitions"),
	// 				Provider: to.Ptr("Microsoft Managed Services"),
	// 				Resource: to.Ptr("Managed Services Registration Definition"),
	// 			},
	// 	}},
	// }
}
Output:

type OperationsWithScopeClientListOptions added in v0.3.0

type OperationsWithScopeClientListOptions struct {
}

OperationsWithScopeClientListOptions contains the optional parameters for the OperationsWithScopeClient.List method.

type OperationsWithScopeClientListResponse added in v0.3.0

type OperationsWithScopeClientListResponse struct {
	// The list of the operations.
	OperationList
}

OperationsWithScopeClientListResponse contains the response from method OperationsWithScopeClient.List.

type Plan

type Plan struct {
	// REQUIRED; Azure Marketplace plan name.
	Name *string

	// REQUIRED; Azure Marketplace product code.
	Product *string

	// REQUIRED; Azure Marketplace publisher ID.
	Publisher *string

	// REQUIRED; Azure Marketplace plan's version.
	Version *string
}

Plan - The details for the Managed Services offer’s plan in Azure Marketplace.

func (Plan) MarshalJSON added in v0.6.0

func (p Plan) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Plan.

func (*Plan) UnmarshalJSON added in v0.6.0

func (p *Plan) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Plan.

type ProvisioningState

type ProvisioningState string

ProvisioningState - The current provisioning state of the registration definition.

const (
	ProvisioningStateAccepted     ProvisioningState = "Accepted"
	ProvisioningStateCanceled     ProvisioningState = "Canceled"
	ProvisioningStateCreated      ProvisioningState = "Created"
	ProvisioningStateCreating     ProvisioningState = "Creating"
	ProvisioningStateDeleted      ProvisioningState = "Deleted"
	ProvisioningStateDeleting     ProvisioningState = "Deleting"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateNotSpecified ProvisioningState = "NotSpecified"
	ProvisioningStateReady        ProvisioningState = "Ready"
	ProvisioningStateRunning      ProvisioningState = "Running"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
	ProvisioningStateUpdating     ProvisioningState = "Updating"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type RegistrationAssignment

type RegistrationAssignment struct {
	// The properties of a registration assignment.
	Properties *RegistrationAssignmentProperties

	// READ-ONLY; The fully qualified path of the registration assignment.
	ID *string

	// READ-ONLY; The name of the registration assignment.
	Name *string

	// READ-ONLY; The metadata for the registration assignment resource.
	SystemData *SystemData

	// READ-ONLY; The type of the Azure resource (Microsoft.ManagedServices/registrationAssignments).
	Type *string
}

RegistrationAssignment - The registration assignment.

func (RegistrationAssignment) MarshalJSON added in v0.6.0

func (r RegistrationAssignment) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegistrationAssignment.

func (*RegistrationAssignment) UnmarshalJSON added in v0.6.0

func (r *RegistrationAssignment) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegistrationAssignment.

type RegistrationAssignmentList

type RegistrationAssignmentList struct {
	// READ-ONLY; The link to the next page of registration assignments.
	NextLink *string

	// READ-ONLY; The list of registration assignments.
	Value []*RegistrationAssignment
}

RegistrationAssignmentList - The list of registration assignments.

func (RegistrationAssignmentList) MarshalJSON

func (r RegistrationAssignmentList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegistrationAssignmentList.

func (*RegistrationAssignmentList) UnmarshalJSON added in v0.6.0

func (r *RegistrationAssignmentList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegistrationAssignmentList.

type RegistrationAssignmentProperties

type RegistrationAssignmentProperties struct {
	// REQUIRED; The fully qualified path of the registration definition.
	RegistrationDefinitionID *string

	// READ-ONLY; The current provisioning state of the registration assignment.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The registration definition associated with the registration assignment.
	RegistrationDefinition *RegistrationAssignmentPropertiesRegistrationDefinition
}

RegistrationAssignmentProperties - The properties of the registration assignment.

func (RegistrationAssignmentProperties) MarshalJSON added in v0.6.0

func (r RegistrationAssignmentProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegistrationAssignmentProperties.

func (*RegistrationAssignmentProperties) UnmarshalJSON added in v0.6.0

func (r *RegistrationAssignmentProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegistrationAssignmentProperties.

type RegistrationAssignmentPropertiesRegistrationDefinition

type RegistrationAssignmentPropertiesRegistrationDefinition struct {
	// The details for the Managed Services offer’s plan in Azure Marketplace.
	Plan *Plan

	// The properties of the registration definition associated with the registration assignment.
	Properties *RegistrationAssignmentPropertiesRegistrationDefinitionProperties

	// READ-ONLY; The fully qualified path of the registration definition.
	ID *string

	// READ-ONLY; The name of the registration definition.
	Name *string

	// READ-ONLY; The metadata for the registration definition resource.
	SystemData *SystemData

	// READ-ONLY; The type of the Azure resource (Microsoft.ManagedServices/registrationDefinitions).
	Type *string
}

RegistrationAssignmentPropertiesRegistrationDefinition - The registration definition associated with the registration assignment.

func (RegistrationAssignmentPropertiesRegistrationDefinition) MarshalJSON added in v0.6.0

MarshalJSON implements the json.Marshaller interface for type RegistrationAssignmentPropertiesRegistrationDefinition.

func (*RegistrationAssignmentPropertiesRegistrationDefinition) UnmarshalJSON added in v0.6.0

UnmarshalJSON implements the json.Unmarshaller interface for type RegistrationAssignmentPropertiesRegistrationDefinition.

type RegistrationAssignmentPropertiesRegistrationDefinitionProperties

type RegistrationAssignmentPropertiesRegistrationDefinitionProperties struct {
	// The collection of authorization objects describing the access Azure Active Directory principals in the managedBy tenant
	// will receive on the delegated resource in the managed tenant.
	Authorizations []*Authorization

	// The description of the registration definition.
	Description *string

	// The collection of eligible authorization objects describing the just-in-time access Azure Active Directory principals in
	// the managedBy tenant will receive on the delegated resource in the managed
	// tenant.
	EligibleAuthorizations []*EligibleAuthorization

	// The identifier of the managedBy tenant.
	ManagedByTenantID *string

	// The name of the managedBy tenant.
	ManagedByTenantName *string

	// The identifier of the managed tenant.
	ManageeTenantID *string

	// The name of the managed tenant.
	ManageeTenantName *string

	// The current provisioning state of the registration definition.
	ProvisioningState *ProvisioningState

	// The name of the registration definition.
	RegistrationDefinitionName *string
}

RegistrationAssignmentPropertiesRegistrationDefinitionProperties - The properties of the registration definition associated with the registration assignment.

func (RegistrationAssignmentPropertiesRegistrationDefinitionProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type RegistrationAssignmentPropertiesRegistrationDefinitionProperties.

func (*RegistrationAssignmentPropertiesRegistrationDefinitionProperties) UnmarshalJSON added in v0.6.0

UnmarshalJSON implements the json.Unmarshaller interface for type RegistrationAssignmentPropertiesRegistrationDefinitionProperties.

type RegistrationAssignmentsClient

type RegistrationAssignmentsClient struct {
	// contains filtered or unexported fields
}

RegistrationAssignmentsClient contains the methods for the RegistrationAssignments group. Don't use this type directly, use NewRegistrationAssignmentsClient() instead.

func NewRegistrationAssignmentsClient

func NewRegistrationAssignmentsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistrationAssignmentsClient, error)

NewRegistrationAssignmentsClient creates a new instance of RegistrationAssignmentsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*RegistrationAssignmentsClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Creates or updates a registration assignment. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-01-preview

  • scope - The scope of the resource.
  • registrationAssignmentID - The GUID of the registration assignment.
  • requestBody - The parameters required to create new registration assignment.
  • options - RegistrationAssignmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistrationAssignmentsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managedservices/resource-manager/Microsoft.ManagedServices/preview/2022-01-01-preview/examples/PutRegistrationAssignment.json

package main

import (
	"context"
	"log"

	"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/managedservices/armmanagedservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmanagedservices.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewRegistrationAssignmentsClient().BeginCreateOrUpdate(ctx, "subscription/0afefe50-734e-4610-8a82-a144ahf49dea", "26c128c2-fefa-4340-9bb1-6e081c90ada2", armmanagedservices.RegistrationAssignment{
		Properties: &armmanagedservices.RegistrationAssignmentProperties{
			RegistrationDefinitionID: to.Ptr("/subscriptions/0afefe50-734e-4610-8a82-a144ahf49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-6e081c90ada2"),
		},
	}, 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.RegistrationAssignment = armmanagedservices.RegistrationAssignment{
	// 	Name: to.Ptr("484a7d5f-9729-4b87-bc9b-26610985a013"),
	// 	Type: to.Ptr("Microsoft.ManagedServices/registrationAssignments"),
	// 	ID: to.Ptr("/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationAssignments/484a7d5f-9729-4b87-bc9b-26610985a013"),
	// 	Properties: &armmanagedservices.RegistrationAssignmentProperties{
	// 		ProvisioningState: to.Ptr(armmanagedservices.ProvisioningStateSucceeded),
	// 		RegistrationDefinitionID: to.Ptr("/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-8e081c90ada2"),
	// 	},
	// }
}
Output:

func (*RegistrationAssignmentsClient) BeginDelete

BeginDelete - Deletes the specified registration assignment. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-01-preview

  • scope - The scope of the resource.
  • registrationAssignmentID - The GUID of the registration assignment.
  • options - RegistrationAssignmentsClientBeginDeleteOptions contains the optional parameters for the RegistrationAssignmentsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managedservices/resource-manager/Microsoft.ManagedServices/preview/2022-01-01-preview/examples/DeleteRegistrationAssignment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managedservices/armmanagedservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmanagedservices.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewRegistrationAssignmentsClient().BeginDelete(ctx, "subscription/0afefe50-734e-4610-8a82-a144ahf49dea", "26c128c2-fefa-4340-9bb1-6e081c90ada2", 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 (*RegistrationAssignmentsClient) Get

Get - Gets the details of the specified registration assignment. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-01-preview

  • scope - The scope of the resource.
  • registrationAssignmentID - The GUID of the registration assignment.
  • options - RegistrationAssignmentsClientGetOptions contains the optional parameters for the RegistrationAssignmentsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managedservices/resource-manager/Microsoft.ManagedServices/preview/2022-01-01-preview/examples/GetRegistrationAssignment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managedservices/armmanagedservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmanagedservices.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRegistrationAssignmentsClient().Get(ctx, "subscription/0afefe50-734e-4610-8a82-a144ahf49dea", "26c128c2-fefa-4340-9bb1-6e081c90ada2", &armmanagedservices.RegistrationAssignmentsClientGetOptions{ExpandRegistrationDefinition: 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.RegistrationAssignment = armmanagedservices.RegistrationAssignment{
	// 	Name: to.Ptr("484a7d5f-9729-4b87-bc9b-26610985a013"),
	// 	Type: to.Ptr("Microsoft.ManagedServices/registrationAssignments"),
	// 	ID: to.Ptr("/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationAssignments/484a7d5f-9729-4b87-bc9b-26610985a013"),
	// 	Properties: &armmanagedservices.RegistrationAssignmentProperties{
	// 		ProvisioningState: to.Ptr(armmanagedservices.ProvisioningStateSucceeded),
	// 		RegistrationDefinition: &armmanagedservices.RegistrationAssignmentPropertiesRegistrationDefinition{
	// 			Name: to.Ptr("26c128c2-fefa-4340-9bb1-8e081c90ada2"),
	// 			Type: to.Ptr("Microsoft.ManagedServices/registrationDefinitions"),
	// 			ID: to.Ptr("/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-8e081c90ada2"),
	// 			Plan: &armmanagedservices.Plan{
	// 				Name: to.Ptr("addesai-plan"),
	// 				Product: to.Ptr("test"),
	// 				Publisher: to.Ptr("marketplace-test"),
	// 				Version: to.Ptr("1.0.0"),
	// 			},
	// 			Properties: &armmanagedservices.RegistrationAssignmentPropertiesRegistrationDefinitionProperties{
	// 				Description: to.Ptr("Test"),
	// 				Authorizations: []*armmanagedservices.Authorization{
	// 					{
	// 						PrincipalID: to.Ptr("f98d86a2-4cc4-4e9d-ad47-b3e80a1bcdfc"),
	// 						PrincipalIDDisplayName: to.Ptr("Support User"),
	// 						RoleDefinitionID: to.Ptr("acdd72a7-3385-48ef-bd42-f606fba81ae7"),
	// 					},
	// 					{
	// 						DelegatedRoleDefinitionIDs: []*string{
	// 							to.Ptr("b24988ac-6180-42a0-ab88-20f7382dd24c")},
	// 							PrincipalID: to.Ptr("f98d86a2-4cc4-4e9d-ad47-b3e80a1bcdfc"),
	// 							PrincipalIDDisplayName: to.Ptr("User Access Administrator"),
	// 							RoleDefinitionID: to.Ptr("18d7d88d-d35e-4fb5-a5c3-7773c20a72d9"),
	// 					}},
	// 					EligibleAuthorizations: []*armmanagedservices.EligibleAuthorization{
	// 						{
	// 							JustInTimeAccessPolicy: &armmanagedservices.JustInTimeAccessPolicy{
	// 								MaximumActivationDuration: to.Ptr("PT8H"),
	// 								MultiFactorAuthProvider: to.Ptr(armmanagedservices.MultiFactorAuthProviderAzure),
	// 							},
	// 							PrincipalID: to.Ptr("3e0ed8c6-e902-4fc5-863c-e3ddbb2ae2a2"),
	// 							PrincipalIDDisplayName: to.Ptr("Support User"),
	// 							RoleDefinitionID: to.Ptr("ae349356-3a1b-4a5e-921d-050484c6347e"),
	// 					}},
	// 					ManagedByTenantID: to.Ptr("83abe5cd-bcc3-441a-bd86-e6a75360cecc"),
	// 					ManagedByTenantName: to.Ptr("Contoso Corp."),
	// 					ManageeTenantID: to.Ptr("01c0bcd5-4f47-4e4b-b492-418b7e2a8854"),
	// 					ManageeTenantName: to.Ptr("test_test_aad_SbtFhyGiLHPFm"),
	// 					ProvisioningState: to.Ptr(armmanagedservices.ProvisioningStateSucceeded),
	// 					RegistrationDefinitionName: to.Ptr("DefinitionName"),
	// 				},
	// 			},
	// 			RegistrationDefinitionID: to.Ptr("/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-8e081c90ada2"),
	// 		},
	// 	}
}
Output:

func (*RegistrationAssignmentsClient) NewListPager added in v0.4.0

NewListPager - Gets a list of the registration assignments.

Generated from API version 2022-01-01-preview

  • scope - The scope of the resource.
  • options - RegistrationAssignmentsClientListOptions contains the optional parameters for the RegistrationAssignmentsClient.NewListPager method.
Example (GetRegistrationAssignments)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managedservices/resource-manager/Microsoft.ManagedServices/preview/2022-01-01-preview/examples/GetRegistrationAssignments.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managedservices/armmanagedservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmanagedservices.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRegistrationAssignmentsClient().NewListPager("subscription/0afefe50-734e-4610-8a82-a144ahf49dea", &armmanagedservices.RegistrationAssignmentsClientListOptions{ExpandRegistrationDefinition: nil,
		Filter: 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.RegistrationAssignmentList = armmanagedservices.RegistrationAssignmentList{
		// 	Value: []*armmanagedservices.RegistrationAssignment{
		// 		{
		// 			Name: to.Ptr("484a7d5f-9729-4b87-bc9b-26610985a013"),
		// 			Type: to.Ptr("Microsoft.ManagedServices/registrationAssignments"),
		// 			ID: to.Ptr("/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationAssignments/484a7d5f-9729-4b87-bc9b-26610985a013"),
		// 			Properties: &armmanagedservices.RegistrationAssignmentProperties{
		// 				ProvisioningState: to.Ptr(armmanagedservices.ProvisioningStateSucceeded),
		// 				RegistrationDefinition: &armmanagedservices.RegistrationAssignmentPropertiesRegistrationDefinition{
		// 					Name: to.Ptr("26c128c2-fefa-4340-9bb1-8e081c90ada2"),
		// 					Type: to.Ptr("Microsoft.ManagedServices/registrationDefinitions"),
		// 					ID: to.Ptr("/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-8e081c90ada2"),
		// 					Plan: &armmanagedservices.Plan{
		// 						Name: to.Ptr("addesai-plan"),
		// 						Product: to.Ptr("test"),
		// 						Publisher: to.Ptr("marketplace-test"),
		// 						Version: to.Ptr("1.0.0"),
		// 					},
		// 					Properties: &armmanagedservices.RegistrationAssignmentPropertiesRegistrationDefinitionProperties{
		// 						Description: to.Ptr("Test"),
		// 						Authorizations: []*armmanagedservices.Authorization{
		// 							{
		// 								PrincipalID: to.Ptr("f98d86a2-4cc4-4e9d-ad47-b3e80a1bcdfc"),
		// 								PrincipalIDDisplayName: to.Ptr("Support User"),
		// 								RoleDefinitionID: to.Ptr("acdd72a7-3385-48ef-bd42-f606fba81ae7"),
		// 							},
		// 							{
		// 								DelegatedRoleDefinitionIDs: []*string{
		// 									to.Ptr("b24988ac-6180-42a0-ab88-20f7382dd24c")},
		// 									PrincipalID: to.Ptr("f98d86a2-4cc4-4e9d-ad47-b3e80a1bcdfc"),
		// 									PrincipalIDDisplayName: to.Ptr("User Access Administrator"),
		// 									RoleDefinitionID: to.Ptr("18d7d88d-d35e-4fb5-a5c3-7773c20a72d9"),
		// 							}},
		// 							EligibleAuthorizations: []*armmanagedservices.EligibleAuthorization{
		// 								{
		// 									JustInTimeAccessPolicy: &armmanagedservices.JustInTimeAccessPolicy{
		// 										MaximumActivationDuration: to.Ptr("PT8H"),
		// 										MultiFactorAuthProvider: to.Ptr(armmanagedservices.MultiFactorAuthProviderAzure),
		// 									},
		// 									PrincipalID: to.Ptr("700bddf4-2c3b-4cd1-bb02-6a2c622524f4"),
		// 									RoleDefinitionID: to.Ptr("8e3af657-a8ff-443c-a75c-2fe8c4bcb635"),
		// 							}},
		// 							ManagedByTenantID: to.Ptr("83abe5cd-bcc3-441a-bd86-e6a75360cecc"),
		// 							ManagedByTenantName: to.Ptr("Contoso Corp."),
		// 							ManageeTenantID: to.Ptr("01c0bcd5-4f47-4e4b-b492-418b7e2a8854"),
		// 							ManageeTenantName: to.Ptr("test_test_aad_SbtFhyGiLHPFm"),
		// 							ProvisioningState: to.Ptr(armmanagedservices.ProvisioningStateSucceeded),
		// 							RegistrationDefinitionName: to.Ptr("DefinitionName"),
		// 						},
		// 					},
		// 					RegistrationDefinitionID: to.Ptr("/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-8e081c90ada2"),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

Example (GetRegistrationAssignmentsWithManagedByTenantIdEqFilter)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managedservices/resource-manager/Microsoft.ManagedServices/preview/2022-01-01-preview/examples/GetRegistrationAssignmentsWithManagedByTenantIdEqFilter.json

package main

import (
	"context"
	"log"

	"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/managedservices/armmanagedservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmanagedservices.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRegistrationAssignmentsClient().NewListPager("subscription/0afefe50-734e-4610-8a82-a144ahf49dea", &armmanagedservices.RegistrationAssignmentsClientListOptions{ExpandRegistrationDefinition: nil,
		Filter: to.Ptr("$filter=managedByTenantId eq '83abe5cd-bcc3-441a-bd86-e6a75360cecc'"),
	})
	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.RegistrationAssignmentList = armmanagedservices.RegistrationAssignmentList{
		// 	Value: []*armmanagedservices.RegistrationAssignment{
		// 		{
		// 			Name: to.Ptr("484a7d5f-9729-4b87-bc9b-26610985a013"),
		// 			Type: to.Ptr("Microsoft.ManagedServices/registrationAssignments"),
		// 			ID: to.Ptr("/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationAssignments/484a7d5f-9729-4b87-bc9b-26610985a013"),
		// 			Properties: &armmanagedservices.RegistrationAssignmentProperties{
		// 				ProvisioningState: to.Ptr(armmanagedservices.ProvisioningStateSucceeded),
		// 				RegistrationDefinition: &armmanagedservices.RegistrationAssignmentPropertiesRegistrationDefinition{
		// 					Name: to.Ptr("26c128c2-fefa-4340-9bb1-8e081c90ada2"),
		// 					Type: to.Ptr("Microsoft.ManagedServices/registrationDefinitions"),
		// 					ID: to.Ptr("/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-8e081c90ada2"),
		// 					Plan: &armmanagedservices.Plan{
		// 						Name: to.Ptr("addesai-plan"),
		// 						Product: to.Ptr("test"),
		// 						Publisher: to.Ptr("marketplace-test"),
		// 						Version: to.Ptr("1.0.0"),
		// 					},
		// 					Properties: &armmanagedservices.RegistrationAssignmentPropertiesRegistrationDefinitionProperties{
		// 						Description: to.Ptr("Test"),
		// 						Authorizations: []*armmanagedservices.Authorization{
		// 							{
		// 								PrincipalID: to.Ptr("f98d86a2-4cc4-4e9d-ad47-b3e80a1bcdfc"),
		// 								PrincipalIDDisplayName: to.Ptr("Support User"),
		// 								RoleDefinitionID: to.Ptr("acdd72a7-3385-48ef-bd42-f606fba81ae7"),
		// 							},
		// 							{
		// 								DelegatedRoleDefinitionIDs: []*string{
		// 									to.Ptr("b24988ac-6180-42a0-ab88-20f7382dd24c")},
		// 									PrincipalID: to.Ptr("f98d86a2-4cc4-4e9d-ad47-b3e80a1bcdfc"),
		// 									PrincipalIDDisplayName: to.Ptr("User Access Administrator"),
		// 									RoleDefinitionID: to.Ptr("18d7d88d-d35e-4fb5-a5c3-7773c20a72d9"),
		// 							}},
		// 							EligibleAuthorizations: []*armmanagedservices.EligibleAuthorization{
		// 								{
		// 									JustInTimeAccessPolicy: &armmanagedservices.JustInTimeAccessPolicy{
		// 										MaximumActivationDuration: to.Ptr("PT8H"),
		// 										MultiFactorAuthProvider: to.Ptr(armmanagedservices.MultiFactorAuthProviderAzure),
		// 									},
		// 									PrincipalID: to.Ptr("700bddf4-2c3b-4cd1-bb02-6a2c622524f4"),
		// 									RoleDefinitionID: to.Ptr("8e3af657-a8ff-443c-a75c-2fe8c4bcb635"),
		// 							}},
		// 							ManagedByTenantID: to.Ptr("83abe5cd-bcc3-441a-bd86-e6a75360cecc"),
		// 							ManagedByTenantName: to.Ptr("Contoso Corp."),
		// 							ManageeTenantID: to.Ptr("01c0bcd5-4f47-4e4b-b492-418b7e2a8854"),
		// 							ManageeTenantName: to.Ptr("test_test_aad_SbtFhyGiLHPFm"),
		// 							ProvisioningState: to.Ptr(armmanagedservices.ProvisioningStateSucceeded),
		// 							RegistrationDefinitionName: to.Ptr("DefinitionName"),
		// 						},
		// 						SystemData: &armmanagedservices.SystemData{
		// 							CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-22T19:56:05.070Z"); return t}()),
		// 							CreatedBy: to.Ptr("testuser@outlook.com"),
		// 							CreatedByType: to.Ptr(armmanagedservices.CreatedByTypeUser),
		// 							LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-22T19:56:05.070Z"); return t}()),
		// 							LastModifiedBy: to.Ptr("testuser@outlook.com"),
		// 							LastModifiedByType: to.Ptr(armmanagedservices.CreatedByTypeUser),
		// 						},
		// 					},
		// 					RegistrationDefinitionID: to.Ptr("/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-8e081c90ada2"),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

Example (GetRegistrationAssignmentsWithManagedByTenantIdInFilter)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managedservices/resource-manager/Microsoft.ManagedServices/preview/2022-01-01-preview/examples/GetRegistrationAssignmentsWithManagedByTenantIdInFilter.json

package main

import (
	"context"
	"log"

	"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/managedservices/armmanagedservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmanagedservices.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRegistrationAssignmentsClient().NewListPager("subscription/0afefe50-734e-4610-8a82-a144ahf49dea", &armmanagedservices.RegistrationAssignmentsClientListOptions{ExpandRegistrationDefinition: nil,
		Filter: to.Ptr("$filter=managedByTenantId in (83abe5cd-bcc3-441a-bd86-e6a75360cec, de83f4a9-a76a-4025-a91a-91171923eac7)"),
	})
	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.RegistrationAssignmentList = armmanagedservices.RegistrationAssignmentList{
		// 	Value: []*armmanagedservices.RegistrationAssignment{
		// 		{
		// 			Name: to.Ptr("484a7d5f-9729-4b87-bc9b-26610985a013"),
		// 			Type: to.Ptr("Microsoft.ManagedServices/registrationAssignments"),
		// 			ID: to.Ptr("/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationAssignments/484a7d5f-9729-4b87-bc9b-26610985a013"),
		// 			Properties: &armmanagedservices.RegistrationAssignmentProperties{
		// 				ProvisioningState: to.Ptr(armmanagedservices.ProvisioningStateSucceeded),
		// 				RegistrationDefinition: &armmanagedservices.RegistrationAssignmentPropertiesRegistrationDefinition{
		// 					Name: to.Ptr("26c128c2-fefa-4340-9bb1-8e081c90ada2"),
		// 					Type: to.Ptr("Microsoft.ManagedServices/registrationDefinitions"),
		// 					ID: to.Ptr("/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-8e081c90ada2"),
		// 					Plan: &armmanagedservices.Plan{
		// 						Name: to.Ptr("addesai-plan"),
		// 						Product: to.Ptr("test"),
		// 						Publisher: to.Ptr("marketplace-test"),
		// 						Version: to.Ptr("1.0.0"),
		// 					},
		// 					Properties: &armmanagedservices.RegistrationAssignmentPropertiesRegistrationDefinitionProperties{
		// 						Description: to.Ptr("Test"),
		// 						Authorizations: []*armmanagedservices.Authorization{
		// 							{
		// 								PrincipalID: to.Ptr("f98d86a2-4cc4-4e9d-ad47-b3e80a1bcdfc"),
		// 								PrincipalIDDisplayName: to.Ptr("Support User"),
		// 								RoleDefinitionID: to.Ptr("acdd72a7-3385-48ef-bd42-f606fba81ae7"),
		// 							},
		// 							{
		// 								DelegatedRoleDefinitionIDs: []*string{
		// 									to.Ptr("b24988ac-6180-42a0-ab88-20f7382dd24c")},
		// 									PrincipalID: to.Ptr("f98d86a2-4cc4-4e9d-ad47-b3e80a1bcdfc"),
		// 									PrincipalIDDisplayName: to.Ptr("User Access Administrator"),
		// 									RoleDefinitionID: to.Ptr("18d7d88d-d35e-4fb5-a5c3-7773c20a72d9"),
		// 							}},
		// 							EligibleAuthorizations: []*armmanagedservices.EligibleAuthorization{
		// 								{
		// 									JustInTimeAccessPolicy: &armmanagedservices.JustInTimeAccessPolicy{
		// 										MaximumActivationDuration: to.Ptr("PT8H"),
		// 										MultiFactorAuthProvider: to.Ptr(armmanagedservices.MultiFactorAuthProviderAzure),
		// 									},
		// 									PrincipalID: to.Ptr("700bddf4-2c3b-4cd1-bb02-6a2c622524f4"),
		// 									RoleDefinitionID: to.Ptr("8e3af657-a8ff-443c-a75c-2fe8c4bcb635"),
		// 							}},
		// 							ManagedByTenantID: to.Ptr("83abe5cd-bcc3-441a-bd86-e6a75360cec"),
		// 							ManagedByTenantName: to.Ptr("Contoso Corp."),
		// 							ManageeTenantID: to.Ptr("01c0bcd5-4f47-4e4b-b492-418b7e2a8854"),
		// 							ManageeTenantName: to.Ptr("test_test_aad_SbtFhyGiLHPFm"),
		// 							ProvisioningState: to.Ptr(armmanagedservices.ProvisioningStateSucceeded),
		// 							RegistrationDefinitionName: to.Ptr("DefinitionName"),
		// 						},
		// 						SystemData: &armmanagedservices.SystemData{
		// 							CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-22T19:56:05.070Z"); return t}()),
		// 							CreatedBy: to.Ptr("testuser@outlook.com"),
		// 							CreatedByType: to.Ptr(armmanagedservices.CreatedByTypeUser),
		// 							LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-22T19:56:05.070Z"); return t}()),
		// 							LastModifiedBy: to.Ptr("testuser@outlook.com"),
		// 							LastModifiedByType: to.Ptr(armmanagedservices.CreatedByTypeUser),
		// 						},
		// 					},
		// 					RegistrationDefinitionID: to.Ptr("/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-8e081c90ada2"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("f6e721b2-7576-44d3-9182-03143fce94c0"),
		// 				Type: to.Ptr("Microsoft.ManagedServices/registrationAssignments"),
		// 				ID: to.Ptr("/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationAssignments/f6e721b2-7576-44d3-9182-03143fce94c0"),
		// 				Properties: &armmanagedservices.RegistrationAssignmentProperties{
		// 					ProvisioningState: to.Ptr(armmanagedservices.ProvisioningStateSucceeded),
		// 					RegistrationDefinition: &armmanagedservices.RegistrationAssignmentPropertiesRegistrationDefinition{
		// 						Name: to.Ptr("67aa1d7b-30ac-4ec2-be0b-ce30751468f2"),
		// 						Type: to.Ptr("Microsoft.ManagedServices/registrationDefinitions"),
		// 						ID: to.Ptr("/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationDefinitions/67aa1d7b-30ac-4ec2-be0b-ce30751468f2"),
		// 						Properties: &armmanagedservices.RegistrationAssignmentPropertiesRegistrationDefinitionProperties{
		// 							Description: to.Ptr("Test"),
		// 							Authorizations: []*armmanagedservices.Authorization{
		// 								{
		// 									PrincipalID: to.Ptr("f98d86a2-4cc4-4e9d-ad47-b3e80a1bcdfc"),
		// 									PrincipalIDDisplayName: to.Ptr("Support User"),
		// 									RoleDefinitionID: to.Ptr("acdd72a7-3385-48ef-bd42-f606fba81ae7"),
		// 							}},
		// 							ManagedByTenantID: to.Ptr("de83f4a9-a76a-4025-a91a-91171923eac7"),
		// 							ManagedByTenantName: to.Ptr("Test Corp."),
		// 							ManageeTenantID: to.Ptr("01c0bcd5-4f47-4e4b-b492-418b7e2a8854"),
		// 							ManageeTenantName: to.Ptr("test_test_aad_SbtFhyGiLHPFm"),
		// 							ProvisioningState: to.Ptr(armmanagedservices.ProvisioningStateSucceeded),
		// 							RegistrationDefinitionName: to.Ptr("DefinitionName"),
		// 						},
		// 						SystemData: &armmanagedservices.SystemData{
		// 							CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-22T19:56:05.070Z"); return t}()),
		// 							CreatedBy: to.Ptr("testuser@outlook.com"),
		// 							CreatedByType: to.Ptr(armmanagedservices.CreatedByTypeUser),
		// 							LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-22T19:56:05.070Z"); return t}()),
		// 							LastModifiedBy: to.Ptr("testuser@outlook.com"),
		// 							LastModifiedByType: to.Ptr(armmanagedservices.CreatedByTypeUser),
		// 						},
		// 					},
		// 					RegistrationDefinitionID: to.Ptr("/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationDefinitions/67aa1d7b-30ac-4ec2-be0b-ce30751468f2"),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

type RegistrationAssignmentsClientBeginCreateOrUpdateOptions added in v0.2.0

type RegistrationAssignmentsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

RegistrationAssignmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistrationAssignmentsClient.BeginCreateOrUpdate method.

type RegistrationAssignmentsClientBeginDeleteOptions added in v0.2.0

type RegistrationAssignmentsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

RegistrationAssignmentsClientBeginDeleteOptions contains the optional parameters for the RegistrationAssignmentsClient.BeginDelete method.

type RegistrationAssignmentsClientCreateOrUpdateResponse added in v0.2.0

type RegistrationAssignmentsClientCreateOrUpdateResponse struct {
	// The registration assignment.
	RegistrationAssignment
}

RegistrationAssignmentsClientCreateOrUpdateResponse contains the response from method RegistrationAssignmentsClient.BeginCreateOrUpdate.

type RegistrationAssignmentsClientDeleteResponse added in v0.2.0

type RegistrationAssignmentsClientDeleteResponse struct {
}

RegistrationAssignmentsClientDeleteResponse contains the response from method RegistrationAssignmentsClient.BeginDelete.

type RegistrationAssignmentsClientGetOptions added in v0.2.0

type RegistrationAssignmentsClientGetOptions struct {
	// The flag indicating whether to return the registration definition details along with the registration assignment details.
	ExpandRegistrationDefinition *bool
}

RegistrationAssignmentsClientGetOptions contains the optional parameters for the RegistrationAssignmentsClient.Get method.

type RegistrationAssignmentsClientGetResponse added in v0.2.0

type RegistrationAssignmentsClientGetResponse struct {
	// The registration assignment.
	RegistrationAssignment
}

RegistrationAssignmentsClientGetResponse contains the response from method RegistrationAssignmentsClient.Get.

type RegistrationAssignmentsClientListOptions added in v0.2.0

type RegistrationAssignmentsClientListOptions struct {
	// The flag indicating whether to return the registration definition details along with the registration assignment details.
	ExpandRegistrationDefinition *bool

	// The filter query parameter to filter managed services resources by.
	Filter *string
}

RegistrationAssignmentsClientListOptions contains the optional parameters for the RegistrationAssignmentsClient.NewListPager method.

type RegistrationAssignmentsClientListResponse added in v0.2.0

type RegistrationAssignmentsClientListResponse struct {
	// The list of registration assignments.
	RegistrationAssignmentList
}

RegistrationAssignmentsClientListResponse contains the response from method RegistrationAssignmentsClient.NewListPager.

type RegistrationDefinition

type RegistrationDefinition struct {
	// The details for the Managed Services offer’s plan in Azure Marketplace.
	Plan *Plan

	// The properties of a registration definition.
	Properties *RegistrationDefinitionProperties

	// READ-ONLY; The fully qualified path of the registration definition.
	ID *string

	// READ-ONLY; The name of the registration definition.
	Name *string

	// READ-ONLY; The metadata for the registration assignment resource.
	SystemData *SystemData

	// READ-ONLY; The type of the Azure resource (Microsoft.ManagedServices/registrationDefinitions).
	Type *string
}

RegistrationDefinition - The registration definition.

func (RegistrationDefinition) MarshalJSON added in v0.6.0

func (r RegistrationDefinition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegistrationDefinition.

func (*RegistrationDefinition) UnmarshalJSON added in v0.6.0

func (r *RegistrationDefinition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegistrationDefinition.

type RegistrationDefinitionList

type RegistrationDefinitionList struct {
	// READ-ONLY; The link to the next page of registration definitions.
	NextLink *string

	// READ-ONLY; The list of registration definitions.
	Value []*RegistrationDefinition
}

RegistrationDefinitionList - The list of registration definitions.

func (RegistrationDefinitionList) MarshalJSON

func (r RegistrationDefinitionList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegistrationDefinitionList.

func (*RegistrationDefinitionList) UnmarshalJSON added in v0.6.0

func (r *RegistrationDefinitionList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegistrationDefinitionList.

type RegistrationDefinitionProperties

type RegistrationDefinitionProperties struct {
	// REQUIRED; The collection of authorization objects describing the access Azure Active Directory principals in the managedBy
	// tenant will receive on the delegated resource in the managed tenant.
	Authorizations []*Authorization

	// REQUIRED; The identifier of the managedBy tenant.
	ManagedByTenantID *string

	// The description of the registration definition.
	Description *string

	// The collection of eligible authorization objects describing the just-in-time access Azure Active Directory principals in
	// the managedBy tenant will receive on the delegated resource in the managed
	// tenant.
	EligibleAuthorizations []*EligibleAuthorization

	// The name of the registration definition.
	RegistrationDefinitionName *string

	// READ-ONLY; The name of the managedBy tenant.
	ManagedByTenantName *string

	// READ-ONLY; The identifier of the managed tenant.
	ManageeTenantID *string

	// READ-ONLY; The name of the managed tenant.
	ManageeTenantName *string

	// READ-ONLY; The current provisioning state of the registration definition.
	ProvisioningState *ProvisioningState
}

RegistrationDefinitionProperties - The properties of a registration definition.

func (RegistrationDefinitionProperties) MarshalJSON

func (r RegistrationDefinitionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegistrationDefinitionProperties.

func (*RegistrationDefinitionProperties) UnmarshalJSON added in v0.6.0

func (r *RegistrationDefinitionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegistrationDefinitionProperties.

type RegistrationDefinitionsClient

type RegistrationDefinitionsClient struct {
	// contains filtered or unexported fields
}

RegistrationDefinitionsClient contains the methods for the RegistrationDefinitions group. Don't use this type directly, use NewRegistrationDefinitionsClient() instead.

func NewRegistrationDefinitionsClient

func NewRegistrationDefinitionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistrationDefinitionsClient, error)

NewRegistrationDefinitionsClient creates a new instance of RegistrationDefinitionsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*RegistrationDefinitionsClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Creates or updates a registration definition. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-01-preview

  • registrationDefinitionID - The GUID of the registration definition.
  • scope - The scope of the resource.
  • requestBody - The parameters required to create a new registration definition.
  • options - RegistrationDefinitionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistrationDefinitionsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managedservices/resource-manager/Microsoft.ManagedServices/preview/2022-01-01-preview/examples/PutRegistrationDefinition.json

package main

import (
	"context"
	"log"

	"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/managedservices/armmanagedservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmanagedservices.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewRegistrationDefinitionsClient().BeginCreateOrUpdate(ctx, "26c128c2-fefa-4340-9bb1-6e081c90ada2", "subscription/0afefe50-734e-4610-8a82-a144ahf49dea", armmanagedservices.RegistrationDefinition{
		Plan: &armmanagedservices.Plan{
			Name:      to.Ptr("addesai-plan"),
			Product:   to.Ptr("test"),
			Publisher: to.Ptr("marketplace-test"),
			Version:   to.Ptr("1.0.0"),
		},
		Properties: &armmanagedservices.RegistrationDefinitionProperties{
			Description: to.Ptr("Tes1t"),
			Authorizations: []*armmanagedservices.Authorization{
				{
					PrincipalID:            to.Ptr("f98d86a2-4cc4-4e9d-ad47-b3e80a1bcdfc"),
					PrincipalIDDisplayName: to.Ptr("Support User"),
					RoleDefinitionID:       to.Ptr("acdd72a7-3385-48ef-bd42-f606fba81ae7"),
				},
				{
					DelegatedRoleDefinitionIDs: []*string{
						to.Ptr("b24988ac-6180-42a0-ab88-20f7382dd24c")},
					PrincipalID:            to.Ptr("f98d86a2-4cc4-4e9d-ad47-b3e80a1bcdfc"),
					PrincipalIDDisplayName: to.Ptr("User Access Administrator"),
					RoleDefinitionID:       to.Ptr("18d7d88d-d35e-4fb5-a5c3-7773c20a72d9"),
				}},
			EligibleAuthorizations: []*armmanagedservices.EligibleAuthorization{
				{
					JustInTimeAccessPolicy: &armmanagedservices.JustInTimeAccessPolicy{
						ManagedByTenantApprovers: []*armmanagedservices.EligibleApprover{
							{
								PrincipalID:            to.Ptr("d9b22cd6-6407-43cc-8c60-07c56df0b51a"),
								PrincipalIDDisplayName: to.Ptr("Approver Group"),
							}},
						MaximumActivationDuration: to.Ptr("PT8H"),
						MultiFactorAuthProvider:   to.Ptr(armmanagedservices.MultiFactorAuthProviderAzure),
					},
					PrincipalID:            to.Ptr("3e0ed8c6-e902-4fc5-863c-e3ddbb2ae2a2"),
					PrincipalIDDisplayName: to.Ptr("Support User"),
					RoleDefinitionID:       to.Ptr("ae349356-3a1b-4a5e-921d-050484c6347e"),
				}},
			ManagedByTenantID:          to.Ptr("83abe5cd-bcc3-441a-bd86-e6a75360cecc"),
			RegistrationDefinitionName: to.Ptr("DefinitionName"),
		},
	}, 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.RegistrationDefinition = armmanagedservices.RegistrationDefinition{
	// 	Name: to.Ptr("26c128c2-fefa-4340-9bb1-6e081c90ada2"),
	// 	Type: to.Ptr("Microsoft.ManagedServices/registrationDefinitions"),
	// 	ID: to.Ptr("/subscriptions/0afefe50-734e-4610-8a82-a144ahf49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-6e081c90ada2"),
	// 	Plan: &armmanagedservices.Plan{
	// 		Name: to.Ptr("addesai-plan"),
	// 		Product: to.Ptr("test"),
	// 		Publisher: to.Ptr("marketplace-test"),
	// 		Version: to.Ptr("1.0.0"),
	// 	},
	// 	Properties: &armmanagedservices.RegistrationDefinitionProperties{
	// 		Description: to.Ptr("Test"),
	// 		Authorizations: []*armmanagedservices.Authorization{
	// 			{
	// 				PrincipalID: to.Ptr("f98g86a2-4cc4-4e6d-ad47-b3e80a1bcdfc"),
	// 				PrincipalIDDisplayName: to.Ptr("Support User"),
	// 				RoleDefinitionID: to.Ptr("acdd72a7-3385-48ef-bd42-f606fba81ae7"),
	// 			},
	// 			{
	// 				DelegatedRoleDefinitionIDs: []*string{
	// 					to.Ptr("b24988ac-6180-42a0-ab88-20f7382dd24c")},
	// 					PrincipalID: to.Ptr("f98d86a2-4cc4-4e9d-ad47-b3e80a1bcdfc"),
	// 					PrincipalIDDisplayName: to.Ptr("User Access Administrator"),
	// 					RoleDefinitionID: to.Ptr("18d7d88d-d35e-4fb5-a5c3-7773c20a72d9"),
	// 			}},
	// 			EligibleAuthorizations: []*armmanagedservices.EligibleAuthorization{
	// 				{
	// 					JustInTimeAccessPolicy: &armmanagedservices.JustInTimeAccessPolicy{
	// 						ManagedByTenantApprovers: []*armmanagedservices.EligibleApprover{
	// 							{
	// 								PrincipalID: to.Ptr("d9b22cd6-6407-43cc-8c60-07c56df0b51a"),
	// 								PrincipalIDDisplayName: to.Ptr("Approver Group"),
	// 						}},
	// 						MaximumActivationDuration: to.Ptr("PT8H"),
	// 						MultiFactorAuthProvider: to.Ptr(armmanagedservices.MultiFactorAuthProviderAzure),
	// 					},
	// 					PrincipalID: to.Ptr("3e0ed8c6-e902-4fc5-863c-e3ddbb2ae2a2"),
	// 					PrincipalIDDisplayName: to.Ptr("Support User"),
	// 					RoleDefinitionID: to.Ptr("ae349356-3a1b-4a5e-921d-050484c6347e"),
	// 			}},
	// 			ManagedByTenantID: to.Ptr("83ace5cd-bcc3-441a-hd86-e6a75360cecc"),
	// 			ManagedByTenantName: to.Ptr("Test Tenant"),
	// 			ProvisioningState: to.Ptr(armmanagedservices.ProvisioningStateSucceeded),
	// 			RegistrationDefinitionName: to.Ptr("DefinitionName"),
	// 		},
	// 	}
}
Output:

func (*RegistrationDefinitionsClient) Delete

Delete - Deletes the registration definition. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-01-preview

  • registrationDefinitionID - The GUID of the registration definition.
  • scope - The scope of the resource.
  • options - RegistrationDefinitionsClientDeleteOptions contains the optional parameters for the RegistrationDefinitionsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managedservices/resource-manager/Microsoft.ManagedServices/preview/2022-01-01-preview/examples/DeleteRegistrationDefinition.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managedservices/armmanagedservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmanagedservices.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewRegistrationDefinitionsClient().Delete(ctx, "26c128c2-fefa-4340-9bb1-6e081c90ada2", "subscription/0afefe50-734e-4610-8a82-a144ahf49dea", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*RegistrationDefinitionsClient) Get

Get - Gets the registration definition details. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-01-preview

  • scope - The scope of the resource.
  • registrationDefinitionID - The GUID of the registration definition.
  • options - RegistrationDefinitionsClientGetOptions contains the optional parameters for the RegistrationDefinitionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managedservices/resource-manager/Microsoft.ManagedServices/preview/2022-01-01-preview/examples/GetRegistrationDefinition.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managedservices/armmanagedservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmanagedservices.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRegistrationDefinitionsClient().Get(ctx, "subscription/0afefe50-734e-4610-8a82-a144ahf49dea", "26c128c2-fefa-4340-9bb1-6e081c90ada2", 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.RegistrationDefinition = armmanagedservices.RegistrationDefinition{
	// 	Name: to.Ptr("26c128c2-fefa-4340-9bb1-6e081c90ada2"),
	// 	Type: to.Ptr("Microsoft.ManagedServices/registrationDefinitions"),
	// 	ID: to.Ptr("/subscriptions/0afefe50-734e-4610-8a82-a144ahf49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-6e081c90ada2"),
	// 	Plan: &armmanagedservices.Plan{
	// 		Name: to.Ptr("addesai-plan"),
	// 		Product: to.Ptr("test"),
	// 		Publisher: to.Ptr("marketplace-test"),
	// 		Version: to.Ptr("1.0.0"),
	// 	},
	// 	Properties: &armmanagedservices.RegistrationDefinitionProperties{
	// 		Description: to.Ptr("Test"),
	// 		Authorizations: []*armmanagedservices.Authorization{
	// 			{
	// 				PrincipalID: to.Ptr("f98g86a2-4cc4-4e6d-ad47-b3e80a1bcdfc"),
	// 				PrincipalIDDisplayName: to.Ptr("Support User"),
	// 				RoleDefinitionID: to.Ptr("acdd72a7-3385-48ef-bd42-f606fba81ae7"),
	// 			},
	// 			{
	// 				DelegatedRoleDefinitionIDs: []*string{
	// 					to.Ptr("b24988ac-6180-42a0-ab88-20f7382dd24c")},
	// 					PrincipalID: to.Ptr("f98d86a2-4cc4-4e9d-ad47-b3e80a1bcdfc"),
	// 					PrincipalIDDisplayName: to.Ptr("User Access Administrator"),
	// 					RoleDefinitionID: to.Ptr("18d7d88d-d35e-4fb5-a5c3-7773c20a72d9"),
	// 			}},
	// 			EligibleAuthorizations: []*armmanagedservices.EligibleAuthorization{
	// 				{
	// 					JustInTimeAccessPolicy: &armmanagedservices.JustInTimeAccessPolicy{
	// 						ManagedByTenantApprovers: []*armmanagedservices.EligibleApprover{
	// 							{
	// 								PrincipalID: to.Ptr("d9b22cd6-6407-43cc-8c60-07c56df0b51a"),
	// 								PrincipalIDDisplayName: to.Ptr("Approver Group"),
	// 						}},
	// 						MaximumActivationDuration: to.Ptr("PT8H"),
	// 						MultiFactorAuthProvider: to.Ptr(armmanagedservices.MultiFactorAuthProviderAzure),
	// 					},
	// 					PrincipalID: to.Ptr("3e0ed8c6-e902-4fc5-863c-e3ddbb2ae2a2"),
	// 					PrincipalIDDisplayName: to.Ptr("Support User"),
	// 					RoleDefinitionID: to.Ptr("ae349356-3a1b-4a5e-921d-050484c6347e"),
	// 			}},
	// 			ManagedByTenantID: to.Ptr("83ace5cd-bcc3-441a-hd86-e6a75360cecc"),
	// 			ManagedByTenantName: to.Ptr("Test Tenant"),
	// 			ManageeTenantID: to.Ptr("0e06d6a3-55ae-40a3-ac29-350808980808"),
	// 			ManageeTenantName: to.Ptr("Test customer"),
	// 			ProvisioningState: to.Ptr(armmanagedservices.ProvisioningStateSucceeded),
	// 			RegistrationDefinitionName: to.Ptr("DefinitionName"),
	// 		},
	// 	}
}
Output:

func (*RegistrationDefinitionsClient) NewListPager added in v0.4.0

NewListPager - Gets a list of the registration definitions.

Generated from API version 2022-01-01-preview

  • scope - The scope of the resource.
  • options - RegistrationDefinitionsClientListOptions contains the optional parameters for the RegistrationDefinitionsClient.NewListPager method.
Example (GetRegistrationDefinitions)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managedservices/resource-manager/Microsoft.ManagedServices/preview/2022-01-01-preview/examples/GetRegistrationDefinitions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managedservices/armmanagedservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmanagedservices.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRegistrationDefinitionsClient().NewListPager("subscription/0afefe50-734e-4610-8a82-a144ahf49dea", &armmanagedservices.RegistrationDefinitionsClientListOptions{Filter: 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.RegistrationDefinitionList = armmanagedservices.RegistrationDefinitionList{
		// 	Value: []*armmanagedservices.RegistrationDefinition{
		// 		{
		// 			Name: to.Ptr("26c128c2-fefa-4340-9bb1-6e081c90ada2"),
		// 			Type: to.Ptr("Microsoft.ManagedServices/registrationDefinitions"),
		// 			ID: to.Ptr("/subscriptions/0afefe50-734e-4610-8a82-a144ahf49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-6e081c90ada2"),
		// 			Plan: &armmanagedservices.Plan{
		// 				Name: to.Ptr("addesai-plan"),
		// 				Product: to.Ptr("test"),
		// 				Publisher: to.Ptr("marketplace-test"),
		// 				Version: to.Ptr("1.0.0"),
		// 			},
		// 			Properties: &armmanagedservices.RegistrationDefinitionProperties{
		// 				Description: to.Ptr("Test"),
		// 				Authorizations: []*armmanagedservices.Authorization{
		// 					{
		// 						PrincipalID: to.Ptr("f98g86a2-4cc4-4e6d-ad47-b3e80a1bcdfc"),
		// 						PrincipalIDDisplayName: to.Ptr("Support User"),
		// 						RoleDefinitionID: to.Ptr("acdd72a7-3385-48ef-bd42-f606fba81ae7"),
		// 					},
		// 					{
		// 						DelegatedRoleDefinitionIDs: []*string{
		// 							to.Ptr("b24988ac-6180-42a0-ab88-20f7382dd24c")},
		// 							PrincipalID: to.Ptr("f98d86a2-4cc4-4e9d-ad47-b3e80a1bcdfc"),
		// 							PrincipalIDDisplayName: to.Ptr("User Access Administrator"),
		// 							RoleDefinitionID: to.Ptr("18d7d88d-d35e-4fb5-a5c3-7773c20a72d9"),
		// 					}},
		// 					EligibleAuthorizations: []*armmanagedservices.EligibleAuthorization{
		// 						{
		// 							JustInTimeAccessPolicy: &armmanagedservices.JustInTimeAccessPolicy{
		// 								ManagedByTenantApprovers: []*armmanagedservices.EligibleApprover{
		// 									{
		// 										PrincipalID: to.Ptr("d9b22cd6-6407-43cc-8c60-07c56df0b51a"),
		// 										PrincipalIDDisplayName: to.Ptr("Approver Group"),
		// 								}},
		// 								MaximumActivationDuration: to.Ptr("PT8H"),
		// 								MultiFactorAuthProvider: to.Ptr(armmanagedservices.MultiFactorAuthProviderAzure),
		// 							},
		// 							PrincipalID: to.Ptr("3e0ed8c6-e902-4fc5-863c-e3ddbb2ae2a2"),
		// 							PrincipalIDDisplayName: to.Ptr("Support User"),
		// 							RoleDefinitionID: to.Ptr("ae349356-3a1b-4a5e-921d-050484c6347e"),
		// 					}},
		// 					ManagedByTenantID: to.Ptr("83ace5cd-bcc3-441a-hd86-e6a75360cecc"),
		// 					ManagedByTenantName: to.Ptr("Test Tenant"),
		// 					ManageeTenantID: to.Ptr("0e06d6a3-55ae-40a3-ac29-350808980808"),
		// 					ManageeTenantName: to.Ptr("Test customer"),
		// 					ProvisioningState: to.Ptr(armmanagedservices.ProvisioningStateSucceeded),
		// 					RegistrationDefinitionName: to.Ptr("DefinitionName"),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

Example (GetRegistrationDefinitionsWithManagedByTenantIdEqFilter)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managedservices/resource-manager/Microsoft.ManagedServices/preview/2022-01-01-preview/examples/GetRegistrationDefinitionsWithManagedByTenantIdEqFilter.json

package main

import (
	"context"
	"log"

	"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/managedservices/armmanagedservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmanagedservices.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRegistrationDefinitionsClient().NewListPager("subscription/0afefe50-734e-4610-8a82-a144ahf49dea", &armmanagedservices.RegistrationDefinitionsClientListOptions{Filter: to.Ptr("$filter=managedByTenantId eq '83ace5cd-bcc3-441a-hd86-e6a75360cecc'")})
	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.RegistrationDefinitionList = armmanagedservices.RegistrationDefinitionList{
		// 	Value: []*armmanagedservices.RegistrationDefinition{
		// 		{
		// 			Name: to.Ptr("26c128c2-fefa-4340-9bb1-6e081c90ada2"),
		// 			Type: to.Ptr("Microsoft.ManagedServices/registrationDefinitions"),
		// 			ID: to.Ptr("/subscriptions/0afefe50-734e-4610-8a82-a144ahf49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-6e081c90ada2"),
		// 			Plan: &armmanagedservices.Plan{
		// 				Name: to.Ptr("addesai-plan"),
		// 				Product: to.Ptr("test"),
		// 				Publisher: to.Ptr("marketplace-test"),
		// 				Version: to.Ptr("1.0.0"),
		// 			},
		// 			Properties: &armmanagedservices.RegistrationDefinitionProperties{
		// 				Description: to.Ptr("Test"),
		// 				Authorizations: []*armmanagedservices.Authorization{
		// 					{
		// 						PrincipalID: to.Ptr("f98g86a2-4cc4-4e6d-ad47-b3e80a1bcdfc"),
		// 						PrincipalIDDisplayName: to.Ptr("Support User"),
		// 						RoleDefinitionID: to.Ptr("acdd72a7-3385-48ef-bd42-f606fba81ae7"),
		// 					},
		// 					{
		// 						DelegatedRoleDefinitionIDs: []*string{
		// 							to.Ptr("b24988ac-6180-42a0-ab88-20f7382dd24c")},
		// 							PrincipalID: to.Ptr("f98d86a2-4cc4-4e9d-ad47-b3e80a1bcdfc"),
		// 							PrincipalIDDisplayName: to.Ptr("User Access Administrator"),
		// 							RoleDefinitionID: to.Ptr("18d7d88d-d35e-4fb5-a5c3-7773c20a72d9"),
		// 					}},
		// 					EligibleAuthorizations: []*armmanagedservices.EligibleAuthorization{
		// 						{
		// 							JustInTimeAccessPolicy: &armmanagedservices.JustInTimeAccessPolicy{
		// 								ManagedByTenantApprovers: []*armmanagedservices.EligibleApprover{
		// 									{
		// 										PrincipalID: to.Ptr("d9b22cd6-6407-43cc-8c60-07c56df0b51a"),
		// 										PrincipalIDDisplayName: to.Ptr("Approver Group"),
		// 								}},
		// 								MaximumActivationDuration: to.Ptr("PT8H"),
		// 								MultiFactorAuthProvider: to.Ptr(armmanagedservices.MultiFactorAuthProviderAzure),
		// 							},
		// 							PrincipalID: to.Ptr("3e0ed8c6-e902-4fc5-863c-e3ddbb2ae2a2"),
		// 							PrincipalIDDisplayName: to.Ptr("Support User"),
		// 							RoleDefinitionID: to.Ptr("ae349356-3a1b-4a5e-921d-050484c6347e"),
		// 					}},
		// 					ManagedByTenantID: to.Ptr("83ace5cd-bcc3-441a-hd86-e6a75360cecc"),
		// 					ManagedByTenantName: to.Ptr("Contoso Corp."),
		// 					ManageeTenantID: to.Ptr("01c0bcd5-4f47-4e4b-b492-418b7e2a8854"),
		// 					ManageeTenantName: to.Ptr("test_test_aad_SbtFhyGiLHPFm"),
		// 					ProvisioningState: to.Ptr(armmanagedservices.ProvisioningStateSucceeded),
		// 					RegistrationDefinitionName: to.Ptr("DefinitionName"),
		// 				},
		// 				SystemData: &armmanagedservices.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-22T19:56:05.070Z"); return t}()),
		// 					CreatedBy: to.Ptr("testuser@outlook.com"),
		// 					CreatedByType: to.Ptr(armmanagedservices.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-22T19:56:05.070Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("testuser@outlook.com"),
		// 					LastModifiedByType: to.Ptr(armmanagedservices.CreatedByTypeUser),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

Example (GetRegistrationDefinitionsWithManagedByTenantIdInFilter)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managedservices/resource-manager/Microsoft.ManagedServices/preview/2022-01-01-preview/examples/GetRegistrationDefinitionsWithManagedByTenantIdInFilter.json

package main

import (
	"context"
	"log"

	"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/managedservices/armmanagedservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmanagedservices.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRegistrationDefinitionsClient().NewListPager("subscription/0afefe50-734e-4610-8a82-a144ahf49dea", &armmanagedservices.RegistrationDefinitionsClientListOptions{Filter: to.Ptr("$filter=managedByTenantId in (83ace5cd-bcc3-441a-hd86-e6a75360cecc, de83f4a9-a76a-4025-a91a-91171923eac7)")})
	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.RegistrationDefinitionList = armmanagedservices.RegistrationDefinitionList{
		// 	Value: []*armmanagedservices.RegistrationDefinition{
		// 		{
		// 			Name: to.Ptr("26c128c2-fefa-4340-9bb1-6e081c90ada2"),
		// 			Type: to.Ptr("Microsoft.ManagedServices/registrationDefinitions"),
		// 			ID: to.Ptr("/subscriptions/0afefe50-734e-4610-8a82-a144ahf49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-6e081c90ada2"),
		// 			Plan: &armmanagedservices.Plan{
		// 				Name: to.Ptr("addesai-plan"),
		// 				Product: to.Ptr("test"),
		// 				Publisher: to.Ptr("marketplace-test"),
		// 				Version: to.Ptr("1.0.0"),
		// 			},
		// 			Properties: &armmanagedservices.RegistrationDefinitionProperties{
		// 				Description: to.Ptr("Test"),
		// 				Authorizations: []*armmanagedservices.Authorization{
		// 					{
		// 						PrincipalID: to.Ptr("f98g86a2-4cc4-4e6d-ad47-b3e80a1bcdfc"),
		// 						PrincipalIDDisplayName: to.Ptr("Support User"),
		// 						RoleDefinitionID: to.Ptr("acdd72a7-3385-48ef-bd42-f606fba81ae7"),
		// 					},
		// 					{
		// 						DelegatedRoleDefinitionIDs: []*string{
		// 							to.Ptr("b24988ac-6180-42a0-ab88-20f7382dd24c")},
		// 							PrincipalID: to.Ptr("f98d86a2-4cc4-4e9d-ad47-b3e80a1bcdfc"),
		// 							PrincipalIDDisplayName: to.Ptr("User Access Administrator"),
		// 							RoleDefinitionID: to.Ptr("18d7d88d-d35e-4fb5-a5c3-7773c20a72d9"),
		// 					}},
		// 					EligibleAuthorizations: []*armmanagedservices.EligibleAuthorization{
		// 						{
		// 							JustInTimeAccessPolicy: &armmanagedservices.JustInTimeAccessPolicy{
		// 								ManagedByTenantApprovers: []*armmanagedservices.EligibleApprover{
		// 									{
		// 										PrincipalID: to.Ptr("d9b22cd6-6407-43cc-8c60-07c56df0b51a"),
		// 										PrincipalIDDisplayName: to.Ptr("Approver Group"),
		// 								}},
		// 								MaximumActivationDuration: to.Ptr("PT8H"),
		// 								MultiFactorAuthProvider: to.Ptr(armmanagedservices.MultiFactorAuthProviderAzure),
		// 							},
		// 							PrincipalID: to.Ptr("3e0ed8c6-e902-4fc5-863c-e3ddbb2ae2a2"),
		// 							PrincipalIDDisplayName: to.Ptr("Support User"),
		// 							RoleDefinitionID: to.Ptr("ae349356-3a1b-4a5e-921d-050484c6347e"),
		// 					}},
		// 					ManagedByTenantID: to.Ptr("83ace5cd-bcc3-441a-hd86-e6a75360cecc"),
		// 					ManagedByTenantName: to.Ptr("Contoso Corp."),
		// 					ManageeTenantID: to.Ptr("01c0bcd5-4f47-4e4b-b492-418b7e2a8854"),
		// 					ManageeTenantName: to.Ptr("test_test_aad_SbtFhyGiLHPFm"),
		// 					ProvisioningState: to.Ptr(armmanagedservices.ProvisioningStateSucceeded),
		// 					RegistrationDefinitionName: to.Ptr("DefinitionName"),
		// 				},
		// 				SystemData: &armmanagedservices.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-22T19:56:05.070Z"); return t}()),
		// 					CreatedBy: to.Ptr("testuser@outlook.com"),
		// 					CreatedByType: to.Ptr(armmanagedservices.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-22T19:56:05.070Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("testuser@outlook.com"),
		// 					LastModifiedByType: to.Ptr(armmanagedservices.CreatedByTypeUser),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("2a60751f-03d6-45a1-8797-24678246d54d"),
		// 				Type: to.Ptr("Microsoft.ManagedServices/registrationDefinitions"),
		// 				ID: to.Ptr("/subscriptions/0afefe50-734e-4610-8a82-a144ahf49dea/providers/Microsoft.ManagedServices/registrationDefinitions/2a60751f-03d6-45a1-8797-24678246d54d"),
		// 				Properties: &armmanagedservices.RegistrationDefinitionProperties{
		// 					Description: to.Ptr("Test 2"),
		// 					Authorizations: []*armmanagedservices.Authorization{
		// 						{
		// 							PrincipalID: to.Ptr("a2e38003-c234-42dc-a769-3ca55be53098"),
		// 							PrincipalIDDisplayName: to.Ptr("Support User"),
		// 							RoleDefinitionID: to.Ptr("acdd72a7-3385-48ef-bd42-f606fba81ae7"),
		// 					}},
		// 					ManagedByTenantID: to.Ptr("de83f4a9-a76a-4025-a91a-91171923eac7"),
		// 					ManagedByTenantName: to.Ptr("Test Corp."),
		// 					ManageeTenantID: to.Ptr("01c0bcd5-4f47-4e4b-b492-418b7e2a8854"),
		// 					ManageeTenantName: to.Ptr("test_test_aad_SbtFhyGiLHPFm"),
		// 					ProvisioningState: to.Ptr(armmanagedservices.ProvisioningStateSucceeded),
		// 					RegistrationDefinitionName: to.Ptr("DefinitionName"),
		// 				},
		// 				SystemData: &armmanagedservices.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-21T08:56:05.070Z"); return t}()),
		// 					CreatedBy: to.Ptr("testuser@msp.com"),
		// 					CreatedByType: to.Ptr(armmanagedservices.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-22T08:56:05.070Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("testuser@msp.com"),
		// 					LastModifiedByType: to.Ptr(armmanagedservices.CreatedByTypeUser),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

type RegistrationDefinitionsClientBeginCreateOrUpdateOptions added in v0.2.0

type RegistrationDefinitionsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

RegistrationDefinitionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistrationDefinitionsClient.BeginCreateOrUpdate method.

type RegistrationDefinitionsClientCreateOrUpdateResponse added in v0.2.0

type RegistrationDefinitionsClientCreateOrUpdateResponse struct {
	// The registration definition.
	RegistrationDefinition
}

RegistrationDefinitionsClientCreateOrUpdateResponse contains the response from method RegistrationDefinitionsClient.BeginCreateOrUpdate.

type RegistrationDefinitionsClientDeleteOptions added in v0.2.0

type RegistrationDefinitionsClientDeleteOptions struct {
}

RegistrationDefinitionsClientDeleteOptions contains the optional parameters for the RegistrationDefinitionsClient.Delete method.

type RegistrationDefinitionsClientDeleteResponse added in v0.2.0

type RegistrationDefinitionsClientDeleteResponse struct {
}

RegistrationDefinitionsClientDeleteResponse contains the response from method RegistrationDefinitionsClient.Delete.

type RegistrationDefinitionsClientGetOptions added in v0.2.0

type RegistrationDefinitionsClientGetOptions struct {
}

RegistrationDefinitionsClientGetOptions contains the optional parameters for the RegistrationDefinitionsClient.Get method.

type RegistrationDefinitionsClientGetResponse added in v0.2.0

type RegistrationDefinitionsClientGetResponse struct {
	// The registration definition.
	RegistrationDefinition
}

RegistrationDefinitionsClientGetResponse contains the response from method RegistrationDefinitionsClient.Get.

type RegistrationDefinitionsClientListOptions added in v0.2.0

type RegistrationDefinitionsClientListOptions struct {
	// The filter query parameter to filter managed services resources by.
	Filter *string
}

RegistrationDefinitionsClientListOptions contains the optional parameters for the RegistrationDefinitionsClient.NewListPager method.

type RegistrationDefinitionsClientListResponse added in v0.2.0

type RegistrationDefinitionsClientListResponse struct {
	// The list of registration definitions.
	RegistrationDefinitionList
}

RegistrationDefinitionsClientListResponse contains the response from method RegistrationDefinitionsClient.NewListPager.

type SystemData added in v0.3.0

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 added in v0.3.0

func (s SystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON added in v0.3.0

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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