armnapsteromniagentapi

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: MIT Imports: 14 Imported by: 0

README

Azure Napster Companion Agent Api Module for Go

The armnapsteromniagentapi module provides operations for working with Azure Napster Companion Agent Api.

Source code

Getting started

Prerequisites

  • An Azure subscription
  • Supported version of Go (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 Napster Companion Agent Api module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/napsteromniagentapi/armnapsteromniagentapi

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Napster Companion Agent Api. 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 Napster Companion Agent Api 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 := armnapsteromniagentapi.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 := armnapsteromniagentapi.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.NewOrganizationsClient()

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 Napsteromniagentapi 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 ActionType

type ActionType string

ActionType - Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.

const (
	// ActionTypeInternal - Actions are for internal-only APIs.
	ActionTypeInternal ActionType = "Internal"
)

func PossibleActionTypeValues

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type ActivateSaaSParameterRequest

type ActivateSaaSParameterRequest struct {
	// REQUIRED; SaaS guid for Activate and Validate SaaS Resource
	SaasGUID *string

	// Publisher Id for Napster resource
	PublisherID *string
}

ActivateSaaSParameterRequest - SaaS guid & PublishedId for Activate and Validate SaaS Resource

func (ActivateSaaSParameterRequest) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ActivateSaaSParameterRequest.

func (*ActivateSaaSParameterRequest) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ActivateSaaSParameterRequest.

type ClientFactory

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

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewOperationsClient

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewOrganizationsClient

func (c *ClientFactory) NewOrganizationsClient() *OrganizationsClient

NewOrganizationsClient creates a new instance of OrganizationsClient.

func (*ClientFactory) NewSaaSOperationGroupClient

func (c *ClientFactory) NewSaaSOperationGroupClient() *SaaSOperationGroupClient

NewSaaSOperationGroupClient creates a new instance of SaaSOperationGroupClient.

type CreatedByType

type CreatedByType string

CreatedByType - The kind of entity that created the resource.

const (
	// CreatedByTypeApplication - The entity was created by an application.
	CreatedByTypeApplication CreatedByType = "Application"
	// CreatedByTypeKey - The entity was created by a key.
	CreatedByTypeKey CreatedByType = "Key"
	// CreatedByTypeManagedIdentity - The entity was created by a managed identity.
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	// CreatedByTypeUser - The entity was created by a user.
	CreatedByTypeUser CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type LatestLinkedSaaSResponse

type LatestLinkedSaaSResponse struct {
	// Flag indicating if the SaaS resource is hidden
	IsHiddenSaaS *bool

	// SaaS resource id
	SaaSResourceID *string
}

LatestLinkedSaaSResponse - Response of get latest linked SaaS resource operation

func (LatestLinkedSaaSResponse) MarshalJSON

func (l LatestLinkedSaaSResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LatestLinkedSaaSResponse.

func (*LatestLinkedSaaSResponse) UnmarshalJSON

func (l *LatestLinkedSaaSResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LatestLinkedSaaSResponse.

type ManagedServiceIdentity

type ManagedServiceIdentity struct {
	// REQUIRED; The type of managed identity assigned to this resource.
	Type *ManagedServiceIdentityType

	// The identities assigned to this resource by the user.
	UserAssignedIdentities map[string]*UserAssignedIdentity

	// READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned
	// identity.
	PrincipalID *string

	// READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
	TenantID *string
}

ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities)

func (ManagedServiceIdentity) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity.

func (*ManagedServiceIdentity) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity.

type ManagedServiceIdentityType

type ManagedServiceIdentityType string

ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

const (
	// ManagedServiceIdentityTypeNone - No managed identity.
	ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None"
	// ManagedServiceIdentityTypeSystemAssigned - System assigned managed identity.
	ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned"
	// ManagedServiceIdentityTypeSystemAssignedUserAssigned - System and user assigned managed identity.
	ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned,UserAssigned"
	// ManagedServiceIdentityTypeUserAssigned - User assigned managed identity.
	ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned"
)

func PossibleManagedServiceIdentityTypeValues

func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType

PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type.

type MarketplaceDetails

type MarketplaceDetails struct {
	// REQUIRED; Offer details for the marketplace that is selected by the user
	OfferDetails *OfferDetails

	// Marketplace SaaS Resource Id
	SaasResourceID *string

	// Azure subscription id for the the marketplace offer is purchased from
	SubscriptionID *string

	// READ-ONLY; Marketplace subscription status
	SubscriptionStatus *MarketplaceSubscriptionStatus
}

MarketplaceDetails - Marketplace details for an organization

func (MarketplaceDetails) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type MarketplaceDetails.

func (*MarketplaceDetails) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type MarketplaceDetails.

type MarketplaceSubscriptionStatus

type MarketplaceSubscriptionStatus string

MarketplaceSubscriptionStatus - Marketplace subscription status of a resource.

const (
	// MarketplaceSubscriptionStatusPendingFulfillmentStart - Purchased but not yet activated
	MarketplaceSubscriptionStatusPendingFulfillmentStart MarketplaceSubscriptionStatus = "PendingFulfillmentStart"
	// MarketplaceSubscriptionStatusSubscribed - Marketplace subscription is activated
	MarketplaceSubscriptionStatusSubscribed MarketplaceSubscriptionStatus = "Subscribed"
	// MarketplaceSubscriptionStatusSuspended - This state indicates that a customer's payment for the Marketplace service was
	// not received
	MarketplaceSubscriptionStatusSuspended MarketplaceSubscriptionStatus = "Suspended"
	// MarketplaceSubscriptionStatusUnsubscribed - Customer has cancelled the subscription
	MarketplaceSubscriptionStatusUnsubscribed MarketplaceSubscriptionStatus = "Unsubscribed"
)

func PossibleMarketplaceSubscriptionStatusValues

func PossibleMarketplaceSubscriptionStatusValues() []MarketplaceSubscriptionStatus

PossibleMarketplaceSubscriptionStatusValues returns the possible values for the MarketplaceSubscriptionStatus const type.

type OfferDetails

type OfferDetails struct {
	// REQUIRED; Offer Id for the marketplace offer
	OfferID *string

	// REQUIRED; Publisher Id for the marketplace offer
	PublisherID *string

	// Plan Id for the marketplace offer
	PlanID *string

	// Plan Name for the marketplace offer
	PlanName *string

	// Plan Display Name for the marketplace offer
	TermID *string

	// Plan Display Name for the marketplace offer
	TermUnit *string
}

OfferDetails - Offer details for the marketplace that is selected by the user

func (OfferDetails) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OfferDetails.

func (*OfferDetails) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OfferDetails.

type Operation

type Operation struct {
	// Localized display information for this particular operation.
	Display *OperationDisplay

	// READ-ONLY; Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
	ActionType *ActionType

	// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure
	// Resource Manager/control-plane operations.
	IsDataAction *bool

	// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
	// "Microsoft.Compute/virtualMachines/capture/action"
	Name *string

	// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
	// value is "user,system"
	Origin *Origin
}

Operation - REST API Operation

Details of a REST API operation, returned from the Resource Provider Operations API

func (Operation) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views.
	Description *string

	// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual
	// Machine", "Restart Virtual Machine".
	Operation *string

	// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft
	// Compute".
	Provider *string

	// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job
	// Schedule Collections".
	Resource *string
}

OperationDisplay - Localized display information for an operation.

func (OperationDisplay) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

type OperationListResult struct {
	// REQUIRED; The Operation items on this page
	Value []*Operation

	// The link to the next page of items
	NextLink *string
}

OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.

func (OperationListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type OperationsClient

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

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

Generated from API version 2025-12-24-preview

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - Contains optional client configuration. Pass nil to accept the default values.

func (*OperationsClient) NewListPager

NewListPager - List the operations for the provider

  • options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example (OperationsListMaximumSetGeneratedByMaximumSetRule)

Generated from example definition: 2025-12-24-preview/Operations_List_MaximumSet_Gen.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/napsteromniagentapi/armnapsteromniagentapi"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnapsteromniagentapi.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page = armnapsteromniagentapi.OperationsClientListResponse{
		// 	OperationListResult: armnapsteromniagentapi.OperationListResult{
		// 		Value: []*armnapsteromniagentapi.Operation{
		// 			{
		// 				Name: to.Ptr("Napster.CompanionAPI/organizations/read"),
		// 				IsDataAction: to.Ptr(true),
		// 				Display: &armnapsteromniagentapi.OperationDisplay{
		// 					Provider: to.Ptr("Napster Companion API"),
		// 					Resource: to.Ptr("Organization"),
		// 					Operation: to.Ptr("Read Organization"),
		// 					Description: to.Ptr("Read Napster CompanionAPI organization resources"),
		// 				},
		// 				Origin: to.Ptr(armnapsteromniagentapi.OriginUser),
		// 				ActionType: to.Ptr(armnapsteromniagentapi.ActionTypeInternal),
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://management.azure.com/providers/Napster.CompanionAPI/operations?api-version=2025-12-24-preview&$skiptoken=X'12345'"),
		// 	},
		// }
	}
}
Example (OperationsListMinimumSetGeneratedByMinimumSetRule)

Generated from example definition: 2025-12-24-preview/Operations_List_MinimumSet_Gen.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/napsteromniagentapi/armnapsteromniagentapi"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnapsteromniagentapi.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page = armnapsteromniagentapi.OperationsClientListResponse{
		// 	OperationListResult: armnapsteromniagentapi.OperationListResult{
		// 	},
		// }
	}
}

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse

type OperationsClientListResponse struct {
	// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type OrganizationProperties

type OrganizationProperties struct {
	// REQUIRED; Marketplace details of the resource.
	Marketplace *MarketplaceDetails

	// REQUIRED; partner properties
	PartnerProperties *PartnerProperties

	// REQUIRED; Details of the user.
	User *UserDetails

	// Single sign-on properties
	SingleSignOnProperties *SingleSignOnPropertiesV2

	// READ-ONLY; Provisioning state of the resource.
	ProvisioningState *ResourceProvisioningState
}

OrganizationProperties - Properties specific to Organization

func (OrganizationProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OrganizationProperties.

func (*OrganizationProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OrganizationProperties.

type OrganizationResource

type OrganizationResource struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// The managed service identities assigned to this resource.
	Identity *ManagedServiceIdentity

	// The resource-specific properties for this resource.
	Properties *OrganizationProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

OrganizationResource - Concrete tracked resource types can be created by aliasing this type using a specific property type.

func (OrganizationResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OrganizationResource.

func (*OrganizationResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OrganizationResource.

type OrganizationResourceListResult

type OrganizationResourceListResult struct {
	// REQUIRED; The OrganizationResource items on this page
	Value []*OrganizationResource

	// The link to the next page of items
	NextLink *string
}

OrganizationResourceListResult - The response of a OrganizationResource list operation.

func (OrganizationResourceListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OrganizationResourceListResult.

func (*OrganizationResourceListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OrganizationResourceListResult.

type OrganizationResourceUpdate

type OrganizationResourceUpdate struct {
	// The managed service identities assigned to this resource.
	Identity *ManagedServiceIdentity

	// Resource tags.
	Tags map[string]*string
}

OrganizationResourceUpdate - The type used for update operations of the Organization Resource.

func (OrganizationResourceUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OrganizationResourceUpdate.

func (*OrganizationResourceUpdate) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OrganizationResourceUpdate.

type OrganizationsClient

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

OrganizationsClient contains the methods for the Organizations group. Don't use this type directly, use NewOrganizationsClient() instead.

Generated from API version 2025-12-24-preview

func NewOrganizationsClient

func NewOrganizationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OrganizationsClient, error)

NewOrganizationsClient creates a new instance of OrganizationsClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - Contains optional client configuration. Pass nil to accept the default values.

func (*OrganizationsClient) BeginCreateOrUpdate

func (client *OrganizationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, organizationname string, resource OrganizationResource, options *OrganizationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[OrganizationsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create a OrganizationResource If the operation fails it returns an *azcore.ResponseError type.

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • organizationname - Name of the Organization resource
  • resource - Resource create parameters.
  • options - OrganizationsClientBeginCreateOrUpdateOptions contains the optional parameters for the OrganizationsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: 2025-12-24-preview/Organizations_CreateOrUpdate_MaximumSet_Gen.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/napsteromniagentapi/armnapsteromniagentapi"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnapsteromniagentapi.NewClientFactory("0F0FBCF9-8374-47FC-B189-B79B84033EA3", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewOrganizationsClient().BeginCreateOrUpdate(ctx, "rgopenapi", "contosoOrg", armnapsteromniagentapi.OrganizationResource{
		Properties: &armnapsteromniagentapi.OrganizationProperties{
			Marketplace: &armnapsteromniagentapi.MarketplaceDetails{
				SubscriptionID:     to.Ptr("a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"),
				SubscriptionStatus: to.Ptr(armnapsteromniagentapi.MarketplaceSubscriptionStatusPendingFulfillmentStart),
				OfferDetails: &armnapsteromniagentapi.OfferDetails{
					PublisherID: to.Ptr("contoso"),
					OfferID:     to.Ptr("contoso-saas-app"),
					PlanID:      to.Ptr("standard-plan"),
					PlanName:    to.Ptr("Standard Plan"),
					TermUnit:    to.Ptr("P1M"),
					TermID:      to.Ptr("monthly-term-001"),
				},
				SaasResourceID: to.Ptr("/subscriptions/a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d/resourceGroups/rgopenapi/providers/Microsoft.SaaS/resources/contosoSaaS"),
			},
			User: &armnapsteromniagentapi.UserDetails{
				FirstName:    to.Ptr("John"),
				LastName:     to.Ptr("Doe"),
				EmailAddress: to.Ptr("john.doe@contoso.com"),
				Upn:          to.Ptr("john.doe@contoso.com"),
				PhoneNumber:  to.Ptr("+1-425-555-1234"),
			},
			PartnerProperties: &armnapsteromniagentapi.PartnerProperties{
				Application: to.Ptr("Contoso App"),
			},
			SingleSignOnProperties: &armnapsteromniagentapi.SingleSignOnPropertiesV2{
				Type:            to.Ptr(armnapsteromniagentapi.SingleSignOnTypeSaml),
				State:           to.Ptr(armnapsteromniagentapi.SingleSignOnStatesInitial),
				EnterpriseAppID: to.Ptr("b2c3d4e5-f6a7-4b5c-8d9e-0f1a2b3c4d5e"),
				URL:             to.Ptr("https://login.contoso.com"),
				AADDomains: []*string{
					to.Ptr("contoso.com"),
				},
			},
		},
		Identity: &armnapsteromniagentapi.ManagedServiceIdentity{
			Type:                   to.Ptr(armnapsteromniagentapi.ManagedServiceIdentityTypeNone),
			UserAssignedIdentities: map[string]*armnapsteromniagentapi.UserAssignedIdentity{},
		},
		Tags:     map[string]*string{},
		Location: to.Ptr("eastus"),
	}, 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 poll 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 = armnapsteromniagentapi.OrganizationsClientCreateOrUpdateResponse{
	// 	OrganizationResource: armnapsteromniagentapi.OrganizationResource{
	// 		Properties: &armnapsteromniagentapi.OrganizationProperties{
	// 			Marketplace: &armnapsteromniagentapi.MarketplaceDetails{
	// 				SubscriptionID: to.Ptr("a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"),
	// 				SubscriptionStatus: to.Ptr(armnapsteromniagentapi.MarketplaceSubscriptionStatusPendingFulfillmentStart),
	// 				OfferDetails: &armnapsteromniagentapi.OfferDetails{
	// 					PublisherID: to.Ptr("contoso"),
	// 					OfferID: to.Ptr("contoso-saas-app"),
	// 					PlanID: to.Ptr("standard-plan"),
	// 					PlanName: to.Ptr("Standard Plan"),
	// 					TermUnit: to.Ptr("P1M"),
	// 					TermID: to.Ptr("monthly-term-001"),
	// 				},
	// 				SaasResourceID: to.Ptr("/subscriptions/a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d/resourceGroups/rgopenapi/providers/Microsoft.SaaS/resources/contosoSaaS"),
	// 			},
	// 			User: &armnapsteromniagentapi.UserDetails{
	// 				FirstName: to.Ptr("John"),
	// 				LastName: to.Ptr("Doe"),
	// 				EmailAddress: to.Ptr("john.doe@contoso.com"),
	// 				Upn: to.Ptr("john.doe@contoso.com"),
	// 				PhoneNumber: to.Ptr("+1-425-555-1234"),
	// 			},
	// 			PartnerProperties: &armnapsteromniagentapi.PartnerProperties{
	// 				Application: to.Ptr("Contoso App"),
	// 			},
	// 			SingleSignOnProperties: &armnapsteromniagentapi.SingleSignOnPropertiesV2{
	// 				Type: to.Ptr(armnapsteromniagentapi.SingleSignOnTypeSaml),
	// 				State: to.Ptr(armnapsteromniagentapi.SingleSignOnStatesInitial),
	// 				EnterpriseAppID: to.Ptr("b2c3d4e5-f6a7-4b5c-8d9e-0f1a2b3c4d5e"),
	// 				URL: to.Ptr("https://login.contoso.com"),
	// 				AADDomains: []*string{
	// 					to.Ptr("contoso.com"),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armnapsteromniagentapi.ResourceProvisioningStateSucceeded),
	// 		},
	// 		Identity: &armnapsteromniagentapi.ManagedServiceIdentity{
	// 			Type: to.Ptr(armnapsteromniagentapi.ManagedServiceIdentityTypeNone),
	// 			UserAssignedIdentities: map[string]*armnapsteromniagentapi.UserAssignedIdentity{
	// 			},
	// 			PrincipalID: to.Ptr("c3d4e5f6-a7b8-4c5d-9e0f-1a2b3c4d5e6f"),
	// 			TenantID: to.Ptr("d4e5f6a7-b8c9-4d5e-0f1a-2b3c4d5e6f7a"),
	// 		},
	// 		Tags: map[string]*string{
	// 		},
	// 		Location: to.Ptr("eastus"),
	// 		ID: to.Ptr("/subscriptions/0F0FBCF9-8374-47FC-B189-B79B84033EA3/resourceGroups/rgopenapi/providers/Napster.CompanionAPI/organizations/contosoOrg"),
	// 		Name: to.Ptr("contosoOrg"),
	// 		Type: to.Ptr("Napster.CompanionAPI/organizations"),
	// 		SystemData: &armnapsteromniagentapi.SystemData{
	// 			CreatedBy: to.Ptr("john.doe@contoso.com"),
	// 			CreatedByType: to.Ptr(armnapsteromniagentapi.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-12-24T15:55:17.787Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("jane.smith@contoso.com"),
	// 			LastModifiedByType: to.Ptr(armnapsteromniagentapi.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-12-24T15:55:17.787Z"); return t}()),
	// 		},
	// 	},
	// }
}

func (*OrganizationsClient) BeginDelete

func (client *OrganizationsClient) BeginDelete(ctx context.Context, resourceGroupName string, organizationname string, options *OrganizationsClientBeginDeleteOptions) (*runtime.Poller[OrganizationsClientDeleteResponse], error)

BeginDelete - Delete a OrganizationResource If the operation fails it returns an *azcore.ResponseError type.

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • organizationname - Name of the Organization resource
  • options - OrganizationsClientBeginDeleteOptions contains the optional parameters for the OrganizationsClient.BeginDelete method.
Example

Generated from example definition: 2025-12-24-preview/Organizations_Delete_MaximumSet_Gen.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/napsteromniagentapi/armnapsteromniagentapi"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnapsteromniagentapi.NewClientFactory("0F0FBCF9-8374-47FC-B189-B79B84033EA3", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewOrganizationsClient().BeginDelete(ctx, "rgopenapi", "contosoOrg", 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 poll the result: %v", err)
	}
}

func (*OrganizationsClient) BeginLinkSaaS

func (client *OrganizationsClient) BeginLinkSaaS(ctx context.Context, resourceGroupName string, organizationname string, body SaaSData, options *OrganizationsClientBeginLinkSaaSOptions) (*runtime.Poller[OrganizationsClientLinkSaaSResponse], error)

BeginLinkSaaS - Links a new SaaS to the Napster organization of the underlying monitor.

Links a new SaaS to the Napster organization of the underlying monitor. If the operation fails it returns an *azcore.ResponseError type.

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • organizationname - Name of the Organization resource
  • body - The content of the action request
  • options - OrganizationsClientBeginLinkSaaSOptions contains the optional parameters for the OrganizationsClient.BeginLinkSaaS method.
Example

Generated from example definition: 2025-12-24-preview/Organizations_LinkSaaS_MaximumSet_Gen.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/napsteromniagentapi/armnapsteromniagentapi"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnapsteromniagentapi.NewClientFactory("0F0FBCF9-8374-47FC-B189-B79B84033EA3", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewOrganizationsClient().BeginLinkSaaS(ctx, "rgopenapi", "contosoOrg", armnapsteromniagentapi.SaaSData{
		SaaSResourceID: to.Ptr("/subscriptions/0F0FBCF9-8374-47FC-B189-B79B84033EA3/resourceGroups/rgopenapi/providers/Microsoft.SaaS/resources/contosoSaaS"),
	}, 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 poll 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 = armnapsteromniagentapi.OrganizationsClientLinkSaaSResponse{
	// 	OrganizationResource: armnapsteromniagentapi.OrganizationResource{
	// 		Properties: &armnapsteromniagentapi.OrganizationProperties{
	// 			Marketplace: &armnapsteromniagentapi.MarketplaceDetails{
	// 				SubscriptionID: to.Ptr("a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"),
	// 				SubscriptionStatus: to.Ptr(armnapsteromniagentapi.MarketplaceSubscriptionStatusPendingFulfillmentStart),
	// 				OfferDetails: &armnapsteromniagentapi.OfferDetails{
	// 					PublisherID: to.Ptr("contoso"),
	// 					OfferID: to.Ptr("contoso-saas-app"),
	// 					PlanID: to.Ptr("standard-plan"),
	// 					PlanName: to.Ptr("Standard Plan"),
	// 					TermUnit: to.Ptr("P1M"),
	// 					TermID: to.Ptr("monthly-term-001"),
	// 				},
	// 				SaasResourceID: to.Ptr("/subscriptions/a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d/resourceGroups/rgopenapi/providers/Microsoft.SaaS/resources/contosoSaaS"),
	// 			},
	// 			User: &armnapsteromniagentapi.UserDetails{
	// 				FirstName: to.Ptr("John"),
	// 				LastName: to.Ptr("Doe"),
	// 				EmailAddress: to.Ptr("john.doe@contoso.com"),
	// 				Upn: to.Ptr("john.doe@contoso.com"),
	// 				PhoneNumber: to.Ptr("+1-425-555-1234"),
	// 			},
	// 			PartnerProperties: &armnapsteromniagentapi.PartnerProperties{
	// 				Application: to.Ptr("Contoso App"),
	// 			},
	// 			SingleSignOnProperties: &armnapsteromniagentapi.SingleSignOnPropertiesV2{
	// 				Type: to.Ptr(armnapsteromniagentapi.SingleSignOnTypeSaml),
	// 				State: to.Ptr(armnapsteromniagentapi.SingleSignOnStatesInitial),
	// 				EnterpriseAppID: to.Ptr("b2c3d4e5-f6a7-4b5c-8d9e-0f1a2b3c4d5e"),
	// 				URL: to.Ptr("https://login.contoso.com"),
	// 				AADDomains: []*string{
	// 					to.Ptr("contoso.com"),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armnapsteromniagentapi.ResourceProvisioningStateSucceeded),
	// 		},
	// 		Identity: &armnapsteromniagentapi.ManagedServiceIdentity{
	// 			Type: to.Ptr(armnapsteromniagentapi.ManagedServiceIdentityTypeNone),
	// 			UserAssignedIdentities: map[string]*armnapsteromniagentapi.UserAssignedIdentity{
	// 			},
	// 			PrincipalID: to.Ptr("c3d4e5f6-a7b8-4c5d-9e0f-1a2b3c4d5e6f"),
	// 			TenantID: to.Ptr("d4e5f6a7-b8c9-4d5e-0f1a-2b3c4d5e6f7a"),
	// 		},
	// 		Tags: map[string]*string{
	// 		},
	// 		Location: to.Ptr("eastus"),
	// 		ID: to.Ptr("/subscriptions/0F0FBCF9-8374-47FC-B189-B79B84033EA3/resourceGroups/rgopenapi/providers/Napster.CompanionAPI/organizations/contosoOrg"),
	// 		Name: to.Ptr("contosoOrg"),
	// 		Type: to.Ptr("Napster.CompanionAPI/organizations"),
	// 		SystemData: &armnapsteromniagentapi.SystemData{
	// 			CreatedBy: to.Ptr("john.doe@contoso.com"),
	// 			CreatedByType: to.Ptr(armnapsteromniagentapi.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-12-24T15:55:17.787Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("jane.smith@contoso.com"),
	// 			LastModifiedByType: to.Ptr(armnapsteromniagentapi.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-12-24T15:55:17.787Z"); return t}()),
	// 		},
	// 	},
	// }
}

func (*OrganizationsClient) BeginUpdate

func (client *OrganizationsClient) BeginUpdate(ctx context.Context, resourceGroupName string, organizationname string, properties OrganizationResourceUpdate, options *OrganizationsClientBeginUpdateOptions) (*runtime.Poller[OrganizationsClientUpdateResponse], error)

BeginUpdate - Update a OrganizationResource If the operation fails it returns an *azcore.ResponseError type.

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • organizationname - Name of the Organization resource
  • properties - The resource properties to be updated.
  • options - OrganizationsClientBeginUpdateOptions contains the optional parameters for the OrganizationsClient.BeginUpdate method.
Example

Generated from example definition: 2025-12-24-preview/Organizations_Update_MaximumSet_Gen.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/napsteromniagentapi/armnapsteromniagentapi"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnapsteromniagentapi.NewClientFactory("0F0FBCF9-8374-47FC-B189-B79B84033EA3", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewOrganizationsClient().BeginUpdate(ctx, "rgopenapi", "contosoOrg", armnapsteromniagentapi.OrganizationResourceUpdate{
		Tags: map[string]*string{},
		Identity: &armnapsteromniagentapi.ManagedServiceIdentity{
			Type:                   to.Ptr(armnapsteromniagentapi.ManagedServiceIdentityTypeNone),
			UserAssignedIdentities: map[string]*armnapsteromniagentapi.UserAssignedIdentity{},
		},
	}, 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 poll 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 = armnapsteromniagentapi.OrganizationsClientUpdateResponse{
	// 	OrganizationResource: armnapsteromniagentapi.OrganizationResource{
	// 		Properties: &armnapsteromniagentapi.OrganizationProperties{
	// 			Marketplace: &armnapsteromniagentapi.MarketplaceDetails{
	// 				SubscriptionID: to.Ptr("a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"),
	// 				SubscriptionStatus: to.Ptr(armnapsteromniagentapi.MarketplaceSubscriptionStatusPendingFulfillmentStart),
	// 				OfferDetails: &armnapsteromniagentapi.OfferDetails{
	// 					PublisherID: to.Ptr("contoso"),
	// 					OfferID: to.Ptr("contoso-saas-app"),
	// 					PlanID: to.Ptr("standard-plan"),
	// 					PlanName: to.Ptr("Standard Plan"),
	// 					TermUnit: to.Ptr("P1M"),
	// 					TermID: to.Ptr("monthly-term-001"),
	// 				},
	// 				SaasResourceID: to.Ptr("/subscriptions/a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d/resourceGroups/rgopenapi/providers/Microsoft.SaaS/resources/contosoSaaS"),
	// 			},
	// 			User: &armnapsteromniagentapi.UserDetails{
	// 				FirstName: to.Ptr("John"),
	// 				LastName: to.Ptr("Doe"),
	// 				EmailAddress: to.Ptr("john.doe@contoso.com"),
	// 				Upn: to.Ptr("john.doe@contoso.com"),
	// 				PhoneNumber: to.Ptr("+1-425-555-1234"),
	// 			},
	// 			PartnerProperties: &armnapsteromniagentapi.PartnerProperties{
	// 				Application: to.Ptr("Contoso App"),
	// 			},
	// 			SingleSignOnProperties: &armnapsteromniagentapi.SingleSignOnPropertiesV2{
	// 				Type: to.Ptr(armnapsteromniagentapi.SingleSignOnTypeSaml),
	// 				State: to.Ptr(armnapsteromniagentapi.SingleSignOnStatesInitial),
	// 				EnterpriseAppID: to.Ptr("b2c3d4e5-f6a7-4b5c-8d9e-0f1a2b3c4d5e"),
	// 				URL: to.Ptr("https://login.contoso.com"),
	// 				AADDomains: []*string{
	// 					to.Ptr("contoso.com"),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armnapsteromniagentapi.ResourceProvisioningStateSucceeded),
	// 		},
	// 		Identity: &armnapsteromniagentapi.ManagedServiceIdentity{
	// 			Type: to.Ptr(armnapsteromniagentapi.ManagedServiceIdentityTypeNone),
	// 			UserAssignedIdentities: map[string]*armnapsteromniagentapi.UserAssignedIdentity{
	// 			},
	// 			PrincipalID: to.Ptr("c3d4e5f6-a7b8-4c5d-9e0f-1a2b3c4d5e6f"),
	// 			TenantID: to.Ptr("d4e5f6a7-b8c9-4d5e-0f1a-2b3c4d5e6f7a"),
	// 		},
	// 		Tags: map[string]*string{
	// 		},
	// 		Location: to.Ptr("eastus"),
	// 		ID: to.Ptr("/subscriptions/0F0FBCF9-8374-47FC-B189-B79B84033EA3/resourceGroups/rgopenapi/providers/Napster.CompanionAPI/organizations/contosoOrg"),
	// 		Name: to.Ptr("contosoOrg"),
	// 		Type: to.Ptr("Napster.CompanionAPI/organizations"),
	// 		SystemData: &armnapsteromniagentapi.SystemData{
	// 			CreatedBy: to.Ptr("john.doe@contoso.com"),
	// 			CreatedByType: to.Ptr(armnapsteromniagentapi.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-12-24T15:55:17.787Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("jane.smith@contoso.com"),
	// 			LastModifiedByType: to.Ptr(armnapsteromniagentapi.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-12-24T15:55:17.787Z"); return t}()),
	// 		},
	// 	},
	// }
}

func (*OrganizationsClient) Get

func (client *OrganizationsClient) Get(ctx context.Context, resourceGroupName string, organizationname string, options *OrganizationsClientGetOptions) (OrganizationsClientGetResponse, error)

Get - Get a OrganizationResource If the operation fails it returns an *azcore.ResponseError type.

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • organizationname - Name of the Organization resource
  • options - OrganizationsClientGetOptions contains the optional parameters for the OrganizationsClient.Get method.
Example

Generated from example definition: 2025-12-24-preview/Organizations_Get_MaximumSet_Gen.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/napsteromniagentapi/armnapsteromniagentapi"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnapsteromniagentapi.NewClientFactory("0F0FBCF9-8374-47FC-B189-B79B84033EA3", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewOrganizationsClient().Get(ctx, "rgopenapi", "contosoOrg", 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 = armnapsteromniagentapi.OrganizationsClientGetResponse{
	// 	OrganizationResource: armnapsteromniagentapi.OrganizationResource{
	// 		Properties: &armnapsteromniagentapi.OrganizationProperties{
	// 			Marketplace: &armnapsteromniagentapi.MarketplaceDetails{
	// 				SubscriptionID: to.Ptr("a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"),
	// 				SubscriptionStatus: to.Ptr(armnapsteromniagentapi.MarketplaceSubscriptionStatusPendingFulfillmentStart),
	// 				OfferDetails: &armnapsteromniagentapi.OfferDetails{
	// 					PublisherID: to.Ptr("contoso"),
	// 					OfferID: to.Ptr("contoso-saas-app"),
	// 					PlanID: to.Ptr("standard-plan"),
	// 					PlanName: to.Ptr("Standard Plan"),
	// 					TermUnit: to.Ptr("P1M"),
	// 					TermID: to.Ptr("monthly-term-001"),
	// 				},
	// 				SaasResourceID: to.Ptr("/subscriptions/a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d/resourceGroups/rgopenapi/providers/Microsoft.SaaS/resources/contosoSaaS"),
	// 			},
	// 			User: &armnapsteromniagentapi.UserDetails{
	// 				FirstName: to.Ptr("John"),
	// 				LastName: to.Ptr("Doe"),
	// 				EmailAddress: to.Ptr("john.doe@contoso.com"),
	// 				Upn: to.Ptr("john.doe@contoso.com"),
	// 				PhoneNumber: to.Ptr("+1-425-555-1234"),
	// 			},
	// 			PartnerProperties: &armnapsteromniagentapi.PartnerProperties{
	// 				Application: to.Ptr("Contoso App"),
	// 			},
	// 			SingleSignOnProperties: &armnapsteromniagentapi.SingleSignOnPropertiesV2{
	// 				Type: to.Ptr(armnapsteromniagentapi.SingleSignOnTypeSaml),
	// 				State: to.Ptr(armnapsteromniagentapi.SingleSignOnStatesInitial),
	// 				EnterpriseAppID: to.Ptr("b2c3d4e5-f6a7-4b5c-8d9e-0f1a2b3c4d5e"),
	// 				URL: to.Ptr("https://login.contoso.com"),
	// 				AADDomains: []*string{
	// 					to.Ptr("contoso.com"),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armnapsteromniagentapi.ResourceProvisioningStateSucceeded),
	// 		},
	// 		Identity: &armnapsteromniagentapi.ManagedServiceIdentity{
	// 			Type: to.Ptr(armnapsteromniagentapi.ManagedServiceIdentityTypeNone),
	// 			UserAssignedIdentities: map[string]*armnapsteromniagentapi.UserAssignedIdentity{
	// 			},
	// 			PrincipalID: to.Ptr("c3d4e5f6-a7b8-4c5d-9e0f-1a2b3c4d5e6f"),
	// 			TenantID: to.Ptr("d4e5f6a7-b8c9-4d5e-0f1a-2b3c4d5e6f7a"),
	// 		},
	// 		Tags: map[string]*string{
	// 		},
	// 		Location: to.Ptr("eastus"),
	// 		ID: to.Ptr("/subscriptions/0F0FBCF9-8374-47FC-B189-B79B84033EA3/resourceGroups/rgopenapi/providers/Napster.CompanionAPI/organizations/contosoOrg"),
	// 		Name: to.Ptr("contosoOrg"),
	// 		Type: to.Ptr("Napster.CompanionAPI/organizations"),
	// 		SystemData: &armnapsteromniagentapi.SystemData{
	// 			CreatedBy: to.Ptr("john.doe@contoso.com"),
	// 			CreatedByType: to.Ptr(armnapsteromniagentapi.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-12-24T15:55:17.787Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("jane.smith@contoso.com"),
	// 			LastModifiedByType: to.Ptr(armnapsteromniagentapi.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-12-24T15:55:17.787Z"); return t}()),
	// 		},
	// 	},
	// }
}

func (*OrganizationsClient) LatestLinkedSaaS

func (client *OrganizationsClient) LatestLinkedSaaS(ctx context.Context, resourceGroupName string, organizationname string, options *OrganizationsClientLatestLinkedSaaSOptions) (OrganizationsClientLatestLinkedSaaSResponse, error)

LatestLinkedSaaS - Returns the latest SaaS linked to the Napster organization of the underlying monitor. If the operation fails it returns an *azcore.ResponseError type.

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • organizationname - Name of the Organization resource
  • options - OrganizationsClientLatestLinkedSaaSOptions contains the optional parameters for the OrganizationsClient.LatestLinkedSaaS method.
Example

Generated from example definition: 2025-12-24-preview/Organizations_LatestLinkedSaaS_MaximumSet_Gen.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/napsteromniagentapi/armnapsteromniagentapi"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnapsteromniagentapi.NewClientFactory("0F0FBCF9-8374-47FC-B189-B79B84033EA3", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewOrganizationsClient().LatestLinkedSaaS(ctx, "rgopenapi", "contosoOrg", 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 = armnapsteromniagentapi.OrganizationsClientLatestLinkedSaaSResponse{
	// 	LatestLinkedSaaSResponse: armnapsteromniagentapi.LatestLinkedSaaSResponse{
	// 		SaaSResourceID: to.Ptr("/subscriptions/0F0FBCF9-8374-47FC-B189-B79B84033EA3/resourceGroups/rgopenapi/providers/Microsoft.SaaS/resources/contosoSaaS"),
	// 		IsHiddenSaaS: to.Ptr(true),
	// 	},
	// }
}

func (*OrganizationsClient) NewListByResourceGroupPager

NewListByResourceGroupPager - List OrganizationResource resources by resource group

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - OrganizationsClientListByResourceGroupOptions contains the optional parameters for the OrganizationsClient.NewListByResourceGroupPager method.
Example (OrganizationsListByResourceGroupMaximumSetGeneratedByMaximumSetRule)

Generated from example definition: 2025-12-24-preview/Organizations_ListByResourceGroup_MaximumSet_Gen.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/napsteromniagentapi/armnapsteromniagentapi"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnapsteromniagentapi.NewClientFactory("0F0FBCF9-8374-47FC-B189-B79B84033EA3", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOrganizationsClient().NewListByResourceGroupPager("rgopenapi", 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 = armnapsteromniagentapi.OrganizationsClientListByResourceGroupResponse{
		// 	OrganizationResourceListResult: armnapsteromniagentapi.OrganizationResourceListResult{
		// 		Value: []*armnapsteromniagentapi.OrganizationResource{
		// 			{
		// 				Properties: &armnapsteromniagentapi.OrganizationProperties{
		// 					Marketplace: &armnapsteromniagentapi.MarketplaceDetails{
		// 						SubscriptionID: to.Ptr("a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"),
		// 						SubscriptionStatus: to.Ptr(armnapsteromniagentapi.MarketplaceSubscriptionStatusPendingFulfillmentStart),
		// 						OfferDetails: &armnapsteromniagentapi.OfferDetails{
		// 							PublisherID: to.Ptr("contoso"),
		// 							OfferID: to.Ptr("contoso-saas-app"),
		// 							PlanID: to.Ptr("standard-plan"),
		// 							PlanName: to.Ptr("Standard Plan"),
		// 							TermUnit: to.Ptr("P1M"),
		// 							TermID: to.Ptr("monthly-term-001"),
		// 						},
		// 						SaasResourceID: to.Ptr("/subscriptions/a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d/resourceGroups/rgopenapi/providers/Microsoft.SaaS/resources/contosoSaaS"),
		// 					},
		// 					User: &armnapsteromniagentapi.UserDetails{
		// 						FirstName: to.Ptr("John"),
		// 						LastName: to.Ptr("Doe"),
		// 						EmailAddress: to.Ptr("john.doe@contoso.com"),
		// 						Upn: to.Ptr("john.doe@contoso.com"),
		// 						PhoneNumber: to.Ptr("+1-425-555-1234"),
		// 					},
		// 					ProvisioningState: to.Ptr(armnapsteromniagentapi.ResourceProvisioningStateSucceeded),
		// 					PartnerProperties: &armnapsteromniagentapi.PartnerProperties{
		// 						Application: to.Ptr("Contoso App"),
		// 					},
		// 					SingleSignOnProperties: &armnapsteromniagentapi.SingleSignOnPropertiesV2{
		// 						Type: to.Ptr(armnapsteromniagentapi.SingleSignOnTypeSaml),
		// 						State: to.Ptr(armnapsteromniagentapi.SingleSignOnStatesInitial),
		// 						EnterpriseAppID: to.Ptr("b2c3d4e5-f6a7-4b5c-8d9e-0f1a2b3c4d5e"),
		// 						URL: to.Ptr("https://login.contoso.com"),
		// 						AADDomains: []*string{
		// 							to.Ptr("contoso.com"),
		// 						},
		// 					},
		// 				},
		// 				Identity: &armnapsteromniagentapi.ManagedServiceIdentity{
		// 					PrincipalID: to.Ptr("c3d4e5f6-a7b8-4c5d-9e0f-1a2b3c4d5e6f"),
		// 					TenantID: to.Ptr("d4e5f6a7-b8c9-4d5e-0f1a-2b3c4d5e6f7a"),
		// 					Type: to.Ptr(armnapsteromniagentapi.ManagedServiceIdentityTypeNone),
		// 					UserAssignedIdentities: map[string]*armnapsteromniagentapi.UserAssignedIdentity{
		// 					},
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 				Location: to.Ptr("eastus"),
		// 				ID: to.Ptr("/subscriptions/0F0FBCF9-8374-47FC-B189-B79B84033EA3/resourceGroups/rgopenapi/providers/Napster.CompanionAPI/organizations/contosoOrg"),
		// 				Name: to.Ptr("contosoOrg"),
		// 				Type: to.Ptr("Napster.CompanionAPI/organizations"),
		// 				SystemData: &armnapsteromniagentapi.SystemData{
		// 					CreatedBy: to.Ptr("john.doe@contoso.com"),
		// 					CreatedByType: to.Ptr(armnapsteromniagentapi.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-12-24T15:55:17.787Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("jane.smith@contoso.com"),
		// 					LastModifiedByType: to.Ptr(armnapsteromniagentapi.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-12-24T15:55:17.787Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://management.azure.com/subscriptions/0F0FBCF9-8374-47FC-B189-B79B84033EA3/providers/Napster.CompanionAPI/organizations?api-version=2025-12-24-preview&$skiptoken=X'12345'"),
		// 	},
		// }
	}
}
Example (OrganizationsListByResourceGroupMinimumSetGeneratedByMinimumSetRule)

Generated from example definition: 2025-12-24-preview/Organizations_ListByResourceGroup_MinimumSet_Gen.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/napsteromniagentapi/armnapsteromniagentapi"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnapsteromniagentapi.NewClientFactory("0F0FBCF9-8374-47FC-B189-B79B84033EA3", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOrganizationsClient().NewListByResourceGroupPager("rgopenapi", 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 = armnapsteromniagentapi.OrganizationsClientListByResourceGroupResponse{
		// 	OrganizationResourceListResult: armnapsteromniagentapi.OrganizationResourceListResult{
		// 		Value: []*armnapsteromniagentapi.OrganizationResource{
		// 			{
		// 				ID: to.Ptr("/subscriptions/0F0FBCF9-8374-47FC-B189-B79B84033EA3/resourceGroups/rgopenapi/providers/Napster.CompanionAPI/organizations/contosoOrg"),
		// 				Location: to.Ptr("eastus"),
		// 			},
		// 		},
		// 	},
		// }
	}
}

func (*OrganizationsClient) NewListBySubscriptionPager

NewListBySubscriptionPager - List OrganizationResource resources by subscription ID

  • options - OrganizationsClientListBySubscriptionOptions contains the optional parameters for the OrganizationsClient.NewListBySubscriptionPager method.
Example (OrganizationsListBySubscriptionMaximumSetGeneratedByMaximumSetRule)

Generated from example definition: 2025-12-24-preview/Organizations_ListBySubscription_MaximumSet_Gen.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/napsteromniagentapi/armnapsteromniagentapi"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnapsteromniagentapi.NewClientFactory("0F0FBCF9-8374-47FC-B189-B79B84033EA3", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOrganizationsClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page = armnapsteromniagentapi.OrganizationsClientListBySubscriptionResponse{
		// 	OrganizationResourceListResult: armnapsteromniagentapi.OrganizationResourceListResult{
		// 		Value: []*armnapsteromniagentapi.OrganizationResource{
		// 			{
		// 				Properties: &armnapsteromniagentapi.OrganizationProperties{
		// 					Marketplace: &armnapsteromniagentapi.MarketplaceDetails{
		// 						SubscriptionID: to.Ptr("a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"),
		// 						SubscriptionStatus: to.Ptr(armnapsteromniagentapi.MarketplaceSubscriptionStatusPendingFulfillmentStart),
		// 						OfferDetails: &armnapsteromniagentapi.OfferDetails{
		// 							PublisherID: to.Ptr("contoso"),
		// 							OfferID: to.Ptr("contoso-saas-app"),
		// 							PlanID: to.Ptr("standard-plan"),
		// 							PlanName: to.Ptr("Standard Plan"),
		// 							TermUnit: to.Ptr("P1M"),
		// 							TermID: to.Ptr("monthly-term-001"),
		// 						},
		// 						SaasResourceID: to.Ptr("/subscriptions/a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d/resourceGroups/rgopenapi/providers/Microsoft.SaaS/resources/contosoSaaS"),
		// 					},
		// 					User: &armnapsteromniagentapi.UserDetails{
		// 						FirstName: to.Ptr("John"),
		// 						LastName: to.Ptr("Doe"),
		// 						EmailAddress: to.Ptr("john.doe@contoso.com"),
		// 						Upn: to.Ptr("john.doe@contoso.com"),
		// 						PhoneNumber: to.Ptr("+1-425-555-1234"),
		// 					},
		// 					ProvisioningState: to.Ptr(armnapsteromniagentapi.ResourceProvisioningStateSucceeded),
		// 					PartnerProperties: &armnapsteromniagentapi.PartnerProperties{
		// 						Application: to.Ptr("Contoso App"),
		// 					},
		// 					SingleSignOnProperties: &armnapsteromniagentapi.SingleSignOnPropertiesV2{
		// 						Type: to.Ptr(armnapsteromniagentapi.SingleSignOnTypeSaml),
		// 						State: to.Ptr(armnapsteromniagentapi.SingleSignOnStatesInitial),
		// 						EnterpriseAppID: to.Ptr("b2c3d4e5-f6a7-4b5c-8d9e-0f1a2b3c4d5e"),
		// 						URL: to.Ptr("https://login.contoso.com"),
		// 						AADDomains: []*string{
		// 							to.Ptr("contoso.com"),
		// 						},
		// 					},
		// 				},
		// 				Identity: &armnapsteromniagentapi.ManagedServiceIdentity{
		// 					PrincipalID: to.Ptr("c3d4e5f6-a7b8-4c5d-9e0f-1a2b3c4d5e6f"),
		// 					TenantID: to.Ptr("d4e5f6a7-b8c9-4d5e-0f1a-2b3c4d5e6f7a"),
		// 					Type: to.Ptr(armnapsteromniagentapi.ManagedServiceIdentityTypeNone),
		// 					UserAssignedIdentities: map[string]*armnapsteromniagentapi.UserAssignedIdentity{
		// 					},
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 				Location: to.Ptr("eastus"),
		// 				ID: to.Ptr("/subscriptions/0F0FBCF9-8374-47FC-B189-B79B84033EA3/resourceGroups/rgopenapi/providers/Napster.CompanionAPI/organizations/contosoOrg"),
		// 				Name: to.Ptr("contosoOrg"),
		// 				Type: to.Ptr("Napster.CompanionAPI/organizations"),
		// 				SystemData: &armnapsteromniagentapi.SystemData{
		// 					CreatedBy: to.Ptr("john.doe@contoso.com"),
		// 					CreatedByType: to.Ptr(armnapsteromniagentapi.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-12-24T15:55:17.787Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("jane.smith@contoso.com"),
		// 					LastModifiedByType: to.Ptr(armnapsteromniagentapi.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-12-24T15:55:17.787Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://management.azure.com/subscriptions/0F0FBCF9-8374-47FC-B189-B79B84033EA3/providers/Napster.CompanionAPI/organizations?api-version=2025-12-24-preview&$skiptoken=X'12345'"),
		// 	},
		// }
	}
}
Example (OrganizationsListBySubscriptionMinimumSetGeneratedByMinimumSetRule)

Generated from example definition: 2025-12-24-preview/Organizations_ListBySubscription_MinimumSet_Gen.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/napsteromniagentapi/armnapsteromniagentapi"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnapsteromniagentapi.NewClientFactory("0F0FBCF9-8374-47FC-B189-B79B84033EA3", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOrganizationsClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page = armnapsteromniagentapi.OrganizationsClientListBySubscriptionResponse{
		// 	OrganizationResourceListResult: armnapsteromniagentapi.OrganizationResourceListResult{
		// 		Value: []*armnapsteromniagentapi.OrganizationResource{
		// 			{
		// 				ID: to.Ptr("/subscriptions/0F0FBCF9-8374-47FC-B189-B79B84033EA3/resourceGroups/rgopenapi/providers/Napster.CompanionAPI/organizations/contosoOrg"),
		// 				Location: to.Ptr("eastus"),
		// 			},
		// 		},
		// 	},
		// }
	}
}

type OrganizationsClientBeginCreateOrUpdateOptions

type OrganizationsClientBeginCreateOrUpdateOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

OrganizationsClientBeginCreateOrUpdateOptions contains the optional parameters for the OrganizationsClient.BeginCreateOrUpdate method.

type OrganizationsClientBeginDeleteOptions

type OrganizationsClientBeginDeleteOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

OrganizationsClientBeginDeleteOptions contains the optional parameters for the OrganizationsClient.BeginDelete method.

type OrganizationsClientBeginLinkSaaSOptions

type OrganizationsClientBeginLinkSaaSOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

OrganizationsClientBeginLinkSaaSOptions contains the optional parameters for the OrganizationsClient.BeginLinkSaaS method.

type OrganizationsClientBeginUpdateOptions

type OrganizationsClientBeginUpdateOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

OrganizationsClientBeginUpdateOptions contains the optional parameters for the OrganizationsClient.BeginUpdate method.

type OrganizationsClientCreateOrUpdateResponse

type OrganizationsClientCreateOrUpdateResponse struct {
	// Concrete tracked resource types can be created by aliasing this type using a specific property type.
	OrganizationResource
}

OrganizationsClientCreateOrUpdateResponse contains the response from method OrganizationsClient.BeginCreateOrUpdate.

type OrganizationsClientDeleteResponse

type OrganizationsClientDeleteResponse struct {
}

OrganizationsClientDeleteResponse contains the response from method OrganizationsClient.BeginDelete.

type OrganizationsClientGetOptions

type OrganizationsClientGetOptions struct {
}

OrganizationsClientGetOptions contains the optional parameters for the OrganizationsClient.Get method.

type OrganizationsClientGetResponse

type OrganizationsClientGetResponse struct {
	// Concrete tracked resource types can be created by aliasing this type using a specific property type.
	OrganizationResource
}

OrganizationsClientGetResponse contains the response from method OrganizationsClient.Get.

type OrganizationsClientLatestLinkedSaaSOptions

type OrganizationsClientLatestLinkedSaaSOptions struct {
}

OrganizationsClientLatestLinkedSaaSOptions contains the optional parameters for the OrganizationsClient.LatestLinkedSaaS method.

type OrganizationsClientLatestLinkedSaaSResponse

type OrganizationsClientLatestLinkedSaaSResponse struct {
	// Response of get latest linked SaaS resource operation
	LatestLinkedSaaSResponse
}

OrganizationsClientLatestLinkedSaaSResponse contains the response from method OrganizationsClient.LatestLinkedSaaS.

type OrganizationsClientLinkSaaSResponse

type OrganizationsClientLinkSaaSResponse struct {
	// Concrete tracked resource types can be created by aliasing this type using a specific property type.
	OrganizationResource
}

OrganizationsClientLinkSaaSResponse contains the response from method OrganizationsClient.BeginLinkSaaS.

type OrganizationsClientListByResourceGroupOptions

type OrganizationsClientListByResourceGroupOptions struct {
}

OrganizationsClientListByResourceGroupOptions contains the optional parameters for the OrganizationsClient.NewListByResourceGroupPager method.

type OrganizationsClientListByResourceGroupResponse

type OrganizationsClientListByResourceGroupResponse struct {
	// The response of a OrganizationResource list operation.
	OrganizationResourceListResult
}

OrganizationsClientListByResourceGroupResponse contains the response from method OrganizationsClient.NewListByResourceGroupPager.

type OrganizationsClientListBySubscriptionOptions

type OrganizationsClientListBySubscriptionOptions struct {
}

OrganizationsClientListBySubscriptionOptions contains the optional parameters for the OrganizationsClient.NewListBySubscriptionPager method.

type OrganizationsClientListBySubscriptionResponse

type OrganizationsClientListBySubscriptionResponse struct {
	// The response of a OrganizationResource list operation.
	OrganizationResourceListResult
}

OrganizationsClientListBySubscriptionResponse contains the response from method OrganizationsClient.NewListBySubscriptionPager.

type OrganizationsClientUpdateResponse

type OrganizationsClientUpdateResponse struct {
	// Concrete tracked resource types can be created by aliasing this type using a specific property type.
	OrganizationResource
}

OrganizationsClientUpdateResponse contains the response from method OrganizationsClient.BeginUpdate.

type Origin

type Origin string

Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"

const (
	// OriginSystem - Indicates the operation is initiated by a system.
	OriginSystem Origin = "system"
	// OriginUser - Indicates the operation is initiated by a user.
	OriginUser Origin = "user"
	// OriginUserSystem - Indicates the operation is initiated by a user or system.
	OriginUserSystem Origin = "user,system"
)

func PossibleOriginValues

func PossibleOriginValues() []Origin

PossibleOriginValues returns the possible values for the Origin const type.

type PartnerProperties

type PartnerProperties struct {
	// REQUIRED; Application name
	Application *string
}

PartnerProperties - Partner's specific Properties

func (PartnerProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PartnerProperties.

func (*PartnerProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PartnerProperties.

type ResourceProvisioningState

type ResourceProvisioningState string

ResourceProvisioningState - The provisioning state of a resource type.

const (
	// ResourceProvisioningStateCanceled - Resource creation was canceled.
	ResourceProvisioningStateCanceled ResourceProvisioningState = "Canceled"
	// ResourceProvisioningStateFailed - Resource creation failed.
	ResourceProvisioningStateFailed ResourceProvisioningState = "Failed"
	// ResourceProvisioningStateSucceeded - Resource has been created.
	ResourceProvisioningStateSucceeded ResourceProvisioningState = "Succeeded"
)

func PossibleResourceProvisioningStateValues

func PossibleResourceProvisioningStateValues() []ResourceProvisioningState

PossibleResourceProvisioningStateValues returns the possible values for the ResourceProvisioningState const type.

type SaaSData

type SaaSData struct {
	// SaaS resource id
	SaaSResourceID *string
}

SaaSData - SaaS-related data properties

func (SaaSData) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SaaSData.

func (*SaaSData) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SaaSData.

type SaaSOperationGroupClient

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

SaaSOperationGroupClient contains the methods for the SaaSOperationGroup group. Don't use this type directly, use NewSaaSOperationGroupClient() instead.

Generated from API version 2025-12-24-preview

func NewSaaSOperationGroupClient

func NewSaaSOperationGroupClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SaaSOperationGroupClient, error)

NewSaaSOperationGroupClient creates a new instance of SaaSOperationGroupClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - Contains optional client configuration. Pass nil to accept the default values.

func (*SaaSOperationGroupClient) BeginActivateResource

BeginActivateResource - Resolve the token to get the SaaS resource ID and activate the SaaS resource If the operation fails it returns an *azcore.ResponseError type.

  • body - The request body
  • options - SaaSOperationGroupClientBeginActivateResourceOptions contains the optional parameters for the SaaSOperationGroupClient.BeginActivateResource method.
Example (SaaSOperationGroupActivateResourceMaximumSetGeneratedByMaximumSetRule)

Generated from example definition: 2025-12-24-preview/SaaSOperationGroup_ActivateResource_MaximumSet_Gen.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/napsteromniagentapi/armnapsteromniagentapi"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnapsteromniagentapi.NewClientFactory("0F0FBCF9-8374-47FC-B189-B79B84033EA3", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewSaaSOperationGroupClient().BeginActivateResource(ctx, armnapsteromniagentapi.ActivateSaaSParameterRequest{
		SaasGUID:    to.Ptr("a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"),
		PublisherID: to.Ptr("contoso"),
	}, 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 poll 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 = armnapsteromniagentapi.SaaSOperationGroupClientActivateResourceResponse{
	// 	SaaSResourceDetailsResponse: armnapsteromniagentapi.SaaSResourceDetailsResponse{
	// 		SaasID: to.Ptr("/subscriptions/0F0FBCF9-8374-47FC-B189-B79B84033EA3/resourceGroups/rgopenapi/providers/Microsoft.SaaS/resources/contosoSaaS"),
	// 		ID: to.Ptr("/subscriptions/0F0FBCF9-8374-47FC-B189-B79B84033EA3/providers/Napster.CompanionAPI/saasResources/contosoSaaS"),
	// 		Name: to.Ptr("contosoSaaS"),
	// 		Type: to.Ptr("Napster.CompanionAPI/saasResources"),
	// 		SystemData: &armnapsteromniagentapi.SystemData{
	// 			CreatedBy: to.Ptr("john.doe@contoso.com"),
	// 			CreatedByType: to.Ptr(armnapsteromniagentapi.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-12-24T15:55:17.787Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("jane.smith@contoso.com"),
	// 			LastModifiedByType: to.Ptr(armnapsteromniagentapi.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-12-24T15:55:17.787Z"); return t}()),
	// 		},
	// 	},
	// }
}
Example (SaaSOperationGroupActivateResourceMinimumSetGeneratedByMinimumSetRule)

Generated from example definition: 2025-12-24-preview/SaaSOperationGroup_ActivateResource_MinimumSet_Gen.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/napsteromniagentapi/armnapsteromniagentapi"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnapsteromniagentapi.NewClientFactory("0F0FBCF9-8374-47FC-B189-B79B84033EA3", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewSaaSOperationGroupClient().BeginActivateResource(ctx, armnapsteromniagentapi.ActivateSaaSParameterRequest{
		SaasGUID: to.Ptr("a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"),
	}, 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 poll 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 = armnapsteromniagentapi.SaaSOperationGroupClientActivateResourceResponse{
	// 	SaaSResourceDetailsResponse: armnapsteromniagentapi.SaaSResourceDetailsResponse{
	// 	},
	// }
}

type SaaSOperationGroupClientActivateResourceResponse

type SaaSOperationGroupClientActivateResourceResponse struct {
	// Marketplace SaaS resource details.
	SaaSResourceDetailsResponse
}

SaaSOperationGroupClientActivateResourceResponse contains the response from method SaaSOperationGroupClient.BeginActivateResource.

type SaaSOperationGroupClientBeginActivateResourceOptions

type SaaSOperationGroupClientBeginActivateResourceOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

SaaSOperationGroupClientBeginActivateResourceOptions contains the optional parameters for the SaaSOperationGroupClient.BeginActivateResource method.

type SaaSResourceDetailsResponse

type SaaSResourceDetailsResponse struct {
	// Id of the Marketplace SaaS Resource
	SaasID *string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

SaaSResourceDetailsResponse - Marketplace SaaS resource details.

func (SaaSResourceDetailsResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SaaSResourceDetailsResponse.

func (*SaaSResourceDetailsResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SaaSResourceDetailsResponse.

type SingleSignOnPropertiesV2

type SingleSignOnPropertiesV2 struct {
	// REQUIRED; Type of Single Sign-On mechanism being used
	Type *SingleSignOnType

	// List of AAD domains fetched from Microsoft Graph for user.
	AADDomains []*string

	// AAD enterprise application Id used to setup SSO
	EnterpriseAppID *string

	// State of the Single Sign On for the resource
	State *SingleSignOnStates

	// URL for SSO to be used by the partner to redirect the user to their system
	URL *string
}

SingleSignOnPropertiesV2 - Properties specific to Single Sign On Resource

func (SingleSignOnPropertiesV2) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SingleSignOnPropertiesV2.

func (*SingleSignOnPropertiesV2) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SingleSignOnPropertiesV2.

type SingleSignOnStates

type SingleSignOnStates string

SingleSignOnStates - Various states of the SSO resource

const (
	// SingleSignOnStatesDisable - State of the SSO resource when it is disabled
	SingleSignOnStatesDisable SingleSignOnStates = "Disable"
	// SingleSignOnStatesEnable - State of the SSO resource when it is enabled
	SingleSignOnStatesEnable SingleSignOnStates = "Enable"
	// SingleSignOnStatesInitial - Initial state of the SSO resource
	SingleSignOnStatesInitial SingleSignOnStates = "Initial"
)

func PossibleSingleSignOnStatesValues

func PossibleSingleSignOnStatesValues() []SingleSignOnStates

PossibleSingleSignOnStatesValues returns the possible values for the SingleSignOnStates const type.

type SingleSignOnType

type SingleSignOnType string

SingleSignOnType - Defines the type of Single Sign-On (SSO) mechanism being used

const (
	// SingleSignOnTypeOpenID - OpenID Connect based Single Sign-On.
	SingleSignOnTypeOpenID SingleSignOnType = "OpenId"
	// SingleSignOnTypeSaml - Security Assertion Markup Language (SAML) based Single Sign-On
	SingleSignOnTypeSaml SingleSignOnType = "Saml"
)

func PossibleSingleSignOnTypeValues

func PossibleSingleSignOnTypeValues() []SingleSignOnType

PossibleSingleSignOnTypeValues returns the possible values for the SingleSignOnType const type.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type UserAssignedIdentity

type UserAssignedIdentity struct {
	// READ-ONLY; The client ID of the assigned identity.
	ClientID *string

	// READ-ONLY; The principal ID of the assigned identity.
	PrincipalID *string
}

UserAssignedIdentity - User assigned identity properties

func (UserAssignedIdentity) MarshalJSON

func (u UserAssignedIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.

func (*UserAssignedIdentity) UnmarshalJSON

func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.

type UserDetails

type UserDetails struct {
	// Email address of the user
	EmailAddress *string

	// First name of the user
	FirstName *string

	// Last name of the user
	LastName *string

	// User's phone number
	PhoneNumber *string

	// User's principal name
	Upn *string
}

UserDetails - User details for an organization

func (UserDetails) MarshalJSON

func (u UserDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserDetails.

func (*UserDetails) UnmarshalJSON

func (u *UserDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserDetails.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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