armdigitaltwins

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 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

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

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) (ClientCreateOrUpdatePollerResponse, 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. 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

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.NewClient("<subscription-id>", cred, nil)
	poller, err := client.BeginCreateOrUpdate(ctx,
		"<resource-group-name>",
		"<resource-name>",
		armdigitaltwins.Description{
			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("Response result: %#v\n", res.ClientCreateOrUpdateResult)
}
Output:

func (*Client) BeginDelete added in v0.2.0

func (client *Client) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, options *ClientBeginDeleteOptions) (ClientDeletePollerResponse, error)

BeginDelete - Delete a DigitalTwinsInstance. If the operation fails it returns an *azcore.ResponseError type. 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

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.NewClient("<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("Response result: %#v\n", res.ClientDeleteResult)
}
Output:

func (*Client) BeginUpdate added in v0.2.0

func (client *Client) BeginUpdate(ctx context.Context, resourceGroupName string, resourceName string, digitalTwinsPatchDescription PatchDescription, options *ClientBeginUpdateOptions) (ClientUpdatePollerResponse, error)

BeginUpdate - Update metadata of DigitalTwinsInstance. If the operation fails it returns an *azcore.ResponseError type. 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

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.NewClient("<subscription-id>", cred, nil)
	poller, err := client.BeginUpdate(ctx,
		"<resource-group-name>",
		"<resource-name>",
		armdigitaltwins.PatchDescription{
			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("Response result: %#v\n", res.ClientUpdateResult)
}
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. 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

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.NewClient("<subscription-id>", cred, nil)
	res, err := client.CheckNameAvailability(ctx,
		"<location>",
		armdigitaltwins.CheckNameRequest{
			Name: to.StringPtr("<name>"),
			Type: to.StringPtr("<type>"),
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ClientCheckNameAvailabilityResult)
}
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. 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

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.NewClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<resource-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ClientGetResult)
}
Output:

func (*Client) List added in v0.2.0

func (client *Client) List(options *ClientListOptions) *ClientListPager

List - Get all the DigitalTwinsInstances in a subscription. If the operation fails it returns an *azcore.ResponseError type. options - ClientListOptions contains the optional parameters for the Client.List method.

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.NewClient("<subscription-id>", cred, nil)
	pager := client.List(nil)
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*Client) ListByResourceGroup added in v0.2.0

func (client *Client) ListByResourceGroup(resourceGroupName string, options *ClientListByResourceGroupOptions) *ClientListByResourceGroupPager

ListByResourceGroup - Get all the DigitalTwinsInstances in a resource group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the DigitalTwinsInstance. options - ClientListByResourceGroupOptions contains the optional parameters for the Client.ListByResourceGroup method.

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.NewClient("<subscription-id>", cred, nil)
	pager := client.ListByResourceGroup("<resource-group-name>",
		nil)
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type ClientBeginCreateOrUpdateOptions added in v0.2.0

type ClientBeginCreateOrUpdateOptions struct {
}

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

type ClientBeginDeleteOptions added in v0.2.0

type ClientBeginDeleteOptions struct {
}

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

type ClientBeginUpdateOptions added in v0.2.0

type ClientBeginUpdateOptions struct {
}

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 {
	ClientCheckNameAvailabilityResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ClientCheckNameAvailabilityResponse contains the response from method Client.CheckNameAvailability.

type ClientCheckNameAvailabilityResult added in v0.2.0

type ClientCheckNameAvailabilityResult struct {
	CheckNameResult
}

ClientCheckNameAvailabilityResult contains the result from method Client.CheckNameAvailability.

type ClientCreateOrUpdatePoller added in v0.2.0

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

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

func (*ClientCreateOrUpdatePoller) Done added in v0.2.0

func (p *ClientCreateOrUpdatePoller) Done() bool

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

func (*ClientCreateOrUpdatePoller) FinalResponse added in v0.2.0

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 ClientCreateOrUpdateResponse will be returned.

func (*ClientCreateOrUpdatePoller) Poll added in v0.2.0

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 (*ClientCreateOrUpdatePoller) ResumeToken added in v0.2.0

func (p *ClientCreateOrUpdatePoller) 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 ClientCreateOrUpdatePollerResponse added in v0.2.0

type ClientCreateOrUpdatePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *ClientCreateOrUpdatePoller

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

ClientCreateOrUpdatePollerResponse contains the response from method Client.CreateOrUpdate.

func (ClientCreateOrUpdatePollerResponse) PollUntilDone added in v0.2.0

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 (*ClientCreateOrUpdatePollerResponse) Resume added in v0.2.0

func (l *ClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *Client, token string) error

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

type ClientCreateOrUpdateResponse added in v0.2.0

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

ClientCreateOrUpdateResponse contains the response from method Client.CreateOrUpdate.

type ClientCreateOrUpdateResult added in v0.2.0

type ClientCreateOrUpdateResult struct {
	Description
}

ClientCreateOrUpdateResult contains the result from method Client.CreateOrUpdate.

type ClientDeletePoller added in v0.2.0

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

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

func (*ClientDeletePoller) Done added in v0.2.0

func (p *ClientDeletePoller) Done() bool

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

func (*ClientDeletePoller) FinalResponse added in v0.2.0

func (p *ClientDeletePoller) FinalResponse(ctx context.Context) (ClientDeleteResponse, error)

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 ClientDeleteResponse will be returned.

func (*ClientDeletePoller) Poll added in v0.2.0

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 (*ClientDeletePoller) ResumeToken added in v0.2.0

func (p *ClientDeletePoller) 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 ClientDeletePollerResponse added in v0.2.0

type ClientDeletePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *ClientDeletePoller

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

ClientDeletePollerResponse contains the response from method Client.Delete.

func (ClientDeletePollerResponse) PollUntilDone added in v0.2.0

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 (*ClientDeletePollerResponse) Resume added in v0.2.0

func (l *ClientDeletePollerResponse) Resume(ctx context.Context, client *Client, token string) error

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

type ClientDeleteResponse added in v0.2.0

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

ClientDeleteResponse contains the response from method Client.Delete.

type ClientDeleteResult added in v0.2.0

type ClientDeleteResult struct {
	Description
}

ClientDeleteResult contains the result from method Client.Delete.

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 {
	ClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ClientGetResponse contains the response from method Client.Get.

type ClientGetResult added in v0.2.0

type ClientGetResult struct {
	Description
}

ClientGetResult contains the result from method Client.Get.

type ClientListByResourceGroupOptions added in v0.2.0

type ClientListByResourceGroupOptions struct {
}

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

type ClientListByResourceGroupPager added in v0.2.0

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

ClientListByResourceGroupPager provides operations for iterating over paged responses.

func (*ClientListByResourceGroupPager) Err added in v0.2.0

Err returns the last error encountered while paging.

func (*ClientListByResourceGroupPager) NextPage added in v0.2.0

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

func (*ClientListByResourceGroupPager) PageResponse added in v0.2.0

PageResponse returns the current ClientListByResourceGroupResponse page.

type ClientListByResourceGroupResponse added in v0.2.0

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

ClientListByResourceGroupResponse contains the response from method Client.ListByResourceGroup.

type ClientListByResourceGroupResult added in v0.2.0

type ClientListByResourceGroupResult struct {
	DescriptionListResult
}

ClientListByResourceGroupResult contains the result from method Client.ListByResourceGroup.

type ClientListOptions added in v0.2.0

type ClientListOptions struct {
}

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

type ClientListPager added in v0.2.0

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

ClientListPager provides operations for iterating over paged responses.

func (*ClientListPager) Err added in v0.2.0

func (p *ClientListPager) Err() error

Err returns the last error encountered while paging.

func (*ClientListPager) NextPage added in v0.2.0

func (p *ClientListPager) 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 (*ClientListPager) PageResponse added in v0.2.0

func (p *ClientListPager) PageResponse() ClientListResponse

PageResponse returns the current ClientListResponse page.

type ClientListResponse added in v0.2.0

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

ClientListResponse contains the response from method Client.List.

type ClientListResult added in v0.2.0

type ClientListResult struct {
	DescriptionListResult
}

ClientListResult contains the result from method Client.List.

type ClientUpdatePoller added in v0.2.0

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

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

func (*ClientUpdatePoller) Done added in v0.2.0

func (p *ClientUpdatePoller) Done() bool

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

func (*ClientUpdatePoller) FinalResponse added in v0.2.0

func (p *ClientUpdatePoller) FinalResponse(ctx context.Context) (ClientUpdateResponse, error)

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 ClientUpdateResponse will be returned.

func (*ClientUpdatePoller) Poll added in v0.2.0

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 (*ClientUpdatePoller) ResumeToken added in v0.2.0

func (p *ClientUpdatePoller) 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 ClientUpdatePollerResponse added in v0.2.0

type ClientUpdatePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *ClientUpdatePoller

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

ClientUpdatePollerResponse contains the response from method Client.Update.

func (ClientUpdatePollerResponse) PollUntilDone added in v0.2.0

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 (*ClientUpdatePollerResponse) Resume added in v0.2.0

func (l *ClientUpdatePollerResponse) Resume(ctx context.Context, client *Client, token string) error

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

type ClientUpdateResponse added in v0.2.0

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

ClientUpdateResponse contains the response from method Client.Update.

type ClientUpdateResult added in v0.2.0

type ClientUpdateResult struct {
	Description
}

ClientUpdateResult contains the result from method Client.Update.

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 {
	// READ-ONLY; The resource identifier.
	ID *string `json:"id,omitempty" azure:"ro"`
}

type ConnectionPropertiesPrivateLinkServiceConnectionState

type ConnectionPropertiesPrivateLinkServiceConnectionState 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"`
}

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

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

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

	// DigitalTwins instance properties.
	Properties *Properties `json:"properties,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"`
}

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.

type DescriptionListResult added in v0.2.0

type DescriptionListResult 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 []*Description `json:"value,omitempty"`
}

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.

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

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) (EndpointClientCreateOrUpdatePollerResponse, error)

BeginCreateOrUpdate - Create or update DigitalTwinsInstance endpoint. If the operation fails it returns an *azcore.ResponseError type. 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

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.NewEndpointClient("<subscription-id>", cred, nil)
	poller, err := client.BeginCreateOrUpdate(ctx,
		"<resource-group-name>",
		"<resource-name>",
		"<endpoint-name>",
		armdigitaltwins.EndpointResource{
			Properties: &armdigitaltwins.ServiceBus{
				AuthenticationType:        armdigitaltwins.AuthenticationType("KeyBased").ToPtr(),
				EndpointType:              armdigitaltwins.EndpointType("ServiceBus").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("Response result: %#v\n", res.EndpointClientCreateOrUpdateResult)
}
Output:

func (*EndpointClient) BeginDelete added in v0.2.0

func (client *EndpointClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, endpointName string, options *EndpointClientBeginDeleteOptions) (EndpointClientDeletePollerResponse, error)

BeginDelete - Delete a DigitalTwinsInstance endpoint. If the operation fails it returns an *azcore.ResponseError type. 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

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.NewEndpointClient("<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("Response result: %#v\n", res.EndpointClientDeleteResult)
}
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. 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

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.NewEndpointClient("<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("Response result: %#v\n", res.EndpointClientGetResult)
}
Output:

func (*EndpointClient) List added in v0.2.0

func (client *EndpointClient) List(resourceGroupName string, resourceName string, options *EndpointClientListOptions) *EndpointClientListPager

List - Get DigitalTwinsInstance Endpoints. If the operation fails it returns an *azcore.ResponseError type. 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.List method.

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.NewEndpointClient("<subscription-id>", cred, nil)
	pager := client.List("<resource-group-name>",
		"<resource-name>",
		nil)
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type EndpointClientBeginCreateOrUpdateOptions added in v0.2.0

type EndpointClientBeginCreateOrUpdateOptions struct {
}

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

type EndpointClientBeginDeleteOptions added in v0.2.0

type EndpointClientBeginDeleteOptions struct {
}

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

type EndpointClientCreateOrUpdatePoller added in v0.2.0

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

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

func (*EndpointClientCreateOrUpdatePoller) Done added in v0.2.0

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

func (*EndpointClientCreateOrUpdatePoller) FinalResponse added in v0.2.0

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 EndpointClientCreateOrUpdateResponse will be returned.

func (*EndpointClientCreateOrUpdatePoller) Poll added in v0.2.0

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 (*EndpointClientCreateOrUpdatePoller) ResumeToken added in v0.2.0

func (p *EndpointClientCreateOrUpdatePoller) 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 EndpointClientCreateOrUpdatePollerResponse added in v0.2.0

type EndpointClientCreateOrUpdatePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *EndpointClientCreateOrUpdatePoller

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

EndpointClientCreateOrUpdatePollerResponse contains the response from method EndpointClient.CreateOrUpdate.

func (EndpointClientCreateOrUpdatePollerResponse) PollUntilDone added in v0.2.0

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 (*EndpointClientCreateOrUpdatePollerResponse) Resume added in v0.2.0

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

type EndpointClientCreateOrUpdateResponse added in v0.2.0

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

EndpointClientCreateOrUpdateResponse contains the response from method EndpointClient.CreateOrUpdate.

type EndpointClientCreateOrUpdateResult added in v0.2.0

type EndpointClientCreateOrUpdateResult struct {
	EndpointResource
}

EndpointClientCreateOrUpdateResult contains the result from method EndpointClient.CreateOrUpdate.

type EndpointClientDeletePoller added in v0.2.0

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

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

func (*EndpointClientDeletePoller) Done added in v0.2.0

func (p *EndpointClientDeletePoller) Done() bool

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

func (*EndpointClientDeletePoller) FinalResponse added in v0.2.0

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 EndpointClientDeleteResponse will be returned.

func (*EndpointClientDeletePoller) Poll added in v0.2.0

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 (*EndpointClientDeletePoller) ResumeToken added in v0.2.0

func (p *EndpointClientDeletePoller) 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 EndpointClientDeletePollerResponse added in v0.2.0

type EndpointClientDeletePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *EndpointClientDeletePoller

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

EndpointClientDeletePollerResponse contains the response from method EndpointClient.Delete.

func (EndpointClientDeletePollerResponse) PollUntilDone added in v0.2.0

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 (*EndpointClientDeletePollerResponse) Resume added in v0.2.0

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

type EndpointClientDeleteResponse added in v0.2.0

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

EndpointClientDeleteResponse contains the response from method EndpointClient.Delete.

type EndpointClientDeleteResult added in v0.2.0

type EndpointClientDeleteResult struct {
	EndpointResource
}

EndpointClientDeleteResult contains the result from method EndpointClient.Delete.

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 {
	EndpointClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

EndpointClientGetResponse contains the response from method EndpointClient.Get.

type EndpointClientGetResult added in v0.2.0

type EndpointClientGetResult struct {
	EndpointResource
}

EndpointClientGetResult contains the result from method EndpointClient.Get.

type EndpointClientListOptions added in v0.2.0

type EndpointClientListOptions struct {
}

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

type EndpointClientListPager added in v0.2.0

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

EndpointClientListPager provides operations for iterating over paged responses.

func (*EndpointClientListPager) Err added in v0.2.0

func (p *EndpointClientListPager) Err() error

Err returns the last error encountered while paging.

func (*EndpointClientListPager) NextPage added in v0.2.0

func (p *EndpointClientListPager) 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 (*EndpointClientListPager) PageResponse added in v0.2.0

PageResponse returns the current EndpointClientListResponse page.

type EndpointClientListResponse added in v0.2.0

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

EndpointClientListResponse contains the response from method EndpointClient.List.

type EndpointClientListResult added in v0.2.0

type EndpointClientListResult struct {
	EndpointResourceListResult
}

EndpointClientListResult contains the result from method EndpointClient.List.

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

type EndpointResource struct {
	// REQUIRED; DigitalTwinsInstance endpoint resource properties.
	Properties EndpointResourcePropertiesClassification `json:"properties,omitempty"`

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

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

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

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.

type EndpointResourceProperties added in v0.2.0

type EndpointResourceProperties 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"`
}

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.

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
	Error *ErrorDefinition `json:"error,omitempty"`
}

ErrorResponse - Error response.

type EventGrid

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

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

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

	// EventGrid secondary accesskey. Will be obfuscated during read.
	AccessKey2 *string `json:"accessKey2,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"`
}

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

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

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

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

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

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

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

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 {
	// 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"`
}

func (GroupIDInformationProperties) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type GroupIDInformationProperties.

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

type Identity 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"`
}

Identity - The managed identity for the DigitalTwinsInstance.

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

func (*OperationsClient) List

List - Lists all of the available DigitalTwins service REST API operations. If the operation fails it returns an *azcore.ResponseError type. options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

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 {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type OperationsClientListOptions added in v0.2.0

type OperationsClientListOptions struct {
}

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

type OperationsClientListPager added in v0.2.0

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

OperationsClientListPager provides operations for iterating over paged responses.

func (*OperationsClientListPager) Err added in v0.2.0

Err returns the last error encountered while paging.

func (*OperationsClientListPager) NextPage added in v0.2.0

func (p *OperationsClientListPager) 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 (*OperationsClientListPager) PageResponse added in v0.2.0

PageResponse returns the current OperationsClientListResponse page.

type OperationsClientListResponse added in v0.2.0

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

OperationsClientListResponse contains the response from method OperationsClient.List.

type OperationsClientListResult added in v0.2.0

type OperationsClientListResult struct {
	OperationListResult
}

OperationsClientListResult contains the result from method OperationsClient.List.

type PatchDescription added in v0.2.0

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

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

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

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.

type PatchProperties added in v0.2.0

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

PatchProperties - The properties of a DigitalTwinsInstance.

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 {
	// 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"`
}

func (PrivateEndpointConnectionProperties) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.

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. 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) (PrivateEndpointConnectionsClientCreateOrUpdatePollerResponse, error)

BeginCreateOrUpdate - Update the status of a private endpoint connection with the given name. If the operation fails it returns an *azcore.ResponseError type. 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

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{
				PrivateLinkServiceConnectionState: &armdigitaltwins.ConnectionPropertiesPrivateLinkServiceConnectionState{
					Description: to.StringPtr("<description>"),
					Status:      armdigitaltwins.PrivateLinkServiceConnectionStatus("Approved").ToPtr(),
				},
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.PrivateEndpointConnectionsClientCreateOrUpdateResult)
}
Output:

func (*PrivateEndpointConnectionsClient) BeginDelete

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

BeginDelete - Delete private endpoint connection with the specified name. If the operation fails it returns an *azcore.ResponseError type. 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

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 *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error)

Get - Get private endpoint connection properties for the given private endpoint. If the operation fails it returns an *azcore.ResponseError type. 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

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("Response result: %#v\n", res.PrivateEndpointConnectionsClientGetResult)
}
Output:

func (*PrivateEndpointConnectionsClient) List

List - List private endpoint connection properties. If the operation fails it returns an *azcore.ResponseError type. 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

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)
	res, err := client.List(ctx,
		"<resource-group-name>",
		"<resource-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.PrivateEndpointConnectionsClientListResult)
}
Output:

type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions added in v0.2.0

type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions struct {
}

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

type PrivateEndpointConnectionsClientBeginDeleteOptions added in v0.2.0

type PrivateEndpointConnectionsClientBeginDeleteOptions struct {
}

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

type PrivateEndpointConnectionsClientCreateOrUpdatePoller added in v0.2.0

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

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

func (*PrivateEndpointConnectionsClientCreateOrUpdatePoller) Done added in v0.2.0

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

func (*PrivateEndpointConnectionsClientCreateOrUpdatePoller) FinalResponse added in v0.2.0

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 PrivateEndpointConnectionsClientCreateOrUpdateResponse will be returned.

func (*PrivateEndpointConnectionsClientCreateOrUpdatePoller) Poll added in v0.2.0

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 (*PrivateEndpointConnectionsClientCreateOrUpdatePoller) ResumeToken added in v0.2.0

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

type PrivateEndpointConnectionsClientCreateOrUpdatePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *PrivateEndpointConnectionsClientCreateOrUpdatePoller

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

PrivateEndpointConnectionsClientCreateOrUpdatePollerResponse contains the response from method PrivateEndpointConnectionsClient.CreateOrUpdate.

func (PrivateEndpointConnectionsClientCreateOrUpdatePollerResponse) PollUntilDone added in v0.2.0

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 (*PrivateEndpointConnectionsClientCreateOrUpdatePollerResponse) Resume added in v0.2.0

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

type PrivateEndpointConnectionsClientCreateOrUpdateResponse added in v0.2.0

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

PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.CreateOrUpdate.

type PrivateEndpointConnectionsClientCreateOrUpdateResult added in v0.2.0

type PrivateEndpointConnectionsClientCreateOrUpdateResult struct {
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientCreateOrUpdateResult contains the result from method PrivateEndpointConnectionsClient.CreateOrUpdate.

type PrivateEndpointConnectionsClientDeletePoller added in v0.2.0

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

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

func (*PrivateEndpointConnectionsClientDeletePoller) Done added in v0.2.0

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

func (*PrivateEndpointConnectionsClientDeletePoller) FinalResponse added in v0.2.0

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 PrivateEndpointConnectionsClientDeleteResponse will be returned.

func (*PrivateEndpointConnectionsClientDeletePoller) Poll added in v0.2.0

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 (*PrivateEndpointConnectionsClientDeletePoller) ResumeToken added in v0.2.0

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

type PrivateEndpointConnectionsClientDeletePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *PrivateEndpointConnectionsClientDeletePoller

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

PrivateEndpointConnectionsClientDeletePollerResponse contains the response from method PrivateEndpointConnectionsClient.Delete.

func (PrivateEndpointConnectionsClientDeletePollerResponse) PollUntilDone added in v0.2.0

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 (*PrivateEndpointConnectionsClientDeletePollerResponse) Resume added in v0.2.0

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

type PrivateEndpointConnectionsClientDeleteResponse added in v0.2.0

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

PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.Delete.

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 {
	PrivateEndpointConnectionsClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.

type PrivateEndpointConnectionsClientGetResult added in v0.2.0

type PrivateEndpointConnectionsClientGetResult struct {
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientGetResult contains the result 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 {
	PrivateEndpointConnectionsClientListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.List.

type PrivateEndpointConnectionsClientListResult added in v0.2.0

type PrivateEndpointConnectionsClientListResult struct {
	PrivateEndpointConnectionsResponse
}

PrivateEndpointConnectionsClientListResult contains the result from method PrivateEndpointConnectionsClient.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. 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. 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

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("Response result: %#v\n", res.PrivateLinkResourcesClientGetResult)
}
Output:

func (*PrivateLinkResourcesClient) List

List - List private link resources for given Digital Twin. If the operation fails it returns an *azcore.ResponseError type. 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

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)
	res, err := client.List(ctx,
		"<resource-group-name>",
		"<resource-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.PrivateLinkResourcesClientListResult)
}
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 {
	PrivateLinkResourcesClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get.

type PrivateLinkResourcesClientGetResult added in v0.2.0

type PrivateLinkResourcesClientGetResult struct {
	GroupIDInformation
}

PrivateLinkResourcesClientGetResult contains the result 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 {
	PrivateLinkResourcesClientListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateLinkResourcesClientListResponse contains the response from method PrivateLinkResourcesClient.List.

type PrivateLinkResourcesClientListResult added in v0.2.0

type PrivateLinkResourcesClientListResult struct {
	GroupIDInformationResponse
}

PrivateLinkResourcesClientListResult contains the result 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.

func (PrivateLinkServiceConnectionStatus) ToPtr

ToPtr returns a *PrivateLinkServiceConnectionStatus pointing to the current value.

type Properties added in v0.2.0

type Properties 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"`
}

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.

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

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

	// The managed identity for the DigitalTwinsInstance.
	Identity *Identity `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"`
}

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.

type ServiceBus

type ServiceBus 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"`

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

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

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.

Jump to

Keyboard shortcuts

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