armplanetarycomputer

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 14 Imported by: 0

README

Azure Planetary Computer Module for Go

The armplanetarycomputer module provides operations for working with Azure Planetary Computer.

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 Planetary Computer module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/planetarycomputer/armplanetarycomputer

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Planetary Computer. 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 Planetary Computer 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 := armplanetarycomputer.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 := armplanetarycomputer.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.NewGeoCatalogsClient()

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 Planetary Computer 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 AutoGeneratedDomainNameLabelScope

type AutoGeneratedDomainNameLabelScope string

AutoGeneratedDomainNameLabelScope - The scope at which the auto-generated domain name label is generated and at which the resource name can be reused.

const (
	// AutoGeneratedDomainNameLabelScopeNoReuse - The domain name label is randomly generated. The resource name cannot be reused
	// within the same region.
	AutoGeneratedDomainNameLabelScopeNoReuse AutoGeneratedDomainNameLabelScope = "NoReuse"
	// AutoGeneratedDomainNameLabelScopeResourceGroupReuse - The domain name label is deterministically generated using the resource
	// name, tenant id, subscription id, and resource group name. The resource name cannot be reused within the same resource
	// group.
	AutoGeneratedDomainNameLabelScopeResourceGroupReuse AutoGeneratedDomainNameLabelScope = "ResourceGroupReuse"
	// AutoGeneratedDomainNameLabelScopeSubscriptionReuse - The domain name label is deterministically generated using the resource
	// name, tenant id, and subscription id. The resource name cannot be reused within the same region and subscription.
	AutoGeneratedDomainNameLabelScopeSubscriptionReuse AutoGeneratedDomainNameLabelScope = "SubscriptionReuse"
	// AutoGeneratedDomainNameLabelScopeTenantReuse - The domain name label is deterministically generated using the resource
	// name and tenant id. The resource name cannot be reused within the same region and tenant.
	AutoGeneratedDomainNameLabelScopeTenantReuse AutoGeneratedDomainNameLabelScope = "TenantReuse"
)

func PossibleAutoGeneratedDomainNameLabelScopeValues

func PossibleAutoGeneratedDomainNameLabelScopeValues() []AutoGeneratedDomainNameLabelScope

PossibleAutoGeneratedDomainNameLabelScopeValues returns the possible values for the AutoGeneratedDomainNameLabelScope const type.

type CatalogTier

type CatalogTier string

CatalogTier - The Microsoft Planetary Computer Pro GeoCatalog tier

const (
	// CatalogTierBasic - The basic tier that utilizes shared resources across catalog instances
	CatalogTierBasic CatalogTier = "Basic"
)

func PossibleCatalogTierValues

func PossibleCatalogTierValues() []CatalogTier

PossibleCatalogTierValues returns the possible values for the CatalogTier 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) NewGeoCatalogsClient

func (c *ClientFactory) NewGeoCatalogsClient() *GeoCatalogsClient

NewGeoCatalogsClient creates a new instance of GeoCatalogsClient.

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 GeoCatalog

type GeoCatalog 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 *GeoCatalogProperties

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

GeoCatalog - A Microsoft Planetary Computer Pro GeoCatalog resource

func (GeoCatalog) MarshalJSON

func (g GeoCatalog) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GeoCatalog.

func (*GeoCatalog) UnmarshalJSON

func (g *GeoCatalog) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GeoCatalog.

type GeoCatalogListResult

type GeoCatalogListResult struct {
	// REQUIRED; The GeoCatalog items on this page
	Value []*GeoCatalog

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

GeoCatalogListResult - The response of a GeoCatalog list operation.

func (GeoCatalogListResult) MarshalJSON

func (g GeoCatalogListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GeoCatalogListResult.

func (*GeoCatalogListResult) UnmarshalJSON

func (g *GeoCatalogListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GeoCatalogListResult.

type GeoCatalogProperties

type GeoCatalogProperties struct {
	// The scope of the auto-generated domain name label. If not provided, defaults to TenantReuse.
	AutoGeneratedDomainNameLabelScope *AutoGeneratedDomainNameLabelScope

	// Tier of the catalog. This cannot be changed after the catalog is created. If not provided, defaults to Basic.
	Tier *CatalogTier

	// READ-ONLY; The URI of the catalog management UI.
	CatalogURI *string

	// READ-ONLY; The status of the last operation.
	ProvisioningState *ProvisioningState
}

GeoCatalogProperties - The details of the Microsoft Planetary Computer Pro GeoCatalog.

func (GeoCatalogProperties) MarshalJSON

func (g GeoCatalogProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GeoCatalogProperties.

func (*GeoCatalogProperties) UnmarshalJSON

func (g *GeoCatalogProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GeoCatalogProperties.

type GeoCatalogUpdate

type GeoCatalogUpdate struct {
	// The managed service identity properties to update.
	Identity *ManagedServiceIdentityUpdate

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

GeoCatalogUpdate - The properties of a GeoCatalog that can be updated.

func (GeoCatalogUpdate) MarshalJSON

func (g GeoCatalogUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GeoCatalogUpdate.

func (*GeoCatalogUpdate) UnmarshalJSON

func (g *GeoCatalogUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GeoCatalogUpdate.

type GeoCatalogsClient

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

GeoCatalogsClient contains the methods for the GeoCatalogs group. Don't use this type directly, use NewGeoCatalogsClient() instead.

func NewGeoCatalogsClient

func NewGeoCatalogsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GeoCatalogsClient, error)

NewGeoCatalogsClient creates a new instance of GeoCatalogsClient 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 (*GeoCatalogsClient) BeginCreate

func (client *GeoCatalogsClient) BeginCreate(ctx context.Context, resourceGroupName string, catalogName string, resource GeoCatalog, options *GeoCatalogsClientBeginCreateOptions) (*runtime.Poller[GeoCatalogsClientCreateResponse], error)

BeginCreate - Create a GeoCatalog If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2026-04-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • catalogName - The name of the catalog
  • resource - Resource create parameters.
  • options - GeoCatalogsClientBeginCreateOptions contains the optional parameters for the GeoCatalogsClient.BeginCreate method.
Example

Generated from example definition: 2026-04-15/GeoCatalogs_Create.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/planetarycomputer/armplanetarycomputer"
	"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 := armplanetarycomputer.NewClientFactory("cd9b6cdf-dcf0-4dca-ab19-82be07b74704", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGeoCatalogsClient().BeginCreate(ctx, "MyResourceGroup", "MyCatalog", armplanetarycomputer.GeoCatalog{
		Properties: &armplanetarycomputer.GeoCatalogProperties{
			Tier:                              to.Ptr(armplanetarycomputer.CatalogTierBasic),
			AutoGeneratedDomainNameLabelScope: to.Ptr(armplanetarycomputer.AutoGeneratedDomainNameLabelScopeNoReuse),
		},
		Identity: &armplanetarycomputer.ManagedServiceIdentity{
			Type: to.Ptr(armplanetarycomputer.ManagedServiceIdentityTypeUserAssigned),
			UserAssignedIdentities: map[string]*armplanetarycomputer.UserAssignedIdentity{
				"/subscriptions/cd9b6cdf-dcf0-4dca-ab19-82be07b74704/resourceGroups/MyResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyManagedIdentity": {},
			},
		},
		Tags: map[string]*string{
			"MyTag": to.Ptr("MyValue"),
		},
		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 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 = armplanetarycomputer.GeoCatalogsClientCreateResponse{
	// 	GeoCatalog: &armplanetarycomputer.GeoCatalog{
	// 		Properties: &armplanetarycomputer.GeoCatalogProperties{
	// 			Tier: to.Ptr(armplanetarycomputer.CatalogTierBasic),
	// 			CatalogURI: to.Ptr("https://mycatalog-0123456789abcdef.geocatalog.spatio.azure.com/"),
	// 			ProvisioningState: to.Ptr(armplanetarycomputer.ProvisioningStateSucceeded),
	// 			AutoGeneratedDomainNameLabelScope: to.Ptr(armplanetarycomputer.AutoGeneratedDomainNameLabelScopeNoReuse),
	// 		},
	// 		Identity: &armplanetarycomputer.ManagedServiceIdentity{
	// 			Type: to.Ptr(armplanetarycomputer.ManagedServiceIdentityTypeUserAssigned),
	// 			UserAssignedIdentities: map[string]*armplanetarycomputer.UserAssignedIdentity{
	// 				"/subscriptions/cd9b6cdf-dcf0-4dca-ab19-82be07b74704/resourceGroups/MyResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyManagedIdentity": &armplanetarycomputer.UserAssignedIdentity{
	// 					PrincipalID: to.Ptr("1b1424a8-4d17-4a72-b47f-d1d401c1e2fd"),
	// 					ClientID: to.Ptr("c57c7b17-2c5e-4996-8169-c74d026ffc5d"),
	// 				},
	// 			},
	// 		},
	// 		Tags: map[string]*string{
	// 			"MyTag": to.Ptr("MyValue"),
	// 		},
	// 		Location: to.Ptr("eastus"),
	// 		ID: to.Ptr("/subscriptions/cd9b6cdf-dcf0-4dca-ab19-82be07b74704/resourceGroups/MyResourceGroup/providers/Microsoft.Orbital/geoCatalogs/MyCatalog"),
	// 		Name: to.Ptr("MyCatalog"),
	// 		Type: to.Ptr("Microsoft.Orbital/geoCatalogs"),
	// 		SystemData: &armplanetarycomputer.SystemData{
	// 			CreatedBy: to.Ptr("Catalog User"),
	// 			CreatedByType: to.Ptr(armplanetarycomputer.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-10T18:34:22.271Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("Catalog User"),
	// 			LastModifiedByType: to.Ptr(armplanetarycomputer.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-10T18:34:22.271Z"); return t}()),
	// 		},
	// 	},
	// }
}

func (*GeoCatalogsClient) BeginDelete

func (client *GeoCatalogsClient) BeginDelete(ctx context.Context, resourceGroupName string, catalogName string, options *GeoCatalogsClientBeginDeleteOptions) (*runtime.Poller[GeoCatalogsClientDeleteResponse], error)

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

Generated from API version 2026-04-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • catalogName - The name of the catalog
  • options - GeoCatalogsClientBeginDeleteOptions contains the optional parameters for the GeoCatalogsClient.BeginDelete method.
Example

Generated from example definition: 2026-04-15/GeoCatalogs_Delete.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/planetarycomputer/armplanetarycomputer"
	"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 := armplanetarycomputer.NewClientFactory("cd9b6cdf-dcf0-4dca-ab19-82be07b74704", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGeoCatalogsClient().BeginDelete(ctx, "MyResourceGroup", "MyCatalog", 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 (*GeoCatalogsClient) BeginUpdate

func (client *GeoCatalogsClient) BeginUpdate(ctx context.Context, resourceGroupName string, catalogName string, properties GeoCatalogUpdate, options *GeoCatalogsClientBeginUpdateOptions) (*runtime.Poller[GeoCatalogsClientUpdateResponse], error)

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

Generated from API version 2026-04-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • catalogName - The name of the catalog
  • properties - The resource properties to be updated.
  • options - GeoCatalogsClientBeginUpdateOptions contains the optional parameters for the GeoCatalogsClient.BeginUpdate method.
Example

Generated from example definition: 2026-04-15/GeoCatalogs_Update.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/planetarycomputer/armplanetarycomputer"
	"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 := armplanetarycomputer.NewClientFactory("cd9b6cdf-dcf0-4dca-ab19-82be07b74704", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGeoCatalogsClient().BeginUpdate(ctx, "MyResourceGroup", "MyCatalog", armplanetarycomputer.GeoCatalogUpdate{
		Tags: map[string]*string{
			"MyTag": to.Ptr("MyValue"),
		},
		Identity: &armplanetarycomputer.ManagedServiceIdentityUpdate{
			Type: to.Ptr(armplanetarycomputer.ManagedServiceIdentityTypeUserAssigned),
			UserAssignedIdentities: map[string]*armplanetarycomputer.UserAssignedIdentity{
				"/subscriptions/cd9b6cdf-dcf0-4dca-ab19-82be07b74704/resourceGroups/MyResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyManagedIdentity": {},
			},
		},
	}, 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 = armplanetarycomputer.GeoCatalogsClientUpdateResponse{
	// 	GeoCatalog: &armplanetarycomputer.GeoCatalog{
	// 		Properties: &armplanetarycomputer.GeoCatalogProperties{
	// 			Tier: to.Ptr(armplanetarycomputer.CatalogTierBasic),
	// 			CatalogURI: to.Ptr("https://mycatalog-0123456789abcdef.geocatalog.spatio.azure.com/"),
	// 			ProvisioningState: to.Ptr(armplanetarycomputer.ProvisioningStateSucceeded),
	// 			AutoGeneratedDomainNameLabelScope: to.Ptr(armplanetarycomputer.AutoGeneratedDomainNameLabelScopeNoReuse),
	// 		},
	// 		Identity: &armplanetarycomputer.ManagedServiceIdentity{
	// 			Type: to.Ptr(armplanetarycomputer.ManagedServiceIdentityTypeUserAssigned),
	// 			UserAssignedIdentities: map[string]*armplanetarycomputer.UserAssignedIdentity{
	// 				"/subscriptions/cd9b6cdf-dcf0-4dca-ab19-82be07b74704/resourceGroups/MyResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyManagedIdentity": &armplanetarycomputer.UserAssignedIdentity{
	// 					PrincipalID: to.Ptr("1b1424a8-4d17-4a72-b47f-d1d401c1e2fd"),
	// 					ClientID: to.Ptr("c57c7b17-2c5e-4996-8169-c74d026ffc5d"),
	// 				},
	// 			},
	// 		},
	// 		Tags: map[string]*string{
	// 			"MyTag": to.Ptr("MyValue"),
	// 		},
	// 		Location: to.Ptr("eastus"),
	// 		ID: to.Ptr("/subscriptions/cd9b6cdf-dcf0-4dca-ab19-82be07b74704/resourceGroups/MyResourceGroup/providers/Microsoft.Orbital/geoCatalogs/MyCatalog"),
	// 		Name: to.Ptr("MyCatalog"),
	// 		Type: to.Ptr("Microsoft.Orbital/geoCatalogs"),
	// 		SystemData: &armplanetarycomputer.SystemData{
	// 			CreatedBy: to.Ptr("Catalog User"),
	// 			CreatedByType: to.Ptr(armplanetarycomputer.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-10T18:34:22.271Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("Catalog User"),
	// 			LastModifiedByType: to.Ptr(armplanetarycomputer.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-10T18:34:22.271Z"); return t}()),
	// 		},
	// 	},
	// }
}

func (*GeoCatalogsClient) Get

func (client *GeoCatalogsClient) Get(ctx context.Context, resourceGroupName string, catalogName string, options *GeoCatalogsClientGetOptions) (GeoCatalogsClientGetResponse, error)

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

Generated from API version 2026-04-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • catalogName - The name of the catalog
  • options - GeoCatalogsClientGetOptions contains the optional parameters for the GeoCatalogsClient.Get method.
Example

Generated from example definition: 2026-04-15/GeoCatalogs_Get.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/planetarycomputer/armplanetarycomputer"
	"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 := armplanetarycomputer.NewClientFactory("cd9b6cdf-dcf0-4dca-ab19-82be07b74704", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGeoCatalogsClient().Get(ctx, "MyResourceGroup", "MyCatalog", 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 = armplanetarycomputer.GeoCatalogsClientGetResponse{
	// 	GeoCatalog: &armplanetarycomputer.GeoCatalog{
	// 		Properties: &armplanetarycomputer.GeoCatalogProperties{
	// 			Tier: to.Ptr(armplanetarycomputer.CatalogTierBasic),
	// 			CatalogURI: to.Ptr("https://mycatalog-0123456789abcdef.geocatalog.spatio.azure.com/"),
	// 			ProvisioningState: to.Ptr(armplanetarycomputer.ProvisioningStateSucceeded),
	// 			AutoGeneratedDomainNameLabelScope: to.Ptr(armplanetarycomputer.AutoGeneratedDomainNameLabelScopeNoReuse),
	// 		},
	// 		Identity: &armplanetarycomputer.ManagedServiceIdentity{
	// 			Type: to.Ptr(armplanetarycomputer.ManagedServiceIdentityTypeUserAssigned),
	// 			UserAssignedIdentities: map[string]*armplanetarycomputer.UserAssignedIdentity{
	// 				"/subscriptions/cd9b6cdf-dcf0-4dca-ab19-82be07b74704/resourceGroups/MyResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyManagedIdentity": &armplanetarycomputer.UserAssignedIdentity{
	// 					PrincipalID: to.Ptr("1b1424a8-4d17-4a72-b47f-d1d401c1e2fd"),
	// 					ClientID: to.Ptr("c57c7b17-2c5e-4996-8169-c74d026ffc5d"),
	// 				},
	// 			},
	// 		},
	// 		Tags: map[string]*string{
	// 			"MyTag": to.Ptr("MyValue"),
	// 		},
	// 		Location: to.Ptr("eastus"),
	// 		ID: to.Ptr("/subscriptions/cd9b6cdf-dcf0-4dca-ab19-82be07b74704/resourceGroups/MyResourceGroup/providers/Microsoft.Orbital/geoCatalogs/MyCatalog"),
	// 		Name: to.Ptr("MyCatalog"),
	// 		Type: to.Ptr("Microsoft.Orbital/geoCatalogs"),
	// 		SystemData: &armplanetarycomputer.SystemData{
	// 			CreatedBy: to.Ptr("Catalog User"),
	// 			CreatedByType: to.Ptr(armplanetarycomputer.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-10T18:34:22.271Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("Catalog User"),
	// 			LastModifiedByType: to.Ptr(armplanetarycomputer.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-10T18:34:22.271Z"); return t}()),
	// 		},
	// 	},
	// }
}

func (*GeoCatalogsClient) NewListByResourceGroupPager

NewListByResourceGroupPager - List GeoCatalog resources by resource group

Generated from API version 2026-04-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - GeoCatalogsClientListByResourceGroupOptions contains the optional parameters for the GeoCatalogsClient.NewListByResourceGroupPager method.
Example

Generated from example definition: 2026-04-15/GeoCatalogs_ListByResourceGroup.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/planetarycomputer/armplanetarycomputer"
	"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 := armplanetarycomputer.NewClientFactory("cd9b6cdf-dcf0-4dca-ab19-82be07b74704", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewGeoCatalogsClient().NewListByResourceGroupPager("MyResourceGroup", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page = armplanetarycomputer.GeoCatalogsClientListByResourceGroupResponse{
		// 	GeoCatalogListResult: armplanetarycomputer.GeoCatalogListResult{
		// 		Value: []*armplanetarycomputer.GeoCatalog{
		// 			{
		// 				Properties: &armplanetarycomputer.GeoCatalogProperties{
		// 					Tier: to.Ptr(armplanetarycomputer.CatalogTierBasic),
		// 					CatalogURI: to.Ptr("https://mycatalog-0123456789abcdef.geocatalog.spatio.azure.com/"),
		// 					ProvisioningState: to.Ptr(armplanetarycomputer.ProvisioningStateSucceeded),
		// 					AutoGeneratedDomainNameLabelScope: to.Ptr(armplanetarycomputer.AutoGeneratedDomainNameLabelScopeNoReuse),
		// 				},
		// 				Identity: &armplanetarycomputer.ManagedServiceIdentity{
		// 					Type: to.Ptr(armplanetarycomputer.ManagedServiceIdentityTypeUserAssigned),
		// 					UserAssignedIdentities: map[string]*armplanetarycomputer.UserAssignedIdentity{
		// 						"/subscriptions/cd9b6cdf-dcf0-4dca-ab19-82be07b74704/resourceGroups/MyResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyManagedIdentity": &armplanetarycomputer.UserAssignedIdentity{
		// 							PrincipalID: to.Ptr("1b1424a8-4d17-4a72-b47f-d1d401c1e2fd"),
		// 							ClientID: to.Ptr("c57c7b17-2c5e-4996-8169-c74d026ffc5d"),
		// 						},
		// 					},
		// 				},
		// 				Tags: map[string]*string{
		// 					"MyTag": to.Ptr("MyValue"),
		// 				},
		// 				Location: to.Ptr("eastus"),
		// 				ID: to.Ptr("/subscriptions/cd9b6cdf-dcf0-4dca-ab19-82be07b74704/resourceGroups/MyResourceGroup/providers/Microsoft.Orbital/geoCatalogs/MyCatalog"),
		// 				Name: to.Ptr("MyCatalog"),
		// 				Type: to.Ptr("Microsoft.Orbital/geoCatalogs"),
		// 				SystemData: &armplanetarycomputer.SystemData{
		// 					CreatedBy: to.Ptr("Catalog User"),
		// 					CreatedByType: to.Ptr(armplanetarycomputer.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-10T18:34:22.271Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("Catalog User"),
		// 					LastModifiedByType: to.Ptr(armplanetarycomputer.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-10T18:34:22.271Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}

func (*GeoCatalogsClient) NewListBySubscriptionPager

NewListBySubscriptionPager - List GeoCatalog resources by subscription ID

Generated from API version 2026-04-15

  • options - GeoCatalogsClientListBySubscriptionOptions contains the optional parameters for the GeoCatalogsClient.NewListBySubscriptionPager method.
Example

Generated from example definition: 2026-04-15/GeoCatalogs_ListBySubscription.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/planetarycomputer/armplanetarycomputer"
	"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 := armplanetarycomputer.NewClientFactory("cd9b6cdf-dcf0-4dca-ab19-82be07b74704", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewGeoCatalogsClient().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 = armplanetarycomputer.GeoCatalogsClientListBySubscriptionResponse{
		// 	GeoCatalogListResult: armplanetarycomputer.GeoCatalogListResult{
		// 		Value: []*armplanetarycomputer.GeoCatalog{
		// 			{
		// 				Properties: &armplanetarycomputer.GeoCatalogProperties{
		// 					Tier: to.Ptr(armplanetarycomputer.CatalogTierBasic),
		// 					CatalogURI: to.Ptr("https://mycatalog-0123456789abcdef.geocatalog.spatio.azure.com/"),
		// 					ProvisioningState: to.Ptr(armplanetarycomputer.ProvisioningStateSucceeded),
		// 					AutoGeneratedDomainNameLabelScope: to.Ptr(armplanetarycomputer.AutoGeneratedDomainNameLabelScopeNoReuse),
		// 				},
		// 				Identity: &armplanetarycomputer.ManagedServiceIdentity{
		// 					Type: to.Ptr(armplanetarycomputer.ManagedServiceIdentityTypeUserAssigned),
		// 					UserAssignedIdentities: map[string]*armplanetarycomputer.UserAssignedIdentity{
		// 						"/subscriptions/cd9b6cdf-dcf0-4dca-ab19-82be07b74704/resourceGroups/MyResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyManagedIdentity": &armplanetarycomputer.UserAssignedIdentity{
		// 							PrincipalID: to.Ptr("1b1424a8-4d17-4a72-b47f-d1d401c1e2fd"),
		// 							ClientID: to.Ptr("c57c7b17-2c5e-4996-8169-c74d026ffc5d"),
		// 						},
		// 					},
		// 				},
		// 				Tags: map[string]*string{
		// 					"MyTag": to.Ptr("MyValue"),
		// 				},
		// 				Location: to.Ptr("eastus"),
		// 				ID: to.Ptr("/subscriptions/cd9b6cdf-dcf0-4dca-ab19-82be07b74704/resourceGroups/MyResourceGroup/providers/Microsoft.Orbital/geoCatalogs/MyCatalog"),
		// 				Name: to.Ptr("MyCatalog"),
		// 				Type: to.Ptr("Microsoft.Orbital/geoCatalogs"),
		// 				SystemData: &armplanetarycomputer.SystemData{
		// 					CreatedBy: to.Ptr("Catalog User"),
		// 					CreatedByType: to.Ptr(armplanetarycomputer.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-10T18:34:22.271Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("Catalog User"),
		// 					LastModifiedByType: to.Ptr(armplanetarycomputer.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-10T18:34:22.271Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}

type GeoCatalogsClientBeginCreateOptions

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

GeoCatalogsClientBeginCreateOptions contains the optional parameters for the GeoCatalogsClient.BeginCreate method.

type GeoCatalogsClientBeginDeleteOptions

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

GeoCatalogsClientBeginDeleteOptions contains the optional parameters for the GeoCatalogsClient.BeginDelete method.

type GeoCatalogsClientBeginUpdateOptions

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

GeoCatalogsClientBeginUpdateOptions contains the optional parameters for the GeoCatalogsClient.BeginUpdate method.

type GeoCatalogsClientCreateResponse

type GeoCatalogsClientCreateResponse struct {
	// A Microsoft Planetary Computer Pro GeoCatalog resource
	GeoCatalog
}

GeoCatalogsClientCreateResponse contains the response from method GeoCatalogsClient.BeginCreate.

type GeoCatalogsClientDeleteResponse

type GeoCatalogsClientDeleteResponse struct {
}

GeoCatalogsClientDeleteResponse contains the response from method GeoCatalogsClient.BeginDelete.

type GeoCatalogsClientGetOptions

type GeoCatalogsClientGetOptions struct {
}

GeoCatalogsClientGetOptions contains the optional parameters for the GeoCatalogsClient.Get method.

type GeoCatalogsClientGetResponse

type GeoCatalogsClientGetResponse struct {
	// A Microsoft Planetary Computer Pro GeoCatalog resource
	GeoCatalog
}

GeoCatalogsClientGetResponse contains the response from method GeoCatalogsClient.Get.

type GeoCatalogsClientListByResourceGroupOptions

type GeoCatalogsClientListByResourceGroupOptions struct {
}

GeoCatalogsClientListByResourceGroupOptions contains the optional parameters for the GeoCatalogsClient.NewListByResourceGroupPager method.

type GeoCatalogsClientListByResourceGroupResponse

type GeoCatalogsClientListByResourceGroupResponse struct {
	// The response of a GeoCatalog list operation.
	GeoCatalogListResult
}

GeoCatalogsClientListByResourceGroupResponse contains the response from method GeoCatalogsClient.NewListByResourceGroupPager.

type GeoCatalogsClientListBySubscriptionOptions

type GeoCatalogsClientListBySubscriptionOptions struct {
}

GeoCatalogsClientListBySubscriptionOptions contains the optional parameters for the GeoCatalogsClient.NewListBySubscriptionPager method.

type GeoCatalogsClientListBySubscriptionResponse

type GeoCatalogsClientListBySubscriptionResponse struct {
	// The response of a GeoCatalog list operation.
	GeoCatalogListResult
}

GeoCatalogsClientListBySubscriptionResponse contains the response from method GeoCatalogsClient.NewListBySubscriptionPager.

type GeoCatalogsClientUpdateResponse

type GeoCatalogsClientUpdateResponse struct {
	// A Microsoft Planetary Computer Pro GeoCatalog resource
	GeoCatalog
}

GeoCatalogsClientUpdateResponse contains the response from method GeoCatalogsClient.BeginUpdate.

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 ManagedServiceIdentityUpdate

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

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

ManagedServiceIdentityUpdate - The template for adding optional properties.

func (ManagedServiceIdentityUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentityUpdate.

func (*ManagedServiceIdentityUpdate) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentityUpdate.

type ProvisioningState

type ProvisioningState string

ProvisioningState - The status of the current operation.

const (
	// ProvisioningStateAccepted - The catalog request has been accepted.
	ProvisioningStateAccepted ProvisioningState = "Accepted"
	// ProvisioningStateCanceled - Resource creation was canceled.
	ProvisioningStateCanceled ProvisioningState = "Canceled"
	// ProvisioningStateDeleting - The catalog is being deleted.
	ProvisioningStateDeleting ProvisioningState = "Deleting"
	// ProvisioningStateFailed - Resource creation failed.
	ProvisioningStateFailed ProvisioningState = "Failed"
	// ProvisioningStateProvisioning - The catalog is being provisioned.
	ProvisioningStateProvisioning ProvisioningState = "Provisioning"
	// ProvisioningStateSucceeded - Resource has been created.
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	// ProvisioningStateUpdating - The catalog is being updated.
	ProvisioningStateUpdating ProvisioningState = "Updating"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState 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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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