armdigitaltwins

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: MIT Imports: 14 Imported by: 4

README

Azure Digital Twins Module for Go

PkgGoDev

The armdigitaltwins module provides operations for working with Azure Digital Twins.

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 Digital Twins module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Digital Twins. 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 Digital Twins 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 := armdigitaltwins.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 := armdigitaltwins.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.NewClient()

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 Digital Twins 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 AuthenticationType

type AuthenticationType string

AuthenticationType - Specifies the authentication type being used for connecting to the endpoint. Defaults to 'KeyBased'. If 'KeyBased' is selected, a connection string must be specified (at least the primary connection string). If 'IdentityBased' is select, the endpointUri and entityPath properties must be specified.

const (
	AuthenticationTypeIdentityBased AuthenticationType = "IdentityBased"
	AuthenticationTypeKeyBased      AuthenticationType = "KeyBased"
)

func PossibleAuthenticationTypeValues

func PossibleAuthenticationTypeValues() []AuthenticationType

PossibleAuthenticationTypeValues returns the possible values for the AuthenticationType const type.

type AzureDataExplorerConnectionProperties added in v0.3.0

type AzureDataExplorerConnectionProperties struct {
	// REQUIRED; The name of the Azure Data Explorer database.
	AdxDatabaseName *string

	// REQUIRED; The URI of the Azure Data Explorer endpoint.
	AdxEndpointURI *string

	// REQUIRED; The resource ID of the Azure Data Explorer cluster.
	AdxResourceID *string

	// REQUIRED; The type of time series connection resource.
	ConnectionType *ConnectionType

	// REQUIRED; The URL of the EventHub namespace for identity-based authentication. It must include the protocol sb://
	EventHubEndpointURI *string

	// REQUIRED; The EventHub name in the EventHub namespace for identity-based authentication.
	EventHubEntityPath *string

	// REQUIRED; The resource ID of the EventHub namespace.
	EventHubNamespaceResourceID *string

	// The name of the Azure Data Explorer table used for recording relationship lifecycle events. The table will not be created
	// if this property is left unspecified.
	AdxRelationshipLifecycleEventsTableName *string

	// The name of the Azure Data Explorer table used for storing updates to properties of twins and relationships. Defaults to
	// AdtPropertyEvents.
	AdxTableName *string

	// The name of the Azure Data Explorer table used for recording twin lifecycle events. The table will not be created if this
	// property is left unspecified.
	AdxTwinLifecycleEventsTableName *string

	// The EventHub consumer group to use when ADX reads from EventHub. Defaults to $Default.
	EventHubConsumerGroup *string

	// Managed identity properties for the time series database connection resource.
	Identity *ManagedIdentityReference

	// Specifies whether or not to record twin / relationship property and item removals, including removals of indexed or keyed
	// values (such as map entries, array elements, etc.). This feature is
	// de-activated unless explicitly set to 'true'. Setting this property to 'true' will generate an additional column in the
	// property events table in ADX.
	RecordPropertyAndItemRemovals *RecordPropertyAndItemRemovals

	// READ-ONLY; The provisioning state.
	ProvisioningState *TimeSeriesDatabaseConnectionState
}

AzureDataExplorerConnectionProperties - Properties of a time series database connection to Azure Data Explorer with data being sent via an EventHub.

func (*AzureDataExplorerConnectionProperties) GetTimeSeriesDatabaseConnectionProperties added in v0.3.0

func (a *AzureDataExplorerConnectionProperties) GetTimeSeriesDatabaseConnectionProperties() *TimeSeriesDatabaseConnectionProperties

GetTimeSeriesDatabaseConnectionProperties implements the TimeSeriesDatabaseConnectionPropertiesClassification interface for type AzureDataExplorerConnectionProperties.

func (AzureDataExplorerConnectionProperties) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type AzureDataExplorerConnectionProperties.

func (*AzureDataExplorerConnectionProperties) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureDataExplorerConnectionProperties.

type CheckNameRequest

type CheckNameRequest struct {
	// REQUIRED; Resource name.
	Name *string

	// CONSTANT; The type of resource, for instance Microsoft.DigitalTwins/digitalTwinsInstances.
	// Field has constant value "Microsoft.DigitalTwins/digitalTwinsInstances", any specified value is ignored.
	Type *string
}

CheckNameRequest - The result returned from a database check name availability request.

func (CheckNameRequest) MarshalJSON added in v1.1.0

func (c CheckNameRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CheckNameRequest.

func (*CheckNameRequest) UnmarshalJSON added in v1.1.0

func (c *CheckNameRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameRequest.

type CheckNameResult

type CheckNameResult struct {
	// Message indicating an unavailable name due to a conflict, or a description of the naming rules that are violated.
	Message *string

	// Specifies a Boolean value that indicates if the name is available.
	NameAvailable *bool

	// Message providing the reason why the given name is invalid.
	Reason *Reason
}

CheckNameResult - The result returned from a check name availability request.

func (CheckNameResult) MarshalJSON added in v1.1.0

func (c CheckNameResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CheckNameResult.

func (*CheckNameResult) UnmarshalJSON added in v1.1.0

func (c *CheckNameResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameResult.

type CleanupConnectionArtifacts added in v1.1.0

type CleanupConnectionArtifacts string
const (
	CleanupConnectionArtifactsFalse CleanupConnectionArtifacts = "false"
	CleanupConnectionArtifactsTrue  CleanupConnectionArtifacts = "true"
)

func PossibleCleanupConnectionArtifactsValues added in v1.1.0

func PossibleCleanupConnectionArtifactsValues() []CleanupConnectionArtifacts

PossibleCleanupConnectionArtifactsValues returns the possible values for the CleanupConnectionArtifacts const type.

type Client added in v0.2.0

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

Client contains the methods for the DigitalTwins group. Don't use this type directly, use NewClient() instead.

func NewClient added in v0.2.0

func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error)

NewClient creates a new instance of Client with the specified values.

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

func (*Client) BeginCreateOrUpdate added in v0.2.0

func (client *Client) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, digitalTwinsCreate Description, options *ClientBeginCreateOrUpdateOptions) (*runtime.Poller[ClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update the metadata of a DigitalTwinsInstance. The usual pattern to modify a property is to retrieve the DigitalTwinsInstance and security metadata, and then combine them with the modified values in a new body to update the DigitalTwinsInstance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group that contains the DigitalTwinsInstance.
  • resourceName - The name of the DigitalTwinsInstance.
  • digitalTwinsCreate - The DigitalTwinsInstance and security metadata.
  • options - ClientBeginCreateOrUpdateOptions contains the optional parameters for the Client.BeginCreateOrUpdate method.
Example (PutADigitalTwinsInstanceResource)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/DigitalTwinsPut_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginCreateOrUpdate(ctx, "resRg", "myDigitalTwinsService", armdigitaltwins.Description{
		Location: to.Ptr("WestUS2"),
	}, 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.Description = armdigitaltwins.Description{
	// 	Name: to.Ptr("myDigitalTwinsService"),
	// 	Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances"),
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService"),
	// 	Location: to.Ptr("westus2"),
	// 	SystemData: &armdigitaltwins.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:59.403Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@example.com"),
	// 		CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:15:02.528Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user@example.com"),
	// 		LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 	},
	// 	Tags: map[string]*string{
	// 		"purpose": to.Ptr("dev"),
	// 	},
	// 	Properties: &armdigitaltwins.Properties{
	// 		CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T12:55:05.229Z"); return t}()),
	// 		HostName: to.Ptr("https://myDigitalTwinsService.api.wus2.ss.azuredigitaltwins-test.net"),
	// 		LastUpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-06T12:21:58.610Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armdigitaltwins.ProvisioningStateSucceeded),
	// 		PublicNetworkAccess: to.Ptr(armdigitaltwins.PublicNetworkAccessEnabled),
	// 	},
	// }
}
Output:

Example (PutADigitalTwinsInstanceResourceWithIdentity)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/DigitalTwinsPut_WithIdentity_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginCreateOrUpdate(ctx, "resRg", "myDigitalTwinsService", armdigitaltwins.Description{
		Identity: &armdigitaltwins.Identity{
			Type: to.Ptr(armdigitaltwins.DigitalTwinsIdentityTypeSystemAssignedUserAssigned),
			UserAssignedIdentities: map[string]*armdigitaltwins.UserAssignedIdentity{
				"/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity": {},
			},
		},
		Location: to.Ptr("WestUS2"),
	}, 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.Description = armdigitaltwins.Description{
	// 	Name: to.Ptr("myDigitalTwinsService"),
	// 	Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances"),
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService"),
	// 	Identity: &armdigitaltwins.Identity{
	// 		Type: to.Ptr(armdigitaltwins.DigitalTwinsIdentityTypeSystemAssignedUserAssigned),
	// 		PrincipalID: to.Ptr("544215a9-21d8-4fb5-8094-8efbcc311dd0"),
	// 		TenantID: to.Ptr("544215a9-21d8-4fb5-8094-8efbcc311dd0"),
	// 		UserAssignedIdentities: map[string]*armdigitaltwins.UserAssignedIdentity{
	// 			"/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity": &armdigitaltwins.UserAssignedIdentity{
	// 				ClientID: to.Ptr("544215a9-21d8-4fb5-8094-8efbcc311dd0"),
	// 				PrincipalID: to.Ptr("50016170-c839-41ba-a724-51e9df440b9e"),
	// 			},
	// 		},
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	SystemData: &armdigitaltwins.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:59.403Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@example.com"),
	// 		CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:15:02.528Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user@example.com"),
	// 		LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 	},
	// 	Tags: map[string]*string{
	// 		"purpose": to.Ptr("dev"),
	// 	},
	// 	Properties: &armdigitaltwins.Properties{
	// 		CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T12:55:05.229Z"); return t}()),
	// 		HostName: to.Ptr("https://myDigitalTwinsService.api.wus2.ss.azuredigitaltwins-test.net"),
	// 		LastUpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-06T12:21:58.610Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armdigitaltwins.ProvisioningStateSucceeded),
	// 		PublicNetworkAccess: to.Ptr(armdigitaltwins.PublicNetworkAccessEnabled),
	// 	},
	// }
}
Output:

Example (PutADigitalTwinsInstanceResourceWithPublicNetworkAccessProperty)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/DigitalTwinsPut_WithPublicNetworkAccess.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginCreateOrUpdate(ctx, "resRg", "myDigitalTwinsService", armdigitaltwins.Description{
		Location: to.Ptr("WestUS2"),
		Properties: &armdigitaltwins.Properties{
			PublicNetworkAccess: to.Ptr(armdigitaltwins.PublicNetworkAccessEnabled),
		},
	}, 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.Description = armdigitaltwins.Description{
	// 	Name: to.Ptr("myDigitalTwinsService"),
	// 	Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances"),
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService"),
	// 	Location: to.Ptr("westus2"),
	// 	SystemData: &armdigitaltwins.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:59.403Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@example.com"),
	// 		CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:15:02.528Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user@example.com"),
	// 		LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 	},
	// 	Properties: &armdigitaltwins.Properties{
	// 		CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T12:55:05.229Z"); return t}()),
	// 		HostName: to.Ptr("https://myDigitalTwinsService.api.wus2.ss.azuredigitaltwins-test.net"),
	// 		LastUpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-06T12:21:58.610Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armdigitaltwins.ProvisioningStateSucceeded),
	// 		PublicNetworkAccess: to.Ptr(armdigitaltwins.PublicNetworkAccessEnabled),
	// 	},
	// }
}
Output:

func (*Client) BeginDelete added in v0.2.0

func (client *Client) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, options *ClientBeginDeleteOptions) (*runtime.Poller[ClientDeleteResponse], error)

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

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group that contains the DigitalTwinsInstance.
  • resourceName - The name of the DigitalTwinsInstance.
  • options - ClientBeginDeleteOptions contains the optional parameters for the Client.BeginDelete method.
Example (DeleteADigitalTwinsInstanceResource)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/DigitalTwinsDelete_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginDelete(ctx, "resRg", "myDigitalTwinsService", 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.Description = armdigitaltwins.Description{
	// 	Name: to.Ptr("myDigitalTwinsService"),
	// 	Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances"),
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService"),
	// 	Location: to.Ptr("westus2"),
	// 	SystemData: &armdigitaltwins.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:13:59.403Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@example.com"),
	// 		CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:02.528Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user@example.com"),
	// 		LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 	},
	// 	Properties: &armdigitaltwins.Properties{
	// 		CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T12:55:05.229Z"); return t}()),
	// 		HostName: to.Ptr("https://myDigitalTwinsService.api.wus2.ss.azuredigitaltwins-test.net"),
	// 		LastUpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-06T12:21:58.610Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armdigitaltwins.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

Example (DeleteADigitalTwinsInstanceResourceWithIdentity)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/DigitalTwinsDelete_WithIdentity_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginDelete(ctx, "resRg", "myDigitalTwinsService", 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.Description = armdigitaltwins.Description{
	// 	Name: to.Ptr("myDigitalTwinsService"),
	// 	Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances"),
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService"),
	// 	Identity: &armdigitaltwins.Identity{
	// 		Type: to.Ptr(armdigitaltwins.DigitalTwinsIdentityTypeSystemAssigned),
	// 		PrincipalID: to.Ptr("544215a9-21d8-4fb5-8094-8efbcc311dd0"),
	// 		TenantID: to.Ptr("544215a9-21d8-4fb5-8094-8efbcc311dd0"),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	SystemData: &armdigitaltwins.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:13:59.403Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@example.com"),
	// 		CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:02.528Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user@example.com"),
	// 		LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 	},
	// 	Properties: &armdigitaltwins.Properties{
	// 		CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T12:55:05.229Z"); return t}()),
	// 		HostName: to.Ptr("https://myDigitalTwinsService.api.wus2.ss.azuredigitaltwins-test.net"),
	// 		LastUpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-06T12:21:58.610Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armdigitaltwins.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*Client) BeginUpdate added in v0.2.0

func (client *Client) BeginUpdate(ctx context.Context, resourceGroupName string, resourceName string, digitalTwinsPatchDescription PatchDescription, options *ClientBeginUpdateOptions) (*runtime.Poller[ClientUpdateResponse], error)

BeginUpdate - Update metadata of DigitalTwinsInstance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group that contains the DigitalTwinsInstance.
  • resourceName - The name of the DigitalTwinsInstance.
  • digitalTwinsPatchDescription - The DigitalTwinsInstance and security metadata.
  • options - ClientBeginUpdateOptions contains the optional parameters for the Client.BeginUpdate method.
Example (PatchADigitalTwinsInstanceResource)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/DigitalTwinsPatch_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginUpdate(ctx, "resRg", "myDigitalTwinsService", armdigitaltwins.PatchDescription{
		Tags: map[string]*string{
			"purpose": to.Ptr("dev"),
		},
	}, 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.Description = armdigitaltwins.Description{
	// 	Name: to.Ptr("myDigitalTwinsService"),
	// 	Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances"),
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService"),
	// 	Location: to.Ptr("westus2"),
	// 	SystemData: &armdigitaltwins.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:59.403Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@example.com"),
	// 		CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:15:02.528Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user@example.com"),
	// 		LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 	},
	// 	Tags: map[string]*string{
	// 		"purpose": to.Ptr("dev"),
	// 	},
	// 	Properties: &armdigitaltwins.Properties{
	// 		CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T12:55:05.229Z"); return t}()),
	// 		HostName: to.Ptr("https://myDigitalTwinsService.api.wus2.ss.azuredigitaltwins-test.net"),
	// 		LastUpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-06T12:21:58.610Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armdigitaltwins.ProvisioningStateSucceeded),
	// 		PublicNetworkAccess: to.Ptr(armdigitaltwins.PublicNetworkAccessDisabled),
	// 	},
	// }
}
Output:

Example (PatchADigitalTwinsInstanceResourceWithIdentity)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/DigitalTwinsPatch_WithIdentity_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginUpdate(ctx, "resRg", "myDigitalTwinsService", armdigitaltwins.PatchDescription{
		Identity: &armdigitaltwins.Identity{
			Type: to.Ptr(armdigitaltwins.DigitalTwinsIdentityTypeNone),
		},
	}, 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.Description = armdigitaltwins.Description{
	// 	Name: to.Ptr("myDigitalTwinsService"),
	// 	Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances"),
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService"),
	// 	Location: to.Ptr("westus2"),
	// 	SystemData: &armdigitaltwins.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:59.403Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@example.com"),
	// 		CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:15:02.528Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user@example.com"),
	// 		LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 	},
	// 	Tags: map[string]*string{
	// 		"purpose": to.Ptr("dev"),
	// 	},
	// 	Properties: &armdigitaltwins.Properties{
	// 		CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T12:55:05.229Z"); return t}()),
	// 		HostName: to.Ptr("https://myDigitalTwinsService.api.wus2.ss.azuredigitaltwins-test.net"),
	// 		LastUpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-06T12:21:58.610Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armdigitaltwins.ProvisioningStateSucceeded),
	// 		PublicNetworkAccess: to.Ptr(armdigitaltwins.PublicNetworkAccessEnabled),
	// 	},
	// }
}
Output:

Example (PatchADigitalTwinsInstanceResourceWithPublicNetworkAccessProperty)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/DigitalTwinsPatch_WithPublicNetworkAccess.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginUpdate(ctx, "resRg", "myDigitalTwinsService", armdigitaltwins.PatchDescription{
		Properties: &armdigitaltwins.PatchProperties{
			PublicNetworkAccess: to.Ptr(armdigitaltwins.PublicNetworkAccessDisabled),
		},
	}, 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.Description = armdigitaltwins.Description{
	// 	Name: to.Ptr("myDigitalTwinsService"),
	// 	Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances"),
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService"),
	// 	Location: to.Ptr("westus2"),
	// 	SystemData: &armdigitaltwins.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:59.403Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@example.com"),
	// 		CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:15:02.528Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user@example.com"),
	// 		LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 	},
	// 	Tags: map[string]*string{
	// 		"purpose": to.Ptr("dev"),
	// 	},
	// 	Properties: &armdigitaltwins.Properties{
	// 		CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T12:55:05.229Z"); return t}()),
	// 		HostName: to.Ptr("https://myDigitalTwinsService.api.wus2.ss.azuredigitaltwins-test.net"),
	// 		LastUpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-06T12:21:58.610Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armdigitaltwins.ProvisioningStateSucceeded),
	// 		PublicNetworkAccess: to.Ptr(armdigitaltwins.PublicNetworkAccessDisabled),
	// 	},
	// }
}
Output:

func (*Client) CheckNameAvailability added in v0.2.0

func (client *Client) CheckNameAvailability(ctx context.Context, location string, digitalTwinsInstanceCheckName CheckNameRequest, options *ClientCheckNameAvailabilityOptions) (ClientCheckNameAvailabilityResponse, error)

CheckNameAvailability - Check if a DigitalTwinsInstance name is available. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-31

  • location - Location of DigitalTwinsInstance.
  • digitalTwinsInstanceCheckName - Set the name parameter in the DigitalTwinsInstanceCheckName structure to the name of the DigitalTwinsInstance to check.
  • options - ClientCheckNameAvailabilityOptions contains the optional parameters for the Client.CheckNameAvailability method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/DigitalTwinsCheckNameAvailability_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().CheckNameAvailability(ctx, "WestUS2", armdigitaltwins.CheckNameRequest{
		Name: to.Ptr("myadtinstance"),
		Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances"),
	}, 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.CheckNameResult = armdigitaltwins.CheckNameResult{
	// 	Message: to.Ptr("Name 'myadtinstance' is already taken. Please specify a different name"),
	// 	NameAvailable: to.Ptr(false),
	// 	Reason: to.Ptr(armdigitaltwins.ReasonAlreadyExists),
	// }
}
Output:

func (*Client) Get added in v0.2.0

func (client *Client) Get(ctx context.Context, resourceGroupName string, resourceName string, options *ClientGetOptions) (ClientGetResponse, error)

Get - Get DigitalTwinsInstances resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group that contains the DigitalTwinsInstance.
  • resourceName - The name of the DigitalTwinsInstance.
  • options - ClientGetOptions contains the optional parameters for the Client.Get method.
Example (GetADigitalTwinsInstanceResource)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/DigitalTwinsGet_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().Get(ctx, "resRg", "myDigitalTwinsService", 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.Description = armdigitaltwins.Description{
	// 	Name: to.Ptr("myDigitalTwinsService"),
	// 	Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances"),
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService"),
	// 	Location: to.Ptr("westus2"),
	// 	SystemData: &armdigitaltwins.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:13:59.403Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@example.com"),
	// 		CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:02.528Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("d2baee3d-44c0-41b6-9961-92563de66a97"),
	// 		LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeApplication),
	// 	},
	// 	Properties: &armdigitaltwins.Properties{
	// 		CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T12:55:05.229Z"); return t}()),
	// 		HostName: to.Ptr("https://myDigitalTwinsService.api.wus2.ss.azuredigitaltwins-test.net"),
	// 		LastUpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-06T12:21:58.610Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armdigitaltwins.ProvisioningStateSucceeded),
	// 		PublicNetworkAccess: to.Ptr(armdigitaltwins.PublicNetworkAccessEnabled),
	// 	},
	// }
}
Output:

Example (GetADigitalTwinsInstanceResourceWithAPrivateEndpointConnection)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/DigitalTwinsGet_WithPrivateEndpointConnection_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().Get(ctx, "resRg", "myDigitalTwinsService", 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.Description = armdigitaltwins.Description{
	// 	Name: to.Ptr("myDigitalTwinsService"),
	// 	Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances"),
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService"),
	// 	Location: to.Ptr("westus2"),
	// 	SystemData: &armdigitaltwins.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:13:59.403Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@example.com"),
	// 		CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:02.528Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("d2baee3d-44c0-41b6-9961-92563de66a97"),
	// 		LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeApplication),
	// 	},
	// 	Properties: &armdigitaltwins.Properties{
	// 		CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T12:55:05.229Z"); return t}()),
	// 		HostName: to.Ptr("https://myDigitalTwinsService.api.wus2.ss.azuredigitaltwins-test.net"),
	// 		LastUpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-06T12:21:58.610Z"); return t}()),
	// 		PrivateEndpointConnections: []*armdigitaltwins.PrivateEndpointConnection{
	// 			{
	// 				ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/privateEndpointConnections/myPrivateConnection"),
	// 				Properties: &armdigitaltwins.ConnectionProperties{
	// 					GroupIDs: []*string{
	// 						to.Ptr("digitalTwinsInstance")},
	// 						PrivateEndpoint: &armdigitaltwins.PrivateEndpoint{
	// 							ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourceGroups/resRg/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"),
	// 						},
	// 						PrivateLinkServiceConnectionState: &armdigitaltwins.ConnectionPropertiesPrivateLinkServiceConnectionState{
	// 							Description: to.Ptr("Please approve my request, thanks."),
	// 							ActionsRequired: to.Ptr("None"),
	// 							Status: to.Ptr(armdigitaltwins.PrivateLinkServiceConnectionStatusPending),
	// 						},
	// 					},
	// 			}},
	// 			ProvisioningState: to.Ptr(armdigitaltwins.ProvisioningStateSucceeded),
	// 			PublicNetworkAccess: to.Ptr(armdigitaltwins.PublicNetworkAccessEnabled),
	// 		},
	// 	}
}
Output:

Example (GetADigitalTwinsInstanceResourceWithIdentity)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/DigitalTwinsGet_WithIdentity_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().Get(ctx, "resRg", "myDigitalTwinsService", 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.Description = armdigitaltwins.Description{
	// 	Name: to.Ptr("myDigitalTwinsService"),
	// 	Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances"),
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService"),
	// 	Identity: &armdigitaltwins.Identity{
	// 		Type: to.Ptr(armdigitaltwins.DigitalTwinsIdentityTypeSystemAssignedUserAssigned),
	// 		PrincipalID: to.Ptr("544215a9-21d8-4fb5-8094-8efbcc311dd0"),
	// 		TenantID: to.Ptr("544215a9-21d8-4fb5-8094-8efbcc311dd0"),
	// 		UserAssignedIdentities: map[string]*armdigitaltwins.UserAssignedIdentity{
	// 			"/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity": &armdigitaltwins.UserAssignedIdentity{
	// 				ClientID: to.Ptr("544215a9-21d8-4fb5-8094-8efbcc311dd0"),
	// 				PrincipalID: to.Ptr("50016170-c839-41ba-a724-51e9df440b9e"),
	// 			},
	// 		},
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	SystemData: &armdigitaltwins.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:13:59.403Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@example.com"),
	// 		CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:02.528Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("d2baee3d-44c0-41b6-9961-92563de66a97"),
	// 		LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeApplication),
	// 	},
	// 	Properties: &armdigitaltwins.Properties{
	// 		CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T12:55:05.229Z"); return t}()),
	// 		HostName: to.Ptr("https://myDigitalTwinsService.api.wus2.ss.azuredigitaltwins-test.net"),
	// 		LastUpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-06T12:21:58.610Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armdigitaltwins.ProvisioningStateSucceeded),
	// 		PublicNetworkAccess: to.Ptr(armdigitaltwins.PublicNetworkAccessEnabled),
	// 	},
	// }
}
Output:

func (*Client) NewListByResourceGroupPager added in v0.4.0

func (client *Client) NewListByResourceGroupPager(resourceGroupName string, options *ClientListByResourceGroupOptions) *runtime.Pager[ClientListByResourceGroupResponse]

NewListByResourceGroupPager - Get all the DigitalTwinsInstances in a resource group.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group that contains the DigitalTwinsInstance.
  • options - ClientListByResourceGroupOptions contains the optional parameters for the Client.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/DigitalTwinsListByResourceGroup_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClient().NewListByResourceGroupPager("resRg", 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.DescriptionListResult = armdigitaltwins.DescriptionListResult{
		// 	Value: []*armdigitaltwins.Description{
		// 		{
		// 			Name: to.Ptr("myDigitalTwinsService"),
		// 			Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances"),
		// 			ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService"),
		// 			Location: to.Ptr("westus2"),
		// 			SystemData: &armdigitaltwins.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:13:59.403Z"); return t}()),
		// 				CreatedBy: to.Ptr("user@example.com"),
		// 				CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:02.528Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("d2baee3d-44c0-41b6-9961-92563de66a97"),
		// 				LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeApplication),
		// 			},
		// 			Properties: &armdigitaltwins.Properties{
		// 				CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T12:55:05.229Z"); return t}()),
		// 				HostName: to.Ptr("https://myDigitalTwinsService.api.wus2.ss.azuredigitaltwins-test.net"),
		// 				LastUpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T12:51:05.229Z"); return t}()),
		// 				ProvisioningState: to.Ptr(armdigitaltwins.ProvisioningStateSucceeded),
		// 				PublicNetworkAccess: to.Ptr(armdigitaltwins.PublicNetworkAccessEnabled),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("myDigitalTwinsService2"),
		// 			Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances"),
		// 			ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService2"),
		// 			Location: to.Ptr("westus2"),
		// 			SystemData: &armdigitaltwins.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:59.403Z"); return t}()),
		// 				CreatedBy: to.Ptr("user@example.com"),
		// 				CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:15:02.528Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("429f7e65-6d99-455e-a469-7a885be68642"),
		// 				LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeApplication),
		// 			},
		// 			Properties: &armdigitaltwins.Properties{
		// 				CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T12:55:07.229Z"); return t}()),
		// 				LastUpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T12:55:07.229Z"); return t}()),
		// 				ProvisioningState: to.Ptr(armdigitaltwins.ProvisioningStateSucceeded),
		// 				PublicNetworkAccess: to.Ptr(armdigitaltwins.PublicNetworkAccessEnabled),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*Client) NewListPager added in v0.4.0

func (client *Client) NewListPager(options *ClientListOptions) *runtime.Pager[ClientListResponse]

NewListPager - Get all the DigitalTwinsInstances in a subscription.

Generated from API version 2023-01-31

  • options - ClientListOptions contains the optional parameters for the Client.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/DigitalTwinsList_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClient().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.DescriptionListResult = armdigitaltwins.DescriptionListResult{
		// 	Value: []*armdigitaltwins.Description{
		// 		{
		// 			Name: to.Ptr("myDigitalTwinsService"),
		// 			Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances"),
		// 			ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService"),
		// 			Location: to.Ptr("westus2"),
		// 			SystemData: &armdigitaltwins.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:13:59.403Z"); return t}()),
		// 				CreatedBy: to.Ptr("user@example.com"),
		// 				CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:02.528Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("d2baee3d-44c0-41b6-9961-92563de66a97"),
		// 				LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeApplication),
		// 			},
		// 			Properties: &armdigitaltwins.Properties{
		// 				CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T12:55:05.229Z"); return t}()),
		// 				HostName: to.Ptr("https://myDigitalTwinsService.api.wus2.ss.azuredigitaltwins-test.net"),
		// 				LastUpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T12:55:07.229Z"); return t}()),
		// 				ProvisioningState: to.Ptr(armdigitaltwins.ProvisioningStateSucceeded),
		// 				PublicNetworkAccess: to.Ptr(armdigitaltwins.PublicNetworkAccessEnabled),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("myDigitalTwinsService2"),
		// 			Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances"),
		// 			ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg2/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService2"),
		// 			Location: to.Ptr("westus2"),
		// 			SystemData: &armdigitaltwins.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:59.403Z"); return t}()),
		// 				CreatedBy: to.Ptr("user@example.com"),
		// 				CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:15:02.528Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("429f7e65-6d99-455e-a469-7a885be68642"),
		// 				LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeApplication),
		// 			},
		// 			Properties: &armdigitaltwins.Properties{
		// 				CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T12:55:05.229Z"); return t}()),
		// 				LastUpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T12:55:07.229Z"); return t}()),
		// 				ProvisioningState: to.Ptr(armdigitaltwins.ProvisioningStateSucceeded),
		// 				PublicNetworkAccess: to.Ptr(armdigitaltwins.PublicNetworkAccessEnabled),
		// 			},
		// 	}},
		// }
	}
}
Output:

type ClientBeginCreateOrUpdateOptions added in v0.2.0

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

ClientBeginCreateOrUpdateOptions contains the optional parameters for the Client.BeginCreateOrUpdate method.

type ClientBeginDeleteOptions added in v0.2.0

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

ClientBeginDeleteOptions contains the optional parameters for the Client.BeginDelete method.

type ClientBeginUpdateOptions added in v0.2.0

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

ClientBeginUpdateOptions contains the optional parameters for the Client.BeginUpdate method.

type ClientCheckNameAvailabilityOptions added in v0.2.0

type ClientCheckNameAvailabilityOptions struct {
}

ClientCheckNameAvailabilityOptions contains the optional parameters for the Client.CheckNameAvailability method.

type ClientCheckNameAvailabilityResponse added in v0.2.0

type ClientCheckNameAvailabilityResponse struct {
	// The result returned from a check name availability request.
	CheckNameResult
}

ClientCheckNameAvailabilityResponse contains the response from method Client.CheckNameAvailability.

type ClientCreateOrUpdateResponse added in v0.2.0

type ClientCreateOrUpdateResponse struct {
	// The description of the DigitalTwins service.
	Description
}

ClientCreateOrUpdateResponse contains the response from method Client.BeginCreateOrUpdate.

type ClientDeleteResponse added in v0.2.0

type ClientDeleteResponse struct {
	// The description of the DigitalTwins service.
	Description
}

ClientDeleteResponse contains the response from method Client.BeginDelete.

type ClientFactory added in v1.1.0

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

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

func NewClientFactory added in v1.1.0

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 subscription identifier.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewClient added in v1.1.0

func (c *ClientFactory) NewClient() *Client

NewClient creates a new instance of Client.

func (*ClientFactory) NewEndpointClient added in v1.1.0

func (c *ClientFactory) NewEndpointClient() *EndpointClient

NewEndpointClient creates a new instance of EndpointClient.

func (*ClientFactory) NewOperationsClient added in v1.1.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewPrivateEndpointConnectionsClient added in v1.1.0

func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.

func (*ClientFactory) NewPrivateLinkResourcesClient added in v1.1.0

func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient.

func (*ClientFactory) NewTimeSeriesDatabaseConnectionsClient added in v1.1.0

func (c *ClientFactory) NewTimeSeriesDatabaseConnectionsClient() *TimeSeriesDatabaseConnectionsClient

NewTimeSeriesDatabaseConnectionsClient creates a new instance of TimeSeriesDatabaseConnectionsClient.

type ClientGetOptions added in v0.2.0

type ClientGetOptions struct {
}

ClientGetOptions contains the optional parameters for the Client.Get method.

type ClientGetResponse added in v0.2.0

type ClientGetResponse struct {
	// The description of the DigitalTwins service.
	Description
}

ClientGetResponse contains the response from method Client.Get.

type ClientListByResourceGroupOptions added in v0.2.0

type ClientListByResourceGroupOptions struct {
}

ClientListByResourceGroupOptions contains the optional parameters for the Client.NewListByResourceGroupPager method.

type ClientListByResourceGroupResponse added in v0.2.0

type ClientListByResourceGroupResponse struct {
	// A list of DigitalTwins description objects with a next link.
	DescriptionListResult
}

ClientListByResourceGroupResponse contains the response from method Client.NewListByResourceGroupPager.

type ClientListOptions added in v0.2.0

type ClientListOptions struct {
}

ClientListOptions contains the optional parameters for the Client.NewListPager method.

type ClientListResponse added in v0.2.0

type ClientListResponse struct {
	// A list of DigitalTwins description objects with a next link.
	DescriptionListResult
}

ClientListResponse contains the response from method Client.NewListPager.

type ClientUpdateResponse added in v0.2.0

type ClientUpdateResponse struct {
	// The description of the DigitalTwins service.
	Description
}

ClientUpdateResponse contains the response from method Client.BeginUpdate.

type ConnectionProperties

type ConnectionProperties struct {
	// The list of group ids for the private endpoint connection.
	GroupIDs []*string

	// The private endpoint.
	PrivateEndpoint *PrivateEndpoint

	// The connection state.
	PrivateLinkServiceConnectionState *ConnectionPropertiesPrivateLinkServiceConnectionState

	// READ-ONLY; The provisioning state.
	ProvisioningState *ConnectionPropertiesProvisioningState
}

ConnectionProperties - The properties of a private endpoint connection.

func (ConnectionProperties) MarshalJSON

func (c ConnectionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConnectionProperties.

func (*ConnectionProperties) UnmarshalJSON added in v1.1.0

func (c *ConnectionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionProperties.

type ConnectionPropertiesPrivateLinkServiceConnectionState

type ConnectionPropertiesPrivateLinkServiceConnectionState struct {
	// REQUIRED; The description for the current state of a private endpoint connection.
	Description *string

	// REQUIRED; The status of a private endpoint connection.
	Status *PrivateLinkServiceConnectionStatus

	// Actions required for a private endpoint connection.
	ActionsRequired *string
}

ConnectionPropertiesPrivateLinkServiceConnectionState - The connection state.

func (ConnectionPropertiesPrivateLinkServiceConnectionState) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type ConnectionPropertiesPrivateLinkServiceConnectionState.

func (*ConnectionPropertiesPrivateLinkServiceConnectionState) UnmarshalJSON added in v1.1.0

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionPropertiesPrivateLinkServiceConnectionState.

type ConnectionPropertiesProvisioningState

type ConnectionPropertiesProvisioningState string

ConnectionPropertiesProvisioningState - The provisioning state.

const (
	ConnectionPropertiesProvisioningStateApproved     ConnectionPropertiesProvisioningState = "Approved"
	ConnectionPropertiesProvisioningStateDisconnected ConnectionPropertiesProvisioningState = "Disconnected"
	ConnectionPropertiesProvisioningStatePending      ConnectionPropertiesProvisioningState = "Pending"
	ConnectionPropertiesProvisioningStateRejected     ConnectionPropertiesProvisioningState = "Rejected"
)

func PossibleConnectionPropertiesProvisioningStateValues

func PossibleConnectionPropertiesProvisioningStateValues() []ConnectionPropertiesProvisioningState

PossibleConnectionPropertiesProvisioningStateValues returns the possible values for the ConnectionPropertiesProvisioningState const type.

type ConnectionState

type ConnectionState struct {
	// REQUIRED; The description for the current state of a private endpoint connection.
	Description *string

	// REQUIRED; The status of a private endpoint connection.
	Status *PrivateLinkServiceConnectionStatus

	// Actions required for a private endpoint connection.
	ActionsRequired *string
}

ConnectionState - The current state of a private endpoint connection.

func (ConnectionState) MarshalJSON added in v1.1.0

func (c ConnectionState) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConnectionState.

func (*ConnectionState) UnmarshalJSON added in v1.1.0

func (c *ConnectionState) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionState.

type ConnectionType added in v0.3.0

type ConnectionType string

ConnectionType - The type of time series connection resource.

const (
	ConnectionTypeAzureDataExplorer ConnectionType = "AzureDataExplorer"
)

func PossibleConnectionTypeValues added in v0.3.0

func PossibleConnectionTypeValues() []ConnectionType

PossibleConnectionTypeValues returns the possible values for the ConnectionType const type.

type CreatedByType added in v0.3.0

type CreatedByType string

CreatedByType - The type of identity that created the resource.

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

func PossibleCreatedByTypeValues added in v0.3.0

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type Description added in v0.2.0

type Description struct {
	// REQUIRED; The resource location.
	Location *string

	// The managed identity for the DigitalTwinsInstance.
	Identity *Identity

	// DigitalTwins instance properties.
	Properties *Properties

	// The resource tags.
	Tags map[string]*string

	// READ-ONLY; The resource identifier.
	ID *string

	// READ-ONLY; The resource name.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the DigitalTwinsInstance.
	SystemData *SystemData

	// READ-ONLY; The resource type.
	Type *string
}

Description - The description of the DigitalTwins service.

func (Description) MarshalJSON added in v0.2.0

func (d Description) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Description.

func (*Description) UnmarshalJSON added in v1.1.0

func (d *Description) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Description.

type DescriptionListResult added in v0.2.0

type DescriptionListResult struct {
	// The link used to get the next page of DigitalTwins description objects.
	NextLink *string

	// A list of DigitalTwins description objects.
	Value []*Description
}

DescriptionListResult - A list of DigitalTwins description objects with a next link.

func (DescriptionListResult) MarshalJSON added in v0.2.0

func (d DescriptionListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DescriptionListResult.

func (*DescriptionListResult) UnmarshalJSON added in v1.1.0

func (d *DescriptionListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DescriptionListResult.

type DigitalTwinsIdentityType

type DigitalTwinsIdentityType string

DigitalTwinsIdentityType - The type of Managed Identity used by the DigitalTwinsInstance.

const (
	DigitalTwinsIdentityTypeNone                       DigitalTwinsIdentityType = "None"
	DigitalTwinsIdentityTypeSystemAssigned             DigitalTwinsIdentityType = "SystemAssigned"
	DigitalTwinsIdentityTypeSystemAssignedUserAssigned DigitalTwinsIdentityType = "SystemAssigned,UserAssigned"
	DigitalTwinsIdentityTypeUserAssigned               DigitalTwinsIdentityType = "UserAssigned"
)

func PossibleDigitalTwinsIdentityTypeValues

func PossibleDigitalTwinsIdentityTypeValues() []DigitalTwinsIdentityType

PossibleDigitalTwinsIdentityTypeValues returns the possible values for the DigitalTwinsIdentityType const type.

type EndpointClient added in v0.2.0

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

EndpointClient contains the methods for the DigitalTwinsEndpoint group. Don't use this type directly, use NewEndpointClient() instead.

func NewEndpointClient added in v0.2.0

func NewEndpointClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EndpointClient, error)

NewEndpointClient creates a new instance of EndpointClient with the specified values.

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

func (*EndpointClient) BeginCreateOrUpdate added in v0.2.0

func (client *EndpointClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, endpointName string, endpointDescription EndpointResource, options *EndpointClientBeginCreateOrUpdateOptions) (*runtime.Poller[EndpointClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update DigitalTwinsInstance endpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group that contains the DigitalTwinsInstance.
  • resourceName - The name of the DigitalTwinsInstance.
  • endpointName - Name of Endpoint Resource.
  • endpointDescription - The DigitalTwinsInstance endpoint metadata and security metadata.
  • options - EndpointClientBeginCreateOrUpdateOptions contains the optional parameters for the EndpointClient.BeginCreateOrUpdate method.
Example (PutADigitalTwinsEndpointResource)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/DigitalTwinsEndpointPut_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewEndpointClient().BeginCreateOrUpdate(ctx, "resRg", "myDigitalTwinsService", "myServiceBus", armdigitaltwins.EndpointResource{
		Properties: &armdigitaltwins.ServiceBus{
			AuthenticationType:        to.Ptr(armdigitaltwins.AuthenticationTypeKeyBased),
			EndpointType:              to.Ptr(armdigitaltwins.EndpointTypeServiceBus),
			PrimaryConnectionString:   to.Ptr("Endpoint=sb://mysb.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=xyzxyzoX4=;EntityPath=abcabc"),
			SecondaryConnectionString: to.Ptr("Endpoint=sb://mysb.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=xyzxyzoX4=;EntityPath=abcabc"),
		},
	}, 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.EndpointResource = armdigitaltwins.EndpointResource{
	// 	Name: to.Ptr("myServiceBus"),
	// 	Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances/endpoints"),
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/endpoints/myServiceBus"),
	// 	SystemData: &armdigitaltwins.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:13:59.403Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@example.com"),
	// 		CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:02.528Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user@example.com"),
	// 		LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 	},
	// 	Properties: &armdigitaltwins.ServiceBus{
	// 		AuthenticationType: to.Ptr(armdigitaltwins.AuthenticationTypeKeyBased),
	// 		CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T01:10:34.350Z"); return t}()),
	// 		EndpointType: to.Ptr(armdigitaltwins.EndpointTypeServiceBus),
	// 		ProvisioningState: to.Ptr(armdigitaltwins.EndpointProvisioningStateSucceeded),
	// 		PrimaryConnectionString: to.Ptr("Endpoint=sb://***/;SharedAccessKeyName=***;SharedAccessKey=***;EntityPath=***"),
	// 		SecondaryConnectionString: to.Ptr("Endpoint=sb://***/;SharedAccessKeyName=***;SharedAccessKey=***;EntityPath=***"),
	// 	},
	// }
}
Output:

Example (PutADigitalTwinsEndpointResourceWithIdentity)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/DigitalTwinsEndpointPut_WithIdentity_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewEndpointClient().BeginCreateOrUpdate(ctx, "resRg", "myDigitalTwinsService", "myServiceBus", armdigitaltwins.EndpointResource{
		Properties: &armdigitaltwins.ServiceBus{
			AuthenticationType: to.Ptr(armdigitaltwins.AuthenticationTypeIdentityBased),
			EndpointType:       to.Ptr(armdigitaltwins.EndpointTypeServiceBus),
			EndpointURI:        to.Ptr("sb://mysb.servicebus.windows.net/"),
			EntityPath:         to.Ptr("mysbtopic"),
		},
	}, 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.EndpointResource = armdigitaltwins.EndpointResource{
	// 	Name: to.Ptr("myServiceBus"),
	// 	Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances/endpoints"),
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/endpoints/myServiceBus"),
	// 	SystemData: &armdigitaltwins.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:13:59.403Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@example.com"),
	// 		CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:02.528Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user@example.com"),
	// 		LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 	},
	// 	Properties: &armdigitaltwins.ServiceBus{
	// 		AuthenticationType: to.Ptr(armdigitaltwins.AuthenticationTypeIdentityBased),
	// 		CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T01:10:34.350Z"); return t}()),
	// 		EndpointType: to.Ptr(armdigitaltwins.EndpointTypeServiceBus),
	// 		ProvisioningState: to.Ptr(armdigitaltwins.EndpointProvisioningStateSucceeded),
	// 		EndpointURI: to.Ptr("sb://mysb.servicebus.windows.net/"),
	// 		EntityPath: to.Ptr("mysbtopic"),
	// 	},
	// }
}
Output:

Example (PutADigitalTwinsEndpointResourceWithUserAssignedIdentity)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/DigitalTwinsEndpointPut_WithUserIdentity_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewEndpointClient().BeginCreateOrUpdate(ctx, "resRg", "myDigitalTwinsService", "myServiceBus", armdigitaltwins.EndpointResource{
		Properties: &armdigitaltwins.ServiceBus{
			AuthenticationType: to.Ptr(armdigitaltwins.AuthenticationTypeIdentityBased),
			EndpointType:       to.Ptr(armdigitaltwins.EndpointTypeServiceBus),
			Identity: &armdigitaltwins.ManagedIdentityReference{
				Type:                 to.Ptr(armdigitaltwins.IdentityTypeUserAssigned),
				UserAssignedIdentity: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity"),
			},
			EndpointURI: to.Ptr("sb://mysb.servicebus.windows.net/"),
			EntityPath:  to.Ptr("mysbtopic"),
		},
	}, 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.EndpointResource = armdigitaltwins.EndpointResource{
	// 	Name: to.Ptr("myServiceBus"),
	// 	Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances/endpoints"),
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/endpoints/myServiceBus"),
	// 	SystemData: &armdigitaltwins.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:13:59.403Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@example.com"),
	// 		CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:02.528Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user@example.com"),
	// 		LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 	},
	// 	Properties: &armdigitaltwins.ServiceBus{
	// 		AuthenticationType: to.Ptr(armdigitaltwins.AuthenticationTypeIdentityBased),
	// 		CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T01:10:34.350Z"); return t}()),
	// 		EndpointType: to.Ptr(armdigitaltwins.EndpointTypeServiceBus),
	// 		Identity: &armdigitaltwins.ManagedIdentityReference{
	// 			Type: to.Ptr(armdigitaltwins.IdentityTypeUserAssigned),
	// 			UserAssignedIdentity: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity"),
	// 		},
	// 		ProvisioningState: to.Ptr(armdigitaltwins.EndpointProvisioningStateSucceeded),
	// 		EndpointURI: to.Ptr("sb://mysb.servicebus.windows.net/"),
	// 		EntityPath: to.Ptr("mysbtopic"),
	// 	},
	// }
}
Output:

func (*EndpointClient) BeginDelete added in v0.2.0

func (client *EndpointClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, endpointName string, options *EndpointClientBeginDeleteOptions) (*runtime.Poller[EndpointClientDeleteResponse], error)

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

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group that contains the DigitalTwinsInstance.
  • resourceName - The name of the DigitalTwinsInstance.
  • endpointName - Name of Endpoint Resource.
  • options - EndpointClientBeginDeleteOptions contains the optional parameters for the EndpointClient.BeginDelete method.
Example (DeleteADigitalTwinsInstanceEndpoint)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/DigitalTwinsEndpointDelete_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewEndpointClient().BeginDelete(ctx, "resRg", "myDigitalTwinsService", "myendpoint", 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.EndpointResource = armdigitaltwins.EndpointResource{
	// 	Name: to.Ptr("myendpoint"),
	// 	Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances/endpoints"),
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/endpoints/myServiceBus"),
	// 	SystemData: &armdigitaltwins.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:13:59.403Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@example.com"),
	// 		CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:02.528Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user@example.com"),
	// 		LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 	},
	// 	Properties: &armdigitaltwins.ServiceBus{
	// 		AuthenticationType: to.Ptr(armdigitaltwins.AuthenticationTypeKeyBased),
	// 		CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T01:10:34.350Z"); return t}()),
	// 		EndpointType: to.Ptr(armdigitaltwins.EndpointTypeServiceBus),
	// 		ProvisioningState: to.Ptr(armdigitaltwins.EndpointProvisioningStateSucceeded),
	// 		PrimaryConnectionString: to.Ptr("Endpoint=sb://***/;SharedAccessKeyName=***;SharedAccessKey=***;EntityPath=***"),
	// 		SecondaryConnectionString: to.Ptr("Endpoint=sb://***/;SharedAccessKeyName=***;SharedAccessKey=***;EntityPath=***"),
	// 	},
	// }
}
Output:

Example (DeleteADigitalTwinsInstanceEndpointWithIdentity)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/DigitalTwinsEndpointDelete_WithIdentity_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewEndpointClient().BeginDelete(ctx, "resRg", "myDigitalTwinsService", "myendpoint", 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.EndpointResource = armdigitaltwins.EndpointResource{
	// 	Name: to.Ptr("myendpoint"),
	// 	Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances/endpoints"),
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/endpoints/myServiceBus"),
	// 	SystemData: &armdigitaltwins.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:13:59.403Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@example.com"),
	// 		CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:02.528Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user@example.com"),
	// 		LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 	},
	// 	Properties: &armdigitaltwins.ServiceBus{
	// 		AuthenticationType: to.Ptr(armdigitaltwins.AuthenticationTypeKeyBased),
	// 		CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T01:10:34.350Z"); return t}()),
	// 		EndpointType: to.Ptr(armdigitaltwins.EndpointTypeServiceBus),
	// 		ProvisioningState: to.Ptr(armdigitaltwins.EndpointProvisioningStateSucceeded),
	// 		EndpointURI: to.Ptr("sb://mysb.servicebus.windows.net/"),
	// 		EntityPath: to.Ptr("mysbtopic"),
	// 	},
	// }
}
Output:

func (*EndpointClient) Get added in v0.2.0

func (client *EndpointClient) Get(ctx context.Context, resourceGroupName string, resourceName string, endpointName string, options *EndpointClientGetOptions) (EndpointClientGetResponse, error)

Get - Get DigitalTwinsInstances Endpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group that contains the DigitalTwinsInstance.
  • resourceName - The name of the DigitalTwinsInstance.
  • endpointName - Name of Endpoint Resource.
  • options - EndpointClientGetOptions contains the optional parameters for the EndpointClient.Get method.
Example (GetADigitalTwinsInstanceEndpoint)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/DigitalTwinsEndpointGet_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEndpointClient().Get(ctx, "resRg", "myDigitalTwinsService", "myServiceBus", 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.EndpointResource = armdigitaltwins.EndpointResource{
	// 	Name: to.Ptr("myServiceBus"),
	// 	Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances/endpoints"),
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/endpoints/myServiceBus"),
	// 	SystemData: &armdigitaltwins.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:13:59.403Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@example.com"),
	// 		CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:02.528Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user@example.com"),
	// 		LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 	},
	// 	Properties: &armdigitaltwins.ServiceBus{
	// 		AuthenticationType: to.Ptr(armdigitaltwins.AuthenticationTypeKeyBased),
	// 		CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T01:10:34.350Z"); return t}()),
	// 		EndpointType: to.Ptr(armdigitaltwins.EndpointTypeServiceBus),
	// 		ProvisioningState: to.Ptr(armdigitaltwins.EndpointProvisioningStateSucceeded),
	// 		PrimaryConnectionString: to.Ptr("Endpoint=sb://***/;SharedAccessKeyName=***;SharedAccessKey=***;EntityPath=***"),
	// 		SecondaryConnectionString: to.Ptr("Endpoint=sb://***/;SharedAccessKeyName=***;SharedAccessKey=***;EntityPath=***"),
	// 	},
	// }
}
Output:

Example (GetADigitalTwinsInstanceEndpointWithIdentity)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/DigitalTwinsEndpointGet_WithIdentity_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEndpointClient().Get(ctx, "resRg", "myDigitalTwinsService", "myServiceBus", 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.EndpointResource = armdigitaltwins.EndpointResource{
	// 	Name: to.Ptr("myServiceBus"),
	// 	Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances/endpoints"),
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/endpoints/myServiceBus"),
	// 	SystemData: &armdigitaltwins.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:13:59.403Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@example.com"),
	// 		CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:02.528Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user@example.com"),
	// 		LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
	// 	},
	// 	Properties: &armdigitaltwins.ServiceBus{
	// 		AuthenticationType: to.Ptr(armdigitaltwins.AuthenticationTypeIdentityBased),
	// 		CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T01:10:34.350Z"); return t}()),
	// 		EndpointType: to.Ptr(armdigitaltwins.EndpointTypeServiceBus),
	// 		ProvisioningState: to.Ptr(armdigitaltwins.EndpointProvisioningStateSucceeded),
	// 		EndpointURI: to.Ptr("sb://mysb.servicebus.windows.net/"),
	// 		EntityPath: to.Ptr("mysbtopic"),
	// 	},
	// }
}
Output:

func (*EndpointClient) NewListPager added in v0.4.0

func (client *EndpointClient) NewListPager(resourceGroupName string, resourceName string, options *EndpointClientListOptions) *runtime.Pager[EndpointClientListResponse]

NewListPager - Get DigitalTwinsInstance Endpoints.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group that contains the DigitalTwinsInstance.
  • resourceName - The name of the DigitalTwinsInstance.
  • options - EndpointClientListOptions contains the optional parameters for the EndpointClient.NewListPager method.
Example (GetADigitalTwinsInstanceEndpoints)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/DigitalTwinsEndpointsGet_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewEndpointClient().NewListPager("resRg", "myDigitalTwinsService", 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.EndpointResourceListResult = armdigitaltwins.EndpointResourceListResult{
		// 	Value: []*armdigitaltwins.EndpointResource{
		// 		{
		// 			Name: to.Ptr("myendpoint1"),
		// 			Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances/endpoints"),
		// 			ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/endpoints/myServiceBus"),
		// 			SystemData: &armdigitaltwins.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:13:59.403Z"); return t}()),
		// 				CreatedBy: to.Ptr("user@example.com"),
		// 				CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:02.528Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("user@example.com"),
		// 				LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
		// 			},
		// 			Properties: &armdigitaltwins.ServiceBus{
		// 				AuthenticationType: to.Ptr(armdigitaltwins.AuthenticationTypeKeyBased),
		// 				CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T01:10:34.350Z"); return t}()),
		// 				EndpointType: to.Ptr(armdigitaltwins.EndpointTypeServiceBus),
		// 				ProvisioningState: to.Ptr(armdigitaltwins.EndpointProvisioningStateSucceeded),
		// 				PrimaryConnectionString: to.Ptr("Endpoint=sb://***/;SharedAccessKeyName=***;SharedAccessKey=***;EntityPath=***"),
		// 				SecondaryConnectionString: to.Ptr("Endpoint=sb://***/;SharedAccessKeyName=***;SharedAccessKey=***;EntityPath=***"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("myendpoint2"),
		// 			Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances/endpoints"),
		// 			ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/endpoints/myServiceBus"),
		// 			SystemData: &armdigitaltwins.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:13:59.403Z"); return t}()),
		// 				CreatedBy: to.Ptr("user@example.com"),
		// 				CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:02.528Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("user@example.com"),
		// 				LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
		// 			},
		// 			Properties: &armdigitaltwins.EventHub{
		// 				AuthenticationType: to.Ptr(armdigitaltwins.AuthenticationTypeKeyBased),
		// 				CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T01:10:34.350Z"); return t}()),
		// 				EndpointType: to.Ptr(armdigitaltwins.EndpointTypeEventHub),
		// 				ProvisioningState: to.Ptr(armdigitaltwins.EndpointProvisioningStateSucceeded),
		// 				ConnectionStringPrimaryKey: to.Ptr("************"),
		// 				ConnectionStringSecondaryKey: to.Ptr("************"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (GetADigitalTwinsInstanceEndpointsWithIdentity)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/DigitalTwinsEndpointsGet_WithIdentity_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewEndpointClient().NewListPager("resRg", "myDigitalTwinsService", 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.EndpointResourceListResult = armdigitaltwins.EndpointResourceListResult{
		// 	Value: []*armdigitaltwins.EndpointResource{
		// 		{
		// 			Name: to.Ptr("myServiceBus"),
		// 			Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances/endpoints"),
		// 			ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/endpoints/myServiceBus"),
		// 			SystemData: &armdigitaltwins.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:13:59.403Z"); return t}()),
		// 				CreatedBy: to.Ptr("user@example.com"),
		// 				CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:02.528Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("user@example.com"),
		// 				LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
		// 			},
		// 			Properties: &armdigitaltwins.ServiceBus{
		// 				AuthenticationType: to.Ptr(armdigitaltwins.AuthenticationTypeIdentityBased),
		// 				CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T01:10:34.350Z"); return t}()),
		// 				EndpointType: to.Ptr(armdigitaltwins.EndpointTypeServiceBus),
		// 				ProvisioningState: to.Ptr(armdigitaltwins.EndpointProvisioningStateSucceeded),
		// 				EndpointURI: to.Ptr("sb://mysb.servicebus.windows.net/"),
		// 				EntityPath: to.Ptr("mysbtopic"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("myServiceBus"),
		// 			Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances/endpoints"),
		// 			ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/endpoints/myServiceBus"),
		// 			SystemData: &armdigitaltwins.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:13:59.403Z"); return t}()),
		// 				CreatedBy: to.Ptr("user@example.com"),
		// 				CreatedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T17:14:02.528Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("user@example.com"),
		// 				LastModifiedByType: to.Ptr(armdigitaltwins.CreatedByTypeUser),
		// 			},
		// 			Properties: &armdigitaltwins.EventHub{
		// 				AuthenticationType: to.Ptr(armdigitaltwins.AuthenticationTypeKeyBased),
		// 				CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-19T01:10:34.350Z"); return t}()),
		// 				EndpointType: to.Ptr(armdigitaltwins.EndpointTypeEventHub),
		// 				ProvisioningState: to.Ptr(armdigitaltwins.EndpointProvisioningStateSucceeded),
		// 				ConnectionStringPrimaryKey: to.Ptr("************"),
		// 				ConnectionStringSecondaryKey: to.Ptr("************"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type EndpointClientBeginCreateOrUpdateOptions added in v0.2.0

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

EndpointClientBeginCreateOrUpdateOptions contains the optional parameters for the EndpointClient.BeginCreateOrUpdate method.

type EndpointClientBeginDeleteOptions added in v0.2.0

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

EndpointClientBeginDeleteOptions contains the optional parameters for the EndpointClient.BeginDelete method.

type EndpointClientCreateOrUpdateResponse added in v0.2.0

type EndpointClientCreateOrUpdateResponse struct {
	// DigitalTwinsInstance endpoint resource.
	EndpointResource
}

EndpointClientCreateOrUpdateResponse contains the response from method EndpointClient.BeginCreateOrUpdate.

type EndpointClientDeleteResponse added in v0.2.0

type EndpointClientDeleteResponse struct {
	// DigitalTwinsInstance endpoint resource.
	EndpointResource
}

EndpointClientDeleteResponse contains the response from method EndpointClient.BeginDelete.

type EndpointClientGetOptions added in v0.2.0

type EndpointClientGetOptions struct {
}

EndpointClientGetOptions contains the optional parameters for the EndpointClient.Get method.

type EndpointClientGetResponse added in v0.2.0

type EndpointClientGetResponse struct {
	// DigitalTwinsInstance endpoint resource.
	EndpointResource
}

EndpointClientGetResponse contains the response from method EndpointClient.Get.

type EndpointClientListOptions added in v0.2.0

type EndpointClientListOptions struct {
}

EndpointClientListOptions contains the optional parameters for the EndpointClient.NewListPager method.

type EndpointClientListResponse added in v0.2.0

type EndpointClientListResponse struct {
	// A list of DigitalTwinsInstance Endpoints with a next link.
	EndpointResourceListResult
}

EndpointClientListResponse contains the response from method EndpointClient.NewListPager.

type EndpointProvisioningState

type EndpointProvisioningState string

EndpointProvisioningState - The provisioning state.

const (
	EndpointProvisioningStateCanceled     EndpointProvisioningState = "Canceled"
	EndpointProvisioningStateDeleted      EndpointProvisioningState = "Deleted"
	EndpointProvisioningStateDeleting     EndpointProvisioningState = "Deleting"
	EndpointProvisioningStateDisabled     EndpointProvisioningState = "Disabled"
	EndpointProvisioningStateFailed       EndpointProvisioningState = "Failed"
	EndpointProvisioningStateMoving       EndpointProvisioningState = "Moving"
	EndpointProvisioningStateProvisioning EndpointProvisioningState = "Provisioning"
	EndpointProvisioningStateRestoring    EndpointProvisioningState = "Restoring"
	EndpointProvisioningStateSucceeded    EndpointProvisioningState = "Succeeded"
	EndpointProvisioningStateSuspending   EndpointProvisioningState = "Suspending"
	EndpointProvisioningStateUpdating     EndpointProvisioningState = "Updating"
	EndpointProvisioningStateWarning      EndpointProvisioningState = "Warning"
)

func PossibleEndpointProvisioningStateValues

func PossibleEndpointProvisioningStateValues() []EndpointProvisioningState

PossibleEndpointProvisioningStateValues returns the possible values for the EndpointProvisioningState const type.

type EndpointResource added in v0.2.0

type EndpointResource struct {
	// REQUIRED; DigitalTwinsInstance endpoint resource properties.
	Properties EndpointResourcePropertiesClassification

	// READ-ONLY; The resource identifier.
	ID *string

	// READ-ONLY; Extension resource name.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The resource type.
	Type *string
}

EndpointResource - DigitalTwinsInstance endpoint resource.

func (EndpointResource) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type EndpointResource.

func (*EndpointResource) UnmarshalJSON added in v0.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EndpointResource.

type EndpointResourceListResult added in v0.2.0

type EndpointResourceListResult struct {
	// The link used to get the next page of DigitalTwinsInstance Endpoints.
	NextLink *string

	// A list of DigitalTwinsInstance Endpoints.
	Value []*EndpointResource
}

EndpointResourceListResult - A list of DigitalTwinsInstance Endpoints with a next link.

func (EndpointResourceListResult) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type EndpointResourceListResult.

func (*EndpointResourceListResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EndpointResourceListResult.

type EndpointResourceProperties added in v0.2.0

type EndpointResourceProperties struct {
	// REQUIRED; The type of Digital Twins endpoint
	EndpointType *EndpointType

	// Specifies the authentication type being used for connecting to the endpoint. Defaults to 'KeyBased'. If 'KeyBased' is selected,
	// a connection string must be specified (at least the primary connection
	// string). If 'IdentityBased' is select, the endpointUri and entityPath properties must be specified.
	AuthenticationType *AuthenticationType

	// Dead letter storage secret for key-based authentication. Will be obfuscated during read.
	DeadLetterSecret *string

	// Dead letter storage URL for identity-based authentication.
	DeadLetterURI *string

	// Managed identity properties for the endpoint.
	Identity *ManagedIdentityReference

	// READ-ONLY; Time when the Endpoint was added to DigitalTwinsInstance.
	CreatedTime *time.Time

	// READ-ONLY; The provisioning state.
	ProvisioningState *EndpointProvisioningState
}

EndpointResourceProperties - Properties related to Digital Twins Endpoint

func (*EndpointResourceProperties) GetEndpointResourceProperties added in v0.2.0

func (e *EndpointResourceProperties) GetEndpointResourceProperties() *EndpointResourceProperties

GetEndpointResourceProperties implements the EndpointResourcePropertiesClassification interface for type EndpointResourceProperties.

func (EndpointResourceProperties) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type EndpointResourceProperties.

func (*EndpointResourceProperties) UnmarshalJSON added in v0.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EndpointResourceProperties.

type EndpointResourcePropertiesClassification added in v0.2.0

type EndpointResourcePropertiesClassification interface {
	// GetEndpointResourceProperties returns the EndpointResourceProperties content of the underlying type.
	GetEndpointResourceProperties() *EndpointResourceProperties
}

EndpointResourcePropertiesClassification provides polymorphic access to related types. Call the interface's GetEndpointResourceProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *EndpointResourceProperties, *EventGrid, *EventHub, *ServiceBus

type EndpointType

type EndpointType string

EndpointType - The type of Digital Twins endpoint

const (
	EndpointTypeEventGrid  EndpointType = "EventGrid"
	EndpointTypeEventHub   EndpointType = "EventHub"
	EndpointTypeServiceBus EndpointType = "ServiceBus"
)

func PossibleEndpointTypeValues

func PossibleEndpointTypeValues() []EndpointType

PossibleEndpointTypeValues returns the possible values for the EndpointType const type.

type ErrorDefinition

type ErrorDefinition struct {
	// READ-ONLY; Service specific error code which serves as the substatus for the HTTP error code.
	Code *string

	// READ-ONLY; Internal error details.
	Details []*ErrorDefinition

	// READ-ONLY; Description of the error.
	Message *string
}

ErrorDefinition - Error definition.

func (ErrorDefinition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorDefinition.

func (*ErrorDefinition) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDefinition.

type ErrorResponse

type ErrorResponse struct {
	// Error description
	Error *ErrorDefinition
}

ErrorResponse - Error response.

func (ErrorResponse) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

type EventGrid

type EventGrid struct {
	// REQUIRED; EventGrid secondary accesskey. Will be obfuscated during read.
	AccessKey1 *string

	// REQUIRED; The type of Digital Twins endpoint
	EndpointType *EndpointType

	// REQUIRED; EventGrid Topic Endpoint.
	TopicEndpoint *string

	// EventGrid secondary accesskey. Will be obfuscated during read.
	AccessKey2 *string

	// Specifies the authentication type being used for connecting to the endpoint. Defaults to 'KeyBased'. If 'KeyBased' is selected,
	// a connection string must be specified (at least the primary connection
	// string). If 'IdentityBased' is select, the endpointUri and entityPath properties must be specified.
	AuthenticationType *AuthenticationType

	// Dead letter storage secret for key-based authentication. Will be obfuscated during read.
	DeadLetterSecret *string

	// Dead letter storage URL for identity-based authentication.
	DeadLetterURI *string

	// Managed identity properties for the endpoint.
	Identity *ManagedIdentityReference

	// READ-ONLY; Time when the Endpoint was added to DigitalTwinsInstance.
	CreatedTime *time.Time

	// READ-ONLY; The provisioning state.
	ProvisioningState *EndpointProvisioningState
}

EventGrid - Properties related to EventGrid.

func (*EventGrid) GetEndpointResourceProperties added in v0.2.0

func (e *EventGrid) GetEndpointResourceProperties() *EndpointResourceProperties

GetEndpointResourceProperties implements the EndpointResourcePropertiesClassification interface for type EventGrid.

func (EventGrid) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EventGrid.

func (*EventGrid) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EventGrid.

type EventHub

type EventHub struct {
	// REQUIRED; The type of Digital Twins endpoint
	EndpointType *EndpointType

	// Specifies the authentication type being used for connecting to the endpoint. Defaults to 'KeyBased'. If 'KeyBased' is selected,
	// a connection string must be specified (at least the primary connection
	// string). If 'IdentityBased' is select, the endpointUri and entityPath properties must be specified.
	AuthenticationType *AuthenticationType

	// PrimaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read.
	ConnectionStringPrimaryKey *string

	// SecondaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read.
	ConnectionStringSecondaryKey *string

	// Dead letter storage secret for key-based authentication. Will be obfuscated during read.
	DeadLetterSecret *string

	// Dead letter storage URL for identity-based authentication.
	DeadLetterURI *string

	// The URL of the EventHub namespace for identity-based authentication. It must include the protocol 'sb://'.
	EndpointURI *string

	// The EventHub name in the EventHub namespace for identity-based authentication.
	EntityPath *string

	// Managed identity properties for the endpoint.
	Identity *ManagedIdentityReference

	// READ-ONLY; Time when the Endpoint was added to DigitalTwinsInstance.
	CreatedTime *time.Time

	// READ-ONLY; The provisioning state.
	ProvisioningState *EndpointProvisioningState
}

EventHub - Properties related to EventHub.

func (*EventHub) GetEndpointResourceProperties added in v0.2.0

func (e *EventHub) GetEndpointResourceProperties() *EndpointResourceProperties

GetEndpointResourceProperties implements the EndpointResourcePropertiesClassification interface for type EventHub.

func (EventHub) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EventHub.

func (*EventHub) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EventHub.

type ExternalResource

type ExternalResource struct {
	// READ-ONLY; The resource identifier.
	ID *string

	// READ-ONLY; Extension resource name.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The resource type.
	Type *string
}

ExternalResource - Definition of a resource.

func (ExternalResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ExternalResource.

func (*ExternalResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ExternalResource.

type GroupIDInformation

type GroupIDInformation struct {
	// REQUIRED; The group information properties.
	Properties *GroupIDInformationProperties

	// The resource identifier.
	ID *string

	// READ-ONLY; The resource name.
	Name *string

	// READ-ONLY; The resource type.
	Type *string
}

GroupIDInformation - The group information for creating a private endpoint on Digital Twin.

func (GroupIDInformation) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type GroupIDInformation.

func (*GroupIDInformation) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type GroupIDInformation.

type GroupIDInformationProperties

type GroupIDInformationProperties struct {
	// The group id.
	GroupID *string

	// The required members for a specific group id.
	RequiredMembers []*string

	// The required DNS zones for a specific group id.
	RequiredZoneNames []*string
}

GroupIDInformationProperties - The properties for a group information object.

func (GroupIDInformationProperties) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type GroupIDInformationProperties.

func (*GroupIDInformationProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type GroupIDInformationProperties.

type GroupIDInformationResponse

type GroupIDInformationResponse struct {
	// The list of available private link resources for a Digital Twin.
	Value []*GroupIDInformation
}

GroupIDInformationResponse - The available private link resources for a Digital Twin.

func (GroupIDInformationResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GroupIDInformationResponse.

func (*GroupIDInformationResponse) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type GroupIDInformationResponse.

type Identity added in v0.2.0

type Identity struct {
	// The type of Managed Identity used by the DigitalTwinsInstance.
	Type *DigitalTwinsIdentityType

	// The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource
	// ids in the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
	// .
	UserAssignedIdentities map[string]*UserAssignedIdentity

	// READ-ONLY; The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-identity-principal-id
	// header in the PUT request if the resource has a systemAssigned(implicit)
	// identity
	PrincipalID *string

	// READ-ONLY; The tenant id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-client-tenant-id
	// header in the PUT request if the resource has a systemAssigned(implicit) identity
	TenantID *string
}

Identity - The managed identity for the DigitalTwinsInstance.

func (Identity) MarshalJSON added in v1.1.0

func (i Identity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Identity.

func (*Identity) UnmarshalJSON added in v1.1.0

func (i *Identity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Identity.

type IdentityType added in v1.1.0

type IdentityType string

IdentityType - The type of managed identity used.

const (
	IdentityTypeSystemAssigned IdentityType = "SystemAssigned"
	IdentityTypeUserAssigned   IdentityType = "UserAssigned"
)

func PossibleIdentityTypeValues added in v1.1.0

func PossibleIdentityTypeValues() []IdentityType

PossibleIdentityTypeValues returns the possible values for the IdentityType const type.

type ManagedIdentityReference added in v1.1.0

type ManagedIdentityReference struct {
	// The type of managed identity used.
	Type *IdentityType

	// The user identity ARM resource id if the managed identity type is 'UserAssigned'.
	UserAssignedIdentity *string
}

ManagedIdentityReference - The properties of the Managed Identity.

func (ManagedIdentityReference) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ManagedIdentityReference.

func (*ManagedIdentityReference) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentityReference.

type Operation

type Operation struct {
	// Operation properties display
	Display *OperationDisplay

	// READ-ONLY; If the operation is a data action (for data plane rbac).
	IsDataAction *bool

	// READ-ONLY; Operation name: {provider}/{resource}/{read | write | action | delete}
	Name *string

	// READ-ONLY; The intended executor of the operation.
	Origin *string

	// READ-ONLY; Operation properties.
	Properties map[string]any
}

Operation - DigitalTwins service REST API operation

func (Operation) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; Friendly description for the operation.
	Description *string

	// READ-ONLY; Name of the operation.
	Operation *string

	// READ-ONLY; Service provider: Microsoft DigitalTwins.
	Provider *string

	// READ-ONLY; Resource Type: DigitalTwinsInstances.
	Resource *string
}

OperationDisplay - The object that represents the operation.

func (OperationDisplay) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

type OperationListResult struct {
	// The link used to get the next page of DigitalTwins description objects.
	NextLink *string

	// READ-ONLY; A list of DigitalTwins operations supported by the Microsoft.DigitalTwins resource provider.
	Value []*Operation
}

OperationListResult - A list of DigitalTwins service operations. It contains a list of operations and a 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 added in v1.1.0

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

NewListPager - Lists all of the available DigitalTwins service REST API operations.

Generated from API version 2023-01-31

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

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/DigitalTwinsOperationsList_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", 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.OperationListResult = armdigitaltwins.OperationListResult{
		// 	Value: []*armdigitaltwins.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.DigitalTwins/models/read"),
		// 			Display: &armdigitaltwins.OperationDisplay{
		// 				Description: to.Ptr("Read any Model"),
		// 				Operation: to.Ptr("Read Model"),
		// 				Provider: to.Ptr("Azure Digital Twins"),
		// 				Resource: to.Ptr("Model"),
		// 			},
		// 			IsDataAction: to.Ptr(true),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances/write"),
		// 			Display: &armdigitaltwins.OperationDisplay{
		// 				Description: to.Ptr("Create or update a Digital Twins Service instance."),
		// 				Operation: to.Ptr("Create or update a Digital Twins Service instance."),
		// 				Provider: to.Ptr("Microsoft.DigitalTwins"),
		// 				Resource: to.Ptr("digitalTwinsInstances"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances/read"),
		// 			Display: &armdigitaltwins.OperationDisplay{
		// 				Description: to.Ptr("Get a Digital Twins Service instance."),
		// 				Operation: to.Ptr("Get a Digital Twins Service instance."),
		// 				Provider: to.Ptr("Microsoft.DigitalTwins"),
		// 				Resource: to.Ptr("digitalTwinsInstances"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances/delete"),
		// 			Display: &armdigitaltwins.OperationDisplay{
		// 				Description: to.Ptr("Delete a Digital Twins Service instance."),
		// 				Operation: to.Ptr("Delete a Digital Twins Service instance."),
		// 				Provider: to.Ptr("Microsoft.DigitalTwins"),
		// 				Resource: to.Ptr("digitalTwinsInstances"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions added in v0.2.0

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse added in v0.2.0

type OperationsClientListResponse struct {
	// A list of DigitalTwins service operations. It contains a list of operations and a URL link to get the next set of results.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type PatchDescription added in v0.2.0

type PatchDescription struct {
	// The managed identity for the DigitalTwinsInstance.
	Identity *Identity

	// Properties for the DigitalTwinsInstance.
	Properties *PatchProperties

	// Instance patch properties
	Tags map[string]*string
}

PatchDescription - The description of the DigitalTwins service.

func (PatchDescription) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type PatchDescription.

func (*PatchDescription) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PatchDescription.

type PatchProperties added in v0.2.0

type PatchProperties struct {
	// Public network access for the DigitalTwinsInstance.
	PublicNetworkAccess *PublicNetworkAccess
}

PatchProperties - The properties of a DigitalTwinsInstance.

func (PatchProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type PatchProperties.

func (*PatchProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PatchProperties.

type PrivateEndpoint

type PrivateEndpoint struct {
	// READ-ONLY; The resource identifier.
	ID *string
}

PrivateEndpoint - The private endpoint property of a private endpoint connection.

func (PrivateEndpoint) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint.

func (*PrivateEndpoint) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint.

type PrivateEndpointConnection

type PrivateEndpointConnection struct {
	// REQUIRED; The connection properties.
	Properties *ConnectionProperties

	// READ-ONLY; The resource identifier.
	ID *string

	// READ-ONLY; The resource name.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the private endpoint connection.
	SystemData *SystemData

	// READ-ONLY; The resource type.
	Type *string
}

PrivateEndpointConnection - The private endpoint connection of a Digital Twin.

func (PrivateEndpointConnection) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.

func (*PrivateEndpointConnection) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.

type PrivateEndpointConnectionsClient

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

PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead.

func NewPrivateEndpointConnectionsClient

func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error)

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values.

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

func (*PrivateEndpointConnectionsClient) BeginCreateOrUpdate

func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, privateEndpointConnection PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateEndpointConnectionsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Update the status of a private endpoint connection with the given name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group that contains the DigitalTwinsInstance.
  • resourceName - The name of the DigitalTwinsInstance.
  • privateEndpointConnectionName - The name of the private endpoint connection.
  • privateEndpointConnection - The private endpoint connection with updated properties.
  • options - PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/PrivateEndpointConnectionPut_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginCreateOrUpdate(ctx, "resRg", "myDigitalTwinsService", "myPrivateConnection", armdigitaltwins.PrivateEndpointConnection{
		Properties: &armdigitaltwins.ConnectionProperties{
			PrivateLinkServiceConnectionState: &armdigitaltwins.ConnectionPropertiesPrivateLinkServiceConnectionState{
				Description: to.Ptr("Approved by johndoe@company.com."),
				Status:      to.Ptr(armdigitaltwins.PrivateLinkServiceConnectionStatusApproved),
			},
		},
	}, 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.PrivateEndpointConnection = armdigitaltwins.PrivateEndpointConnection{
	// 	Name: to.Ptr("myPrivateConnection"),
	// 	Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances/privateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/privateEndpointConnections/myPrivateConnection"),
	// 	Properties: &armdigitaltwins.ConnectionProperties{
	// 		GroupIDs: []*string{
	// 			to.Ptr("digitalTwinsInstance")},
	// 			PrivateEndpoint: &armdigitaltwins.PrivateEndpoint{
	// 				ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourceGroups/resRg/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"),
	// 			},
	// 			PrivateLinkServiceConnectionState: &armdigitaltwins.ConnectionPropertiesPrivateLinkServiceConnectionState{
	// 				Description: to.Ptr("Approved by johndoe@company.com."),
	// 				Status: to.Ptr(armdigitaltwins.PrivateLinkServiceConnectionStatusApproved),
	// 			},
	// 			ProvisioningState: to.Ptr(armdigitaltwins.ConnectionPropertiesProvisioningState("Succeeded")),
	// 		},
	// 	}
}
Output:

func (*PrivateEndpointConnectionsClient) BeginDelete

func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)

BeginDelete - Delete private endpoint connection with the specified name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group that contains the DigitalTwinsInstance.
  • resourceName - The name of the DigitalTwinsInstance.
  • privateEndpointConnectionName - The name of the private endpoint connection.
  • options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/PrivateEndpointConnectionDelete_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginDelete(ctx, "resRg", "myDigitalTwinsService", "myPrivateConnection", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*PrivateEndpointConnectionsClient) Get

func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error)

Get - Get private endpoint connection properties for the given private endpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group that contains the DigitalTwinsInstance.
  • resourceName - The name of the DigitalTwinsInstance.
  • privateEndpointConnectionName - The name of the private endpoint connection.
  • options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/PrivateEndpointConnectionByConnectionName_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "resRg", "myDigitalTwinsService", "myPrivateConnection", 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.PrivateEndpointConnection = armdigitaltwins.PrivateEndpointConnection{
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/privateEndpointConnections/myPrivateConnection"),
	// 	Properties: &armdigitaltwins.ConnectionProperties{
	// 		GroupIDs: []*string{
	// 			to.Ptr("digitalTwinsInstance")},
	// 			PrivateEndpoint: &armdigitaltwins.PrivateEndpoint{
	// 				ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourceGroups/resRg/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"),
	// 			},
	// 			PrivateLinkServiceConnectionState: &armdigitaltwins.ConnectionPropertiesPrivateLinkServiceConnectionState{
	// 				Description: to.Ptr("Please approve my request, thanks."),
	// 				ActionsRequired: to.Ptr("None"),
	// 				Status: to.Ptr(armdigitaltwins.PrivateLinkServiceConnectionStatusPending),
	// 			},
	// 		},
	// 	}
}
Output:

func (*PrivateEndpointConnectionsClient) List

List - List private endpoint connection properties. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group that contains the DigitalTwinsInstance.
  • resourceName - The name of the DigitalTwinsInstance.
  • options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/PrivateEndpointConnectionsList_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateEndpointConnectionsClient().List(ctx, "resRg", "myDigitalTwinsService", 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.PrivateEndpointConnectionsResponse = armdigitaltwins.PrivateEndpointConnectionsResponse{
	// 	Value: []*armdigitaltwins.PrivateEndpointConnection{
	// 		{
	// 			ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/privateEndpointConnections/myPrivateConnection"),
	// 			Properties: &armdigitaltwins.ConnectionProperties{
	// 				GroupIDs: []*string{
	// 					to.Ptr("digitalTwinsInstance")},
	// 					PrivateEndpoint: &armdigitaltwins.PrivateEndpoint{
	// 						ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourceGroups/resRg/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"),
	// 					},
	// 					PrivateLinkServiceConnectionState: &armdigitaltwins.ConnectionPropertiesPrivateLinkServiceConnectionState{
	// 						Description: to.Ptr("Please approve my request, thanks."),
	// 						ActionsRequired: to.Ptr("None"),
	// 						Status: to.Ptr(armdigitaltwins.PrivateLinkServiceConnectionStatusPending),
	// 					},
	// 				},
	// 		}},
	// 	}
}
Output:

type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions added in v0.2.0

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

PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate method.

type PrivateEndpointConnectionsClientBeginDeleteOptions added in v0.2.0

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

PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.

type PrivateEndpointConnectionsClientCreateOrUpdateResponse added in v0.2.0

type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct {
	// The private endpoint connection of a Digital Twin.
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.BeginCreateOrUpdate.

type PrivateEndpointConnectionsClientDeleteResponse added in v0.2.0

type PrivateEndpointConnectionsClientDeleteResponse struct {
}

PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete.

type PrivateEndpointConnectionsClientGetOptions added in v0.2.0

type PrivateEndpointConnectionsClientGetOptions struct {
}

PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.

type PrivateEndpointConnectionsClientGetResponse added in v0.2.0

type PrivateEndpointConnectionsClientGetResponse struct {
	// The private endpoint connection of a Digital Twin.
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.

type PrivateEndpointConnectionsClientListOptions added in v0.2.0

type PrivateEndpointConnectionsClientListOptions struct {
}

PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List method.

type PrivateEndpointConnectionsClientListResponse added in v0.2.0

type PrivateEndpointConnectionsClientListResponse struct {
	// The available private link connections for a Digital Twin.
	PrivateEndpointConnectionsResponse
}

PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.List.

type PrivateEndpointConnectionsResponse

type PrivateEndpointConnectionsResponse struct {
	// The list of available private link connections for a Digital Twin.
	Value []*PrivateEndpointConnection
}

PrivateEndpointConnectionsResponse - The available private link connections for a Digital Twin.

func (PrivateEndpointConnectionsResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionsResponse.

func (*PrivateEndpointConnectionsResponse) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionsResponse.

type PrivateLinkResourcesClient

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

PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. Don't use this type directly, use NewPrivateLinkResourcesClient() instead.

func NewPrivateLinkResourcesClient

func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error)

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values.

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

func (*PrivateLinkResourcesClient) Get

func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, resourceID string, options *PrivateLinkResourcesClientGetOptions) (PrivateLinkResourcesClientGetResponse, error)

Get - Get the specified private link resource for the given Digital Twin. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group that contains the DigitalTwinsInstance.
  • resourceName - The name of the DigitalTwinsInstance.
  • resourceID - The name of the private link resource.
  • options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/PrivateLinkResourcesByGroupId_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateLinkResourcesClient().Get(ctx, "resRg", "myDigitalTwinsService", "subResource", 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.GroupIDInformation = armdigitaltwins.GroupIDInformation{
	// 	Name: to.Ptr("myDigitalTwinsService"),
	// 	Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances/privateLinkResources"),
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/privateLinkResources/myDigitalTwinsService"),
	// 	Properties: &armdigitaltwins.GroupIDInformationProperties{
	// 		GroupID: to.Ptr("digitalTwinsInstance"),
	// 		RequiredMembers: []*string{
	// 			to.Ptr("myDigitalTwinsService")},
	// 			RequiredZoneNames: []*string{
	// 				to.Ptr("privatelink.api.wus2.digitaltwins.azure.net")},
	// 			},
	// 		}
}
Output:

func (*PrivateLinkResourcesClient) List

List - List private link resources for given Digital Twin. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group that contains the DigitalTwinsInstance.
  • resourceName - The name of the DigitalTwinsInstance.
  • options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/PrivateLinkResourcesList_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateLinkResourcesClient().List(ctx, "resRg", "myDigitalTwinsService", 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.GroupIDInformationResponse = armdigitaltwins.GroupIDInformationResponse{
	// 	Value: []*armdigitaltwins.GroupIDInformation{
	// 		{
	// 			Name: to.Ptr("myDigitalTwinsService"),
	// 			Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances/privateLinkResources"),
	// 			ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/privateLinkResources/myDigitalTwinsService"),
	// 			Properties: &armdigitaltwins.GroupIDInformationProperties{
	// 				GroupID: to.Ptr("digitalTwinsInstance"),
	// 				RequiredMembers: []*string{
	// 					to.Ptr("myDigitalTwinsService")},
	// 					RequiredZoneNames: []*string{
	// 						to.Ptr("privatelink.api.wus2.digitaltwins.azure.net")},
	// 					},
	// 			}},
	// 		}
}
Output:

type PrivateLinkResourcesClientGetOptions added in v0.2.0

type PrivateLinkResourcesClientGetOptions struct {
}

PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.

type PrivateLinkResourcesClientGetResponse added in v0.2.0

type PrivateLinkResourcesClientGetResponse struct {
	// The group information for creating a private endpoint on Digital Twin.
	GroupIDInformation
}

PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get.

type PrivateLinkResourcesClientListOptions added in v0.2.0

type PrivateLinkResourcesClientListOptions struct {
}

PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method.

type PrivateLinkResourcesClientListResponse added in v0.2.0

type PrivateLinkResourcesClientListResponse struct {
	// The available private link resources for a Digital Twin.
	GroupIDInformationResponse
}

PrivateLinkResourcesClientListResponse contains the response from method PrivateLinkResourcesClient.List.

type PrivateLinkServiceConnectionStatus

type PrivateLinkServiceConnectionStatus string

PrivateLinkServiceConnectionStatus - The status of a private endpoint connection.

const (
	PrivateLinkServiceConnectionStatusApproved     PrivateLinkServiceConnectionStatus = "Approved"
	PrivateLinkServiceConnectionStatusDisconnected PrivateLinkServiceConnectionStatus = "Disconnected"
	PrivateLinkServiceConnectionStatusPending      PrivateLinkServiceConnectionStatus = "Pending"
	PrivateLinkServiceConnectionStatusRejected     PrivateLinkServiceConnectionStatus = "Rejected"
)

func PossiblePrivateLinkServiceConnectionStatusValues

func PossiblePrivateLinkServiceConnectionStatusValues() []PrivateLinkServiceConnectionStatus

PossiblePrivateLinkServiceConnectionStatusValues returns the possible values for the PrivateLinkServiceConnectionStatus const type.

type Properties added in v0.2.0

type Properties struct {
	// The private endpoint connections.
	PrivateEndpointConnections []*PrivateEndpointConnection

	// Public network access for the DigitalTwinsInstance.
	PublicNetworkAccess *PublicNetworkAccess

	// READ-ONLY; Time when DigitalTwinsInstance was created.
	CreatedTime *time.Time

	// READ-ONLY; Api endpoint to work with DigitalTwinsInstance.
	HostName *string

	// READ-ONLY; Time when DigitalTwinsInstance was updated.
	LastUpdatedTime *time.Time

	// READ-ONLY; The provisioning state.
	ProvisioningState *ProvisioningState
}

Properties - The properties of a DigitalTwinsInstance.

func (Properties) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type Properties.

func (*Properties) UnmarshalJSON added in v0.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Properties.

type ProvisioningState

type ProvisioningState string

ProvisioningState - The provisioning state.

const (
	ProvisioningStateCanceled     ProvisioningState = "Canceled"
	ProvisioningStateDeleted      ProvisioningState = "Deleted"
	ProvisioningStateDeleting     ProvisioningState = "Deleting"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateMoving       ProvisioningState = "Moving"
	ProvisioningStateProvisioning ProvisioningState = "Provisioning"
	ProvisioningStateRestoring    ProvisioningState = "Restoring"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
	ProvisioningStateSuspending   ProvisioningState = "Suspending"
	ProvisioningStateUpdating     ProvisioningState = "Updating"
	ProvisioningStateWarning      ProvisioningState = "Warning"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type PublicNetworkAccess

type PublicNetworkAccess string

PublicNetworkAccess - Public network access for the DigitalTwinsInstance.

const (
	PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled"
	PublicNetworkAccessEnabled  PublicNetworkAccess = "Enabled"
)

func PossiblePublicNetworkAccessValues

func PossiblePublicNetworkAccessValues() []PublicNetworkAccess

PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type.

type Reason

type Reason string

Reason - Message providing the reason why the given name is invalid.

const (
	ReasonAlreadyExists Reason = "AlreadyExists"
	ReasonInvalid       Reason = "Invalid"
)

func PossibleReasonValues

func PossibleReasonValues() []Reason

PossibleReasonValues returns the possible values for the Reason const type.

type RecordPropertyAndItemRemovals added in v1.1.0

type RecordPropertyAndItemRemovals string

RecordPropertyAndItemRemovals - Specifies whether or not to record twin / relationship property and item removals, including removals of indexed or keyed values (such as map entries, array elements, etc.). This feature is de-activated unless explicitly set to 'true'. Setting this property to 'true' will generate an additional column in the property events table in ADX.

const (
	RecordPropertyAndItemRemovalsFalse RecordPropertyAndItemRemovals = "false"
	RecordPropertyAndItemRemovalsTrue  RecordPropertyAndItemRemovals = "true"
)

func PossibleRecordPropertyAndItemRemovalsValues added in v1.1.0

func PossibleRecordPropertyAndItemRemovalsValues() []RecordPropertyAndItemRemovals

PossibleRecordPropertyAndItemRemovalsValues returns the possible values for the RecordPropertyAndItemRemovals const type.

type Resource added in v0.2.0

type Resource struct {
	// REQUIRED; The resource location.
	Location *string

	// The managed identity for the DigitalTwinsInstance.
	Identity *Identity

	// The resource tags.
	Tags map[string]*string

	// READ-ONLY; The resource identifier.
	ID *string

	// READ-ONLY; The resource name.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the DigitalTwinsInstance.
	SystemData *SystemData

	// READ-ONLY; The resource type.
	Type *string
}

Resource - The common properties of a DigitalTwinsInstance.

func (Resource) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type ServiceBus

type ServiceBus struct {
	// REQUIRED; The type of Digital Twins endpoint
	EndpointType *EndpointType

	// Specifies the authentication type being used for connecting to the endpoint. Defaults to 'KeyBased'. If 'KeyBased' is selected,
	// a connection string must be specified (at least the primary connection
	// string). If 'IdentityBased' is select, the endpointUri and entityPath properties must be specified.
	AuthenticationType *AuthenticationType

	// Dead letter storage secret for key-based authentication. Will be obfuscated during read.
	DeadLetterSecret *string

	// Dead letter storage URL for identity-based authentication.
	DeadLetterURI *string

	// The URL of the ServiceBus namespace for identity-based authentication. It must include the protocol 'sb://'.
	EndpointURI *string

	// The ServiceBus Topic name for identity-based authentication.
	EntityPath *string

	// Managed identity properties for the endpoint.
	Identity *ManagedIdentityReference

	// PrimaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read.
	PrimaryConnectionString *string

	// SecondaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read.
	SecondaryConnectionString *string

	// READ-ONLY; Time when the Endpoint was added to DigitalTwinsInstance.
	CreatedTime *time.Time

	// READ-ONLY; The provisioning state.
	ProvisioningState *EndpointProvisioningState
}

ServiceBus - Properties related to ServiceBus.

func (*ServiceBus) GetEndpointResourceProperties added in v0.2.0

func (s *ServiceBus) GetEndpointResourceProperties() *EndpointResourceProperties

GetEndpointResourceProperties implements the EndpointResourcePropertiesClassification interface for type ServiceBus.

func (ServiceBus) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServiceBus.

func (*ServiceBus) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceBus.

type SystemData added in v0.3.0

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

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

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

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

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

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

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

func (SystemData) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TimeSeriesDatabaseConnection added in v0.3.0

type TimeSeriesDatabaseConnection struct {
	// Properties of a specific time series database connection.
	Properties TimeSeriesDatabaseConnectionPropertiesClassification

	// READ-ONLY; The resource identifier.
	ID *string

	// READ-ONLY; Extension resource name.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The resource type.
	Type *string
}

TimeSeriesDatabaseConnection - Describes a time series database connection resource.

func (TimeSeriesDatabaseConnection) MarshalJSON added in v0.3.0

func (t TimeSeriesDatabaseConnection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TimeSeriesDatabaseConnection.

func (*TimeSeriesDatabaseConnection) UnmarshalJSON added in v0.3.0

func (t *TimeSeriesDatabaseConnection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TimeSeriesDatabaseConnection.

type TimeSeriesDatabaseConnectionListResult added in v0.3.0

type TimeSeriesDatabaseConnectionListResult struct {
	// The link used to get the next page of results.
	NextLink *string

	// A list of time series database connection resources.
	Value []*TimeSeriesDatabaseConnection
}

TimeSeriesDatabaseConnectionListResult - A pageable list of time series database connection resources.

func (TimeSeriesDatabaseConnectionListResult) MarshalJSON added in v0.3.0

func (t TimeSeriesDatabaseConnectionListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TimeSeriesDatabaseConnectionListResult.

func (*TimeSeriesDatabaseConnectionListResult) UnmarshalJSON added in v1.1.0

func (t *TimeSeriesDatabaseConnectionListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TimeSeriesDatabaseConnectionListResult.

type TimeSeriesDatabaseConnectionProperties added in v0.3.0

type TimeSeriesDatabaseConnectionProperties struct {
	// REQUIRED; The type of time series connection resource.
	ConnectionType *ConnectionType

	// Managed identity properties for the time series database connection resource.
	Identity *ManagedIdentityReference

	// READ-ONLY; The provisioning state.
	ProvisioningState *TimeSeriesDatabaseConnectionState
}

TimeSeriesDatabaseConnectionProperties - Properties of a time series database connection resource.

func (*TimeSeriesDatabaseConnectionProperties) GetTimeSeriesDatabaseConnectionProperties added in v0.3.0

func (t *TimeSeriesDatabaseConnectionProperties) GetTimeSeriesDatabaseConnectionProperties() *TimeSeriesDatabaseConnectionProperties

GetTimeSeriesDatabaseConnectionProperties implements the TimeSeriesDatabaseConnectionPropertiesClassification interface for type TimeSeriesDatabaseConnectionProperties.

func (TimeSeriesDatabaseConnectionProperties) MarshalJSON added in v1.1.0

func (t TimeSeriesDatabaseConnectionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TimeSeriesDatabaseConnectionProperties.

func (*TimeSeriesDatabaseConnectionProperties) UnmarshalJSON added in v1.1.0

func (t *TimeSeriesDatabaseConnectionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TimeSeriesDatabaseConnectionProperties.

type TimeSeriesDatabaseConnectionPropertiesClassification added in v0.3.0

type TimeSeriesDatabaseConnectionPropertiesClassification interface {
	// GetTimeSeriesDatabaseConnectionProperties returns the TimeSeriesDatabaseConnectionProperties content of the underlying type.
	GetTimeSeriesDatabaseConnectionProperties() *TimeSeriesDatabaseConnectionProperties
}

TimeSeriesDatabaseConnectionPropertiesClassification provides polymorphic access to related types. Call the interface's GetTimeSeriesDatabaseConnectionProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AzureDataExplorerConnectionProperties, *TimeSeriesDatabaseConnectionProperties

type TimeSeriesDatabaseConnectionState added in v0.3.0

type TimeSeriesDatabaseConnectionState string

TimeSeriesDatabaseConnectionState - The provisioning state.

const (
	TimeSeriesDatabaseConnectionStateCanceled     TimeSeriesDatabaseConnectionState = "Canceled"
	TimeSeriesDatabaseConnectionStateDeleted      TimeSeriesDatabaseConnectionState = "Deleted"
	TimeSeriesDatabaseConnectionStateDeleting     TimeSeriesDatabaseConnectionState = "Deleting"
	TimeSeriesDatabaseConnectionStateDisabled     TimeSeriesDatabaseConnectionState = "Disabled"
	TimeSeriesDatabaseConnectionStateFailed       TimeSeriesDatabaseConnectionState = "Failed"
	TimeSeriesDatabaseConnectionStateMoving       TimeSeriesDatabaseConnectionState = "Moving"
	TimeSeriesDatabaseConnectionStateProvisioning TimeSeriesDatabaseConnectionState = "Provisioning"
	TimeSeriesDatabaseConnectionStateRestoring    TimeSeriesDatabaseConnectionState = "Restoring"
	TimeSeriesDatabaseConnectionStateSucceeded    TimeSeriesDatabaseConnectionState = "Succeeded"
	TimeSeriesDatabaseConnectionStateSuspending   TimeSeriesDatabaseConnectionState = "Suspending"
	TimeSeriesDatabaseConnectionStateUpdating     TimeSeriesDatabaseConnectionState = "Updating"
	TimeSeriesDatabaseConnectionStateWarning      TimeSeriesDatabaseConnectionState = "Warning"
)

func PossibleTimeSeriesDatabaseConnectionStateValues added in v0.3.0

func PossibleTimeSeriesDatabaseConnectionStateValues() []TimeSeriesDatabaseConnectionState

PossibleTimeSeriesDatabaseConnectionStateValues returns the possible values for the TimeSeriesDatabaseConnectionState const type.

type TimeSeriesDatabaseConnectionsClient added in v0.3.0

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

TimeSeriesDatabaseConnectionsClient contains the methods for the TimeSeriesDatabaseConnections group. Don't use this type directly, use NewTimeSeriesDatabaseConnectionsClient() instead.

func NewTimeSeriesDatabaseConnectionsClient added in v0.3.0

func NewTimeSeriesDatabaseConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TimeSeriesDatabaseConnectionsClient, error)

NewTimeSeriesDatabaseConnectionsClient creates a new instance of TimeSeriesDatabaseConnectionsClient with the specified values.

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

func (*TimeSeriesDatabaseConnectionsClient) BeginCreateOrUpdate added in v0.3.0

func (client *TimeSeriesDatabaseConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, timeSeriesDatabaseConnectionName string, timeSeriesDatabaseConnectionDescription TimeSeriesDatabaseConnection, options *TimeSeriesDatabaseConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[TimeSeriesDatabaseConnectionsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a time series database connection. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group that contains the DigitalTwinsInstance.
  • resourceName - The name of the DigitalTwinsInstance.
  • timeSeriesDatabaseConnectionName - Name of time series database connection.
  • timeSeriesDatabaseConnectionDescription - The time series database connection description.
  • options - TimeSeriesDatabaseConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the TimeSeriesDatabaseConnectionsClient.BeginCreateOrUpdate method.
Example (CreateOrReplaceATimeSeriesDatabaseConnectionForADigitalTwinsInstance)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/TimeSeriesDatabaseConnectionsPut_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewTimeSeriesDatabaseConnectionsClient().BeginCreateOrUpdate(ctx, "resRg", "myDigitalTwinsService", "myConnection", armdigitaltwins.TimeSeriesDatabaseConnection{
		Properties: &armdigitaltwins.AzureDataExplorerConnectionProperties{
			ConnectionType:                          to.Ptr(armdigitaltwins.ConnectionTypeAzureDataExplorer),
			AdxDatabaseName:                         to.Ptr("myDatabase"),
			AdxEndpointURI:                          to.Ptr("https://mycluster.kusto.windows.net"),
			AdxRelationshipLifecycleEventsTableName: to.Ptr("myRelationshipLifecycleEventsTable"),
			AdxResourceID:                           to.Ptr("/subscriptions/c493073e-2460-45ba-a403-f3e0df1e9feg/resourceGroups/testrg/providers/Microsoft.Kusto/clusters/mycluster"),
			AdxTableName:                            to.Ptr("myPropertyUpdatesTable"),
			AdxTwinLifecycleEventsTableName:         to.Ptr("myTwinLifecycleEventsTable"),
			EventHubEndpointURI:                     to.Ptr("sb://myeh.servicebus.windows.net/"),
			EventHubEntityPath:                      to.Ptr("myeh"),
			EventHubNamespaceResourceID:             to.Ptr("/subscriptions/c493073e-2460-45ba-a403-f3e0df1e9feg/resourceGroups/testrg/providers/Microsoft.EventHub/namespaces/myeh"),
			RecordPropertyAndItemRemovals:           to.Ptr(armdigitaltwins.RecordPropertyAndItemRemovalsTrue),
		},
	}, 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.TimeSeriesDatabaseConnection = armdigitaltwins.TimeSeriesDatabaseConnection{
	// 	Name: to.Ptr("myConnection"),
	// 	Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances/timeSeriesDatabaseConnections"),
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/timeSeriesDatabaseConnections/myConnection"),
	// 	Properties: &armdigitaltwins.AzureDataExplorerConnectionProperties{
	// 		ConnectionType: to.Ptr(armdigitaltwins.ConnectionTypeAzureDataExplorer),
	// 		ProvisioningState: to.Ptr(armdigitaltwins.TimeSeriesDatabaseConnectionStateSucceeded),
	// 		AdxDatabaseName: to.Ptr("myDatabase"),
	// 		AdxEndpointURI: to.Ptr("https://mycluster.kusto.windows.net"),
	// 		AdxRelationshipLifecycleEventsTableName: to.Ptr("myRelationshipLifecycleEventsTable"),
	// 		AdxResourceID: to.Ptr("/subscriptions/c493073e-2460-45ba-a403-f3e0df1e9feg/resourceGroups/testrg/providers/Microsoft.Kusto/clusters/mycluster"),
	// 		AdxTableName: to.Ptr("myPropertyUpdatesTable"),
	// 		AdxTwinLifecycleEventsTableName: to.Ptr("myTwinLifecycleEventsTable"),
	// 		EventHubConsumerGroup: to.Ptr("$Default"),
	// 		EventHubEndpointURI: to.Ptr("sb://myeh.servicebus.windows.net/"),
	// 		EventHubEntityPath: to.Ptr("myeh"),
	// 		EventHubNamespaceResourceID: to.Ptr("/subscriptions/c493073e-2460-45ba-a403-f3e0df1e9feg/resourceGroups/testrg/providers/Microsoft.EventHub/namespaces/myeh"),
	// 		RecordPropertyAndItemRemovals: to.Ptr(armdigitaltwins.RecordPropertyAndItemRemovalsTrue),
	// 	},
	// }
}
Output:

Example (CreateOrReplaceATimeSeriesDatabaseConnectionForADigitalTwinsInstanceWithUserAssignedIdentity)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/TimeSeriesDatabaseConnectionsPut_WithUserIdentity_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewTimeSeriesDatabaseConnectionsClient().BeginCreateOrUpdate(ctx, "resRg", "myDigitalTwinsService", "myConnection", armdigitaltwins.TimeSeriesDatabaseConnection{
		Properties: &armdigitaltwins.AzureDataExplorerConnectionProperties{
			ConnectionType: to.Ptr(armdigitaltwins.ConnectionTypeAzureDataExplorer),
			Identity: &armdigitaltwins.ManagedIdentityReference{
				Type:                 to.Ptr(armdigitaltwins.IdentityTypeUserAssigned),
				UserAssignedIdentity: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity"),
			},
			AdxDatabaseName:             to.Ptr("myDatabase"),
			AdxEndpointURI:              to.Ptr("https://mycluster.kusto.windows.net"),
			AdxResourceID:               to.Ptr("/subscriptions/c493073e-2460-45ba-a403-f3e0df1e9feg/resourceGroups/testrg/providers/Microsoft.Kusto/clusters/mycluster"),
			AdxTableName:                to.Ptr("myTable"),
			EventHubEndpointURI:         to.Ptr("sb://myeh.servicebus.windows.net/"),
			EventHubEntityPath:          to.Ptr("myeh"),
			EventHubNamespaceResourceID: to.Ptr("/subscriptions/c493073e-2460-45ba-a403-f3e0df1e9feg/resourceGroups/testrg/providers/Microsoft.EventHub/namespaces/myeh"),
		},
	}, 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.TimeSeriesDatabaseConnection = armdigitaltwins.TimeSeriesDatabaseConnection{
	// 	Name: to.Ptr("myConnection"),
	// 	Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances/timeSeriesDatabaseConnections"),
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/timeSeriesDatabaseConnections/myConnection"),
	// 	Properties: &armdigitaltwins.AzureDataExplorerConnectionProperties{
	// 		ConnectionType: to.Ptr(armdigitaltwins.ConnectionTypeAzureDataExplorer),
	// 		Identity: &armdigitaltwins.ManagedIdentityReference{
	// 			Type: to.Ptr(armdigitaltwins.IdentityTypeUserAssigned),
	// 			UserAssignedIdentity: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity"),
	// 		},
	// 		ProvisioningState: to.Ptr(armdigitaltwins.TimeSeriesDatabaseConnectionStateSucceeded),
	// 		AdxDatabaseName: to.Ptr("myDatabase"),
	// 		AdxEndpointURI: to.Ptr("https://mycluster.kusto.windows.net"),
	// 		AdxResourceID: to.Ptr("/subscriptions/c493073e-2460-45ba-a403-f3e0df1e9feg/resourceGroups/testrg/providers/Microsoft.Kusto/clusters/mycluster"),
	// 		AdxTableName: to.Ptr("myTable"),
	// 		EventHubConsumerGroup: to.Ptr("$Default"),
	// 		EventHubEndpointURI: to.Ptr("sb://myeh.servicebus.windows.net/"),
	// 		EventHubEntityPath: to.Ptr("myeh"),
	// 		EventHubNamespaceResourceID: to.Ptr("/subscriptions/c493073e-2460-45ba-a403-f3e0df1e9feg/resourceGroups/testrg/providers/Microsoft.EventHub/namespaces/myeh"),
	// 		RecordPropertyAndItemRemovals: to.Ptr(armdigitaltwins.RecordPropertyAndItemRemovalsFalse),
	// 	},
	// }
}
Output:

func (*TimeSeriesDatabaseConnectionsClient) BeginDelete added in v0.3.0

func (client *TimeSeriesDatabaseConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, timeSeriesDatabaseConnectionName string, options *TimeSeriesDatabaseConnectionsClientBeginDeleteOptions) (*runtime.Poller[TimeSeriesDatabaseConnectionsClientDeleteResponse], error)

BeginDelete - Delete a time series database connection. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group that contains the DigitalTwinsInstance.
  • resourceName - The name of the DigitalTwinsInstance.
  • timeSeriesDatabaseConnectionName - Name of time series database connection.
  • options - TimeSeriesDatabaseConnectionsClientBeginDeleteOptions contains the optional parameters for the TimeSeriesDatabaseConnectionsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/TimeSeriesDatabaseConnectionsDelete_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewTimeSeriesDatabaseConnectionsClient().BeginDelete(ctx, "resRg", "myDigitalTwinsService", "myConnection", &armdigitaltwins.TimeSeriesDatabaseConnectionsClientBeginDeleteOptions{CleanupConnectionArtifacts: 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.TimeSeriesDatabaseConnection = armdigitaltwins.TimeSeriesDatabaseConnection{
	// 	Name: to.Ptr("myConnection"),
	// 	Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances/timeSeriesDatabaseConnections"),
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/timeSeriesDatabaseConnections/myConnection"),
	// 	Properties: &armdigitaltwins.AzureDataExplorerConnectionProperties{
	// 		ConnectionType: to.Ptr(armdigitaltwins.ConnectionTypeAzureDataExplorer),
	// 		ProvisioningState: to.Ptr(armdigitaltwins.TimeSeriesDatabaseConnectionStateSucceeded),
	// 		AdxDatabaseName: to.Ptr("myDatabase"),
	// 		AdxEndpointURI: to.Ptr("https://mycluster.kusto.windows.net"),
	// 		AdxResourceID: to.Ptr("/subscriptions/c493073e-2460-45ba-a403-f3e0df1e9feg/resourceGroups/testrg/providers/Microsoft.Kusto/clusters/mycluster"),
	// 		EventHubConsumerGroup: to.Ptr("$Default"),
	// 		EventHubEndpointURI: to.Ptr("sb://myeh.servicebus.windows.net/"),
	// 		EventHubEntityPath: to.Ptr("myeh"),
	// 		EventHubNamespaceResourceID: to.Ptr("/subscriptions/c493073e-2460-45ba-a403-f3e0df1e9feg/resourceGroups/testrg/providers/Microsoft.EventHub/namespaces/myeh"),
	// 	},
	// }
}
Output:

func (*TimeSeriesDatabaseConnectionsClient) Get added in v0.3.0

func (client *TimeSeriesDatabaseConnectionsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, timeSeriesDatabaseConnectionName string, options *TimeSeriesDatabaseConnectionsClientGetOptions) (TimeSeriesDatabaseConnectionsClientGetResponse, error)

Get - Get the description of an existing time series database connection. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group that contains the DigitalTwinsInstance.
  • resourceName - The name of the DigitalTwinsInstance.
  • timeSeriesDatabaseConnectionName - Name of time series database connection.
  • options - TimeSeriesDatabaseConnectionsClientGetOptions contains the optional parameters for the TimeSeriesDatabaseConnectionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/TimeSeriesDatabaseConnectionsGet_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTimeSeriesDatabaseConnectionsClient().Get(ctx, "resRg", "myDigitalTwinsService", "myConnection", 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.TimeSeriesDatabaseConnection = armdigitaltwins.TimeSeriesDatabaseConnection{
	// 	Name: to.Ptr("myConnection"),
	// 	Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances/timeSeriesDatabaseConnections"),
	// 	ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/timeSeriesDatabaseConnections/myConnection"),
	// 	Properties: &armdigitaltwins.AzureDataExplorerConnectionProperties{
	// 		ConnectionType: to.Ptr(armdigitaltwins.ConnectionTypeAzureDataExplorer),
	// 		ProvisioningState: to.Ptr(armdigitaltwins.TimeSeriesDatabaseConnectionStateSucceeded),
	// 		AdxDatabaseName: to.Ptr("myDatabase"),
	// 		AdxEndpointURI: to.Ptr("https://mycluster.kusto.windows.net"),
	// 		AdxResourceID: to.Ptr("/subscriptions/c493073e-2460-45ba-a403-f3e0df1e9feg/resourceGroups/testrg/providers/Microsoft.Kusto/clusters/mycluster"),
	// 		AdxTableName: to.Ptr("myTable"),
	// 		EventHubConsumerGroup: to.Ptr("$Default"),
	// 		EventHubEndpointURI: to.Ptr("sb://myeh.servicebus.windows.net/"),
	// 		EventHubEntityPath: to.Ptr("myeh"),
	// 		EventHubNamespaceResourceID: to.Ptr("/subscriptions/c493073e-2460-45ba-a403-f3e0df1e9feg/resourceGroups/testrg/providers/Microsoft.EventHub/namespaces/myeh"),
	// 	},
	// }
}
Output:

func (*TimeSeriesDatabaseConnectionsClient) NewListPager added in v0.4.0

NewListPager - Get all existing time series database connections for this DigitalTwins instance.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group that contains the DigitalTwinsInstance.
  • resourceName - The name of the DigitalTwinsInstance.
  • options - TimeSeriesDatabaseConnectionsClientListOptions contains the optional parameters for the TimeSeriesDatabaseConnectionsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a60468a0c5e2beb054680ae488fb9f92699f0a0d/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2023-01-31/examples/TimeSeriesDatabaseConnectionsList_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdigitaltwins.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewTimeSeriesDatabaseConnectionsClient().NewListPager("resRg", "myDigitalTwinsService", 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.TimeSeriesDatabaseConnectionListResult = armdigitaltwins.TimeSeriesDatabaseConnectionListResult{
		// 	Value: []*armdigitaltwins.TimeSeriesDatabaseConnection{
		// 		{
		// 			Name: to.Ptr("myConnection"),
		// 			Type: to.Ptr("Microsoft.DigitalTwins/digitalTwinsInstances/timeSeriesDatabaseConnections"),
		// 			ID: to.Ptr("/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/timeSeriesDatabaseConnections/myConnection"),
		// 			Properties: &armdigitaltwins.AzureDataExplorerConnectionProperties{
		// 				ConnectionType: to.Ptr(armdigitaltwins.ConnectionTypeAzureDataExplorer),
		// 				ProvisioningState: to.Ptr(armdigitaltwins.TimeSeriesDatabaseConnectionStateSucceeded),
		// 				AdxDatabaseName: to.Ptr("myDatabase"),
		// 				AdxEndpointURI: to.Ptr("https://mycluster.kusto.windows.net"),
		// 				AdxResourceID: to.Ptr("/subscriptions/c493073e-2460-45ba-a403-f3e0df1e9feg/resourceGroups/testrg/providers/Microsoft.Kusto/clusters/mycluster"),
		// 				AdxTableName: to.Ptr("myTable"),
		// 				EventHubEndpointURI: to.Ptr("sb://myeh.servicebus.windows.net/"),
		// 				EventHubEntityPath: to.Ptr("myeh"),
		// 				EventHubNamespaceResourceID: to.Ptr("/subscriptions/c493073e-2460-45ba-a403-f3e0df1e9feg/resourceGroups/testrg/providers/Microsoft.EventHub/namespaces/myeh"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type TimeSeriesDatabaseConnectionsClientBeginCreateOrUpdateOptions added in v0.3.0

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

TimeSeriesDatabaseConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the TimeSeriesDatabaseConnectionsClient.BeginCreateOrUpdate method.

type TimeSeriesDatabaseConnectionsClientBeginDeleteOptions added in v0.3.0

type TimeSeriesDatabaseConnectionsClientBeginDeleteOptions struct {
	// Specifies whether or not to attempt to clean up artifacts that were created in order to establish a connection to the time
	// series database. This is a best-effort attempt that will fail if appropriate
	// permissions are not in place. Setting this to 'true' does not delete any recorded data.
	CleanupConnectionArtifacts *CleanupConnectionArtifacts

	// Resumes the LRO from the provided token.
	ResumeToken string
}

TimeSeriesDatabaseConnectionsClientBeginDeleteOptions contains the optional parameters for the TimeSeriesDatabaseConnectionsClient.BeginDelete method.

type TimeSeriesDatabaseConnectionsClientCreateOrUpdateResponse added in v0.3.0

type TimeSeriesDatabaseConnectionsClientCreateOrUpdateResponse struct {
	// Describes a time series database connection resource.
	TimeSeriesDatabaseConnection
}

TimeSeriesDatabaseConnectionsClientCreateOrUpdateResponse contains the response from method TimeSeriesDatabaseConnectionsClient.BeginCreateOrUpdate.

type TimeSeriesDatabaseConnectionsClientDeleteResponse added in v0.3.0

type TimeSeriesDatabaseConnectionsClientDeleteResponse struct {
	// Describes a time series database connection resource.
	TimeSeriesDatabaseConnection
}

TimeSeriesDatabaseConnectionsClientDeleteResponse contains the response from method TimeSeriesDatabaseConnectionsClient.BeginDelete.

type TimeSeriesDatabaseConnectionsClientGetOptions added in v0.3.0

type TimeSeriesDatabaseConnectionsClientGetOptions struct {
}

TimeSeriesDatabaseConnectionsClientGetOptions contains the optional parameters for the TimeSeriesDatabaseConnectionsClient.Get method.

type TimeSeriesDatabaseConnectionsClientGetResponse added in v0.3.0

type TimeSeriesDatabaseConnectionsClientGetResponse struct {
	// Describes a time series database connection resource.
	TimeSeriesDatabaseConnection
}

TimeSeriesDatabaseConnectionsClientGetResponse contains the response from method TimeSeriesDatabaseConnectionsClient.Get.

type TimeSeriesDatabaseConnectionsClientListOptions added in v0.3.0

type TimeSeriesDatabaseConnectionsClientListOptions struct {
}

TimeSeriesDatabaseConnectionsClientListOptions contains the optional parameters for the TimeSeriesDatabaseConnectionsClient.NewListPager method.

type TimeSeriesDatabaseConnectionsClientListResponse added in v0.3.0

type TimeSeriesDatabaseConnectionsClientListResponse struct {
	// A pageable list of time series database connection resources.
	TimeSeriesDatabaseConnectionListResult
}

TimeSeriesDatabaseConnectionsClientListResponse contains the response from method TimeSeriesDatabaseConnectionsClient.NewListPager.

type UserAssignedIdentity added in v1.1.0

type UserAssignedIdentity struct {
	// READ-ONLY; The client id of the User Assigned Identity Resource.
	ClientID *string

	// READ-ONLY; The object id of the User Assigned Identity Resource.
	PrincipalID *string
}

UserAssignedIdentity - The information about the user assigned identity.

func (UserAssignedIdentity) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.

func (*UserAssignedIdentity) UnmarshalJSON added in v1.1.0

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