armdigitaltwins

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: MIT Imports: 15 Imported by: 5

README

Azure Digital Twins Module for Go

PkgGoDev

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

Source code

Getting started

Prerequisites

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.

Clients

Azure Digital Twins modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential.

client := armdigitaltwins.NewDigitalTwinsEndpointClient(<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{
    Host: arm.AzureChina,
}
client := armdigitaltwins.NewDigitalTwinsEndpointClient(<subscription ID>, cred, &options)

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.

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

func PossibleAuthenticationTypeValues

func PossibleAuthenticationTypeValues() []AuthenticationType

PossibleAuthenticationTypeValues returns the possible values for the AuthenticationType const type.

func (AuthenticationType) ToPtr

ToPtr returns a *AuthenticationType pointing to the current value.

type CheckNameRequest

type CheckNameRequest struct {
	// REQUIRED; Resource name.
	Name *string `json:"name,omitempty"`

	// REQUIRED; The type of resource, for instance Microsoft.DigitalTwins/digitalTwinsInstances.
	Type *string `json:"type,omitempty"`
}

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

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 `json:"message,omitempty"`

	// Specifies a Boolean value that indicates if the name is available.
	NameAvailable *bool `json:"nameAvailable,omitempty"`

	// Message providing the reason why the given name is invalid.
	Reason *Reason `json:"reason,omitempty"`
}

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

type ConnectionProperties

type ConnectionProperties struct {
	// The list of group ids for the private endpoint connection.
	GroupIDs                          []*string                                              `json:"groupIds,omitempty"`
	PrivateEndpoint                   *ConnectionPropertiesPrivateEndpoint                   `json:"privateEndpoint,omitempty"`
	PrivateLinkServiceConnectionState *ConnectionPropertiesPrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`

	// READ-ONLY; The provisioning state.
	ProvisioningState *ConnectionPropertiesProvisioningState `json:"provisioningState,omitempty" azure:"ro"`
}

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.

type ConnectionPropertiesPrivateEndpoint

type ConnectionPropertiesPrivateEndpoint struct {
	PrivateEndpoint
}

type ConnectionPropertiesPrivateLinkServiceConnectionState

type ConnectionPropertiesPrivateLinkServiceConnectionState struct {
	ConnectionState
}

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.

func (ConnectionPropertiesProvisioningState) ToPtr

ToPtr returns a *ConnectionPropertiesProvisioningState pointing to the current value.

type ConnectionState

type ConnectionState struct {
	// REQUIRED; The description for the current state of a private endpoint connection.
	Description *string `json:"description,omitempty"`

	// REQUIRED; The status of a private endpoint connection.
	Status *PrivateLinkServiceConnectionStatus `json:"status,omitempty"`

	// Actions required for a private endpoint connection.
	ActionsRequired *string `json:"actionsRequired,omitempty"`
}

ConnectionState - The current state of a private endpoint connection.

type DigitalTwinsBeginCreateOrUpdateOptions

type DigitalTwinsBeginCreateOrUpdateOptions struct {
}

DigitalTwinsBeginCreateOrUpdateOptions contains the optional parameters for the DigitalTwins.BeginCreateOrUpdate method.

type DigitalTwinsBeginDeleteOptions

type DigitalTwinsBeginDeleteOptions struct {
}

DigitalTwinsBeginDeleteOptions contains the optional parameters for the DigitalTwins.BeginDelete method.

type DigitalTwinsBeginUpdateOptions

type DigitalTwinsBeginUpdateOptions struct {
}

DigitalTwinsBeginUpdateOptions contains the optional parameters for the DigitalTwins.BeginUpdate method.

type DigitalTwinsCheckNameAvailabilityOptions

type DigitalTwinsCheckNameAvailabilityOptions struct {
}

DigitalTwinsCheckNameAvailabilityOptions contains the optional parameters for the DigitalTwins.CheckNameAvailability method.

type DigitalTwinsCheckNameAvailabilityResponse

type DigitalTwinsCheckNameAvailabilityResponse struct {
	DigitalTwinsCheckNameAvailabilityResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DigitalTwinsCheckNameAvailabilityResponse contains the response from method DigitalTwins.CheckNameAvailability.

type DigitalTwinsCheckNameAvailabilityResult

type DigitalTwinsCheckNameAvailabilityResult struct {
	CheckNameResult
}

DigitalTwinsCheckNameAvailabilityResult contains the result from method DigitalTwins.CheckNameAvailability.

type DigitalTwinsClient

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

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

func NewDigitalTwinsClient

func NewDigitalTwinsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *DigitalTwinsClient

NewDigitalTwinsClient creates a new instance of DigitalTwinsClient with the specified values.

func (*DigitalTwinsClient) BeginCreateOrUpdate

func (client *DigitalTwinsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, digitalTwinsCreate DigitalTwinsDescription, options *DigitalTwinsBeginCreateOrUpdateOptions) (DigitalTwinsCreateOrUpdatePollerResponse, 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 the *ErrorResponse error type.

Example

x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsPut_example.json

package main

import (
	"context"
	"log"

	"time"

	"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()
	client := armdigitaltwins.NewDigitalTwinsClient("<subscription-id>", cred, nil)
	poller, err := client.BeginCreateOrUpdate(ctx,
		"<resource-group-name>",
		"<resource-name>",
		armdigitaltwins.DigitalTwinsDescription{
			DigitalTwinsResource: armdigitaltwins.DigitalTwinsResource{
				Location: to.StringPtr("<location>"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("DigitalTwinsDescription.ID: %s\n", *res.ID)
}
Output:

func (*DigitalTwinsClient) BeginDelete

func (client *DigitalTwinsClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, options *DigitalTwinsBeginDeleteOptions) (DigitalTwinsDeletePollerResponse, error)

BeginDelete - Delete a DigitalTwinsInstance. If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsDelete_example.json

package main

import (
	"context"
	"log"

	"time"

	"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()
	client := armdigitaltwins.NewDigitalTwinsClient("<subscription-id>", cred, nil)
	poller, err := client.BeginDelete(ctx,
		"<resource-group-name>",
		"<resource-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("DigitalTwinsDescription.ID: %s\n", *res.ID)
}
Output:

func (*DigitalTwinsClient) BeginUpdate

func (client *DigitalTwinsClient) BeginUpdate(ctx context.Context, resourceGroupName string, resourceName string, digitalTwinsPatchDescription DigitalTwinsPatchDescription, options *DigitalTwinsBeginUpdateOptions) (DigitalTwinsUpdatePollerResponse, error)

BeginUpdate - Update metadata of DigitalTwinsInstance. If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsPatch_example.json

package main

import (
	"context"
	"log"

	"time"

	"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()
	client := armdigitaltwins.NewDigitalTwinsClient("<subscription-id>", cred, nil)
	poller, err := client.BeginUpdate(ctx,
		"<resource-group-name>",
		"<resource-name>",
		armdigitaltwins.DigitalTwinsPatchDescription{
			Tags: map[string]*string{
				"purpose": to.StringPtr("dev"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("DigitalTwinsDescription.ID: %s\n", *res.ID)
}
Output:

func (*DigitalTwinsClient) CheckNameAvailability

func (client *DigitalTwinsClient) CheckNameAvailability(ctx context.Context, location string, digitalTwinsInstanceCheckName CheckNameRequest, options *DigitalTwinsCheckNameAvailabilityOptions) (DigitalTwinsCheckNameAvailabilityResponse, error)

CheckNameAvailability - Check if a DigitalTwinsInstance name is available. If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/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()
	client := armdigitaltwins.NewDigitalTwinsClient("<subscription-id>", cred, nil)
	_, err = client.CheckNameAvailability(ctx,
		"<location>",
		armdigitaltwins.CheckNameRequest{
			Name: to.StringPtr("<name>"),
			Type: to.StringPtr("<type>"),
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*DigitalTwinsClient) Get

func (client *DigitalTwinsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *DigitalTwinsGetOptions) (DigitalTwinsGetResponse, error)

Get - Get DigitalTwinsInstances resource. If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/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()
	client := armdigitaltwins.NewDigitalTwinsClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<resource-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("DigitalTwinsDescription.ID: %s\n", *res.ID)
}
Output:

func (*DigitalTwinsClient) List

List - Get all the DigitalTwinsInstances in a subscription. If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/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()
	client := armdigitaltwins.NewDigitalTwinsClient("<subscription-id>", cred, nil)
	pager := client.List(nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("DigitalTwinsDescription.ID: %s\n", *v.ID)
		}
	}
}
Output:

func (*DigitalTwinsClient) ListByResourceGroup

func (client *DigitalTwinsClient) ListByResourceGroup(resourceGroupName string, options *DigitalTwinsListByResourceGroupOptions) *DigitalTwinsListByResourceGroupPager

ListByResourceGroup - Get all the DigitalTwinsInstances in a resource group. If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/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()
	client := armdigitaltwins.NewDigitalTwinsClient("<subscription-id>", cred, nil)
	pager := client.ListByResourceGroup("<resource-group-name>",
		nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("DigitalTwinsDescription.ID: %s\n", *v.ID)
		}
	}
}
Output:

type DigitalTwinsCreateOrUpdatePoller

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

DigitalTwinsCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state.

func (*DigitalTwinsCreateOrUpdatePoller) Done

Done returns true if the LRO has reached a terminal state.

func (*DigitalTwinsCreateOrUpdatePoller) FinalResponse

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final DigitalTwinsCreateOrUpdateResponse will be returned.

func (*DigitalTwinsCreateOrUpdatePoller) Poll

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*DigitalTwinsCreateOrUpdatePoller) ResumeToken

func (p *DigitalTwinsCreateOrUpdatePoller) ResumeToken() (string, error)

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type DigitalTwinsCreateOrUpdatePollerResponse

type DigitalTwinsCreateOrUpdatePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *DigitalTwinsCreateOrUpdatePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DigitalTwinsCreateOrUpdatePollerResponse contains the response from method DigitalTwins.CreateOrUpdate.

func (DigitalTwinsCreateOrUpdatePollerResponse) PollUntilDone

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*DigitalTwinsCreateOrUpdatePollerResponse) Resume

Resume rehydrates a DigitalTwinsCreateOrUpdatePollerResponse from the provided client and resume token.

type DigitalTwinsCreateOrUpdateResponse

type DigitalTwinsCreateOrUpdateResponse struct {
	DigitalTwinsCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DigitalTwinsCreateOrUpdateResponse contains the response from method DigitalTwins.CreateOrUpdate.

type DigitalTwinsCreateOrUpdateResult

type DigitalTwinsCreateOrUpdateResult struct {
	DigitalTwinsDescription
}

DigitalTwinsCreateOrUpdateResult contains the result from method DigitalTwins.CreateOrUpdate.

type DigitalTwinsDeletePoller

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

DigitalTwinsDeletePoller provides polling facilities until the operation reaches a terminal state.

func (*DigitalTwinsDeletePoller) Done

func (p *DigitalTwinsDeletePoller) Done() bool

Done returns true if the LRO has reached a terminal state.

func (*DigitalTwinsDeletePoller) FinalResponse

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final DigitalTwinsDeleteResponse will be returned.

func (*DigitalTwinsDeletePoller) Poll

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*DigitalTwinsDeletePoller) ResumeToken

func (p *DigitalTwinsDeletePoller) ResumeToken() (string, error)

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type DigitalTwinsDeletePollerResponse

type DigitalTwinsDeletePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *DigitalTwinsDeletePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DigitalTwinsDeletePollerResponse contains the response from method DigitalTwins.Delete.

func (DigitalTwinsDeletePollerResponse) PollUntilDone

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*DigitalTwinsDeletePollerResponse) Resume

Resume rehydrates a DigitalTwinsDeletePollerResponse from the provided client and resume token.

type DigitalTwinsDeleteResponse

type DigitalTwinsDeleteResponse struct {
	DigitalTwinsDeleteResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DigitalTwinsDeleteResponse contains the response from method DigitalTwins.Delete.

type DigitalTwinsDeleteResult

type DigitalTwinsDeleteResult struct {
	DigitalTwinsDescription
}

DigitalTwinsDeleteResult contains the result from method DigitalTwins.Delete.

type DigitalTwinsDescription

type DigitalTwinsDescription struct {
	DigitalTwinsResource
	// DigitalTwins instance properties.
	Properties *DigitalTwinsProperties `json:"properties,omitempty"`
}

DigitalTwinsDescription - The description of the DigitalTwins service.

func (DigitalTwinsDescription) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DigitalTwinsDescription.

type DigitalTwinsDescriptionListResult

type DigitalTwinsDescriptionListResult struct {
	// The link used to get the next page of DigitalTwins description objects.
	NextLink *string `json:"nextLink,omitempty"`

	// A list of DigitalTwins description objects.
	Value []*DigitalTwinsDescription `json:"value,omitempty"`
}

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

func (DigitalTwinsDescriptionListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DigitalTwinsDescriptionListResult.

type DigitalTwinsEndpointBeginCreateOrUpdateOptions

type DigitalTwinsEndpointBeginCreateOrUpdateOptions struct {
}

DigitalTwinsEndpointBeginCreateOrUpdateOptions contains the optional parameters for the DigitalTwinsEndpoint.BeginCreateOrUpdate method.

type DigitalTwinsEndpointBeginDeleteOptions

type DigitalTwinsEndpointBeginDeleteOptions struct {
}

DigitalTwinsEndpointBeginDeleteOptions contains the optional parameters for the DigitalTwinsEndpoint.BeginDelete method.

type DigitalTwinsEndpointClient

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

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

func NewDigitalTwinsEndpointClient

func NewDigitalTwinsEndpointClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *DigitalTwinsEndpointClient

NewDigitalTwinsEndpointClient creates a new instance of DigitalTwinsEndpointClient with the specified values.

func (*DigitalTwinsEndpointClient) BeginCreateOrUpdate

func (client *DigitalTwinsEndpointClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, endpointName string, endpointDescription DigitalTwinsEndpointResource, options *DigitalTwinsEndpointBeginCreateOrUpdateOptions) (DigitalTwinsEndpointCreateOrUpdatePollerResponse, error)

BeginCreateOrUpdate - Create or update DigitalTwinsInstance endpoint. If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsEndpointPut_example.json

package main

import (
	"context"
	"log"

	"time"

	"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()
	client := armdigitaltwins.NewDigitalTwinsEndpointClient("<subscription-id>", cred, nil)
	poller, err := client.BeginCreateOrUpdate(ctx,
		"<resource-group-name>",
		"<resource-name>",
		"<endpoint-name>",
		armdigitaltwins.DigitalTwinsEndpointResource{
			Properties: &armdigitaltwins.ServiceBus{
				DigitalTwinsEndpointResourceProperties: armdigitaltwins.DigitalTwinsEndpointResourceProperties{
					AuthenticationType: armdigitaltwins.AuthenticationTypeKeyBased.ToPtr(),
					EndpointType:       armdigitaltwins.EndpointTypeServiceBus.ToPtr(),
				},
				PrimaryConnectionString:   to.StringPtr("<primary-connection-string>"),
				SecondaryConnectionString: to.StringPtr("<secondary-connection-string>"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("DigitalTwinsEndpointResource.ID: %s\n", *res.ID)
}
Output:

func (*DigitalTwinsEndpointClient) BeginDelete

func (client *DigitalTwinsEndpointClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, endpointName string, options *DigitalTwinsEndpointBeginDeleteOptions) (DigitalTwinsEndpointDeletePollerResponse, error)

BeginDelete - Delete a DigitalTwinsInstance endpoint. If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsEndpointDelete_example.json

package main

import (
	"context"
	"log"

	"time"

	"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()
	client := armdigitaltwins.NewDigitalTwinsEndpointClient("<subscription-id>", cred, nil)
	poller, err := client.BeginDelete(ctx,
		"<resource-group-name>",
		"<resource-name>",
		"<endpoint-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("DigitalTwinsEndpointResource.ID: %s\n", *res.ID)
}
Output:

func (*DigitalTwinsEndpointClient) Get

func (client *DigitalTwinsEndpointClient) Get(ctx context.Context, resourceGroupName string, resourceName string, endpointName string, options *DigitalTwinsEndpointGetOptions) (DigitalTwinsEndpointGetResponse, error)

Get - Get DigitalTwinsInstances Endpoint. If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/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()
	client := armdigitaltwins.NewDigitalTwinsEndpointClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<resource-name>",
		"<endpoint-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("DigitalTwinsEndpointResource.ID: %s\n", *res.ID)
}
Output:

func (*DigitalTwinsEndpointClient) List

func (client *DigitalTwinsEndpointClient) List(resourceGroupName string, resourceName string, options *DigitalTwinsEndpointListOptions) *DigitalTwinsEndpointListPager

List - Get DigitalTwinsInstance Endpoints. If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/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()
	client := armdigitaltwins.NewDigitalTwinsEndpointClient("<subscription-id>", cred, nil)
	pager := client.List("<resource-group-name>",
		"<resource-name>",
		nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("DigitalTwinsEndpointResource.ID: %s\n", *v.ID)
		}
	}
}
Output:

type DigitalTwinsEndpointCreateOrUpdatePoller

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

DigitalTwinsEndpointCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state.

func (*DigitalTwinsEndpointCreateOrUpdatePoller) Done

Done returns true if the LRO has reached a terminal state.

func (*DigitalTwinsEndpointCreateOrUpdatePoller) FinalResponse

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final DigitalTwinsEndpointCreateOrUpdateResponse will be returned.

func (*DigitalTwinsEndpointCreateOrUpdatePoller) Poll

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*DigitalTwinsEndpointCreateOrUpdatePoller) ResumeToken

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type DigitalTwinsEndpointCreateOrUpdatePollerResponse

type DigitalTwinsEndpointCreateOrUpdatePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *DigitalTwinsEndpointCreateOrUpdatePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DigitalTwinsEndpointCreateOrUpdatePollerResponse contains the response from method DigitalTwinsEndpoint.CreateOrUpdate.

func (DigitalTwinsEndpointCreateOrUpdatePollerResponse) PollUntilDone

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*DigitalTwinsEndpointCreateOrUpdatePollerResponse) Resume

Resume rehydrates a DigitalTwinsEndpointCreateOrUpdatePollerResponse from the provided client and resume token.

type DigitalTwinsEndpointCreateOrUpdateResponse

type DigitalTwinsEndpointCreateOrUpdateResponse struct {
	DigitalTwinsEndpointCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DigitalTwinsEndpointCreateOrUpdateResponse contains the response from method DigitalTwinsEndpoint.CreateOrUpdate.

type DigitalTwinsEndpointCreateOrUpdateResult

type DigitalTwinsEndpointCreateOrUpdateResult struct {
	DigitalTwinsEndpointResource
}

DigitalTwinsEndpointCreateOrUpdateResult contains the result from method DigitalTwinsEndpoint.CreateOrUpdate.

type DigitalTwinsEndpointDeletePoller

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

DigitalTwinsEndpointDeletePoller provides polling facilities until the operation reaches a terminal state.

func (*DigitalTwinsEndpointDeletePoller) Done

Done returns true if the LRO has reached a terminal state.

func (*DigitalTwinsEndpointDeletePoller) FinalResponse

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final DigitalTwinsEndpointDeleteResponse will be returned.

func (*DigitalTwinsEndpointDeletePoller) Poll

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*DigitalTwinsEndpointDeletePoller) ResumeToken

func (p *DigitalTwinsEndpointDeletePoller) ResumeToken() (string, error)

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type DigitalTwinsEndpointDeletePollerResponse

type DigitalTwinsEndpointDeletePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *DigitalTwinsEndpointDeletePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DigitalTwinsEndpointDeletePollerResponse contains the response from method DigitalTwinsEndpoint.Delete.

func (DigitalTwinsEndpointDeletePollerResponse) PollUntilDone

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*DigitalTwinsEndpointDeletePollerResponse) Resume

Resume rehydrates a DigitalTwinsEndpointDeletePollerResponse from the provided client and resume token.

type DigitalTwinsEndpointDeleteResponse

type DigitalTwinsEndpointDeleteResponse struct {
	DigitalTwinsEndpointDeleteResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DigitalTwinsEndpointDeleteResponse contains the response from method DigitalTwinsEndpoint.Delete.

type DigitalTwinsEndpointDeleteResult

type DigitalTwinsEndpointDeleteResult struct {
	DigitalTwinsEndpointResource
}

DigitalTwinsEndpointDeleteResult contains the result from method DigitalTwinsEndpoint.Delete.

type DigitalTwinsEndpointGetOptions

type DigitalTwinsEndpointGetOptions struct {
}

DigitalTwinsEndpointGetOptions contains the optional parameters for the DigitalTwinsEndpoint.Get method.

type DigitalTwinsEndpointGetResponse

type DigitalTwinsEndpointGetResponse struct {
	DigitalTwinsEndpointGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DigitalTwinsEndpointGetResponse contains the response from method DigitalTwinsEndpoint.Get.

type DigitalTwinsEndpointGetResult

type DigitalTwinsEndpointGetResult struct {
	DigitalTwinsEndpointResource
}

DigitalTwinsEndpointGetResult contains the result from method DigitalTwinsEndpoint.Get.

type DigitalTwinsEndpointListOptions

type DigitalTwinsEndpointListOptions struct {
}

DigitalTwinsEndpointListOptions contains the optional parameters for the DigitalTwinsEndpoint.List method.

type DigitalTwinsEndpointListPager

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

DigitalTwinsEndpointListPager provides operations for iterating over paged responses.

func (*DigitalTwinsEndpointListPager) Err

Err returns the last error encountered while paging.

func (*DigitalTwinsEndpointListPager) NextPage

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*DigitalTwinsEndpointListPager) PageResponse

PageResponse returns the current DigitalTwinsEndpointListResponse page.

type DigitalTwinsEndpointListResponse

type DigitalTwinsEndpointListResponse struct {
	DigitalTwinsEndpointListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DigitalTwinsEndpointListResponse contains the response from method DigitalTwinsEndpoint.List.

type DigitalTwinsEndpointListResult

type DigitalTwinsEndpointListResult struct {
	DigitalTwinsEndpointResourceListResult
}

DigitalTwinsEndpointListResult contains the result from method DigitalTwinsEndpoint.List.

type DigitalTwinsEndpointResource

type DigitalTwinsEndpointResource struct {
	ExternalResource
	// REQUIRED; DigitalTwinsInstance endpoint resource properties.
	Properties DigitalTwinsEndpointResourcePropertiesClassification `json:"properties,omitempty"`
}

DigitalTwinsEndpointResource - DigitalTwinsInstance endpoint resource.

func (DigitalTwinsEndpointResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DigitalTwinsEndpointResource.

func (*DigitalTwinsEndpointResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DigitalTwinsEndpointResource.

type DigitalTwinsEndpointResourceListResult

type DigitalTwinsEndpointResourceListResult struct {
	// The link used to get the next page of DigitalTwinsInstance Endpoints.
	NextLink *string `json:"nextLink,omitempty"`

	// A list of DigitalTwinsInstance Endpoints.
	Value []*DigitalTwinsEndpointResource `json:"value,omitempty"`
}

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

func (DigitalTwinsEndpointResourceListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DigitalTwinsEndpointResourceListResult.

type DigitalTwinsEndpointResourceProperties

type DigitalTwinsEndpointResourceProperties struct {
	// REQUIRED; The type of Digital Twins endpoint
	EndpointType *EndpointType `json:"endpointType,omitempty"`

	// Specifies the authentication type being used for connecting to the endpoint.
	AuthenticationType *AuthenticationType `json:"authenticationType,omitempty"`

	// Dead letter storage secret for key-based authentication. Will be obfuscated during read.
	DeadLetterSecret *string `json:"deadLetterSecret,omitempty"`

	// Dead letter storage URL for identity-based authentication.
	DeadLetterURI *string `json:"deadLetterUri,omitempty"`

	// READ-ONLY; Time when the Endpoint was added to DigitalTwinsInstance.
	CreatedTime *time.Time `json:"createdTime,omitempty" azure:"ro"`

	// READ-ONLY; The provisioning state.
	ProvisioningState *EndpointProvisioningState `json:"provisioningState,omitempty" azure:"ro"`
}

DigitalTwinsEndpointResourceProperties - Properties related to Digital Twins Endpoint

func (*DigitalTwinsEndpointResourceProperties) GetDigitalTwinsEndpointResourceProperties

func (d *DigitalTwinsEndpointResourceProperties) GetDigitalTwinsEndpointResourceProperties() *DigitalTwinsEndpointResourceProperties

GetDigitalTwinsEndpointResourceProperties implements the DigitalTwinsEndpointResourcePropertiesClassification interface for type DigitalTwinsEndpointResourceProperties.

func (*DigitalTwinsEndpointResourceProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DigitalTwinsEndpointResourceProperties.

type DigitalTwinsEndpointResourcePropertiesClassification

type DigitalTwinsEndpointResourcePropertiesClassification interface {
	// GetDigitalTwinsEndpointResourceProperties returns the DigitalTwinsEndpointResourceProperties content of the underlying type.
	GetDigitalTwinsEndpointResourceProperties() *DigitalTwinsEndpointResourceProperties
}

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

type DigitalTwinsGetOptions

type DigitalTwinsGetOptions struct {
}

DigitalTwinsGetOptions contains the optional parameters for the DigitalTwins.Get method.

type DigitalTwinsGetResponse

type DigitalTwinsGetResponse struct {
	DigitalTwinsGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DigitalTwinsGetResponse contains the response from method DigitalTwins.Get.

type DigitalTwinsGetResult

type DigitalTwinsGetResult struct {
	DigitalTwinsDescription
}

DigitalTwinsGetResult contains the result from method DigitalTwins.Get.

type DigitalTwinsIdentity

type DigitalTwinsIdentity struct {
	// The type of Managed Identity used by the DigitalTwinsInstance. Only SystemAssigned is supported.
	Type *DigitalTwinsIdentityType `json:"type,omitempty"`

	// 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 `json:"principalId,omitempty" azure:"ro"`

	// 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 `json:"tenantId,omitempty" azure:"ro"`
}

DigitalTwinsIdentity - The managed identity for the DigitalTwinsInstance.

type DigitalTwinsIdentityType

type DigitalTwinsIdentityType string

DigitalTwinsIdentityType - The type of Managed Identity used by the DigitalTwinsInstance. Only SystemAssigned is supported.

const (
	DigitalTwinsIdentityTypeNone           DigitalTwinsIdentityType = "None"
	DigitalTwinsIdentityTypeSystemAssigned DigitalTwinsIdentityType = "SystemAssigned"
)

func PossibleDigitalTwinsIdentityTypeValues

func PossibleDigitalTwinsIdentityTypeValues() []DigitalTwinsIdentityType

PossibleDigitalTwinsIdentityTypeValues returns the possible values for the DigitalTwinsIdentityType const type.

func (DigitalTwinsIdentityType) ToPtr

ToPtr returns a *DigitalTwinsIdentityType pointing to the current value.

type DigitalTwinsListByResourceGroupOptions

type DigitalTwinsListByResourceGroupOptions struct {
}

DigitalTwinsListByResourceGroupOptions contains the optional parameters for the DigitalTwins.ListByResourceGroup method.

type DigitalTwinsListByResourceGroupPager

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

DigitalTwinsListByResourceGroupPager provides operations for iterating over paged responses.

func (*DigitalTwinsListByResourceGroupPager) Err

Err returns the last error encountered while paging.

func (*DigitalTwinsListByResourceGroupPager) NextPage

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*DigitalTwinsListByResourceGroupPager) PageResponse

PageResponse returns the current DigitalTwinsListByResourceGroupResponse page.

type DigitalTwinsListByResourceGroupResponse

type DigitalTwinsListByResourceGroupResponse struct {
	DigitalTwinsListByResourceGroupResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DigitalTwinsListByResourceGroupResponse contains the response from method DigitalTwins.ListByResourceGroup.

type DigitalTwinsListByResourceGroupResult

type DigitalTwinsListByResourceGroupResult struct {
	DigitalTwinsDescriptionListResult
}

DigitalTwinsListByResourceGroupResult contains the result from method DigitalTwins.ListByResourceGroup.

type DigitalTwinsListOptions

type DigitalTwinsListOptions struct {
}

DigitalTwinsListOptions contains the optional parameters for the DigitalTwins.List method.

type DigitalTwinsListPager

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

DigitalTwinsListPager provides operations for iterating over paged responses.

func (*DigitalTwinsListPager) Err

func (p *DigitalTwinsListPager) Err() error

Err returns the last error encountered while paging.

func (*DigitalTwinsListPager) NextPage

func (p *DigitalTwinsListPager) NextPage(ctx context.Context) bool

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*DigitalTwinsListPager) PageResponse

PageResponse returns the current DigitalTwinsListResponse page.

type DigitalTwinsListResponse

type DigitalTwinsListResponse struct {
	DigitalTwinsListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DigitalTwinsListResponse contains the response from method DigitalTwins.List.

type DigitalTwinsListResult

type DigitalTwinsListResult struct {
	DigitalTwinsDescriptionListResult
}

DigitalTwinsListResult contains the result from method DigitalTwins.List.

type DigitalTwinsPatchDescription

type DigitalTwinsPatchDescription struct {
	// The managed identity for the DigitalTwinsInstance.
	Identity *DigitalTwinsIdentity `json:"identity,omitempty"`

	// Properties for the DigitalTwinsInstance.
	Properties *DigitalTwinsPatchProperties `json:"properties,omitempty"`

	// Instance patch properties
	Tags map[string]*string `json:"tags,omitempty"`
}

DigitalTwinsPatchDescription - The description of the DigitalTwins service.

func (DigitalTwinsPatchDescription) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DigitalTwinsPatchDescription.

type DigitalTwinsPatchProperties

type DigitalTwinsPatchProperties struct {
	// Public network access for the DigitalTwinsInstance.
	PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`
}

DigitalTwinsPatchProperties - The properties of a DigitalTwinsInstance.

type DigitalTwinsProperties

type DigitalTwinsProperties struct {
	PrivateEndpointConnections []*PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`

	// Public network access for the DigitalTwinsInstance.
	PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`

	// READ-ONLY; Time when DigitalTwinsInstance was created.
	CreatedTime *time.Time `json:"createdTime,omitempty" azure:"ro"`

	// READ-ONLY; Api endpoint to work with DigitalTwinsInstance.
	HostName *string `json:"hostName,omitempty" azure:"ro"`

	// READ-ONLY; Time when DigitalTwinsInstance was updated.
	LastUpdatedTime *time.Time `json:"lastUpdatedTime,omitempty" azure:"ro"`

	// READ-ONLY; The provisioning state.
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"`
}

DigitalTwinsProperties - The properties of a DigitalTwinsInstance.

func (DigitalTwinsProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DigitalTwinsProperties.

func (*DigitalTwinsProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DigitalTwinsProperties.

type DigitalTwinsResource

type DigitalTwinsResource struct {
	// REQUIRED; The resource location.
	Location *string `json:"location,omitempty"`

	// The managed identity for the DigitalTwinsInstance.
	Identity *DigitalTwinsIdentity `json:"identity,omitempty"`

	// The resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; The resource identifier.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The resource type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

DigitalTwinsResource - The common properties of a DigitalTwinsInstance.

func (DigitalTwinsResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DigitalTwinsResource.

type DigitalTwinsUpdatePoller

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

DigitalTwinsUpdatePoller provides polling facilities until the operation reaches a terminal state.

func (*DigitalTwinsUpdatePoller) Done

func (p *DigitalTwinsUpdatePoller) Done() bool

Done returns true if the LRO has reached a terminal state.

func (*DigitalTwinsUpdatePoller) FinalResponse

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final DigitalTwinsUpdateResponse will be returned.

func (*DigitalTwinsUpdatePoller) Poll

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*DigitalTwinsUpdatePoller) ResumeToken

func (p *DigitalTwinsUpdatePoller) ResumeToken() (string, error)

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type DigitalTwinsUpdatePollerResponse

type DigitalTwinsUpdatePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *DigitalTwinsUpdatePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DigitalTwinsUpdatePollerResponse contains the response from method DigitalTwins.Update.

func (DigitalTwinsUpdatePollerResponse) PollUntilDone

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*DigitalTwinsUpdatePollerResponse) Resume

Resume rehydrates a DigitalTwinsUpdatePollerResponse from the provided client and resume token.

type DigitalTwinsUpdateResponse

type DigitalTwinsUpdateResponse struct {
	DigitalTwinsUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DigitalTwinsUpdateResponse contains the response from method DigitalTwins.Update.

type DigitalTwinsUpdateResult

type DigitalTwinsUpdateResult struct {
	DigitalTwinsDescription
}

DigitalTwinsUpdateResult contains the result from method DigitalTwins.Update.

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"
	EndpointProvisioningStateWarning      EndpointProvisioningState = "Warning"
)

func PossibleEndpointProvisioningStateValues

func PossibleEndpointProvisioningStateValues() []EndpointProvisioningState

PossibleEndpointProvisioningStateValues returns the possible values for the EndpointProvisioningState const type.

func (EndpointProvisioningState) ToPtr

ToPtr returns a *EndpointProvisioningState pointing to the current value.

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.

func (EndpointType) ToPtr

func (c EndpointType) ToPtr() *EndpointType

ToPtr returns a *EndpointType pointing to the current value.

type ErrorDefinition

type ErrorDefinition struct {
	// READ-ONLY; Service specific error code which serves as the substatus for the HTTP error code.
	Code *string `json:"code,omitempty" azure:"ro"`

	// READ-ONLY; Internal error details.
	Details []*ErrorDefinition `json:"details,omitempty" azure:"ro"`

	// READ-ONLY; Description of the error.
	Message *string `json:"message,omitempty" azure:"ro"`
}

ErrorDefinition - Error definition.

func (ErrorDefinition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorDefinition.

type ErrorResponse

type ErrorResponse struct {

	// Error description
	InnerError *ErrorDefinition `json:"error,omitempty"`
	// contains filtered or unexported fields
}

ErrorResponse - Error response. Implements the error and azcore.HTTPResponse interfaces.

func (ErrorResponse) Error

func (e ErrorResponse) Error() string

Error implements the error interface for type ErrorResponse. The contents of the error text are not contractual and subject to change.

type EventGrid

type EventGrid struct {
	DigitalTwinsEndpointResourceProperties
	// REQUIRED; EventGrid secondary accesskey. Will be obfuscated during read.
	AccessKey1 *string `json:"accessKey1,omitempty"`

	// REQUIRED; EventGrid Topic Endpoint
	TopicEndpoint *string `json:"TopicEndpoint,omitempty"`

	// EventGrid secondary accesskey. Will be obfuscated during read.
	AccessKey2 *string `json:"accessKey2,omitempty"`
}

EventGrid - Properties related to 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 {
	DigitalTwinsEndpointResourceProperties
	// PrimaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read.
	ConnectionStringPrimaryKey *string `json:"connectionStringPrimaryKey,omitempty"`

	// SecondaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read.
	ConnectionStringSecondaryKey *string `json:"connectionStringSecondaryKey,omitempty"`

	// The URL of the EventHub namespace for identity-based authentication. It must include the protocol sb://
	EndpointURI *string `json:"endpointUri,omitempty"`

	// The EventHub name in the EventHub namespace for identity-based authentication.
	EntityPath *string `json:"entityPath,omitempty"`
}

EventHub - Properties related to 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 `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Extension resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The resource type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

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
	Properties *GroupIDInformationProperties `json:"properties,omitempty"`

	// The resource identifier.
	ID *string `json:"id,omitempty"`

	// READ-ONLY; The resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The resource type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

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

type GroupIDInformationProperties

type GroupIDInformationProperties struct {
	GroupIDInformationPropertiesAutoGenerated
}

type GroupIDInformationPropertiesAutoGenerated

type GroupIDInformationPropertiesAutoGenerated struct {
	// The group id
	GroupID *string `json:"groupId,omitempty"`

	// The required members for a specific group id.
	RequiredMembers []*string `json:"requiredMembers,omitempty"`

	// The required DNS zones for a specific group id.
	RequiredZoneNames []*string `json:"requiredZoneNames,omitempty"`
}

GroupIDInformationPropertiesAutoGenerated - The properties for a group information object.

func (GroupIDInformationPropertiesAutoGenerated) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type GroupIDInformationPropertiesAutoGenerated.

type GroupIDInformationResponse

type GroupIDInformationResponse struct {
	// The list of available private link resources for a Digital Twin.
	Value []*GroupIDInformation `json:"value,omitempty"`
}

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.

type Operation

type Operation struct {
	// Operation properties display
	Display *OperationDisplay `json:"display,omitempty"`

	// READ-ONLY; If the operation is a data action (for data plane rbac).
	IsDataAction *bool `json:"isDataAction,omitempty" azure:"ro"`

	// READ-ONLY; Operation name: {provider}/{resource}/{read | write | action | delete}
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The intended executor of the operation.
	Origin *string `json:"origin,omitempty" azure:"ro"`
}

Operation - DigitalTwins service REST API operation

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; Friendly description for the operation,
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; Name of the operation
	Operation *string `json:"operation,omitempty" azure:"ro"`

	// READ-ONLY; Service provider: Microsoft DigitalTwins
	Provider *string `json:"provider,omitempty" azure:"ro"`

	// READ-ONLY; Resource Type: DigitalTwinsInstances
	Resource *string `json:"resource,omitempty" azure:"ro"`
}

OperationDisplay - The object that represents the operation.

type OperationListResult

type OperationListResult struct {
	// The link used to get the next page of DigitalTwins description objects.
	NextLink *string `json:"nextLink,omitempty"`

	// READ-ONLY; A list of DigitalTwins operations supported by the Microsoft.DigitalTwins resource provider.
	Value []*Operation `json:"value,omitempty" azure:"ro"`
}

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.

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

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

func (*OperationsClient) List

List - Lists all of the available DigitalTwins service REST API operations. If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/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()
	client := armdigitaltwins.NewOperationsClient(cred, nil)
	pager := client.List(nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
	}
}
Output:

type OperationsListOptions

type OperationsListOptions struct {
}

OperationsListOptions contains the optional parameters for the Operations.List method.

type OperationsListPager

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

OperationsListPager provides operations for iterating over paged responses.

func (*OperationsListPager) Err

func (p *OperationsListPager) Err() error

Err returns the last error encountered while paging.

func (*OperationsListPager) NextPage

func (p *OperationsListPager) NextPage(ctx context.Context) bool

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*OperationsListPager) PageResponse

func (p *OperationsListPager) PageResponse() OperationsListResponse

PageResponse returns the current OperationsListResponse page.

type OperationsListResponse

type OperationsListResponse struct {
	OperationsListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

OperationsListResponse contains the response from method Operations.List.

type OperationsListResult

type OperationsListResult struct {
	OperationListResult
}

OperationsListResult contains the result from method Operations.List.

type PrivateEndpoint

type PrivateEndpoint struct {
	// READ-ONLY; The resource identifier.
	ID *string `json:"id,omitempty" azure:"ro"`
}

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

type PrivateEndpointConnection

type PrivateEndpointConnection struct {
	// REQUIRED
	Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"`

	// READ-ONLY; The resource identifier.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The resource type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

PrivateEndpointConnection - The private endpoint connection of a Digital Twin.

type PrivateEndpointConnectionProperties

type PrivateEndpointConnectionProperties struct {
	ConnectionProperties
}

type PrivateEndpointConnectionsBeginCreateOrUpdateOptions

type PrivateEndpointConnectionsBeginCreateOrUpdateOptions struct {
}

PrivateEndpointConnectionsBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnections.BeginCreateOrUpdate method.

type PrivateEndpointConnectionsBeginDeleteOptions

type PrivateEndpointConnectionsBeginDeleteOptions struct {
}

PrivateEndpointConnectionsBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnections.BeginDelete method.

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

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

func (*PrivateEndpointConnectionsClient) BeginCreateOrUpdate

func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, privateEndpointConnection PrivateEndpointConnection, options *PrivateEndpointConnectionsBeginCreateOrUpdateOptions) (PrivateEndpointConnectionsCreateOrUpdatePollerResponse, error)

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

Example

x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/PrivateEndpointConnectionPut_example.json

package main

import (
	"context"
	"log"

	"time"

	"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()
	client := armdigitaltwins.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil)
	poller, err := client.BeginCreateOrUpdate(ctx,
		"<resource-group-name>",
		"<resource-name>",
		"<private-endpoint-connection-name>",
		armdigitaltwins.PrivateEndpointConnection{
			Properties: &armdigitaltwins.PrivateEndpointConnectionProperties{
				ConnectionProperties: armdigitaltwins.ConnectionProperties{
					PrivateLinkServiceConnectionState: &armdigitaltwins.ConnectionPropertiesPrivateLinkServiceConnectionState{
						ConnectionState: armdigitaltwins.ConnectionState{
							Description: to.StringPtr("<description>"),
							Status:      armdigitaltwins.PrivateLinkServiceConnectionStatusApproved.ToPtr(),
						},
					},
				},
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("PrivateEndpointConnection.ID: %s\n", *res.ID)
}
Output:

func (*PrivateEndpointConnectionsClient) BeginDelete

func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsBeginDeleteOptions) (PrivateEndpointConnectionsDeletePollerResponse, error)

BeginDelete - Delete private endpoint connection with the specified name. If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/PrivateEndpointConnectionDelete_example.json

package main

import (
	"context"
	"log"

	"time"

	"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()
	client := armdigitaltwins.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil)
	poller, err := client.BeginDelete(ctx,
		"<resource-group-name>",
		"<resource-name>",
		"<private-endpoint-connection-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	_, err = poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*PrivateEndpointConnectionsClient) Get

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

Get - Get private endpoint connection properties for the given private endpoint. If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/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()
	client := armdigitaltwins.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<resource-name>",
		"<private-endpoint-connection-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("PrivateEndpointConnection.ID: %s\n", *res.ID)
}
Output:

func (*PrivateEndpointConnectionsClient) List

List - List private endpoint connection properties. If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/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()
	client := armdigitaltwins.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil)
	_, err = client.List(ctx,
		"<resource-group-name>",
		"<resource-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

type PrivateEndpointConnectionsCreateOrUpdatePoller

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

PrivateEndpointConnectionsCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state.

func (*PrivateEndpointConnectionsCreateOrUpdatePoller) Done

Done returns true if the LRO has reached a terminal state.

func (*PrivateEndpointConnectionsCreateOrUpdatePoller) FinalResponse

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final PrivateEndpointConnectionsCreateOrUpdateResponse will be returned.

func (*PrivateEndpointConnectionsCreateOrUpdatePoller) Poll

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*PrivateEndpointConnectionsCreateOrUpdatePoller) ResumeToken

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type PrivateEndpointConnectionsCreateOrUpdatePollerResponse

type PrivateEndpointConnectionsCreateOrUpdatePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *PrivateEndpointConnectionsCreateOrUpdatePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateEndpointConnectionsCreateOrUpdatePollerResponse contains the response from method PrivateEndpointConnections.CreateOrUpdate.

func (PrivateEndpointConnectionsCreateOrUpdatePollerResponse) PollUntilDone

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*PrivateEndpointConnectionsCreateOrUpdatePollerResponse) Resume

Resume rehydrates a PrivateEndpointConnectionsCreateOrUpdatePollerResponse from the provided client and resume token.

type PrivateEndpointConnectionsCreateOrUpdateResponse

type PrivateEndpointConnectionsCreateOrUpdateResponse struct {
	PrivateEndpointConnectionsCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateEndpointConnectionsCreateOrUpdateResponse contains the response from method PrivateEndpointConnections.CreateOrUpdate.

type PrivateEndpointConnectionsCreateOrUpdateResult

type PrivateEndpointConnectionsCreateOrUpdateResult struct {
	PrivateEndpointConnection
}

PrivateEndpointConnectionsCreateOrUpdateResult contains the result from method PrivateEndpointConnections.CreateOrUpdate.

type PrivateEndpointConnectionsDeletePoller

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

PrivateEndpointConnectionsDeletePoller provides polling facilities until the operation reaches a terminal state.

func (*PrivateEndpointConnectionsDeletePoller) Done

Done returns true if the LRO has reached a terminal state.

func (*PrivateEndpointConnectionsDeletePoller) FinalResponse

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final PrivateEndpointConnectionsDeleteResponse will be returned.

func (*PrivateEndpointConnectionsDeletePoller) Poll

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*PrivateEndpointConnectionsDeletePoller) ResumeToken

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type PrivateEndpointConnectionsDeletePollerResponse

type PrivateEndpointConnectionsDeletePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *PrivateEndpointConnectionsDeletePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateEndpointConnectionsDeletePollerResponse contains the response from method PrivateEndpointConnections.Delete.

func (PrivateEndpointConnectionsDeletePollerResponse) PollUntilDone

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*PrivateEndpointConnectionsDeletePollerResponse) Resume

Resume rehydrates a PrivateEndpointConnectionsDeletePollerResponse from the provided client and resume token.

type PrivateEndpointConnectionsDeleteResponse

type PrivateEndpointConnectionsDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateEndpointConnectionsDeleteResponse contains the response from method PrivateEndpointConnections.Delete.

type PrivateEndpointConnectionsGetOptions

type PrivateEndpointConnectionsGetOptions struct {
}

PrivateEndpointConnectionsGetOptions contains the optional parameters for the PrivateEndpointConnections.Get method.

type PrivateEndpointConnectionsGetResponse

type PrivateEndpointConnectionsGetResponse struct {
	PrivateEndpointConnectionsGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateEndpointConnectionsGetResponse contains the response from method PrivateEndpointConnections.Get.

type PrivateEndpointConnectionsGetResult

type PrivateEndpointConnectionsGetResult struct {
	PrivateEndpointConnection
}

PrivateEndpointConnectionsGetResult contains the result from method PrivateEndpointConnections.Get.

type PrivateEndpointConnectionsListOptions

type PrivateEndpointConnectionsListOptions struct {
}

PrivateEndpointConnectionsListOptions contains the optional parameters for the PrivateEndpointConnections.List method.

type PrivateEndpointConnectionsListResponse

type PrivateEndpointConnectionsListResponse struct {
	PrivateEndpointConnectionsListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateEndpointConnectionsListResponse contains the response from method PrivateEndpointConnections.List.

type PrivateEndpointConnectionsListResult

type PrivateEndpointConnectionsListResult struct {
	PrivateEndpointConnectionsResponse
}

PrivateEndpointConnectionsListResult contains the result from method PrivateEndpointConnections.List.

type PrivateEndpointConnectionsResponse

type PrivateEndpointConnectionsResponse struct {
	// The list of available private link connections for a Digital Twin.
	Value []*PrivateEndpointConnection `json:"value,omitempty"`
}

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.

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

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

func (*PrivateLinkResourcesClient) Get

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

Get - Get the specified private link resource for the given Digital Twin. If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/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()
	client := armdigitaltwins.NewPrivateLinkResourcesClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<resource-name>",
		"<resource-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("GroupIDInformation.ID: %s\n", *res.ID)
}
Output:

func (*PrivateLinkResourcesClient) List

func (client *PrivateLinkResourcesClient) List(ctx context.Context, resourceGroupName string, resourceName string, options *PrivateLinkResourcesListOptions) (PrivateLinkResourcesListResponse, error)

List - List private link resources for given Digital Twin. If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/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()
	client := armdigitaltwins.NewPrivateLinkResourcesClient("<subscription-id>", cred, nil)
	_, err = client.List(ctx,
		"<resource-group-name>",
		"<resource-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

type PrivateLinkResourcesGetOptions

type PrivateLinkResourcesGetOptions struct {
}

PrivateLinkResourcesGetOptions contains the optional parameters for the PrivateLinkResources.Get method.

type PrivateLinkResourcesGetResponse

type PrivateLinkResourcesGetResponse struct {
	PrivateLinkResourcesGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateLinkResourcesGetResponse contains the response from method PrivateLinkResources.Get.

type PrivateLinkResourcesGetResult

type PrivateLinkResourcesGetResult struct {
	GroupIDInformation
}

PrivateLinkResourcesGetResult contains the result from method PrivateLinkResources.Get.

type PrivateLinkResourcesListOptions

type PrivateLinkResourcesListOptions struct {
}

PrivateLinkResourcesListOptions contains the optional parameters for the PrivateLinkResources.List method.

type PrivateLinkResourcesListResponse

type PrivateLinkResourcesListResponse struct {
	PrivateLinkResourcesListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateLinkResourcesListResponse contains the response from method PrivateLinkResources.List.

type PrivateLinkResourcesListResult

type PrivateLinkResourcesListResult struct {
	GroupIDInformationResponse
}

PrivateLinkResourcesListResult contains the result from method PrivateLinkResources.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.

func (PrivateLinkServiceConnectionStatus) ToPtr

ToPtr returns a *PrivateLinkServiceConnectionStatus pointing to the current value.

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.

func (ProvisioningState) ToPtr

ToPtr returns a *ProvisioningState pointing to the current value.

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.

func (PublicNetworkAccess) ToPtr

ToPtr returns a *PublicNetworkAccess pointing to the current value.

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.

func (Reason) ToPtr

func (c Reason) ToPtr() *Reason

ToPtr returns a *Reason pointing to the current value.

type ServiceBus

type ServiceBus struct {
	DigitalTwinsEndpointResourceProperties
	// The URL of the ServiceBus namespace for identity-based authentication. It must include the protocol sb://
	EndpointURI *string `json:"endpointUri,omitempty"`

	// The ServiceBus Topic name for identity-based authentication
	EntityPath *string `json:"entityPath,omitempty"`

	// PrimaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read.
	PrimaryConnectionString *string `json:"primaryConnectionString,omitempty"`

	// SecondaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read.
	SecondaryConnectionString *string `json:"secondaryConnectionString,omitempty"`
}

ServiceBus - Properties related to 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.

Jump to

Keyboard shortcuts

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