armmongodbatlas

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2025 License: MIT Imports: 14 Imported by: 0

README

Azure Mongodb Atlas Module for Go

The armmongodbatlas module provides operations for working with Azure Mongodb Atlas.

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 Mongodb Atlas module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mongodbatlas/armmongodbatlas

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Mongodb Atlas. 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 Mongodb Atlas 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 := armmongodbatlas.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 := armmongodbatlas.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 Mongodbatlas 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 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.

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

	// REQUIRED; 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; Plan Id for the marketplace offer
	PlanID *string

	// REQUIRED; Publisher Id for the marketplace offer
	PublisherID *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 and operation.

func (OperationDisplay) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

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

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

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

func (OperationListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type OperationsClient

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

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

func NewOperationsClient

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

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

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

func (*OperationsClient) NewListPager

NewListPager - List the operations for the provider

Generated from API version 2025-06-01

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

Generated from example definition: 2025-06-01/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/mongodbatlas/armmongodbatlas"
	"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 := armmongodbatlas.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 = armmongodbatlas.OperationsClientListResponse{
		// 	OperationListResult: armmongodbatlas.OperationListResult{
		// 		Value: []*armmongodbatlas.Operation{
		// 			{
		// 				Name: to.Ptr("glurvmlhuxhlxhmjoiycpicdrjmsd"),
		// 				IsDataAction: to.Ptr(true),
		// 				Display: &armmongodbatlas.OperationDisplay{
		// 					Provider: to.Ptr("ybkvitxcbahxljn"),
		// 					Resource: to.Ptr("wsdbqubnkmfbclp"),
		// 					Operation: to.Ptr("vsix"),
		// 					Description: to.Ptr("ichocwjfmgzbiliknwwnasvdsnowu"),
		// 				},
		// 				Origin: to.Ptr(armmongodbatlas.OriginUser),
		// 				ActionType: to.Ptr(armmongodbatlas.ActionTypeInternal),
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}
Example (OperationsListMinimumSet)

Generated from example definition: 2025-06-01/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/mongodbatlas/armmongodbatlas"
	"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 := armmongodbatlas.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 = armmongodbatlas.OperationsClientListResponse{
		// 	OperationListResult: armmongodbatlas.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; Details of the user.
	User *UserDetails

	// MongoDB properties
	PartnerProperties *PartnerProperties

	// 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

	// READ-ONLY; Name of the Organization resource
	Name *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; 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 - The resource model definition for an Azure Organization

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 added in v1.0.0

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

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

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

OrganizationResourceUpdate - The type used for update operations of the OrganizationResource.

func (OrganizationResourceUpdate) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type OrganizationResourceUpdate.

func (*OrganizationResourceUpdate) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OrganizationResourceUpdate.

type OrganizationResourceUpdateProperties added in v1.0.0

type OrganizationResourceUpdateProperties struct {
	// MongoDB properties
	PartnerProperties *PartnerProperties

	// Details of the user.
	User *UserDetails
}

OrganizationResourceUpdateProperties - The updatable properties of the OrganizationResource.

func (OrganizationResourceUpdateProperties) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type OrganizationResourceUpdateProperties.

func (*OrganizationResourceUpdateProperties) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OrganizationResourceUpdateProperties.

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.

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 - 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.

Generated from API version 2025-06-01

  • 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-06-01/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/mongodbatlas/armmongodbatlas"
	"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 := armmongodbatlas.NewClientFactory("AD4FE133-6EF1-4ED8-82DB-5C1CBA58597E", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewOrganizationsClient().BeginCreateOrUpdate(ctx, "rgopenapi", "U.1-:7", armmongodbatlas.OrganizationResource{
		Properties: &armmongodbatlas.OrganizationProperties{
			Marketplace: &armmongodbatlas.MarketplaceDetails{
				SubscriptionID:     to.Ptr("o"),
				SubscriptionStatus: to.Ptr(armmongodbatlas.MarketplaceSubscriptionStatusPendingFulfillmentStart),
				OfferDetails: &armmongodbatlas.OfferDetails{
					PublisherID: to.Ptr("rxglearenxsgpwzlsxmiicynks"),
					OfferID:     to.Ptr("ohnquleylybvjrtnpjupvwlk"),
					PlanID:      to.Ptr("obhxnhvrtbcnoovgofbs"),
					PlanName:    to.Ptr("lkwdzpfhvjezjusrqzyftcikxdt"),
					TermUnit:    to.Ptr("omkxrnburbnruglwqgjlahvjmbfcse"),
					TermID:      to.Ptr("bqmmltwmtpdcdeszbka"),
				},
			},
			User: &armmongodbatlas.UserDetails{
				FirstName:    to.Ptr("aslybvdwwddqxwazxvxhjrs"),
				LastName:     to.Ptr("cnuitqoqpcyvmuqowgnxpwxjcveyr"),
				EmailAddress: to.Ptr(".K_@e7N-g1.xjqnbPs"),
				Upn:          to.Ptr("howdzmfy"),
				PhoneNumber:  to.Ptr("ilypntsrbmbbbexbasuu"),
				CompanyName:  to.Ptr("oxdcwwl"),
			},
			PartnerProperties: &armmongodbatlas.PartnerProperties{
				OrganizationID:   to.Ptr("lyombjlhvwxithkiy"),
				RedirectURL:      to.Ptr("cbxwtehraetlluocdihfgchvjzockn"),
				OrganizationName: to.Ptr("U.1-:7"),
			},
		},
		Identity: &armmongodbatlas.ManagedServiceIdentity{
			Type:                   to.Ptr(armmongodbatlas.ManagedServiceIdentityTypeNone),
			UserAssignedIdentities: map[string]*armmongodbatlas.UserAssignedIdentity{},
		},
		Tags:     map[string]*string{},
		Location: to.Ptr("wobqn"),
	}, 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 = armmongodbatlas.OrganizationsClientCreateOrUpdateResponse{
	// 	OrganizationResource: &armmongodbatlas.OrganizationResource{
	// 		Properties: &armmongodbatlas.OrganizationProperties{
	// 			Marketplace: &armmongodbatlas.MarketplaceDetails{
	// 				SubscriptionID: to.Ptr("o"),
	// 				SubscriptionStatus: to.Ptr(armmongodbatlas.MarketplaceSubscriptionStatusPendingFulfillmentStart),
	// 				OfferDetails: &armmongodbatlas.OfferDetails{
	// 					PublisherID: to.Ptr("rxglearenxsgpwzlsxmiicynks"),
	// 					OfferID: to.Ptr("ohnquleylybvjrtnpjupvwlk"),
	// 					PlanID: to.Ptr("obhxnhvrtbcnoovgofbs"),
	// 					PlanName: to.Ptr("lkwdzpfhvjezjusrqzyftcikxdt"),
	// 					TermUnit: to.Ptr("omkxrnburbnruglwqgjlahvjmbfcse"),
	// 					TermID: to.Ptr("bqmmltwmtpdcdeszbka"),
	// 				},
	// 			},
	// 			User: &armmongodbatlas.UserDetails{
	// 				FirstName: to.Ptr("aslybvdwwddqxwazxvxhjrs"),
	// 				LastName: to.Ptr("cnuitqoqpcyvmuqowgnxpwxjcveyr"),
	// 				EmailAddress: to.Ptr(".K_@e7N-g1.xjqnbPs"),
	// 				Upn: to.Ptr("howdzmfy"),
	// 				PhoneNumber: to.Ptr("ilypntsrbmbbbexbasuu"),
	// 				CompanyName: to.Ptr("oxdcwwl"),
	// 			},
	// 			ProvisioningState: to.Ptr(armmongodbatlas.ResourceProvisioningStateSucceeded),
	// 			PartnerProperties: &armmongodbatlas.PartnerProperties{
	// 				OrganizationID: to.Ptr("lpmdubvuizsthw"),
	// 				RedirectURL: to.Ptr("cbxwtehraetlluocdihfgchvjzockn"),
	// 				OrganizationName: to.Ptr("U.1-:7"),
	// 			},
	// 		},
	// 		Identity: &armmongodbatlas.ManagedServiceIdentity{
	// 			PrincipalID: to.Ptr("123e4567-e89b-12d3-a456-426614174000"),
	// 			TenantID: to.Ptr("123e4567-e89b-12d3-a456-426614174000"),
	// 			Type: to.Ptr(armmongodbatlas.ManagedServiceIdentityTypeNone),
	// 			UserAssignedIdentities: map[string]*armmongodbatlas.UserAssignedIdentity{
	// 			},
	// 		},
	// 		Tags: map[string]*string{
	// 			"key8183": to.Ptr("ibdiopeuhthfvnjjbtkwipooa"),
	// 		},
	// 		Location: to.Ptr("wobqn"),
	// 		ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/MongoDB.Atlas/organizations/testorg"),
	// 		Name: to.Ptr("qcdj"),
	// 		Type: to.Ptr("pfmxfnhzmwmnmbdbluynkxomgwtqz"),
	// 		SystemData: &armmongodbatlas.SystemData{
	// 			CreatedBy: to.Ptr("rwy"),
	// 			CreatedByType: to.Ptr(armmongodbatlas.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-04T04:51:37.109Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("ceflhxjkjslg"),
	// 			LastModifiedByType: to.Ptr(armmongodbatlas.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-04T04:51:37.109Z"); 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.

Generated from API version 2025-06-01

  • 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-06-01/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/mongodbatlas/armmongodbatlas"
	"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 := armmongodbatlas.NewClientFactory("4AFC1287-D389-4265-B2D4-59B96A45CACC", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewOrganizationsClient().BeginDelete(ctx, "rgopenapi", "U.1-:7", 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)
	}
}

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.

Generated from API version 2025-06-01

  • 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-06-01/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/mongodbatlas/armmongodbatlas"
	"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 := armmongodbatlas.NewClientFactory("422A4D59-A5BC-4DBB-8831-EC666633F64F", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewOrganizationsClient().BeginUpdate(ctx, "rgopenapi", "U.1-:7", armmongodbatlas.OrganizationResourceUpdate{
		Tags: map[string]*string{},
		Properties: &armmongodbatlas.OrganizationResourceUpdateProperties{
			User: &armmongodbatlas.UserDetails{
				FirstName:    to.Ptr("btyhwmlbzzihjfimviefebg"),
				LastName:     to.Ptr("xx"),
				EmailAddress: to.Ptr(".K_@e7N-g1.xjqnbPs"),
				Upn:          to.Ptr("mxtbogd"),
				PhoneNumber:  to.Ptr("isvc"),
				CompanyName:  to.Ptr("oztteysco"),
			},
			PartnerProperties: &armmongodbatlas.PartnerProperties{
				OrganizationID:   to.Ptr("vugtqrobendjkinziswxlqueouo"),
				RedirectURL:      to.Ptr("cbxwtehraetlluocdihfgchvjzockn"),
				OrganizationName: to.Ptr("U.1-:7"),
			},
		},
		Identity: &armmongodbatlas.ManagedServiceIdentity{
			Type:                   to.Ptr(armmongodbatlas.ManagedServiceIdentityTypeNone),
			UserAssignedIdentities: map[string]*armmongodbatlas.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 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 = armmongodbatlas.OrganizationsClientUpdateResponse{
	// 	OrganizationResource: &armmongodbatlas.OrganizationResource{
	// 		Properties: &armmongodbatlas.OrganizationProperties{
	// 			Marketplace: &armmongodbatlas.MarketplaceDetails{
	// 				SubscriptionID: to.Ptr("isxzpjgmsgvwmqaridgqgnz"),
	// 				SubscriptionStatus: to.Ptr(armmongodbatlas.MarketplaceSubscriptionStatusPendingFulfillmentStart),
	// 				OfferDetails: &armmongodbatlas.OfferDetails{
	// 					PublisherID: to.Ptr("fpojslpbvfsqvckbafx"),
	// 					OfferID: to.Ptr("armdqpexqptdprwn"),
	// 					PlanID: to.Ptr("gnbu"),
	// 					PlanName: to.Ptr("tajluzdogtzyep"),
	// 					TermUnit: to.Ptr("wzbofhcxshswsdtq"),
	// 					TermID: to.Ptr("lfppyeno"),
	// 				},
	// 			},
	// 			User: &armmongodbatlas.UserDetails{
	// 				FirstName: to.Ptr("btyhwmlbzzihjfimviefebg"),
	// 				LastName: to.Ptr("xx"),
	// 				EmailAddress: to.Ptr(".K_@e7N-g1.xjqnbPs"),
	// 				Upn: to.Ptr("mxtbogd"),
	// 				PhoneNumber: to.Ptr("isvc"),
	// 				CompanyName: to.Ptr("oztteysco"),
	// 			},
	// 			PartnerProperties: &armmongodbatlas.PartnerProperties{
	// 				OrganizationID: to.Ptr("vugtqrobendjkinziswxlqueouo"),
	// 				RedirectURL: to.Ptr("cbxwtehraetlluocdihfgchvjzockn"),
	// 				OrganizationName: to.Ptr("U.1-:7"),
	// 			},
	// 			ProvisioningState: to.Ptr(armmongodbatlas.ResourceProvisioningStateSucceeded),
	// 		},
	// 		Tags: map[string]*string{
	// 		},
	// 		Location: to.Ptr("tjmlissxvwsk"),
	// 		Identity: &armmongodbatlas.ManagedServiceIdentity{
	// 			Type: to.Ptr(armmongodbatlas.ManagedServiceIdentityTypeNone),
	// 			UserAssignedIdentities: map[string]*armmongodbatlas.UserAssignedIdentity{
	// 			},
	// 			PrincipalID: to.Ptr("123e4567-e89b-12d3-a456-426614174000"),
	// 			TenantID: to.Ptr("123e4567-e89b-12d3-a456-426614174000"),
	// 		},
	// 		ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM"),
	// 		Name: to.Ptr("ginfhwxvil"),
	// 		Type: to.Ptr("zmnehscunk"),
	// 		SystemData: &armmongodbatlas.SystemData{
	// 			CreatedBy: to.Ptr("hetkdvvtqdzyaxbgvpgvthdhw"),
	// 			CreatedByType: to.Ptr(armmongodbatlas.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-11-19T10:17:41.372Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("aghbfhfodcoagjdcmutdqwh"),
	// 			LastModifiedByType: to.Ptr(armmongodbatlas.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-11-19T10:17:41.372Z"); 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.

Generated from API version 2025-06-01

  • 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-06-01/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/mongodbatlas/armmongodbatlas"
	"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 := armmongodbatlas.NewClientFactory("4AFC1287-D389-4265-B2D4-59B96A45CACC", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewOrganizationsClient().Get(ctx, "rgopenapi", "U.1-:7", 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 = armmongodbatlas.OrganizationsClientGetResponse{
	// 	OrganizationResource: &armmongodbatlas.OrganizationResource{
	// 		Properties: &armmongodbatlas.OrganizationProperties{
	// 			Marketplace: &armmongodbatlas.MarketplaceDetails{
	// 				SubscriptionID: to.Ptr("isxzpjgmsgvwmqaridgqgnz"),
	// 				SubscriptionStatus: to.Ptr(armmongodbatlas.MarketplaceSubscriptionStatusPendingFulfillmentStart),
	// 				OfferDetails: &armmongodbatlas.OfferDetails{
	// 					PublisherID: to.Ptr("fpojslpbvfsqvckbafx"),
	// 					OfferID: to.Ptr("armdqpexqptdprwn"),
	// 					PlanID: to.Ptr("gnbu"),
	// 					PlanName: to.Ptr("tajluzdogtzyep"),
	// 					TermUnit: to.Ptr("wzbofhcxshswsdtq"),
	// 					TermID: to.Ptr("lfppyeno"),
	// 				},
	// 			},
	// 			User: &armmongodbatlas.UserDetails{
	// 				FirstName: to.Ptr("xyiejuwmngdgwkuj"),
	// 				LastName: to.Ptr("qvvxiyucekcxfhkyoasgiluqnk"),
	// 				EmailAddress: to.Ptr(".K_@e7N-g1.xjqnbPs"),
	// 				Upn: to.Ptr("mlcjscht"),
	// 				PhoneNumber: to.Ptr("hkfsjzqbqsskl"),
	// 				CompanyName: to.Ptr("iupxjimdyphrdncsikbuqkeics"),
	// 			},
	// 			PartnerProperties: &armmongodbatlas.PartnerProperties{
	// 				OrganizationID: to.Ptr("nshpooeewedeppupwedibg"),
	// 				RedirectURL: to.Ptr("cbxwtehraetlluocdihfgchvjzockn"),
	// 				OrganizationName: to.Ptr("U.1-:7"),
	// 			},
	// 			ProvisioningState: to.Ptr(armmongodbatlas.ResourceProvisioningStateSucceeded),
	// 		},
	// 		Tags: map[string]*string{
	// 		},
	// 		Location: to.Ptr("tjmlissxvwsk"),
	// 		Identity: &armmongodbatlas.ManagedServiceIdentity{
	// 			Type: to.Ptr(armmongodbatlas.ManagedServiceIdentityTypeNone),
	// 			UserAssignedIdentities: map[string]*armmongodbatlas.UserAssignedIdentity{
	// 			},
	// 			PrincipalID: to.Ptr("123e4567-e89b-12d3-a456-426614174000"),
	// 			TenantID: to.Ptr("123e4567-e89b-12d3-a456-426614174000"),
	// 		},
	// 		ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/MongoDB.Atlas/organizations/testorg"),
	// 		Name: to.Ptr("ginfhwxvil"),
	// 		Type: to.Ptr("zmnehscunk"),
	// 		SystemData: &armmongodbatlas.SystemData{
	// 			CreatedBy: to.Ptr("hetkdvvtqdzyaxbgvpgvthdhw"),
	// 			CreatedByType: to.Ptr(armmongodbatlas.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-11-19T10:17:41.372Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("aghbfhfodcoagjdcmutdqwh"),
	// 			LastModifiedByType: to.Ptr(armmongodbatlas.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-11-19T10:17:41.372Z"); return t}()),
	// 		},
	// 	},
	// }
}

func (*OrganizationsClient) NewListByResourceGroupPager

NewListByResourceGroupPager - List OrganizationResource resources by resource group

Generated from API version 2025-06-01

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

Generated from example definition: 2025-06-01/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/mongodbatlas/armmongodbatlas"
	"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 := armmongodbatlas.NewClientFactory("4AFC1287-D389-4265-B2D4-59B96A45CACC", 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 = armmongodbatlas.OrganizationsClientListByResourceGroupResponse{
		// 	OrganizationResourceListResult: armmongodbatlas.OrganizationResourceListResult{
		// 		Value: []*armmongodbatlas.OrganizationResource{
		// 			{
		// 				Properties: &armmongodbatlas.OrganizationProperties{
		// 					Marketplace: &armmongodbatlas.MarketplaceDetails{
		// 						SubscriptionID: to.Ptr("isxzpjgmsgvwmqaridgqgnz"),
		// 						SubscriptionStatus: to.Ptr(armmongodbatlas.MarketplaceSubscriptionStatusPendingFulfillmentStart),
		// 						OfferDetails: &armmongodbatlas.OfferDetails{
		// 							PublisherID: to.Ptr("fpojslpbvfsqvckbafx"),
		// 							OfferID: to.Ptr("armdqpexqptdprwn"),
		// 							PlanID: to.Ptr("gnbu"),
		// 							PlanName: to.Ptr("tajluzdogtzyep"),
		// 							TermUnit: to.Ptr("wzbofhcxshswsdtq"),
		// 							TermID: to.Ptr("lfppyeno"),
		// 						},
		// 					},
		// 					User: &armmongodbatlas.UserDetails{
		// 						FirstName: to.Ptr("xyiejuwmngdgwkuj"),
		// 						LastName: to.Ptr("qvvxiyucekcxfhkyoasgiluqnk"),
		// 						EmailAddress: to.Ptr(".K_@e7N-g1.xjqnbPs"),
		// 						Upn: to.Ptr("mlcjscht"),
		// 						PhoneNumber: to.Ptr("hkfsjzqbqsskl"),
		// 						CompanyName: to.Ptr("iupxjimdyphrdncsikbuqkeics"),
		// 					},
		// 					ProvisioningState: to.Ptr(armmongodbatlas.ResourceProvisioningStateSucceeded),
		// 					PartnerProperties: &armmongodbatlas.PartnerProperties{
		// 						OrganizationID: to.Ptr("nshpooeewedeppupwedibg"),
		// 						RedirectURL: to.Ptr("cbxwtehraetlluocdihfgchvjzockn"),
		// 						OrganizationName: to.Ptr("U.1-:7"),
		// 					},
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 				Location: to.Ptr("tjmlissxvwsk"),
		// 				ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/MongoDB.Atlas/organizations/testorg"),
		// 				Name: to.Ptr("ginfhwxvil"),
		// 				Type: to.Ptr("zmnehscunk"),
		// 				SystemData: &armmongodbatlas.SystemData{
		// 					CreatedBy: to.Ptr("hetkdvvtqdzyaxbgvpgvthdhw"),
		// 					CreatedByType: to.Ptr(armmongodbatlas.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-11-19T10:17:41.372Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("aghbfhfodcoagjdcmutdqwh"),
		// 					LastModifiedByType: to.Ptr(armmongodbatlas.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-11-19T10:17:41.372Z"); return t}()),
		// 				},
		// 				Identity: &armmongodbatlas.ManagedServiceIdentity{
		// 					PrincipalID: to.Ptr("123e4567-e89b-12d3-a456-426614174000"),
		// 					TenantID: to.Ptr("123e4567-e89b-12d3-a456-426614174000"),
		// 					Type: to.Ptr(armmongodbatlas.ManagedServiceIdentityTypeNone),
		// 					UserAssignedIdentities: map[string]*armmongodbatlas.UserAssignedIdentity{
		// 					},
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}
Example (OrganizationsListByResourceGroupMaximumSetGeneratedByMinimumSetRule)

Generated from example definition: 2025-06-01/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/mongodbatlas/armmongodbatlas"
	"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 := armmongodbatlas.NewClientFactory("422A4D59-A5BC-4DBB-8831-EC666633F64F", 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 = armmongodbatlas.OrganizationsClientListByResourceGroupResponse{
		// 	OrganizationResourceListResult: armmongodbatlas.OrganizationResourceListResult{
		// 		Value: []*armmongodbatlas.OrganizationResource{
		// 			{
		// 				Location: to.Ptr("tjmlissxvwsk"),
		// 				ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/MongoDB.Atlas/organizations/testorg"),
		// 			},
		// 		},
		// 	},
		// }
	}
}

func (*OrganizationsClient) NewListBySubscriptionPager

NewListBySubscriptionPager - List OrganizationResource resources by subscription ID

Generated from API version 2025-06-01

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

Generated from example definition: 2025-06-01/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/mongodbatlas/armmongodbatlas"
	"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 := armmongodbatlas.NewClientFactory("4AFC1287-D389-4265-B2D4-59B96A45CACC", 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 = armmongodbatlas.OrganizationsClientListBySubscriptionResponse{
		// 	OrganizationResourceListResult: armmongodbatlas.OrganizationResourceListResult{
		// 		Value: []*armmongodbatlas.OrganizationResource{
		// 			{
		// 				Properties: &armmongodbatlas.OrganizationProperties{
		// 					Marketplace: &armmongodbatlas.MarketplaceDetails{
		// 						SubscriptionID: to.Ptr("isxzpjgmsgvwmqaridgqgnz"),
		// 						SubscriptionStatus: to.Ptr(armmongodbatlas.MarketplaceSubscriptionStatusPendingFulfillmentStart),
		// 						OfferDetails: &armmongodbatlas.OfferDetails{
		// 							PublisherID: to.Ptr("fpojslpbvfsqvckbafx"),
		// 							OfferID: to.Ptr("armdqpexqptdprwn"),
		// 							PlanID: to.Ptr("gnbu"),
		// 							PlanName: to.Ptr("tajluzdogtzyep"),
		// 							TermUnit: to.Ptr("wzbofhcxshswsdtq"),
		// 							TermID: to.Ptr("lfppyeno"),
		// 						},
		// 					},
		// 					User: &armmongodbatlas.UserDetails{
		// 						FirstName: to.Ptr("xyiejuwmngdgwkuj"),
		// 						LastName: to.Ptr("qvvxiyucekcxfhkyoasgiluqnk"),
		// 						EmailAddress: to.Ptr(".K_@e7N-g1.xjqnbPs"),
		// 						Upn: to.Ptr("mlcjscht"),
		// 						PhoneNumber: to.Ptr("hkfsjzqbqsskl"),
		// 						CompanyName: to.Ptr("iupxjimdyphrdncsikbuqkeics"),
		// 					},
		// 					ProvisioningState: to.Ptr(armmongodbatlas.ResourceProvisioningStateSucceeded),
		// 					PartnerProperties: &armmongodbatlas.PartnerProperties{
		// 						OrganizationID: to.Ptr("nshpooeewedeppupwedibg"),
		// 						RedirectURL: to.Ptr("cbxwtehraetlluocdihfgchvjzockn"),
		// 						OrganizationName: to.Ptr("U.1-:7"),
		// 					},
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 				Location: to.Ptr("tjmlissxvwsk"),
		// 				ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/MongoDB.Atlas/organizations/testorg"),
		// 				Name: to.Ptr("ginfhwxvil"),
		// 				Type: to.Ptr("zmnehscunk"),
		// 				SystemData: &armmongodbatlas.SystemData{
		// 					CreatedBy: to.Ptr("hetkdvvtqdzyaxbgvpgvthdhw"),
		// 					CreatedByType: to.Ptr(armmongodbatlas.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-11-19T10:17:41.372Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("aghbfhfodcoagjdcmutdqwh"),
		// 					LastModifiedByType: to.Ptr(armmongodbatlas.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-11-19T10:17:41.372Z"); return t}()),
		// 				},
		// 				Identity: &armmongodbatlas.ManagedServiceIdentity{
		// 					PrincipalID: to.Ptr("123e4567-e89b-12d3-a456-426614174000"),
		// 					TenantID: to.Ptr("123e4567-e89b-12d3-a456-426614174000"),
		// 					Type: to.Ptr(armmongodbatlas.ManagedServiceIdentityTypeNone),
		// 					UserAssignedIdentities: map[string]*armmongodbatlas.UserAssignedIdentity{
		// 					},
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}
Example (OrganizationsListBySubscriptionMaximumSetGeneratedByMinimumSetRule)

Generated from example definition: 2025-06-01/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/mongodbatlas/armmongodbatlas"
	"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 := armmongodbatlas.NewClientFactory("422A4D59-A5BC-4DBB-8831-EC666633F64F", 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 = armmongodbatlas.OrganizationsClientListBySubscriptionResponse{
		// 	OrganizationResourceListResult: armmongodbatlas.OrganizationResourceListResult{
		// 		Value: []*armmongodbatlas.OrganizationResource{
		// 			{
		// 				Location: to.Ptr("tjmlissxvwsk"),
		// 				ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/MongoDB.Atlas/organizations/testorg"),
		// 			},
		// 		},
		// 	},
		// }
	}
}

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 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 {
	// The resource model definition for an Azure Organization
	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 {
	// The resource model definition for an Azure Organization
	OrganizationResource
}

OrganizationsClientGetResponse contains the response from method OrganizationsClient.Get.

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 {
	// The resource model definition for an Azure Organization
	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; Organization name in MongoDB system
	OrganizationName *string

	// Organization Id in MongoDB system
	OrganizationID *string

	// Redirect URL for the MongoDB
	RedirectURL *string
}

PartnerProperties - MongoDB 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 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 {
	// REQUIRED; Email address of the user
	EmailAddress *string

	// REQUIRED; First name of the user
	FirstName *string

	// REQUIRED; Last name of the user
	LastName *string

	// Company Name
	CompanyName *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