armsignalr

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: MIT Imports: 14 Imported by: 5

README

Azure Signalr Module for Go

PkgGoDev

The armsignalr module provides operations for working with Azure Signalr.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Signalr module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Signalr. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure Signalr module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armsignalr.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armsignalr.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Signalr 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 ACLAction

type ACLAction string

ACLAction - Azure Networking ACL Action.

const (
	ACLActionAllow ACLAction = "Allow"
	ACLActionDeny  ACLAction = "Deny"
)

func PossibleACLActionValues

func PossibleACLActionValues() []ACLAction

PossibleACLActionValues returns the possible values for the ACLAction const type.

type Client added in v0.2.0

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

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

func NewClient added in v0.2.0

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

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

  • subscriptionID - Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • 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, parameters ResourceInfo, options *ClientBeginCreateOrUpdateOptions) (*runtime.Poller[ClientCreateOrUpdateResponse], error)

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

Generated from API version 2023-02-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • parameters - Parameters for the create or update operation
  • options - ClientBeginCreateOrUpdateOptions contains the optional parameters for the Client.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalR_CreateOrUpdate.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/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "mySignalRService", armsignalr.ResourceInfo{
		Location: to.Ptr("eastus"),
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
		Identity: &armsignalr.ManagedIdentity{
			Type: to.Ptr(armsignalr.ManagedIdentityTypeSystemAssigned),
		},
		Kind: to.Ptr(armsignalr.ServiceKindSignalR),
		Properties: &armsignalr.Properties{
			Cors: &armsignalr.CorsSettings{
				AllowedOrigins: []*string{
					to.Ptr("https://foo.com"),
					to.Ptr("https://bar.com")},
			},
			DisableAADAuth:   to.Ptr(false),
			DisableLocalAuth: to.Ptr(false),
			Features: []*armsignalr.Feature{
				{
					Flag:       to.Ptr(armsignalr.FeatureFlagsServiceMode),
					Properties: map[string]*string{},
					Value:      to.Ptr("Serverless"),
				},
				{
					Flag:       to.Ptr(armsignalr.FeatureFlagsEnableConnectivityLogs),
					Properties: map[string]*string{},
					Value:      to.Ptr("True"),
				},
				{
					Flag:       to.Ptr(armsignalr.FeatureFlagsEnableMessagingLogs),
					Properties: map[string]*string{},
					Value:      to.Ptr("False"),
				},
				{
					Flag:       to.Ptr(armsignalr.FeatureFlagsEnableLiveTrace),
					Properties: map[string]*string{},
					Value:      to.Ptr("False"),
				}},
			LiveTraceConfiguration: &armsignalr.LiveTraceConfiguration{
				Categories: []*armsignalr.LiveTraceCategory{
					{
						Name:    to.Ptr("ConnectivityLogs"),
						Enabled: to.Ptr("true"),
					}},
				Enabled: to.Ptr("false"),
			},
			NetworkACLs: &armsignalr.NetworkACLs{
				DefaultAction: to.Ptr(armsignalr.ACLActionDeny),
				PrivateEndpoints: []*armsignalr.PrivateEndpointACL{
					{
						Allow: []*armsignalr.SignalRRequestType{
							to.Ptr(armsignalr.SignalRRequestTypeServerConnection)},
						Name: to.Ptr("mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
					}},
				PublicNetwork: &armsignalr.NetworkACL{
					Allow: []*armsignalr.SignalRRequestType{
						to.Ptr(armsignalr.SignalRRequestTypeClientConnection)},
				},
			},
			PublicNetworkAccess: to.Ptr("Enabled"),
			Serverless: &armsignalr.ServerlessSettings{
				ConnectionTimeoutInSeconds: to.Ptr[int32](5),
			},
			TLS: &armsignalr.TLSSettings{
				ClientCertEnabled: to.Ptr(false),
			},
			Upstream: &armsignalr.ServerlessUpstreamSettings{
				Templates: []*armsignalr.UpstreamTemplate{
					{
						Auth: &armsignalr.UpstreamAuthSettings{
							Type: to.Ptr(armsignalr.UpstreamAuthTypeManagedIdentity),
							ManagedIdentity: &armsignalr.ManagedIdentitySettings{
								Resource: to.Ptr("api://example"),
							},
						},
						CategoryPattern: to.Ptr("*"),
						EventPattern:    to.Ptr("connect,disconnect"),
						HubPattern:      to.Ptr("*"),
						URLTemplate:     to.Ptr("https://example.com/chat/api/connect"),
					}},
			},
		},
		SKU: &armsignalr.ResourceSKU{
			Name:     to.Ptr("Premium_P1"),
			Capacity: to.Ptr[int32](1),
			Tier:     to.Ptr(armsignalr.SignalRSKUTierPremium),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ResourceInfo = armsignalr.ResourceInfo{
	// 	Name: to.Ptr("mySignalRService"),
	// 	Type: to.Ptr("Microsoft.SignalRService/SignalR"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService"),
	// 	Location: to.Ptr("eastus"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Identity: &armsignalr.ManagedIdentity{
	// 		Type: to.Ptr(armsignalr.ManagedIdentityTypeSystemAssigned),
	// 		PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	},
	// 	Kind: to.Ptr(armsignalr.ServiceKindSignalR),
	// 	Properties: &armsignalr.Properties{
	// 		Cors: &armsignalr.CorsSettings{
	// 			AllowedOrigins: []*string{
	// 				to.Ptr("https://foo.com"),
	// 				to.Ptr("https://bar.com")},
	// 			},
	// 			DisableAADAuth: to.Ptr(false),
	// 			DisableLocalAuth: to.Ptr(false),
	// 			ExternalIP: to.Ptr("10.0.0.1"),
	// 			Features: []*armsignalr.Feature{
	// 				{
	// 					Flag: to.Ptr(armsignalr.FeatureFlagsServiceMode),
	// 					Properties: map[string]*string{
	// 					},
	// 					Value: to.Ptr("Serverless"),
	// 				},
	// 				{
	// 					Flag: to.Ptr(armsignalr.FeatureFlagsEnableConnectivityLogs),
	// 					Properties: map[string]*string{
	// 					},
	// 					Value: to.Ptr("True"),
	// 				},
	// 				{
	// 					Flag: to.Ptr(armsignalr.FeatureFlagsEnableMessagingLogs),
	// 					Properties: map[string]*string{
	// 					},
	// 					Value: to.Ptr("False"),
	// 				},
	// 				{
	// 					Flag: to.Ptr(armsignalr.FeatureFlagsEnableLiveTrace),
	// 					Properties: map[string]*string{
	// 					},
	// 					Value: to.Ptr("False"),
	// 			}},
	// 			HostName: to.Ptr("mysignalrservice.service.signalr.net"),
	// 			LiveTraceConfiguration: &armsignalr.LiveTraceConfiguration{
	// 				Categories: []*armsignalr.LiveTraceCategory{
	// 					{
	// 						Name: to.Ptr("ConnectivityLogs"),
	// 						Enabled: to.Ptr("true"),
	// 				}},
	// 				Enabled: to.Ptr("false"),
	// 			},
	// 			NetworkACLs: &armsignalr.NetworkACLs{
	// 				DefaultAction: to.Ptr(armsignalr.ACLActionDeny),
	// 				PrivateEndpoints: []*armsignalr.PrivateEndpointACL{
	// 					{
	// 						Allow: []*armsignalr.SignalRRequestType{
	// 							to.Ptr(armsignalr.SignalRRequestTypeServerConnection)},
	// 							Name: to.Ptr("mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 					}},
	// 					PublicNetwork: &armsignalr.NetworkACL{
	// 						Allow: []*armsignalr.SignalRRequestType{
	// 							to.Ptr(armsignalr.SignalRRequestTypeClientConnection)},
	// 						},
	// 					},
	// 					PrivateEndpointConnections: []*armsignalr.PrivateEndpointConnection{
	// 						{
	// 							Name: to.Ptr("mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 							Type: to.Ptr("Microsoft.SignalRService/SignalR/privateEndpointConnections"),
	// 							ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/privateEndpointConnections/mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 							Properties: &armsignalr.PrivateEndpointConnectionProperties{
	// 								PrivateEndpoint: &armsignalr.PrivateEndpoint{
	// 									ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"),
	// 								},
	// 								PrivateLinkServiceConnectionState: &armsignalr.PrivateLinkServiceConnectionState{
	// 									ActionsRequired: to.Ptr("None"),
	// 									Status: to.Ptr(armsignalr.PrivateLinkServiceConnectionStatusApproved),
	// 								},
	// 								ProvisioningState: to.Ptr(armsignalr.ProvisioningStateSucceeded),
	// 							},
	// 							SystemData: &armsignalr.SystemData{
	// 								CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
	// 								CreatedBy: to.Ptr("string"),
	// 								CreatedByType: to.Ptr(armsignalr.CreatedByTypeUser),
	// 								LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
	// 								LastModifiedBy: to.Ptr("string"),
	// 								LastModifiedByType: to.Ptr(armsignalr.CreatedByTypeUser),
	// 							},
	// 					}},
	// 					ProvisioningState: to.Ptr(armsignalr.ProvisioningStateSucceeded),
	// 					PublicNetworkAccess: to.Ptr("Enabled"),
	// 					PublicPort: to.Ptr[int32](443),
	// 					ResourceLogConfiguration: &armsignalr.ResourceLogConfiguration{
	// 						Categories: []*armsignalr.ResourceLogCategory{
	// 							{
	// 								Name: to.Ptr("ConnectivityLogs"),
	// 								Enabled: to.Ptr("true"),
	// 						}},
	// 					},
	// 					ServerPort: to.Ptr[int32](443),
	// 					Serverless: &armsignalr.ServerlessSettings{
	// 						ConnectionTimeoutInSeconds: to.Ptr[int32](5),
	// 					},
	// 					TLS: &armsignalr.TLSSettings{
	// 						ClientCertEnabled: to.Ptr(true),
	// 					},
	// 					Upstream: &armsignalr.ServerlessUpstreamSettings{
	// 						Templates: []*armsignalr.UpstreamTemplate{
	// 							{
	// 								URLTemplate: to.Ptr("http://foo.com"),
	// 						}},
	// 					},
	// 					Version: to.Ptr("1.0"),
	// 				},
	// 				SKU: &armsignalr.ResourceSKU{
	// 					Name: to.Ptr("Premium_P1"),
	// 					Capacity: to.Ptr[int32](1),
	// 					Size: to.Ptr("P1"),
	// 					Tier: to.Ptr(armsignalr.SignalRSKUTierPremium),
	// 				},
	// 				SystemData: &armsignalr.SystemData{
	// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
	// 					CreatedBy: to.Ptr("string"),
	// 					CreatedByType: to.Ptr(armsignalr.CreatedByTypeUser),
	// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
	// 					LastModifiedBy: to.Ptr("string"),
	// 					LastModifiedByType: to.Ptr(armsignalr.CreatedByTypeUser),
	// 				},
	// 			}
}
Output:

func (*Client) BeginDelete added in v0.2.0

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

BeginDelete - Operation to delete a resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • options - ClientBeginDeleteOptions contains the optional parameters for the Client.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalR_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr"
)

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

func (*Client) BeginRegenerateKey added in v0.2.0

func (client *Client) BeginRegenerateKey(ctx context.Context, resourceGroupName string, resourceName string, parameters RegenerateKeyParameters, options *ClientBeginRegenerateKeyOptions) (*runtime.Poller[ClientRegenerateKeyResponse], error)

BeginRegenerateKey - Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • parameters - Parameter that describes the Regenerate Key Operation.
  • options - ClientBeginRegenerateKeyOptions contains the optional parameters for the Client.BeginRegenerateKey method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalR_RegenerateKey.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/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginRegenerateKey(ctx, "myResourceGroup", "mySignalRService", armsignalr.RegenerateKeyParameters{
		KeyType: to.Ptr(armsignalr.KeyTypePrimary),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*Client) BeginRestart added in v0.2.0

func (client *Client) BeginRestart(ctx context.Context, resourceGroupName string, resourceName string, options *ClientBeginRestartOptions) (*runtime.Poller[ClientRestartResponse], error)

BeginRestart - Operation to restart a resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • options - ClientBeginRestartOptions contains the optional parameters for the Client.BeginRestart method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalR_Restart.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr"
)

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

func (*Client) BeginUpdate added in v0.2.0

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

BeginUpdate - Operation to update an exiting resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • parameters - Parameters for the update operation
  • options - ClientBeginUpdateOptions contains the optional parameters for the Client.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalR_Update.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/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginUpdate(ctx, "myResourceGroup", "mySignalRService", armsignalr.ResourceInfo{
		Location: to.Ptr("eastus"),
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
		Identity: &armsignalr.ManagedIdentity{
			Type: to.Ptr(armsignalr.ManagedIdentityTypeSystemAssigned),
		},
		Kind: to.Ptr(armsignalr.ServiceKindSignalR),
		Properties: &armsignalr.Properties{
			Cors: &armsignalr.CorsSettings{
				AllowedOrigins: []*string{
					to.Ptr("https://foo.com"),
					to.Ptr("https://bar.com")},
			},
			DisableAADAuth:   to.Ptr(false),
			DisableLocalAuth: to.Ptr(false),
			Features: []*armsignalr.Feature{
				{
					Flag:       to.Ptr(armsignalr.FeatureFlagsServiceMode),
					Properties: map[string]*string{},
					Value:      to.Ptr("Serverless"),
				},
				{
					Flag:       to.Ptr(armsignalr.FeatureFlagsEnableConnectivityLogs),
					Properties: map[string]*string{},
					Value:      to.Ptr("True"),
				},
				{
					Flag:       to.Ptr(armsignalr.FeatureFlagsEnableMessagingLogs),
					Properties: map[string]*string{},
					Value:      to.Ptr("False"),
				},
				{
					Flag:       to.Ptr(armsignalr.FeatureFlagsEnableLiveTrace),
					Properties: map[string]*string{},
					Value:      to.Ptr("False"),
				}},
			LiveTraceConfiguration: &armsignalr.LiveTraceConfiguration{
				Categories: []*armsignalr.LiveTraceCategory{
					{
						Name:    to.Ptr("ConnectivityLogs"),
						Enabled: to.Ptr("true"),
					}},
				Enabled: to.Ptr("false"),
			},
			NetworkACLs: &armsignalr.NetworkACLs{
				DefaultAction: to.Ptr(armsignalr.ACLActionDeny),
				PrivateEndpoints: []*armsignalr.PrivateEndpointACL{
					{
						Allow: []*armsignalr.SignalRRequestType{
							to.Ptr(armsignalr.SignalRRequestTypeServerConnection)},
						Name: to.Ptr("mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
					}},
				PublicNetwork: &armsignalr.NetworkACL{
					Allow: []*armsignalr.SignalRRequestType{
						to.Ptr(armsignalr.SignalRRequestTypeClientConnection)},
				},
			},
			PublicNetworkAccess: to.Ptr("Enabled"),
			Serverless: &armsignalr.ServerlessSettings{
				ConnectionTimeoutInSeconds: to.Ptr[int32](5),
			},
			TLS: &armsignalr.TLSSettings{
				ClientCertEnabled: to.Ptr(false),
			},
			Upstream: &armsignalr.ServerlessUpstreamSettings{
				Templates: []*armsignalr.UpstreamTemplate{
					{
						Auth: &armsignalr.UpstreamAuthSettings{
							Type: to.Ptr(armsignalr.UpstreamAuthTypeManagedIdentity),
							ManagedIdentity: &armsignalr.ManagedIdentitySettings{
								Resource: to.Ptr("api://example"),
							},
						},
						CategoryPattern: to.Ptr("*"),
						EventPattern:    to.Ptr("connect,disconnect"),
						HubPattern:      to.Ptr("*"),
						URLTemplate:     to.Ptr("https://example.com/chat/api/connect"),
					}},
			},
		},
		SKU: &armsignalr.ResourceSKU{
			Name:     to.Ptr("Premium_P1"),
			Capacity: to.Ptr[int32](1),
			Tier:     to.Ptr(armsignalr.SignalRSKUTierPremium),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ResourceInfo = armsignalr.ResourceInfo{
	// 	Name: to.Ptr("mySignalRService"),
	// 	Type: to.Ptr("Microsoft.SignalRService/SignalR"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService"),
	// 	Location: to.Ptr("eastus"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Identity: &armsignalr.ManagedIdentity{
	// 		Type: to.Ptr(armsignalr.ManagedIdentityTypeSystemAssigned),
	// 		PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	},
	// 	Kind: to.Ptr(armsignalr.ServiceKindSignalR),
	// 	Properties: &armsignalr.Properties{
	// 		Cors: &armsignalr.CorsSettings{
	// 			AllowedOrigins: []*string{
	// 				to.Ptr("https://foo.com"),
	// 				to.Ptr("https://bar.com")},
	// 			},
	// 			DisableAADAuth: to.Ptr(false),
	// 			DisableLocalAuth: to.Ptr(false),
	// 			ExternalIP: to.Ptr("10.0.0.1"),
	// 			Features: []*armsignalr.Feature{
	// 				{
	// 					Flag: to.Ptr(armsignalr.FeatureFlagsServiceMode),
	// 					Properties: map[string]*string{
	// 					},
	// 					Value: to.Ptr("Serverless"),
	// 				},
	// 				{
	// 					Flag: to.Ptr(armsignalr.FeatureFlagsEnableConnectivityLogs),
	// 					Properties: map[string]*string{
	// 					},
	// 					Value: to.Ptr("True"),
	// 				},
	// 				{
	// 					Flag: to.Ptr(armsignalr.FeatureFlagsEnableMessagingLogs),
	// 					Properties: map[string]*string{
	// 					},
	// 					Value: to.Ptr("False"),
	// 				},
	// 				{
	// 					Flag: to.Ptr(armsignalr.FeatureFlagsEnableLiveTrace),
	// 					Properties: map[string]*string{
	// 					},
	// 					Value: to.Ptr("False"),
	// 			}},
	// 			HostName: to.Ptr("mysignalrservice.service.signalr.net"),
	// 			LiveTraceConfiguration: &armsignalr.LiveTraceConfiguration{
	// 				Categories: []*armsignalr.LiveTraceCategory{
	// 					{
	// 						Name: to.Ptr("ConnectivityLogs"),
	// 						Enabled: to.Ptr("true"),
	// 				}},
	// 				Enabled: to.Ptr("false"),
	// 			},
	// 			NetworkACLs: &armsignalr.NetworkACLs{
	// 				DefaultAction: to.Ptr(armsignalr.ACLActionDeny),
	// 				PrivateEndpoints: []*armsignalr.PrivateEndpointACL{
	// 					{
	// 						Allow: []*armsignalr.SignalRRequestType{
	// 							to.Ptr(armsignalr.SignalRRequestTypeServerConnection)},
	// 							Name: to.Ptr("mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 					}},
	// 					PublicNetwork: &armsignalr.NetworkACL{
	// 						Allow: []*armsignalr.SignalRRequestType{
	// 							to.Ptr(armsignalr.SignalRRequestTypeClientConnection)},
	// 						},
	// 					},
	// 					PrivateEndpointConnections: []*armsignalr.PrivateEndpointConnection{
	// 						{
	// 							Name: to.Ptr("mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 							Type: to.Ptr("Microsoft.SignalRService/SignalR/privateEndpointConnections"),
	// 							ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/privateEndpointConnections/mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 							Properties: &armsignalr.PrivateEndpointConnectionProperties{
	// 								PrivateEndpoint: &armsignalr.PrivateEndpoint{
	// 									ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"),
	// 								},
	// 								PrivateLinkServiceConnectionState: &armsignalr.PrivateLinkServiceConnectionState{
	// 									ActionsRequired: to.Ptr("None"),
	// 									Status: to.Ptr(armsignalr.PrivateLinkServiceConnectionStatusApproved),
	// 								},
	// 								ProvisioningState: to.Ptr(armsignalr.ProvisioningStateSucceeded),
	// 							},
	// 							SystemData: &armsignalr.SystemData{
	// 								CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
	// 								CreatedBy: to.Ptr("string"),
	// 								CreatedByType: to.Ptr(armsignalr.CreatedByTypeUser),
	// 								LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
	// 								LastModifiedBy: to.Ptr("string"),
	// 								LastModifiedByType: to.Ptr(armsignalr.CreatedByTypeUser),
	// 							},
	// 					}},
	// 					ProvisioningState: to.Ptr(armsignalr.ProvisioningStateSucceeded),
	// 					PublicNetworkAccess: to.Ptr("Enabled"),
	// 					PublicPort: to.Ptr[int32](443),
	// 					ResourceLogConfiguration: &armsignalr.ResourceLogConfiguration{
	// 						Categories: []*armsignalr.ResourceLogCategory{
	// 							{
	// 								Name: to.Ptr("ConnectivityLogs"),
	// 								Enabled: to.Ptr("true"),
	// 						}},
	// 					},
	// 					ServerPort: to.Ptr[int32](443),
	// 					Serverless: &armsignalr.ServerlessSettings{
	// 						ConnectionTimeoutInSeconds: to.Ptr[int32](5),
	// 					},
	// 					TLS: &armsignalr.TLSSettings{
	// 						ClientCertEnabled: to.Ptr(true),
	// 					},
	// 					Upstream: &armsignalr.ServerlessUpstreamSettings{
	// 						Templates: []*armsignalr.UpstreamTemplate{
	// 							{
	// 								URLTemplate: to.Ptr("http://foo.com"),
	// 						}},
	// 					},
	// 					Version: to.Ptr("1.0"),
	// 				},
	// 				SKU: &armsignalr.ResourceSKU{
	// 					Name: to.Ptr("Premium_P1"),
	// 					Capacity: to.Ptr[int32](1),
	// 					Size: to.Ptr("P1"),
	// 					Tier: to.Ptr(armsignalr.SignalRSKUTierPremium),
	// 				},
	// 				SystemData: &armsignalr.SystemData{
	// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
	// 					CreatedBy: to.Ptr("string"),
	// 					CreatedByType: to.Ptr(armsignalr.CreatedByTypeUser),
	// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
	// 					LastModifiedBy: to.Ptr("string"),
	// 					LastModifiedByType: to.Ptr(armsignalr.CreatedByTypeUser),
	// 				},
	// 			}
}
Output:

func (*Client) CheckNameAvailability added in v0.2.0

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

CheckNameAvailability - Checks that the resource name is valid and is not already in use. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01

  • location - the region
  • parameters - Parameters supplied to the operation.
  • options - ClientCheckNameAvailabilityOptions contains the optional parameters for the Client.CheckNameAvailability method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalR_CheckNameAvailability.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/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().CheckNameAvailability(ctx, "eastus", armsignalr.NameAvailabilityParameters{
		Name: to.Ptr("mySignalRService"),
		Type: to.Ptr("Microsoft.SignalRService/SignalR"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.NameAvailability = armsignalr.NameAvailability{
	// 	Message: to.Ptr("The name is already taken. Please try a different name."),
	// 	NameAvailable: to.Ptr(false),
	// 	Reason: to.Ptr("AlreadyExists"),
	// }
}
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 the resource and its properties. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • options - ClientGetOptions contains the optional parameters for the Client.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalR_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().Get(ctx, "myResourceGroup", "mySignalRService", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ResourceInfo = armsignalr.ResourceInfo{
	// 	Name: to.Ptr("mySignalRService"),
	// 	Type: to.Ptr("Microsoft.SignalRService/SignalR"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService"),
	// 	Location: to.Ptr("eastus"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Identity: &armsignalr.ManagedIdentity{
	// 		Type: to.Ptr(armsignalr.ManagedIdentityTypeSystemAssigned),
	// 		PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	},
	// 	Kind: to.Ptr(armsignalr.ServiceKindSignalR),
	// 	Properties: &armsignalr.Properties{
	// 		Cors: &armsignalr.CorsSettings{
	// 			AllowedOrigins: []*string{
	// 				to.Ptr("https://foo.com"),
	// 				to.Ptr("https://bar.com")},
	// 			},
	// 			DisableAADAuth: to.Ptr(false),
	// 			DisableLocalAuth: to.Ptr(false),
	// 			ExternalIP: to.Ptr("10.0.0.1"),
	// 			Features: []*armsignalr.Feature{
	// 				{
	// 					Flag: to.Ptr(armsignalr.FeatureFlagsServiceMode),
	// 					Properties: map[string]*string{
	// 					},
	// 					Value: to.Ptr("Serverless"),
	// 				},
	// 				{
	// 					Flag: to.Ptr(armsignalr.FeatureFlagsEnableConnectivityLogs),
	// 					Properties: map[string]*string{
	// 					},
	// 					Value: to.Ptr("True"),
	// 				},
	// 				{
	// 					Flag: to.Ptr(armsignalr.FeatureFlagsEnableMessagingLogs),
	// 					Properties: map[string]*string{
	// 					},
	// 					Value: to.Ptr("False"),
	// 				},
	// 				{
	// 					Flag: to.Ptr(armsignalr.FeatureFlagsEnableLiveTrace),
	// 					Properties: map[string]*string{
	// 					},
	// 					Value: to.Ptr("False"),
	// 			}},
	// 			HostName: to.Ptr("mysignalrservice.service.signalr.net"),
	// 			LiveTraceConfiguration: &armsignalr.LiveTraceConfiguration{
	// 				Categories: []*armsignalr.LiveTraceCategory{
	// 					{
	// 						Name: to.Ptr("ConnectivityLogs"),
	// 						Enabled: to.Ptr("true"),
	// 				}},
	// 				Enabled: to.Ptr("false"),
	// 			},
	// 			NetworkACLs: &armsignalr.NetworkACLs{
	// 				DefaultAction: to.Ptr(armsignalr.ACLActionDeny),
	// 				PrivateEndpoints: []*armsignalr.PrivateEndpointACL{
	// 					{
	// 						Allow: []*armsignalr.SignalRRequestType{
	// 							to.Ptr(armsignalr.SignalRRequestTypeServerConnection)},
	// 							Name: to.Ptr("mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 					}},
	// 					PublicNetwork: &armsignalr.NetworkACL{
	// 						Allow: []*armsignalr.SignalRRequestType{
	// 							to.Ptr(armsignalr.SignalRRequestTypeClientConnection)},
	// 						},
	// 					},
	// 					PrivateEndpointConnections: []*armsignalr.PrivateEndpointConnection{
	// 						{
	// 							Name: to.Ptr("mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 							Type: to.Ptr("Microsoft.SignalRService/SignalR/privateEndpointConnections"),
	// 							ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/privateEndpointConnections/mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 							Properties: &armsignalr.PrivateEndpointConnectionProperties{
	// 								PrivateEndpoint: &armsignalr.PrivateEndpoint{
	// 									ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"),
	// 								},
	// 								PrivateLinkServiceConnectionState: &armsignalr.PrivateLinkServiceConnectionState{
	// 									ActionsRequired: to.Ptr("None"),
	// 									Status: to.Ptr(armsignalr.PrivateLinkServiceConnectionStatusApproved),
	// 								},
	// 								ProvisioningState: to.Ptr(armsignalr.ProvisioningStateSucceeded),
	// 							},
	// 							SystemData: &armsignalr.SystemData{
	// 								CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
	// 								CreatedBy: to.Ptr("string"),
	// 								CreatedByType: to.Ptr(armsignalr.CreatedByTypeUser),
	// 								LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
	// 								LastModifiedBy: to.Ptr("string"),
	// 								LastModifiedByType: to.Ptr(armsignalr.CreatedByTypeUser),
	// 							},
	// 					}},
	// 					ProvisioningState: to.Ptr(armsignalr.ProvisioningStateSucceeded),
	// 					PublicNetworkAccess: to.Ptr("Enabled"),
	// 					PublicPort: to.Ptr[int32](443),
	// 					ResourceLogConfiguration: &armsignalr.ResourceLogConfiguration{
	// 						Categories: []*armsignalr.ResourceLogCategory{
	// 							{
	// 								Name: to.Ptr("ConnectivityLogs"),
	// 								Enabled: to.Ptr("true"),
	// 						}},
	// 					},
	// 					ServerPort: to.Ptr[int32](443),
	// 					Serverless: &armsignalr.ServerlessSettings{
	// 						ConnectionTimeoutInSeconds: to.Ptr[int32](5),
	// 					},
	// 					TLS: &armsignalr.TLSSettings{
	// 						ClientCertEnabled: to.Ptr(true),
	// 					},
	// 					Upstream: &armsignalr.ServerlessUpstreamSettings{
	// 						Templates: []*armsignalr.UpstreamTemplate{
	// 							{
	// 								URLTemplate: to.Ptr("http://foo.com"),
	// 						}},
	// 					},
	// 					Version: to.Ptr("1.0"),
	// 				},
	// 				SKU: &armsignalr.ResourceSKU{
	// 					Name: to.Ptr("Premium_P1"),
	// 					Capacity: to.Ptr[int32](1),
	// 					Size: to.Ptr("P1"),
	// 					Tier: to.Ptr(armsignalr.SignalRSKUTierPremium),
	// 				},
	// 				SystemData: &armsignalr.SystemData{
	// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
	// 					CreatedBy: to.Ptr("string"),
	// 					CreatedByType: to.Ptr(armsignalr.CreatedByTypeUser),
	// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
	// 					LastModifiedBy: to.Ptr("string"),
	// 					LastModifiedByType: to.Ptr(armsignalr.CreatedByTypeUser),
	// 				},
	// 			}
}
Output:

func (*Client) ListKeys added in v0.2.0

func (client *Client) ListKeys(ctx context.Context, resourceGroupName string, resourceName string, options *ClientListKeysOptions) (ClientListKeysResponse, error)

ListKeys - Get the access keys of the resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • options - ClientListKeysOptions contains the optional parameters for the Client.ListKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalR_ListKeys.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().ListKeys(ctx, "myResourceGroup", "mySignalRService", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Keys = armsignalr.Keys{
	// }
}
Output:

func (*Client) ListSKUs added in v0.2.0

func (client *Client) ListSKUs(ctx context.Context, resourceGroupName string, resourceName string, options *ClientListSKUsOptions) (ClientListSKUsResponse, error)

ListSKUs - List all available skus of the resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • options - ClientListSKUsOptions contains the optional parameters for the Client.ListSKUs method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalR_ListSkus.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().ListSKUs(ctx, "myResourceGroup", "mySignalRService", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SKUList = armsignalr.SKUList{
	// 	Value: []*armsignalr.SKU{
	// 		{
	// 			Capacity: &armsignalr.SKUCapacity{
	// 				Default: to.Ptr[int32](1),
	// 				AllowedValues: []*int32{
	// 					to.Ptr[int32](0),
	// 					to.Ptr[int32](1)},
	// 					Maximum: to.Ptr[int32](1),
	// 					Minimum: to.Ptr[int32](0),
	// 					ScaleType: to.Ptr(armsignalr.ScaleTypeManual),
	// 				},
	// 				ResourceType: to.Ptr("Microsoft.SignalRService/SignalR"),
	// 				SKU: &armsignalr.ResourceSKU{
	// 					Name: to.Ptr("Free_F1"),
	// 					Tier: to.Ptr(armsignalr.SignalRSKUTierFree),
	// 				},
	// 			},
	// 			{
	// 				Capacity: &armsignalr.SKUCapacity{
	// 					Default: to.Ptr[int32](1),
	// 					AllowedValues: []*int32{
	// 						to.Ptr[int32](0),
	// 						to.Ptr[int32](1),
	// 						to.Ptr[int32](2),
	// 						to.Ptr[int32](5),
	// 						to.Ptr[int32](10),
	// 						to.Ptr[int32](20),
	// 						to.Ptr[int32](50),
	// 						to.Ptr[int32](100)},
	// 						Maximum: to.Ptr[int32](100),
	// 						Minimum: to.Ptr[int32](0),
	// 						ScaleType: to.Ptr(armsignalr.ScaleTypeAutomatic),
	// 					},
	// 					ResourceType: to.Ptr("Microsoft.SignalRService/SignalR"),
	// 					SKU: &armsignalr.ResourceSKU{
	// 						Name: to.Ptr("Standard_S1"),
	// 						Tier: to.Ptr(armsignalr.SignalRSKUTierStandard),
	// 					},
	// 			}},
	// 		}
}
Output:

func (*Client) NewListByResourceGroupPager added in v0.5.0

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

NewListByResourceGroupPager - Handles requests to list all resources in a resource group.

Generated from API version 2023-02-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • options - ClientListByResourceGroupOptions contains the optional parameters for the Client.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalR_ListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClient().NewListByResourceGroupPager("myResourceGroup", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ResourceInfoList = armsignalr.ResourceInfoList{
		// 	Value: []*armsignalr.ResourceInfo{
		// 		{
		// 			Name: to.Ptr("mySignalRService"),
		// 			Type: to.Ptr("Microsoft.SignalRService/SignalR"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService"),
		// 			Location: to.Ptr("eastus"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Identity: &armsignalr.ManagedIdentity{
		// 				Type: to.Ptr(armsignalr.ManagedIdentityTypeSystemAssigned),
		// 				PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			},
		// 			Kind: to.Ptr(armsignalr.ServiceKindSignalR),
		// 			Properties: &armsignalr.Properties{
		// 				Cors: &armsignalr.CorsSettings{
		// 					AllowedOrigins: []*string{
		// 						to.Ptr("https://foo.com"),
		// 						to.Ptr("https://bar.com")},
		// 					},
		// 					DisableAADAuth: to.Ptr(false),
		// 					DisableLocalAuth: to.Ptr(false),
		// 					ExternalIP: to.Ptr("10.0.0.1"),
		// 					Features: []*armsignalr.Feature{
		// 						{
		// 							Flag: to.Ptr(armsignalr.FeatureFlagsServiceMode),
		// 							Properties: map[string]*string{
		// 							},
		// 							Value: to.Ptr("Serverless"),
		// 						},
		// 						{
		// 							Flag: to.Ptr(armsignalr.FeatureFlagsEnableConnectivityLogs),
		// 							Properties: map[string]*string{
		// 							},
		// 							Value: to.Ptr("True"),
		// 						},
		// 						{
		// 							Flag: to.Ptr(armsignalr.FeatureFlagsEnableMessagingLogs),
		// 							Properties: map[string]*string{
		// 							},
		// 							Value: to.Ptr("False"),
		// 						},
		// 						{
		// 							Flag: to.Ptr(armsignalr.FeatureFlagsEnableLiveTrace),
		// 							Properties: map[string]*string{
		// 							},
		// 							Value: to.Ptr("False"),
		// 					}},
		// 					HostName: to.Ptr("mysignalrservice.service.signalr.net"),
		// 					LiveTraceConfiguration: &armsignalr.LiveTraceConfiguration{
		// 						Categories: []*armsignalr.LiveTraceCategory{
		// 							{
		// 								Name: to.Ptr("ConnectivityLogs"),
		// 								Enabled: to.Ptr("true"),
		// 						}},
		// 						Enabled: to.Ptr("false"),
		// 					},
		// 					NetworkACLs: &armsignalr.NetworkACLs{
		// 						DefaultAction: to.Ptr(armsignalr.ACLActionDeny),
		// 						PrivateEndpoints: []*armsignalr.PrivateEndpointACL{
		// 							{
		// 								Allow: []*armsignalr.SignalRRequestType{
		// 									to.Ptr(armsignalr.SignalRRequestTypeServerConnection)},
		// 									Name: to.Ptr("mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
		// 							}},
		// 							PublicNetwork: &armsignalr.NetworkACL{
		// 								Allow: []*armsignalr.SignalRRequestType{
		// 									to.Ptr(armsignalr.SignalRRequestTypeClientConnection)},
		// 								},
		// 							},
		// 							PrivateEndpointConnections: []*armsignalr.PrivateEndpointConnection{
		// 								{
		// 									Name: to.Ptr("mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
		// 									Type: to.Ptr("Microsoft.SignalRService/SignalR/privateEndpointConnections"),
		// 									ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/privateEndpointConnections/mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
		// 									Properties: &armsignalr.PrivateEndpointConnectionProperties{
		// 										PrivateEndpoint: &armsignalr.PrivateEndpoint{
		// 											ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"),
		// 										},
		// 										PrivateLinkServiceConnectionState: &armsignalr.PrivateLinkServiceConnectionState{
		// 											ActionsRequired: to.Ptr("None"),
		// 											Status: to.Ptr(armsignalr.PrivateLinkServiceConnectionStatusApproved),
		// 										},
		// 										ProvisioningState: to.Ptr(armsignalr.ProvisioningStateSucceeded),
		// 									},
		// 									SystemData: &armsignalr.SystemData{
		// 										CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
		// 										CreatedBy: to.Ptr("string"),
		// 										CreatedByType: to.Ptr(armsignalr.CreatedByTypeUser),
		// 										LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
		// 										LastModifiedBy: to.Ptr("string"),
		// 										LastModifiedByType: to.Ptr(armsignalr.CreatedByTypeUser),
		// 									},
		// 							}},
		// 							ProvisioningState: to.Ptr(armsignalr.ProvisioningStateSucceeded),
		// 							PublicNetworkAccess: to.Ptr("Enabled"),
		// 							PublicPort: to.Ptr[int32](443),
		// 							ResourceLogConfiguration: &armsignalr.ResourceLogConfiguration{
		// 								Categories: []*armsignalr.ResourceLogCategory{
		// 									{
		// 										Name: to.Ptr("ConnectivityLogs"),
		// 										Enabled: to.Ptr("true"),
		// 								}},
		// 							},
		// 							ServerPort: to.Ptr[int32](443),
		// 							Serverless: &armsignalr.ServerlessSettings{
		// 								ConnectionTimeoutInSeconds: to.Ptr[int32](5),
		// 							},
		// 							TLS: &armsignalr.TLSSettings{
		// 								ClientCertEnabled: to.Ptr(true),
		// 							},
		// 							Upstream: &armsignalr.ServerlessUpstreamSettings{
		// 								Templates: []*armsignalr.UpstreamTemplate{
		// 									{
		// 										URLTemplate: to.Ptr("http://foo.com"),
		// 								}},
		// 							},
		// 							Version: to.Ptr("1.0"),
		// 						},
		// 						SKU: &armsignalr.ResourceSKU{
		// 							Name: to.Ptr("Premium_P1"),
		// 							Capacity: to.Ptr[int32](1),
		// 							Size: to.Ptr("P1"),
		// 							Tier: to.Ptr(armsignalr.SignalRSKUTierPremium),
		// 						},
		// 						SystemData: &armsignalr.SystemData{
		// 							CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
		// 							CreatedBy: to.Ptr("string"),
		// 							CreatedByType: to.Ptr(armsignalr.CreatedByTypeUser),
		// 							LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
		// 							LastModifiedBy: to.Ptr("string"),
		// 							LastModifiedByType: to.Ptr(armsignalr.CreatedByTypeUser),
		// 						},
		// 				}},
		// 			}
	}
}
Output:

func (*Client) NewListBySubscriptionPager added in v0.5.0

func (client *Client) NewListBySubscriptionPager(options *ClientListBySubscriptionOptions) *runtime.Pager[ClientListBySubscriptionResponse]

NewListBySubscriptionPager - Handles requests to list all resources in a subscription.

Generated from API version 2023-02-01

  • options - ClientListBySubscriptionOptions contains the optional parameters for the Client.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalR_ListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ResourceInfoList = armsignalr.ResourceInfoList{
		// 	Value: []*armsignalr.ResourceInfo{
		// 		{
		// 			Name: to.Ptr("mySignalRService"),
		// 			Type: to.Ptr("Microsoft.SignalRService/SignalR"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService"),
		// 			Location: to.Ptr("eastus"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Identity: &armsignalr.ManagedIdentity{
		// 				Type: to.Ptr(armsignalr.ManagedIdentityTypeSystemAssigned),
		// 				PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			},
		// 			Kind: to.Ptr(armsignalr.ServiceKindSignalR),
		// 			Properties: &armsignalr.Properties{
		// 				Cors: &armsignalr.CorsSettings{
		// 					AllowedOrigins: []*string{
		// 						to.Ptr("https://foo.com"),
		// 						to.Ptr("https://bar.com")},
		// 					},
		// 					DisableAADAuth: to.Ptr(false),
		// 					DisableLocalAuth: to.Ptr(false),
		// 					ExternalIP: to.Ptr("10.0.0.1"),
		// 					Features: []*armsignalr.Feature{
		// 						{
		// 							Flag: to.Ptr(armsignalr.FeatureFlagsServiceMode),
		// 							Properties: map[string]*string{
		// 							},
		// 							Value: to.Ptr("Serverless"),
		// 						},
		// 						{
		// 							Flag: to.Ptr(armsignalr.FeatureFlagsEnableConnectivityLogs),
		// 							Properties: map[string]*string{
		// 							},
		// 							Value: to.Ptr("True"),
		// 						},
		// 						{
		// 							Flag: to.Ptr(armsignalr.FeatureFlagsEnableMessagingLogs),
		// 							Properties: map[string]*string{
		// 							},
		// 							Value: to.Ptr("False"),
		// 						},
		// 						{
		// 							Flag: to.Ptr(armsignalr.FeatureFlagsEnableLiveTrace),
		// 							Properties: map[string]*string{
		// 							},
		// 							Value: to.Ptr("False"),
		// 					}},
		// 					HostName: to.Ptr("mysignalrservice.service.signalr.net"),
		// 					LiveTraceConfiguration: &armsignalr.LiveTraceConfiguration{
		// 						Categories: []*armsignalr.LiveTraceCategory{
		// 							{
		// 								Name: to.Ptr("ConnectivityLogs"),
		// 								Enabled: to.Ptr("true"),
		// 						}},
		// 						Enabled: to.Ptr("false"),
		// 					},
		// 					NetworkACLs: &armsignalr.NetworkACLs{
		// 						DefaultAction: to.Ptr(armsignalr.ACLActionDeny),
		// 						PrivateEndpoints: []*armsignalr.PrivateEndpointACL{
		// 							{
		// 								Allow: []*armsignalr.SignalRRequestType{
		// 									to.Ptr(armsignalr.SignalRRequestTypeServerConnection)},
		// 									Name: to.Ptr("mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
		// 							}},
		// 							PublicNetwork: &armsignalr.NetworkACL{
		// 								Allow: []*armsignalr.SignalRRequestType{
		// 									to.Ptr(armsignalr.SignalRRequestTypeClientConnection)},
		// 								},
		// 							},
		// 							PrivateEndpointConnections: []*armsignalr.PrivateEndpointConnection{
		// 								{
		// 									Name: to.Ptr("mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
		// 									Type: to.Ptr("Microsoft.SignalRService/SignalR/privateEndpointConnections"),
		// 									ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/privateEndpointConnections/mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
		// 									Properties: &armsignalr.PrivateEndpointConnectionProperties{
		// 										PrivateEndpoint: &armsignalr.PrivateEndpoint{
		// 											ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"),
		// 										},
		// 										PrivateLinkServiceConnectionState: &armsignalr.PrivateLinkServiceConnectionState{
		// 											ActionsRequired: to.Ptr("None"),
		// 											Status: to.Ptr(armsignalr.PrivateLinkServiceConnectionStatusApproved),
		// 										},
		// 										ProvisioningState: to.Ptr(armsignalr.ProvisioningStateSucceeded),
		// 									},
		// 									SystemData: &armsignalr.SystemData{
		// 										CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
		// 										CreatedBy: to.Ptr("string"),
		// 										CreatedByType: to.Ptr(armsignalr.CreatedByTypeUser),
		// 										LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
		// 										LastModifiedBy: to.Ptr("string"),
		// 										LastModifiedByType: to.Ptr(armsignalr.CreatedByTypeUser),
		// 									},
		// 							}},
		// 							ProvisioningState: to.Ptr(armsignalr.ProvisioningStateSucceeded),
		// 							PublicNetworkAccess: to.Ptr("Enabled"),
		// 							PublicPort: to.Ptr[int32](443),
		// 							ResourceLogConfiguration: &armsignalr.ResourceLogConfiguration{
		// 								Categories: []*armsignalr.ResourceLogCategory{
		// 									{
		// 										Name: to.Ptr("ConnectivityLogs"),
		// 										Enabled: to.Ptr("true"),
		// 								}},
		// 							},
		// 							ServerPort: to.Ptr[int32](443),
		// 							Serverless: &armsignalr.ServerlessSettings{
		// 								ConnectionTimeoutInSeconds: to.Ptr[int32](5),
		// 							},
		// 							TLS: &armsignalr.TLSSettings{
		// 								ClientCertEnabled: to.Ptr(true),
		// 							},
		// 							Upstream: &armsignalr.ServerlessUpstreamSettings{
		// 								Templates: []*armsignalr.UpstreamTemplate{
		// 									{
		// 										URLTemplate: to.Ptr("http://foo.com"),
		// 								}},
		// 							},
		// 							Version: to.Ptr("1.0"),
		// 						},
		// 						SKU: &armsignalr.ResourceSKU{
		// 							Name: to.Ptr("Premium_P1"),
		// 							Capacity: to.Ptr[int32](1),
		// 							Size: to.Ptr("P1"),
		// 							Tier: to.Ptr(armsignalr.SignalRSKUTierPremium),
		// 						},
		// 						SystemData: &armsignalr.SystemData{
		// 							CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
		// 							CreatedBy: to.Ptr("string"),
		// 							CreatedByType: to.Ptr(armsignalr.CreatedByTypeUser),
		// 							LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
		// 							LastModifiedBy: to.Ptr("string"),
		// 							LastModifiedByType: to.Ptr(armsignalr.CreatedByTypeUser),
		// 						},
		// 				}},
		// 			}
	}
}
Output:

type ClientBeginCreateOrUpdateOptions added in v0.2.0

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

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

type ClientBeginDeleteOptions added in v0.2.0

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

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

type ClientBeginRegenerateKeyOptions added in v0.2.0

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

ClientBeginRegenerateKeyOptions contains the optional parameters for the Client.BeginRegenerateKey method.

type ClientBeginRestartOptions added in v0.2.0

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

ClientBeginRestartOptions contains the optional parameters for the Client.BeginRestart method.

type ClientBeginUpdateOptions added in v0.2.0

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

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

type ClientCheckNameAvailabilityOptions added in v0.2.0

type ClientCheckNameAvailabilityOptions struct {
}

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

type ClientCheckNameAvailabilityResponse added in v0.2.0

type ClientCheckNameAvailabilityResponse struct {
	// Result of the request to check name availability. It contains a flag and possible reason of failure.
	NameAvailability
}

ClientCheckNameAvailabilityResponse contains the response from method Client.CheckNameAvailability.

type ClientCreateOrUpdateResponse added in v0.2.0

type ClientCreateOrUpdateResponse struct {
	// A class represent a resource.
	ResourceInfo
}

ClientCreateOrUpdateResponse contains the response from method Client.BeginCreateOrUpdate.

type ClientDeleteResponse added in v0.2.0

type ClientDeleteResponse struct {
}

ClientDeleteResponse contains the response from method Client.BeginDelete.

type ClientFactory added in v1.1.0

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

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

func NewClientFactory added in v1.1.0

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • subscriptionID - Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewClient added in v1.1.0

func (c *ClientFactory) NewClient() *Client

NewClient creates a new instance of Client.

func (*ClientFactory) NewCustomCertificatesClient added in v1.1.0

func (c *ClientFactory) NewCustomCertificatesClient() *CustomCertificatesClient

NewCustomCertificatesClient creates a new instance of CustomCertificatesClient.

func (*ClientFactory) NewCustomDomainsClient added in v1.1.0

func (c *ClientFactory) NewCustomDomainsClient() *CustomDomainsClient

NewCustomDomainsClient creates a new instance of CustomDomainsClient.

func (*ClientFactory) NewOperationsClient added in v1.1.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewPrivateEndpointConnectionsClient added in v1.1.0

func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.

func (*ClientFactory) NewPrivateLinkResourcesClient added in v1.1.0

func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient.

func (*ClientFactory) NewSharedPrivateLinkResourcesClient added in v1.1.0

func (c *ClientFactory) NewSharedPrivateLinkResourcesClient() *SharedPrivateLinkResourcesClient

NewSharedPrivateLinkResourcesClient creates a new instance of SharedPrivateLinkResourcesClient.

func (*ClientFactory) NewUsagesClient added in v1.1.0

func (c *ClientFactory) NewUsagesClient() *UsagesClient

NewUsagesClient creates a new instance of UsagesClient.

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 {
	// A class represent a resource.
	ResourceInfo
}

ClientGetResponse contains the response from method Client.Get.

type ClientListByResourceGroupOptions added in v0.2.0

type ClientListByResourceGroupOptions struct {
}

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

type ClientListByResourceGroupResponse added in v0.2.0

type ClientListByResourceGroupResponse struct {
	// Object that includes an array of resources and a possible link for next set.
	ResourceInfoList
}

ClientListByResourceGroupResponse contains the response from method Client.NewListByResourceGroupPager.

type ClientListBySubscriptionOptions added in v0.2.0

type ClientListBySubscriptionOptions struct {
}

ClientListBySubscriptionOptions contains the optional parameters for the Client.NewListBySubscriptionPager method.

type ClientListBySubscriptionResponse added in v0.2.0

type ClientListBySubscriptionResponse struct {
	// Object that includes an array of resources and a possible link for next set.
	ResourceInfoList
}

ClientListBySubscriptionResponse contains the response from method Client.NewListBySubscriptionPager.

type ClientListKeysOptions added in v0.2.0

type ClientListKeysOptions struct {
}

ClientListKeysOptions contains the optional parameters for the Client.ListKeys method.

type ClientListKeysResponse added in v0.2.0

type ClientListKeysResponse struct {
	// A class represents the access keys of the resource.
	Keys
}

ClientListKeysResponse contains the response from method Client.ListKeys.

type ClientListSKUsOptions added in v0.2.0

type ClientListSKUsOptions struct {
}

ClientListSKUsOptions contains the optional parameters for the Client.ListSKUs method.

type ClientListSKUsResponse added in v0.2.0

type ClientListSKUsResponse struct {
	// The list skus operation response
	SKUList
}

ClientListSKUsResponse contains the response from method Client.ListSKUs.

type ClientRegenerateKeyResponse added in v0.2.0

type ClientRegenerateKeyResponse struct {
	// A class represents the access keys of the resource.
	Keys
}

ClientRegenerateKeyResponse contains the response from method Client.BeginRegenerateKey.

type ClientRestartResponse added in v0.2.0

type ClientRestartResponse struct {
}

ClientRestartResponse contains the response from method Client.BeginRestart.

type ClientUpdateResponse added in v0.2.0

type ClientUpdateResponse struct {
	// A class represent a resource.
	ResourceInfo
}

ClientUpdateResponse contains the response from method Client.BeginUpdate.

type CorsSettings added in v0.2.0

type CorsSettings struct {
	// Gets or sets the list of origins that should be allowed to make cross-origin calls (for example: http://example.com:12345).
	// Use "*" to allow all. If omitted, allow all by default.
	AllowedOrigins []*string
}

CorsSettings - Cross-Origin Resource Sharing (CORS) settings.

func (CorsSettings) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type CorsSettings.

func (*CorsSettings) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CorsSettings.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

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

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type CustomCertificate added in v0.3.0

type CustomCertificate struct {
	// REQUIRED; Custom certificate properties.
	Properties *CustomCertificateProperties

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

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

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

	// READ-ONLY; The type of the resource - e.g. "Microsoft.SignalRService/SignalR"
	Type *string
}

CustomCertificate - A custom certificate.

func (CustomCertificate) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CustomCertificate.

func (*CustomCertificate) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomCertificate.

type CustomCertificateList added in v0.3.0

type CustomCertificateList struct {
	// The URL the client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// List of custom certificates of this resource.
	Value []*CustomCertificate
}

CustomCertificateList - Custom certificates list.

func (CustomCertificateList) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type CustomCertificateList.

func (*CustomCertificateList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomCertificateList.

type CustomCertificateProperties added in v0.3.0

type CustomCertificateProperties struct {
	// REQUIRED; Base uri of the KeyVault that stores certificate.
	KeyVaultBaseURI *string

	// REQUIRED; Certificate secret name.
	KeyVaultSecretName *string

	// Certificate secret version.
	KeyVaultSecretVersion *string

	// READ-ONLY; Provisioning state of the resource.
	ProvisioningState *ProvisioningState
}

CustomCertificateProperties - Custom certificate properties.

func (CustomCertificateProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CustomCertificateProperties.

func (*CustomCertificateProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomCertificateProperties.

type CustomCertificatesClient added in v0.3.0

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

CustomCertificatesClient contains the methods for the SignalRCustomCertificates group. Don't use this type directly, use NewCustomCertificatesClient() instead.

func NewCustomCertificatesClient added in v0.3.0

func NewCustomCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomCertificatesClient, error)

NewCustomCertificatesClient creates a new instance of CustomCertificatesClient with the specified values.

  • subscriptionID - Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*CustomCertificatesClient) BeginCreateOrUpdate added in v0.3.0

func (client *CustomCertificatesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, parameters CustomCertificate, options *CustomCertificatesClientBeginCreateOrUpdateOptions) (*runtime.Poller[CustomCertificatesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a custom certificate. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • certificateName - Custom certificate name
  • options - CustomCertificatesClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomCertificatesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalRCustomCertificates_CreateOrUpdate.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/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCustomCertificatesClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "mySignalRService", "myCert", armsignalr.CustomCertificate{
		Properties: &armsignalr.CustomCertificateProperties{
			KeyVaultBaseURI:       to.Ptr("https://myvault.keyvault.azure.net/"),
			KeyVaultSecretName:    to.Ptr("mycert"),
			KeyVaultSecretVersion: to.Ptr("bb6a44b2743f47f68dad0d6cc9756432"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CustomCertificate = armsignalr.CustomCertificate{
	// 	Name: to.Ptr("myCert"),
	// 	Type: to.Ptr("Microsoft.SignalRService/SignalR/customCertificates"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/customCertificates/myCert"),
	// 	Properties: &armsignalr.CustomCertificateProperties{
	// 		KeyVaultBaseURI: to.Ptr("https://myvault.keyvault.azure.net/"),
	// 		KeyVaultSecretName: to.Ptr("mycert"),
	// 		KeyVaultSecretVersion: to.Ptr("bb6a44b2743f47f68dad0d6cc9756432"),
	// 		ProvisioningState: to.Ptr(armsignalr.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*CustomCertificatesClient) Delete added in v0.3.0

func (client *CustomCertificatesClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, options *CustomCertificatesClientDeleteOptions) (CustomCertificatesClientDeleteResponse, error)

Delete - Delete a custom certificate. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • certificateName - Custom certificate name
  • options - CustomCertificatesClientDeleteOptions contains the optional parameters for the CustomCertificatesClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalRCustomCertificates_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewCustomCertificatesClient().Delete(ctx, "myResourceGroup", "mySignalRService", "myCert", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*CustomCertificatesClient) Get added in v0.3.0

func (client *CustomCertificatesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, options *CustomCertificatesClientGetOptions) (CustomCertificatesClientGetResponse, error)

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

Generated from API version 2023-02-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • certificateName - Custom certificate name
  • options - CustomCertificatesClientGetOptions contains the optional parameters for the CustomCertificatesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalRCustomCertificates_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCustomCertificatesClient().Get(ctx, "myResourceGroup", "mySignalRService", "myCert", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CustomCertificate = armsignalr.CustomCertificate{
	// 	Name: to.Ptr("myCert"),
	// 	Type: to.Ptr("Microsoft.SignalRService/SignalR/customCertificates"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/customCertificates/myCert"),
	// 	Properties: &armsignalr.CustomCertificateProperties{
	// 		KeyVaultBaseURI: to.Ptr("https://myvault.keyvault.azure.net/"),
	// 		KeyVaultSecretName: to.Ptr("mycert"),
	// 		KeyVaultSecretVersion: to.Ptr("bb6a44b2743f47f68dad0d6cc9756432"),
	// 		ProvisioningState: to.Ptr(armsignalr.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*CustomCertificatesClient) NewListPager added in v0.5.0

func (client *CustomCertificatesClient) NewListPager(resourceGroupName string, resourceName string, options *CustomCertificatesClientListOptions) *runtime.Pager[CustomCertificatesClientListResponse]

NewListPager - List all custom certificates.

Generated from API version 2023-02-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • options - CustomCertificatesClientListOptions contains the optional parameters for the CustomCertificatesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalRCustomCertificates_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCustomCertificatesClient().NewListPager("myResourceGroup", "mySignalRService", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.CustomCertificateList = armsignalr.CustomCertificateList{
		// 	Value: []*armsignalr.CustomCertificate{
		// 		{
		// 			Name: to.Ptr("myCert"),
		// 			Type: to.Ptr("Microsoft.SignalRService/SignalR/customCertificates"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/customCertificates/myCert"),
		// 			Properties: &armsignalr.CustomCertificateProperties{
		// 				KeyVaultBaseURI: to.Ptr("https://myvault.keyvault.azure.net/"),
		// 				KeyVaultSecretName: to.Ptr("mycert"),
		// 				KeyVaultSecretVersion: to.Ptr("bb6a44b2743f47f68dad0d6cc9756432"),
		// 				ProvisioningState: to.Ptr(armsignalr.ProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

type CustomCertificatesClientBeginCreateOrUpdateOptions added in v0.3.0

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

CustomCertificatesClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomCertificatesClient.BeginCreateOrUpdate method.

type CustomCertificatesClientCreateOrUpdateResponse added in v0.3.0

type CustomCertificatesClientCreateOrUpdateResponse struct {
	// A custom certificate.
	CustomCertificate
}

CustomCertificatesClientCreateOrUpdateResponse contains the response from method CustomCertificatesClient.BeginCreateOrUpdate.

type CustomCertificatesClientDeleteOptions added in v0.3.0

type CustomCertificatesClientDeleteOptions struct {
}

CustomCertificatesClientDeleteOptions contains the optional parameters for the CustomCertificatesClient.Delete method.

type CustomCertificatesClientDeleteResponse added in v0.3.0

type CustomCertificatesClientDeleteResponse struct {
}

CustomCertificatesClientDeleteResponse contains the response from method CustomCertificatesClient.Delete.

type CustomCertificatesClientGetOptions added in v0.3.0

type CustomCertificatesClientGetOptions struct {
}

CustomCertificatesClientGetOptions contains the optional parameters for the CustomCertificatesClient.Get method.

type CustomCertificatesClientGetResponse added in v0.3.0

type CustomCertificatesClientGetResponse struct {
	// A custom certificate.
	CustomCertificate
}

CustomCertificatesClientGetResponse contains the response from method CustomCertificatesClient.Get.

type CustomCertificatesClientListOptions added in v0.3.0

type CustomCertificatesClientListOptions struct {
}

CustomCertificatesClientListOptions contains the optional parameters for the CustomCertificatesClient.NewListPager method.

type CustomCertificatesClientListResponse added in v0.3.0

type CustomCertificatesClientListResponse struct {
	// Custom certificates list.
	CustomCertificateList
}

CustomCertificatesClientListResponse contains the response from method CustomCertificatesClient.NewListPager.

type CustomDomain added in v0.3.0

type CustomDomain struct {
	// REQUIRED; Properties of a custom domain.
	Properties *CustomDomainProperties

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

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

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

	// READ-ONLY; The type of the resource - e.g. "Microsoft.SignalRService/SignalR"
	Type *string
}

CustomDomain - A custom domain

func (CustomDomain) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CustomDomain.

func (*CustomDomain) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomain.

type CustomDomainList added in v0.3.0

type CustomDomainList struct {
	// The URL the client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// List of custom domains that bind to this resource.
	Value []*CustomDomain
}

CustomDomainList - Custom domains list

func (CustomDomainList) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type CustomDomainList.

func (*CustomDomainList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainList.

type CustomDomainProperties added in v0.3.0

type CustomDomainProperties struct {
	// REQUIRED; Reference to a resource.
	CustomCertificate *ResourceReference

	// REQUIRED; The custom domain name.
	DomainName *string

	// READ-ONLY; Provisioning state of the resource.
	ProvisioningState *ProvisioningState
}

CustomDomainProperties - Properties of a custom domain.

func (CustomDomainProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CustomDomainProperties.

func (*CustomDomainProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainProperties.

type CustomDomainsClient added in v0.3.0

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

CustomDomainsClient contains the methods for the SignalRCustomDomains group. Don't use this type directly, use NewCustomDomainsClient() instead.

func NewCustomDomainsClient added in v0.3.0

func NewCustomDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomDomainsClient, error)

NewCustomDomainsClient creates a new instance of CustomDomainsClient with the specified values.

  • subscriptionID - Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*CustomDomainsClient) BeginCreateOrUpdate added in v0.3.0

func (client *CustomDomainsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, name string, parameters CustomDomain, options *CustomDomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[CustomDomainsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a custom domain. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • name - Custom domain name.
  • options - CustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalRCustomDomains_CreateOrUpdate.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/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCustomDomainsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "mySignalRService", "myDomain", armsignalr.CustomDomain{
		Properties: &armsignalr.CustomDomainProperties{
			CustomCertificate: &armsignalr.ResourceReference{
				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/customCertificates/myCert"),
			},
			DomainName: to.Ptr("example.com"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*CustomDomainsClient) BeginDelete added in v0.3.0

func (client *CustomDomainsClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, name string, options *CustomDomainsClientBeginDeleteOptions) (*runtime.Poller[CustomDomainsClientDeleteResponse], error)

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

Generated from API version 2023-02-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • name - Custom domain name.
  • options - CustomDomainsClientBeginDeleteOptions contains the optional parameters for the CustomDomainsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalRCustomDomains_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr"
)

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

func (*CustomDomainsClient) Get added in v0.3.0

func (client *CustomDomainsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, name string, options *CustomDomainsClientGetOptions) (CustomDomainsClientGetResponse, error)

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

Generated from API version 2023-02-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • name - Custom domain name.
  • options - CustomDomainsClientGetOptions contains the optional parameters for the CustomDomainsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalRCustomDomains_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCustomDomainsClient().Get(ctx, "myResourceGroup", "mySignalRService", "example", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CustomDomain = armsignalr.CustomDomain{
	// 	Name: to.Ptr("myDomain"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/customDomains/myDomain"),
	// 	Properties: &armsignalr.CustomDomainProperties{
	// 		CustomCertificate: &armsignalr.ResourceReference{
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/customCertificates/myCert"),
	// 		},
	// 		DomainName: to.Ptr("example.com"),
	// 		ProvisioningState: to.Ptr(armsignalr.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*CustomDomainsClient) NewListPager added in v0.5.0

func (client *CustomDomainsClient) NewListPager(resourceGroupName string, resourceName string, options *CustomDomainsClientListOptions) *runtime.Pager[CustomDomainsClientListResponse]

NewListPager - List all custom domains.

Generated from API version 2023-02-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • options - CustomDomainsClientListOptions contains the optional parameters for the CustomDomainsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalRCustomDomains_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCustomDomainsClient().NewListPager("myResourceGroup", "mySignalRService", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.CustomDomainList = armsignalr.CustomDomainList{
		// 	Value: []*armsignalr.CustomDomain{
		// 		{
		// 			Name: to.Ptr("myDomain"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/customDomains/myDomain"),
		// 			Properties: &armsignalr.CustomDomainProperties{
		// 				CustomCertificate: &armsignalr.ResourceReference{
		// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/customCertificates/myCert"),
		// 				},
		// 				DomainName: to.Ptr("example.com"),
		// 				ProvisioningState: to.Ptr(armsignalr.ProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

type CustomDomainsClientBeginCreateOrUpdateOptions added in v0.3.0

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

CustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginCreateOrUpdate method.

type CustomDomainsClientBeginDeleteOptions added in v0.3.0

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

CustomDomainsClientBeginDeleteOptions contains the optional parameters for the CustomDomainsClient.BeginDelete method.

type CustomDomainsClientCreateOrUpdateResponse added in v0.3.0

type CustomDomainsClientCreateOrUpdateResponse struct {
	// A custom domain
	CustomDomain
}

CustomDomainsClientCreateOrUpdateResponse contains the response from method CustomDomainsClient.BeginCreateOrUpdate.

type CustomDomainsClientDeleteResponse added in v0.3.0

type CustomDomainsClientDeleteResponse struct {
}

CustomDomainsClientDeleteResponse contains the response from method CustomDomainsClient.BeginDelete.

type CustomDomainsClientGetOptions added in v0.3.0

type CustomDomainsClientGetOptions struct {
}

CustomDomainsClientGetOptions contains the optional parameters for the CustomDomainsClient.Get method.

type CustomDomainsClientGetResponse added in v0.3.0

type CustomDomainsClientGetResponse struct {
	// A custom domain
	CustomDomain
}

CustomDomainsClientGetResponse contains the response from method CustomDomainsClient.Get.

type CustomDomainsClientListOptions added in v0.3.0

type CustomDomainsClientListOptions struct {
}

CustomDomainsClientListOptions contains the optional parameters for the CustomDomainsClient.NewListPager method.

type CustomDomainsClientListResponse added in v0.3.0

type CustomDomainsClientListResponse struct {
	// Custom domains list
	CustomDomainList
}

CustomDomainsClientListResponse contains the response from method CustomDomainsClient.NewListPager.

type Dimension

type Dimension struct {
	// Localized friendly display name of the dimension.
	DisplayName *string

	// Name of the dimension as it appears in MDM.
	InternalName *string

	// The public facing name of the dimension.
	Name *string

	// A Boolean flag indicating whether this dimension should be included for the shoebox export scenario.
	ToBeExportedForShoebox *bool
}

Dimension - Specifications of the Dimension of metrics.

func (Dimension) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type Dimension.

func (*Dimension) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Dimension.

type Feature added in v0.2.0

type Feature struct {
	// REQUIRED; FeatureFlags is the supported features of Azure SignalR service.
	// * ServiceMode: Flag for backend server for SignalR service. Values allowed: "Default": have your own backend server; "Serverless":
	// your application doesn't have a backend server; "Classic": for
	// backward compatibility. Support both Default and Serverless mode but not recommended; "PredefinedOnly": for future use.
	// * EnableConnectivityLogs: "true"/"false", to enable/disable the connectivity log category respectively.
	// * EnableMessagingLogs: "true"/"false", to enable/disable the connectivity log category respectively.
	// * EnableLiveTrace: Live Trace allows you to know what's happening inside Azure SignalR service, it will give you live traces
	// in real time, it will be helpful when you developing your own Azure
	// SignalR based web application or self-troubleshooting some issues. Please note that live traces are counted as outbound
	// messages that will be charged. Values allowed: "true"/"false", to
	// enable/disable live trace feature.
	Flag *FeatureFlags

	// REQUIRED; Value of the feature flag. See Azure SignalR service document https://docs.microsoft.com/azure/azure-signalr/
	// for allowed values.
	Value *string

	// Optional properties related to this feature.
	Properties map[string]*string
}

Feature of a resource, which controls the runtime behavior.

func (Feature) MarshalJSON added in v0.2.0

func (f Feature) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Feature.

func (*Feature) UnmarshalJSON added in v1.1.0

func (f *Feature) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Feature.

type FeatureFlags

type FeatureFlags string

FeatureFlags - FeatureFlags is the supported features of Azure SignalR service. * ServiceMode: Flag for backend server for SignalR service. Values allowed: "Default": have your own backend server; "Serverless": your application doesn't have a backend server; "Classic": for backward compatibility. Support both Default and Serverless mode but not recommended; "PredefinedOnly": for future use. * EnableConnectivityLogs: "true"/"false", to enable/disable the connectivity log category respectively. * EnableMessagingLogs: "true"/"false", to enable/disable the connectivity log category respectively. * EnableLiveTrace: Live Trace allows you to know what's happening inside Azure SignalR service, it will give you live traces in real time, it will be helpful when you developing your own Azure SignalR based web application or self-troubleshooting some issues. Please note that live traces are counted as outbound messages that will be charged. Values allowed: "true"/"false", to enable/disable live trace feature.

const (
	FeatureFlagsEnableConnectivityLogs FeatureFlags = "EnableConnectivityLogs"
	FeatureFlagsEnableLiveTrace        FeatureFlags = "EnableLiveTrace"
	FeatureFlagsEnableMessagingLogs    FeatureFlags = "EnableMessagingLogs"
	FeatureFlagsServiceMode            FeatureFlags = "ServiceMode"
)

func PossibleFeatureFlagsValues

func PossibleFeatureFlagsValues() []FeatureFlags

PossibleFeatureFlagsValues returns the possible values for the FeatureFlags const type.

type KeyType

type KeyType string

KeyType - The type of access key.

const (
	KeyTypePrimary   KeyType = "Primary"
	KeyTypeSalt      KeyType = "Salt"
	KeyTypeSecondary KeyType = "Secondary"
)

func PossibleKeyTypeValues

func PossibleKeyTypeValues() []KeyType

PossibleKeyTypeValues returns the possible values for the KeyType const type.

type Keys added in v0.2.0

type Keys struct {
	// Connection string constructed via the primaryKey
	PrimaryConnectionString *string

	// The primary access key.
	PrimaryKey *string

	// Connection string constructed via the secondaryKey
	SecondaryConnectionString *string

	// The secondary access key.
	SecondaryKey *string
}

Keys - A class represents the access keys of the resource.

func (Keys) MarshalJSON added in v1.1.0

func (k Keys) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Keys.

func (*Keys) UnmarshalJSON added in v1.1.0

func (k *Keys) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Keys.

type LiveTraceCategory added in v0.3.0

type LiveTraceCategory struct {
	// Indicates whether or the live trace category is enabled. Available values: true, false. Case insensitive.
	Enabled *string

	// Gets or sets the live trace category's name. Available values: ConnectivityLogs, MessagingLogs. Case insensitive.
	Name *string
}

LiveTraceCategory - Live trace category configuration of a Microsoft.SignalRService resource.

func (LiveTraceCategory) MarshalJSON added in v1.1.0

func (l LiveTraceCategory) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LiveTraceCategory.

func (*LiveTraceCategory) UnmarshalJSON added in v1.1.0

func (l *LiveTraceCategory) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LiveTraceCategory.

type LiveTraceConfiguration added in v0.3.0

type LiveTraceConfiguration struct {
	// Gets or sets the list of category configurations.
	Categories []*LiveTraceCategory

	// Indicates whether or not enable live trace. When it's set to true, live trace client can connect to the service. Otherwise,
	// live trace client can't connect to the service, so that you are unable to
	// receive any log, no matter what you configure in "categories". Available values: true, false. Case insensitive.
	Enabled *string
}

LiveTraceConfiguration - Live trace configuration of a Microsoft.SignalRService resource.

func (LiveTraceConfiguration) MarshalJSON added in v0.3.0

func (l LiveTraceConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LiveTraceConfiguration.

func (*LiveTraceConfiguration) UnmarshalJSON added in v1.1.0

func (l *LiveTraceConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LiveTraceConfiguration.

type LogSpecification

type LogSpecification struct {
	// Localized friendly display name of the log.
	DisplayName *string

	// Name of the log.
	Name *string
}

LogSpecification - Specifications of the Logs for Azure Monitoring.

func (LogSpecification) MarshalJSON added in v1.1.0

func (l LogSpecification) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LogSpecification.

func (*LogSpecification) UnmarshalJSON added in v1.1.0

func (l *LogSpecification) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification.

type ManagedIdentity

type ManagedIdentity struct {
	// Represents the identity type: systemAssigned, userAssigned, None
	Type *ManagedIdentityType

	// Get or set the user assigned identities
	UserAssignedIdentities map[string]*UserAssignedIdentityProperty

	// READ-ONLY; Get the principal id for the system assigned identity. Only be used in response.
	PrincipalID *string

	// READ-ONLY; Get the tenant id for the system assigned identity. Only be used in response
	TenantID *string
}

ManagedIdentity - A class represent managed identities used for request and response

func (ManagedIdentity) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ManagedIdentity.

func (*ManagedIdentity) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentity.

type ManagedIdentitySettings

type ManagedIdentitySettings struct {
	// The Resource indicating the App ID URI of the target resource. It also appears in the aud (audience) claim of the issued
	// token.
	Resource *string
}

ManagedIdentitySettings - Managed identity settings for upstream.

func (ManagedIdentitySettings) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ManagedIdentitySettings.

func (*ManagedIdentitySettings) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentitySettings.

type ManagedIdentityType

type ManagedIdentityType string

ManagedIdentityType - Represents the identity type: systemAssigned, userAssigned, None

const (
	ManagedIdentityTypeNone           ManagedIdentityType = "None"
	ManagedIdentityTypeSystemAssigned ManagedIdentityType = "SystemAssigned"
	ManagedIdentityTypeUserAssigned   ManagedIdentityType = "UserAssigned"
)

func PossibleManagedIdentityTypeValues

func PossibleManagedIdentityTypeValues() []ManagedIdentityType

PossibleManagedIdentityTypeValues returns the possible values for the ManagedIdentityType const type.

type MetricSpecification

type MetricSpecification struct {
	// Only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count.
	AggregationType *string

	// The name of the metric category that the metric belongs to. A metric can only belong to a single category.
	Category *string

	// The dimensions of the metrics.
	Dimensions []*Dimension

	// Localized friendly description of the metric.
	DisplayDescription *string

	// Localized friendly display name of the metric.
	DisplayName *string

	// Optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. Ex. a metric
	// that returns the number of times a particular error code was emitted. The
	// error code may not appear often, instead of the RP publishing 0, Shoebox can auto fill in 0s for time periods where nothing
	// was emitted.
	FillGapWithZero *string

	// Name of the metric.
	Name *string

	// The unit that makes sense for the metric.
	Unit *string
}

MetricSpecification - Specifications of the Metrics for Azure Monitoring.

func (MetricSpecification) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type MetricSpecification.

func (*MetricSpecification) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecification.

type NameAvailability

type NameAvailability struct {
	// The message of the operation.
	Message *string

	// Indicates whether the name is available or not.
	NameAvailable *bool

	// The reason of the availability. Required if name is not available.
	Reason *string
}

NameAvailability - Result of the request to check name availability. It contains a flag and possible reason of failure.

func (NameAvailability) MarshalJSON added in v1.1.0

func (n NameAvailability) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NameAvailability.

func (*NameAvailability) UnmarshalJSON added in v1.1.0

func (n *NameAvailability) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NameAvailability.

type NameAvailabilityParameters

type NameAvailabilityParameters struct {
	// REQUIRED; The resource name to validate. e.g."my-resource-name"
	Name *string

	// REQUIRED; The resource type. Can be "Microsoft.SignalRService/SignalR" or "Microsoft.SignalRService/webPubSub"
	Type *string
}

NameAvailabilityParameters - Data POST-ed to the nameAvailability action

func (NameAvailabilityParameters) MarshalJSON added in v1.1.0

func (n NameAvailabilityParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NameAvailabilityParameters.

func (*NameAvailabilityParameters) UnmarshalJSON added in v1.1.0

func (n *NameAvailabilityParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NameAvailabilityParameters.

type NetworkACL

type NetworkACL struct {
	// Allowed request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI.
	Allow []*SignalRRequestType

	// Denied request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI.
	Deny []*SignalRRequestType
}

NetworkACL - Network ACL

func (NetworkACL) MarshalJSON

func (n NetworkACL) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkACL.

func (*NetworkACL) UnmarshalJSON added in v1.1.0

func (n *NetworkACL) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkACL.

type NetworkACLs added in v0.2.0

type NetworkACLs struct {
	// Azure Networking ACL Action.
	DefaultAction *ACLAction

	// ACLs for requests from private endpoints
	PrivateEndpoints []*PrivateEndpointACL

	// Network ACL
	PublicNetwork *NetworkACL
}

NetworkACLs - Network ACLs for the resource

func (NetworkACLs) MarshalJSON added in v0.2.0

func (n NetworkACLs) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkACLs.

func (*NetworkACLs) UnmarshalJSON added in v1.1.0

func (n *NetworkACLs) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkACLs.

type Operation

type Operation struct {
	// The object that describes a operation.
	Display *OperationDisplay

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

	// Name of the operation with format: {provider}/{resource}/{operation}
	Name *string

	// Optional. The intended executor of the operation; governs the display of the operation in the RBAC UX and the audit logs
	// UX.
	Origin *string

	// Extra Operation properties.
	Properties *OperationProperties
}

Operation - REST API operation supported by resource provider.

func (Operation) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// The localized friendly description for the operation
	Description *string

	// The localized friendly name for the operation.
	Operation *string

	// Friendly name of the resource provider
	Provider *string

	// Resource type on which the operation is performed.
	Resource *string
}

OperationDisplay - The object that describes a operation.

func (OperationDisplay) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationList

type OperationList struct {
	// The URL the client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// List of operations supported by the resource provider.
	Value []*Operation
}

OperationList - Result of the request to list REST API operations. It contains a list of operations.

func (OperationList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationList.

func (*OperationList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationList.

type OperationProperties

type OperationProperties struct {
	// An object that describes a specification.
	ServiceSpecification *ServiceSpecification
}

OperationProperties - Extra Operation properties.

func (OperationProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type OperationProperties.

func (*OperationProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationProperties.

type OperationsClient

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

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

func NewOperationsClient

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

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

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

func (*OperationsClient) NewListPager added in v0.5.0

NewListPager - Lists all of the available REST API operations of the Microsoft.SignalRService provider.

Generated from API version 2023-02-01

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

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/Operations_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OperationList = armsignalr.OperationList{
		// 	Value: []*armsignalr.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.SignalRService/SignalR/read"),
		// 			Display: &armsignalr.OperationDisplay{
		// 				Description: to.Ptr("View the resource settings and configurations in the management portal or through API"),
		// 				Operation: to.Ptr("Manage SignalR (read-only)"),
		// 				Provider: to.Ptr("Microsoft.SignalRService"),
		// 				Resource: to.Ptr("SignalR"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Properties: &armsignalr.OperationProperties{
		// 			},
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions added in v0.2.0

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse added in v0.2.0

type OperationsClientListResponse struct {
	// Result of the request to list REST API operations. It contains a list of operations.
	OperationList
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type PrivateEndpoint

type PrivateEndpoint struct {
	// Full qualified Id of the private endpoint
	ID *string
}

PrivateEndpoint - Private endpoint

func (PrivateEndpoint) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint.

func (*PrivateEndpoint) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint.

type PrivateEndpointACL

type PrivateEndpointACL struct {
	// REQUIRED; Name of the private endpoint connection
	Name *string

	// Allowed request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI.
	Allow []*SignalRRequestType

	// Denied request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI.
	Deny []*SignalRRequestType
}

PrivateEndpointACL - ACL for a private endpoint

func (PrivateEndpointACL) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointACL.

func (*PrivateEndpointACL) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointACL.

type PrivateEndpointConnection

type PrivateEndpointConnection struct {
	// Private endpoint connection properties
	Properties *PrivateEndpointConnectionProperties

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

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

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

	// READ-ONLY; The type of the resource - e.g. "Microsoft.SignalRService/SignalR"
	Type *string
}

PrivateEndpointConnection - A private endpoint connection to an azure resource

func (PrivateEndpointConnection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.

func (*PrivateEndpointConnection) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.

type PrivateEndpointConnectionList

type PrivateEndpointConnectionList struct {
	// Request URL that can be used to query next page of private endpoint connections. Returned when the total number of requested
	// private endpoint connections exceed maximum page size.
	NextLink *string

	// The list of the private endpoint connections
	Value []*PrivateEndpointConnection
}

PrivateEndpointConnectionList - A list of private endpoint connections

func (PrivateEndpointConnectionList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionList.

func (*PrivateEndpointConnectionList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionList.

type PrivateEndpointConnectionProperties

type PrivateEndpointConnectionProperties struct {
	// Private endpoint
	PrivateEndpoint *PrivateEndpoint

	// Connection state of the private endpoint connection
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState

	// READ-ONLY; Group IDs
	GroupIDs []*string

	// READ-ONLY; Provisioning state of the resource.
	ProvisioningState *ProvisioningState
}

PrivateEndpointConnectionProperties - Private endpoint connection properties

func (PrivateEndpointConnectionProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.

func (*PrivateEndpointConnectionProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.

type PrivateEndpointConnectionsClient added in v0.2.0

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

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

func NewPrivateEndpointConnectionsClient added in v0.2.0

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

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

  • subscriptionID - Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PrivateEndpointConnectionsClient) BeginDelete added in v0.2.0

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

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

Generated from API version 2023-02-01

  • privateEndpointConnectionName - The name of the private endpoint connection
  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalRPrivateEndpointConnections_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginDelete(ctx, "mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", "myResourceGroup", "mySignalRService", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*PrivateEndpointConnectionsClient) Get added in v0.2.0

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

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

Generated from API version 2023-02-01

  • privateEndpointConnectionName - The name of the private endpoint connection
  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalRPrivateEndpointConnections_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", "myResourceGroup", "mySignalRService", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PrivateEndpointConnection = armsignalr.PrivateEndpointConnection{
	// 	Name: to.Ptr("mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 	Type: to.Ptr("Microsoft.SignalRService/SignalR/privateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/privateEndpointConnections/mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 	Properties: &armsignalr.PrivateEndpointConnectionProperties{
	// 		GroupIDs: []*string{
	// 			to.Ptr("signalr")},
	// 			PrivateEndpoint: &armsignalr.PrivateEndpoint{
	// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"),
	// 			},
	// 			PrivateLinkServiceConnectionState: &armsignalr.PrivateLinkServiceConnectionState{
	// 				ActionsRequired: to.Ptr("None"),
	// 				Status: to.Ptr(armsignalr.PrivateLinkServiceConnectionStatusApproved),
	// 			},
	// 			ProvisioningState: to.Ptr(armsignalr.ProvisioningStateSucceeded),
	// 		},
	// 		SystemData: &armsignalr.SystemData{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
	// 			CreatedBy: to.Ptr("string"),
	// 			CreatedByType: to.Ptr(armsignalr.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("string"),
	// 			LastModifiedByType: to.Ptr(armsignalr.CreatedByTypeUser),
	// 		},
	// 	}
}
Output:

func (*PrivateEndpointConnectionsClient) NewListPager added in v0.5.0

NewListPager - List private endpoint connections

Generated from API version 2023-02-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalRPrivateEndpointConnections_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListPager("myResourceGroup", "mySignalRService", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.PrivateEndpointConnectionList = armsignalr.PrivateEndpointConnectionList{
		// 	Value: []*armsignalr.PrivateEndpointConnection{
		// 		{
		// 			Name: to.Ptr("mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
		// 			Type: to.Ptr("Microsoft.SignalRService/SignalR/privateEndpointConnections"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/privateEndpointConnections/mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
		// 			Properties: &armsignalr.PrivateEndpointConnectionProperties{
		// 				GroupIDs: []*string{
		// 					to.Ptr("signalr")},
		// 					PrivateEndpoint: &armsignalr.PrivateEndpoint{
		// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"),
		// 					},
		// 					PrivateLinkServiceConnectionState: &armsignalr.PrivateLinkServiceConnectionState{
		// 						ActionsRequired: to.Ptr("None"),
		// 						Status: to.Ptr(armsignalr.PrivateLinkServiceConnectionStatusApproved),
		// 					},
		// 					ProvisioningState: to.Ptr(armsignalr.ProvisioningStateSucceeded),
		// 				},
		// 				SystemData: &armsignalr.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
		// 					CreatedBy: to.Ptr("string"),
		// 					CreatedByType: to.Ptr(armsignalr.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("string"),
		// 					LastModifiedByType: to.Ptr(armsignalr.CreatedByTypeUser),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

func (*PrivateEndpointConnectionsClient) Update added in v0.2.0

func (client *PrivateEndpointConnectionsClient) Update(ctx context.Context, privateEndpointConnectionName string, resourceGroupName string, resourceName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientUpdateOptions) (PrivateEndpointConnectionsClientUpdateResponse, error)

Update - Update the state of specified private endpoint connection If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01

  • privateEndpointConnectionName - The name of the private endpoint connection
  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • parameters - The resource of private endpoint and its properties
  • options - PrivateEndpointConnectionsClientUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalRPrivateEndpointConnections_Update.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/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateEndpointConnectionsClient().Update(ctx, "mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", "myResourceGroup", "mySignalRService", armsignalr.PrivateEndpointConnection{
		Properties: &armsignalr.PrivateEndpointConnectionProperties{
			PrivateEndpoint: &armsignalr.PrivateEndpoint{
				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"),
			},
			PrivateLinkServiceConnectionState: &armsignalr.PrivateLinkServiceConnectionState{
				ActionsRequired: to.Ptr("None"),
				Status:          to.Ptr(armsignalr.PrivateLinkServiceConnectionStatusApproved),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PrivateEndpointConnection = armsignalr.PrivateEndpointConnection{
	// 	Name: to.Ptr("mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 	Type: to.Ptr("Microsoft.SignalRService/SignalR/privateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/privateEndpointConnections/mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 	Properties: &armsignalr.PrivateEndpointConnectionProperties{
	// 		GroupIDs: []*string{
	// 			to.Ptr("signalr")},
	// 			PrivateEndpoint: &armsignalr.PrivateEndpoint{
	// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"),
	// 			},
	// 			PrivateLinkServiceConnectionState: &armsignalr.PrivateLinkServiceConnectionState{
	// 				ActionsRequired: to.Ptr("None"),
	// 				Status: to.Ptr(armsignalr.PrivateLinkServiceConnectionStatusApproved),
	// 			},
	// 			ProvisioningState: to.Ptr(armsignalr.ProvisioningStateSucceeded),
	// 		},
	// 		SystemData: &armsignalr.SystemData{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
	// 			CreatedBy: to.Ptr("string"),
	// 			CreatedByType: to.Ptr(armsignalr.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-02-03T04:05:06.000Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("string"),
	// 			LastModifiedByType: to.Ptr(armsignalr.CreatedByTypeUser),
	// 		},
	// 	}
}
Output:

type PrivateEndpointConnectionsClientBeginDeleteOptions added in v0.2.0

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

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

type PrivateEndpointConnectionsClientDeleteResponse added in v0.2.0

type PrivateEndpointConnectionsClientDeleteResponse struct {
}

PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete.

type PrivateEndpointConnectionsClientGetOptions added in v0.2.0

type PrivateEndpointConnectionsClientGetOptions struct {
}

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

type PrivateEndpointConnectionsClientGetResponse added in v0.2.0

type PrivateEndpointConnectionsClientGetResponse struct {
	// A private endpoint connection to an azure resource
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.

type PrivateEndpointConnectionsClientListOptions added in v0.2.0

type PrivateEndpointConnectionsClientListOptions struct {
}

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

type PrivateEndpointConnectionsClientListResponse added in v0.2.0

type PrivateEndpointConnectionsClientListResponse struct {
	// A list of private endpoint connections
	PrivateEndpointConnectionList
}

PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.NewListPager.

type PrivateEndpointConnectionsClientUpdateOptions added in v0.2.0

type PrivateEndpointConnectionsClientUpdateOptions struct {
}

PrivateEndpointConnectionsClientUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Update method.

type PrivateEndpointConnectionsClientUpdateResponse added in v0.2.0

type PrivateEndpointConnectionsClientUpdateResponse struct {
	// A private endpoint connection to an azure resource
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientUpdateResponse contains the response from method PrivateEndpointConnectionsClient.Update.

type PrivateLinkResource

type PrivateLinkResource struct {
	// Private link resource properties
	Properties *PrivateLinkResourceProperties

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

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

	// READ-ONLY; The type of the resource - e.g. "Microsoft.SignalRService/SignalR"
	Type *string
}

PrivateLinkResource - Private link resource

func (PrivateLinkResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.

func (*PrivateLinkResource) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.

type PrivateLinkResourceList

type PrivateLinkResourceList struct {
	// The URL the client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// List of PrivateLinkResource
	Value []*PrivateLinkResource
}

PrivateLinkResourceList - Contains a list of PrivateLinkResource and a possible link to query more results

func (PrivateLinkResourceList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceList.

func (*PrivateLinkResourceList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceList.

type PrivateLinkResourceProperties

type PrivateLinkResourceProperties struct {
	// Group Id of the private link resource
	GroupID *string

	// Required members of the private link resource
	RequiredMembers []*string

	// Required private DNS zone names
	RequiredZoneNames []*string

	// The list of resources that are onboarded to private link service
	ShareablePrivateLinkResourceTypes []*ShareablePrivateLinkResourceType
}

PrivateLinkResourceProperties - Private link resource properties

func (PrivateLinkResourceProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.

func (*PrivateLinkResourceProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.

type PrivateLinkResourcesClient added in v0.2.0

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

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

func NewPrivateLinkResourcesClient added in v0.2.0

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

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

  • subscriptionID - Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PrivateLinkResourcesClient) NewListPager added in v0.5.0

NewListPager - Get the private link resources that need to be created for a resource.

Generated from API version 2023-02-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalRPrivateLinkResources_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPrivateLinkResourcesClient().NewListPager("myResourceGroup", "mySignalRService", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.PrivateLinkResourceList = armsignalr.PrivateLinkResourceList{
		// 	Value: []*armsignalr.PrivateLinkResource{
		// 		{
		// 			Name: to.Ptr("myPrivateLink"),
		// 			Type: to.Ptr("privateLinkResources"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/privateLinkResources/myPrivateLink"),
		// 			Properties: &armsignalr.PrivateLinkResourceProperties{
		// 				GroupID: to.Ptr("signalr"),
		// 				RequiredMembers: []*string{
		// 					to.Ptr("signalr")},
		// 					RequiredZoneNames: []*string{
		// 						to.Ptr("privatelink.service.signalr.net")},
		// 						ShareablePrivateLinkResourceTypes: []*armsignalr.ShareablePrivateLinkResourceType{
		// 							{
		// 								Name: to.Ptr("site"),
		// 								Properties: &armsignalr.ShareablePrivateLinkResourceProperties{
		// 									Type: to.Ptr("Microsoft.Web/sites"),
		// 									Description: to.Ptr("Azure App Service can be used as an upstream"),
		// 									GroupID: to.Ptr("sites"),
		// 								},
		// 						}},
		// 					},
		// 			}},
		// 		}
	}
}
Output:

type PrivateLinkResourcesClientListOptions added in v0.2.0

type PrivateLinkResourcesClientListOptions struct {
}

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

type PrivateLinkResourcesClientListResponse added in v0.2.0

type PrivateLinkResourcesClientListResponse struct {
	// Contains a list of PrivateLinkResource and a possible link to query more results
	PrivateLinkResourceList
}

PrivateLinkResourcesClientListResponse contains the response from method PrivateLinkResourcesClient.NewListPager.

type PrivateLinkServiceConnectionState

type PrivateLinkServiceConnectionState struct {
	// A message indicating if changes on the service provider require any updates on the consumer.
	ActionsRequired *string

	// The reason for approval/rejection of the connection.
	Description *string

	// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
	Status *PrivateLinkServiceConnectionStatus
}

PrivateLinkServiceConnectionState - Connection state of the private endpoint connection

func (PrivateLinkServiceConnectionState) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState.

func (*PrivateLinkServiceConnectionState) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState.

type PrivateLinkServiceConnectionStatus

type PrivateLinkServiceConnectionStatus string

PrivateLinkServiceConnectionStatus - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.

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

func PossiblePrivateLinkServiceConnectionStatusValues

func PossiblePrivateLinkServiceConnectionStatusValues() []PrivateLinkServiceConnectionStatus

PossiblePrivateLinkServiceConnectionStatusValues returns the possible values for the PrivateLinkServiceConnectionStatus const type.

type Properties added in v0.2.0

type Properties struct {
	// Cross-Origin Resource Sharing (CORS) settings.
	Cors *CorsSettings

	// DisableLocalAuth Enable or disable aad auth When set as true, connection with AuthType=aad won't work.
	DisableAADAuth *bool

	// DisableLocalAuth Enable or disable local auth with AccessKey When set as true, connection with AccessKey=xxx won't work.
	DisableLocalAuth *bool

	// List of the featureFlags.
	// FeatureFlags that are not included in the parameters for the update operation will not be modified. And the response will
	// only include featureFlags that are explicitly set. When a featureFlag is not
	// explicitly set, its globally default value will be used But keep in mind, the default value doesn't mean "false". It varies
	// in terms of different FeatureFlags.
	Features []*Feature

	// Live trace configuration of a Microsoft.SignalRService resource.
	LiveTraceConfiguration *LiveTraceConfiguration

	// Network ACLs for the resource
	NetworkACLs *NetworkACLs

	// Enable or disable public network access. Default to "Enabled". When it's Enabled, network ACLs still apply. When it's Disabled,
	// public network access is always disabled no matter what you set in
	// network ACLs.
	PublicNetworkAccess *string

	// Resource log configuration of a Microsoft.SignalRService resource.
	ResourceLogConfiguration *ResourceLogConfiguration

	// Serverless settings.
	Serverless *ServerlessSettings

	// TLS settings for the resource
	TLS *TLSSettings

	// The settings for the Upstream when the service is in server-less mode.
	Upstream *ServerlessUpstreamSettings

	// READ-ONLY; The publicly accessible IP of the resource.
	ExternalIP *string

	// READ-ONLY; FQDN of the service instance.
	HostName *string

	// READ-ONLY; Deprecated.
	HostNamePrefix *string

	// READ-ONLY; Private endpoint connections to the resource.
	PrivateEndpointConnections []*PrivateEndpointConnection

	// READ-ONLY; Provisioning state of the resource.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The publicly accessible port of the resource which is designed for browser/client side usage.
	PublicPort *int32

	// READ-ONLY; The publicly accessible port of the resource which is designed for customer server side usage.
	ServerPort *int32

	// READ-ONLY; The list of shared private link resources.
	SharedPrivateLinkResources []*SharedPrivateLinkResource

	// READ-ONLY; Version of the resource. Probably you need the same or higher version of client SDKs.
	Version *string
}

Properties - A class that describes the properties of the resource

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

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

UnmarshalJSON implements the json.Unmarshaller interface for type Properties.

type ProvisioningState

type ProvisioningState string

ProvisioningState - Provisioning state of the resource.

const (
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateMoving    ProvisioningState = "Moving"
	ProvisioningStateRunning   ProvisioningState = "Running"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUnknown   ProvisioningState = "Unknown"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type RegenerateKeyParameters

type RegenerateKeyParameters struct {
	// The type of access key.
	KeyType *KeyType
}

RegenerateKeyParameters - Parameters describes the request to regenerate access keys

func (RegenerateKeyParameters) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type RegenerateKeyParameters.

func (*RegenerateKeyParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type RegenerateKeyParameters.

type ResourceInfo added in v0.2.0

type ResourceInfo struct {
	// A class represent managed identities used for request and response
	Identity *ManagedIdentity

	// The kind of the service, it can be SignalR or RawWebSockets
	Kind *ServiceKind

	// The GEO location of the resource. e.g. West US | East US | North Central US | South Central US.
	Location *string

	// A class that describes the properties of the resource
	Properties *Properties

	// The billing information of the resource.
	SKU *ResourceSKU

	// Tags of the service which is a list of key value pairs that describe the resource.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

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

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

	// READ-ONLY; The type of the resource - e.g. "Microsoft.SignalRService/SignalR"
	Type *string
}

ResourceInfo - A class represent a resource.

func (ResourceInfo) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type ResourceInfo.

func (*ResourceInfo) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceInfo.

type ResourceInfoList added in v0.2.0

type ResourceInfoList struct {
	// The URL the client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// List of the resources
	Value []*ResourceInfo
}

ResourceInfoList - Object that includes an array of resources and a possible link for next set.

func (ResourceInfoList) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type ResourceInfoList.

func (*ResourceInfoList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceInfoList.

type ResourceLogCategory

type ResourceLogCategory struct {
	// Indicates whether or the resource log category is enabled. Available values: true, false. Case insensitive.
	Enabled *string

	// Gets or sets the resource log category's name. Available values: ConnectivityLogs, MessagingLogs. Case insensitive.
	Name *string
}

ResourceLogCategory - Resource log category configuration of a Microsoft.SignalRService resource.

func (ResourceLogCategory) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ResourceLogCategory.

func (*ResourceLogCategory) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceLogCategory.

type ResourceLogConfiguration

type ResourceLogConfiguration struct {
	// Gets or sets the list of category configurations.
	Categories []*ResourceLogCategory
}

ResourceLogConfiguration - Resource log configuration of a Microsoft.SignalRService resource.

func (ResourceLogConfiguration) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceLogConfiguration.

func (*ResourceLogConfiguration) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceLogConfiguration.

type ResourceReference added in v0.3.0

type ResourceReference struct {
	// Resource ID.
	ID *string
}

ResourceReference - Reference to a resource.

func (ResourceReference) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ResourceReference.

func (*ResourceReference) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceReference.

type ResourceSKU

type ResourceSKU struct {
	// REQUIRED; The name of the SKU. Required.
	// Allowed values: StandardS1, FreeF1, Premium_P1
	Name *string

	// Optional, integer. The unit count of the resource. 1 by default.
	// If present, following values are allowed: Free: 1; Standard: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100; Premium:
	// 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100;
	Capacity *int32

	// Optional tier of this particular SKU. 'Standard' or 'Free'.
	// Basic is deprecated, use Standard instead.
	Tier *SignalRSKUTier

	// READ-ONLY; Not used. Retained for future use.
	Family *string

	// READ-ONLY; Not used. Retained for future use.
	Size *string
}

ResourceSKU - The billing information of the resource.

func (ResourceSKU) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ResourceSKU.

func (*ResourceSKU) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKU.

type SKU

type SKU struct {
	// READ-ONLY; Describes scaling information of a sku.
	Capacity *SKUCapacity

	// READ-ONLY; The resource type that this object applies to
	ResourceType *string

	// READ-ONLY; The billing information of the resource.
	SKU *ResourceSKU
}

SKU - Describes an available sku."

func (SKU) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SKU.

func (*SKU) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SKU.

type SKUCapacity

type SKUCapacity struct {
	// READ-ONLY; Allows capacity value list.
	AllowedValues []*int32

	// READ-ONLY; The default capacity.
	Default *int32

	// READ-ONLY; The highest permitted capacity for this resource
	Maximum *int32

	// READ-ONLY; The lowest permitted capacity for this resource
	Minimum *int32

	// READ-ONLY; The scale type applicable to the sku.
	ScaleType *ScaleType
}

SKUCapacity - Describes scaling information of a sku.

func (SKUCapacity) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SKUCapacity.

func (*SKUCapacity) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapacity.

type SKUList

type SKUList struct {
	// READ-ONLY; The URL the client should use to fetch the next page (per server side paging). It's null for now, added for
	// future use.
	NextLink *string

	// READ-ONLY; The list of skus available for the resource.
	Value []*SKU
}

SKUList - The list skus operation response

func (SKUList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SKUList.

func (*SKUList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SKUList.

type ScaleType

type ScaleType string

ScaleType - The scale type applicable to the sku.

const (
	ScaleTypeAutomatic ScaleType = "Automatic"
	ScaleTypeManual    ScaleType = "Manual"
	ScaleTypeNone      ScaleType = "None"
)

func PossibleScaleTypeValues

func PossibleScaleTypeValues() []ScaleType

PossibleScaleTypeValues returns the possible values for the ScaleType const type.

type ServerlessSettings added in v1.1.0

type ServerlessSettings struct {
	// Gets or sets Client Connection Timeout. Optional to be set. Value in seconds. Default value is 30 seconds. Customer should
	// set the timeout to a shorter period if messages are expected to be sent in
	// shorter intervals, and want the client to disconnect more quickly after the last message is sent. You can set the timeout
	// to a longer period if messages are expected to be sent in longer intervals,
	// and they want to keep the same client connection alive during this session. The service considers the client disconnected
	// if it hasn't received a message (including keep-alive) in this interval.
	ConnectionTimeoutInSeconds *int32
}

ServerlessSettings - Serverless settings.

func (ServerlessSettings) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ServerlessSettings.

func (*ServerlessSettings) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServerlessSettings.

type ServerlessUpstreamSettings

type ServerlessUpstreamSettings struct {
	// Gets or sets the list of Upstream URL templates. Order matters, and the first matching template takes effects.
	Templates []*UpstreamTemplate
}

ServerlessUpstreamSettings - The settings for the Upstream when the service is in server-less mode.

func (ServerlessUpstreamSettings) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServerlessUpstreamSettings.

func (*ServerlessUpstreamSettings) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServerlessUpstreamSettings.

type ServiceKind

type ServiceKind string

ServiceKind - The kind of the service, it can be SignalR or RawWebSockets

const (
	ServiceKindRawWebSockets ServiceKind = "RawWebSockets"
	ServiceKindSignalR       ServiceKind = "SignalR"
)

func PossibleServiceKindValues

func PossibleServiceKindValues() []ServiceKind

PossibleServiceKindValues returns the possible values for the ServiceKind const type.

type ServiceSpecification

type ServiceSpecification struct {
	// Specifications of the Logs for Azure Monitoring.
	LogSpecifications []*LogSpecification

	// Specifications of the Metrics for Azure Monitoring.
	MetricSpecifications []*MetricSpecification
}

ServiceSpecification - An object that describes a specification.

func (ServiceSpecification) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServiceSpecification.

func (*ServiceSpecification) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSpecification.

type ShareablePrivateLinkResourceProperties

type ShareablePrivateLinkResourceProperties struct {
	// The description of the resource type that has been onboarded to private link service
	Description *string

	// The resource provider group id for the resource that has been onboarded to private link service
	GroupID *string

	// The resource provider type for the resource that has been onboarded to private link service
	Type *string
}

ShareablePrivateLinkResourceProperties - Describes the properties of a resource type that has been onboarded to private link service

func (ShareablePrivateLinkResourceProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ShareablePrivateLinkResourceProperties.

func (*ShareablePrivateLinkResourceProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ShareablePrivateLinkResourceProperties.

type ShareablePrivateLinkResourceType

type ShareablePrivateLinkResourceType struct {
	// The name of the resource type that has been onboarded to private link service
	Name *string

	// Describes the properties of a resource type that has been onboarded to private link service
	Properties *ShareablePrivateLinkResourceProperties
}

ShareablePrivateLinkResourceType - Describes a resource type that has been onboarded to private link service

func (ShareablePrivateLinkResourceType) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ShareablePrivateLinkResourceType.

func (*ShareablePrivateLinkResourceType) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ShareablePrivateLinkResourceType.

type SharedPrivateLinkResource

type SharedPrivateLinkResource struct {
	// Describes the properties of an existing Shared Private Link Resource
	Properties *SharedPrivateLinkResourceProperties

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

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

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

	// READ-ONLY; The type of the resource - e.g. "Microsoft.SignalRService/SignalR"
	Type *string
}

SharedPrivateLinkResource - Describes a Shared Private Link Resource

func (SharedPrivateLinkResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SharedPrivateLinkResource.

func (*SharedPrivateLinkResource) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SharedPrivateLinkResource.

type SharedPrivateLinkResourceList

type SharedPrivateLinkResourceList struct {
	// Request URL that can be used to query next page of private endpoint connections. Returned when the total number of requested
	// private endpoint connections exceed maximum page size.
	NextLink *string

	// The list of the shared private link resources
	Value []*SharedPrivateLinkResource
}

SharedPrivateLinkResourceList - A list of shared private link resources

func (SharedPrivateLinkResourceList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SharedPrivateLinkResourceList.

func (*SharedPrivateLinkResourceList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SharedPrivateLinkResourceList.

type SharedPrivateLinkResourceProperties

type SharedPrivateLinkResourceProperties struct {
	// REQUIRED; The group id from the provider of resource the shared private link resource is for
	GroupID *string

	// REQUIRED; The resource id of the resource the shared private link resource is for
	PrivateLinkResourceID *string

	// The request message for requesting approval of the shared private link resource
	RequestMessage *string

	// READ-ONLY; Provisioning state of the resource.
	ProvisioningState *ProvisioningState

	// READ-ONLY; Status of the shared private link resource
	Status *SharedPrivateLinkResourceStatus
}

SharedPrivateLinkResourceProperties - Describes the properties of an existing Shared Private Link Resource

func (SharedPrivateLinkResourceProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SharedPrivateLinkResourceProperties.

func (*SharedPrivateLinkResourceProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SharedPrivateLinkResourceProperties.

type SharedPrivateLinkResourceStatus

type SharedPrivateLinkResourceStatus string

SharedPrivateLinkResourceStatus - Status of the shared private link resource

const (
	SharedPrivateLinkResourceStatusApproved     SharedPrivateLinkResourceStatus = "Approved"
	SharedPrivateLinkResourceStatusDisconnected SharedPrivateLinkResourceStatus = "Disconnected"
	SharedPrivateLinkResourceStatusPending      SharedPrivateLinkResourceStatus = "Pending"
	SharedPrivateLinkResourceStatusRejected     SharedPrivateLinkResourceStatus = "Rejected"
	SharedPrivateLinkResourceStatusTimeout      SharedPrivateLinkResourceStatus = "Timeout"
)

func PossibleSharedPrivateLinkResourceStatusValues

func PossibleSharedPrivateLinkResourceStatusValues() []SharedPrivateLinkResourceStatus

PossibleSharedPrivateLinkResourceStatusValues returns the possible values for the SharedPrivateLinkResourceStatus const type.

type SharedPrivateLinkResourcesClient added in v0.2.0

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

SharedPrivateLinkResourcesClient contains the methods for the SignalRSharedPrivateLinkResources group. Don't use this type directly, use NewSharedPrivateLinkResourcesClient() instead.

func NewSharedPrivateLinkResourcesClient added in v0.2.0

func NewSharedPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SharedPrivateLinkResourcesClient, error)

NewSharedPrivateLinkResourcesClient creates a new instance of SharedPrivateLinkResourcesClient with the specified values.

  • subscriptionID - Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*SharedPrivateLinkResourcesClient) BeginCreateOrUpdate added in v0.2.0

BeginCreateOrUpdate - Create or update a shared private link resource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01

  • sharedPrivateLinkResourceName - The name of the shared private link resource
  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • parameters - The shared private link resource
  • options - SharedPrivateLinkResourcesClientBeginCreateOrUpdateOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalRSharedPrivateLinkResources_CreateOrUpdate.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/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewSharedPrivateLinkResourcesClient().BeginCreateOrUpdate(ctx, "upstream", "myResourceGroup", "mySignalRService", armsignalr.SharedPrivateLinkResource{
		Properties: &armsignalr.SharedPrivateLinkResourceProperties{
			GroupID:               to.Ptr("sites"),
			PrivateLinkResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp"),
			RequestMessage:        to.Ptr("Please approve"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SharedPrivateLinkResource = armsignalr.SharedPrivateLinkResource{
	// 	Name: to.Ptr("upstream"),
	// 	Type: to.Ptr("Microsoft.SignalRService/SignalR/privateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/privateEndpointConnections/upstream"),
	// 	Properties: &armsignalr.SharedPrivateLinkResourceProperties{
	// 		GroupID: to.Ptr("sites"),
	// 		PrivateLinkResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp"),
	// 		ProvisioningState: to.Ptr(armsignalr.ProvisioningStateSucceeded),
	// 		RequestMessage: to.Ptr("Please approve"),
	// 		Status: to.Ptr(armsignalr.SharedPrivateLinkResourceStatusApproved),
	// 	},
	// }
}
Output:

func (*SharedPrivateLinkResourcesClient) BeginDelete added in v0.2.0

func (client *SharedPrivateLinkResourcesClient) BeginDelete(ctx context.Context, sharedPrivateLinkResourceName string, resourceGroupName string, resourceName string, options *SharedPrivateLinkResourcesClientBeginDeleteOptions) (*runtime.Poller[SharedPrivateLinkResourcesClientDeleteResponse], error)

BeginDelete - Delete the specified shared private link resource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01

  • sharedPrivateLinkResourceName - The name of the shared private link resource
  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • options - SharedPrivateLinkResourcesClientBeginDeleteOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalRSharedPrivateLinkResources_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr"
)

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

func (*SharedPrivateLinkResourcesClient) Get added in v0.2.0

func (client *SharedPrivateLinkResourcesClient) Get(ctx context.Context, sharedPrivateLinkResourceName string, resourceGroupName string, resourceName string, options *SharedPrivateLinkResourcesClientGetOptions) (SharedPrivateLinkResourcesClientGetResponse, error)

Get - Get the specified shared private link resource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01

  • sharedPrivateLinkResourceName - The name of the shared private link resource
  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • options - SharedPrivateLinkResourcesClientGetOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalRSharedPrivateLinkResources_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSharedPrivateLinkResourcesClient().Get(ctx, "upstream", "myResourceGroup", "mySignalRService", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SharedPrivateLinkResource = armsignalr.SharedPrivateLinkResource{
	// 	Name: to.Ptr("upstream"),
	// 	Type: to.Ptr("Microsoft.SignalRService/SignalR/privateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/privateEndpointConnections/upstream"),
	// 	Properties: &armsignalr.SharedPrivateLinkResourceProperties{
	// 		GroupID: to.Ptr("sites"),
	// 		PrivateLinkResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp"),
	// 		ProvisioningState: to.Ptr(armsignalr.ProvisioningStateSucceeded),
	// 		RequestMessage: to.Ptr("Please approve"),
	// 		Status: to.Ptr(armsignalr.SharedPrivateLinkResourceStatusApproved),
	// 	},
	// }
}
Output:

func (*SharedPrivateLinkResourcesClient) NewListPager added in v0.5.0

NewListPager - List shared private link resources

Generated from API version 2023-02-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • resourceName - The name of the resource.
  • options - SharedPrivateLinkResourcesClientListOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalRSharedPrivateLinkResources_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSharedPrivateLinkResourcesClient().NewListPager("myResourceGroup", "mySignalRService", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SharedPrivateLinkResourceList = armsignalr.SharedPrivateLinkResourceList{
		// 	Value: []*armsignalr.SharedPrivateLinkResource{
		// 		{
		// 			Name: to.Ptr("upstream"),
		// 			Type: to.Ptr("Microsoft.SignalRService/SignalR/privateEndpointConnections"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/privateEndpointConnections/upstream"),
		// 			Properties: &armsignalr.SharedPrivateLinkResourceProperties{
		// 				GroupID: to.Ptr("sites"),
		// 				PrivateLinkResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp"),
		// 				ProvisioningState: to.Ptr(armsignalr.ProvisioningStateSucceeded),
		// 				RequestMessage: to.Ptr("Please approve"),
		// 				Status: to.Ptr(armsignalr.SharedPrivateLinkResourceStatusApproved),
		// 			},
		// 	}},
		// }
	}
}
Output:

type SharedPrivateLinkResourcesClientBeginCreateOrUpdateOptions added in v0.2.0

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

SharedPrivateLinkResourcesClientBeginCreateOrUpdateOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.BeginCreateOrUpdate method.

type SharedPrivateLinkResourcesClientBeginDeleteOptions added in v0.2.0

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

SharedPrivateLinkResourcesClientBeginDeleteOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.BeginDelete method.

type SharedPrivateLinkResourcesClientCreateOrUpdateResponse added in v0.2.0

type SharedPrivateLinkResourcesClientCreateOrUpdateResponse struct {
	// Describes a Shared Private Link Resource
	SharedPrivateLinkResource
}

SharedPrivateLinkResourcesClientCreateOrUpdateResponse contains the response from method SharedPrivateLinkResourcesClient.BeginCreateOrUpdate.

type SharedPrivateLinkResourcesClientDeleteResponse added in v0.2.0

type SharedPrivateLinkResourcesClientDeleteResponse struct {
}

SharedPrivateLinkResourcesClientDeleteResponse contains the response from method SharedPrivateLinkResourcesClient.BeginDelete.

type SharedPrivateLinkResourcesClientGetOptions added in v0.2.0

type SharedPrivateLinkResourcesClientGetOptions struct {
}

SharedPrivateLinkResourcesClientGetOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.Get method.

type SharedPrivateLinkResourcesClientGetResponse added in v0.2.0

type SharedPrivateLinkResourcesClientGetResponse struct {
	// Describes a Shared Private Link Resource
	SharedPrivateLinkResource
}

SharedPrivateLinkResourcesClientGetResponse contains the response from method SharedPrivateLinkResourcesClient.Get.

type SharedPrivateLinkResourcesClientListOptions added in v0.2.0

type SharedPrivateLinkResourcesClientListOptions struct {
}

SharedPrivateLinkResourcesClientListOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.NewListPager method.

type SharedPrivateLinkResourcesClientListResponse added in v0.2.0

type SharedPrivateLinkResourcesClientListResponse struct {
	// A list of shared private link resources
	SharedPrivateLinkResourceList
}

SharedPrivateLinkResourcesClientListResponse contains the response from method SharedPrivateLinkResourcesClient.NewListPager.

type SignalRRequestType

type SignalRRequestType string

SignalRRequestType - The incoming request type to the service

const (
	SignalRRequestTypeClientConnection SignalRRequestType = "ClientConnection"
	SignalRRequestTypeRESTAPI          SignalRRequestType = "RESTAPI"
	SignalRRequestTypeServerConnection SignalRRequestType = "ServerConnection"
	SignalRRequestTypeTrace            SignalRRequestType = "Trace"
)

func PossibleSignalRRequestTypeValues

func PossibleSignalRRequestTypeValues() []SignalRRequestType

PossibleSignalRRequestTypeValues returns the possible values for the SignalRRequestType const type.

type SignalRSKUTier

type SignalRSKUTier string

SignalRSKUTier - Optional tier of this particular SKU. 'Standard' or 'Free'. Basic is deprecated, use Standard instead.

const (
	SignalRSKUTierBasic    SignalRSKUTier = "Basic"
	SignalRSKUTierFree     SignalRSKUTier = "Free"
	SignalRSKUTierPremium  SignalRSKUTier = "Premium"
	SignalRSKUTierStandard SignalRSKUTier = "Standard"
)

func PossibleSignalRSKUTierValues

func PossibleSignalRSKUTierValues() []SignalRSKUTier

PossibleSignalRSKUTierValues returns the possible values for the SignalRSKUTier const type.

type SystemData

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

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

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

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

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

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

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

func (SystemData) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TLSSettings added in v0.2.0

type TLSSettings struct {
	// Request client certificate during TLS handshake if enabled
	ClientCertEnabled *bool
}

TLSSettings - TLS settings for the resource

func (TLSSettings) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type TLSSettings.

func (*TLSSettings) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type TLSSettings.

type UpstreamAuthSettings

type UpstreamAuthSettings struct {
	// Managed identity settings for upstream.
	ManagedIdentity *ManagedIdentitySettings

	// Upstream auth type enum.
	Type *UpstreamAuthType
}

UpstreamAuthSettings - Upstream auth settings. If not set, no auth is used for upstream messages.

func (UpstreamAuthSettings) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type UpstreamAuthSettings.

func (*UpstreamAuthSettings) UnmarshalJSON added in v1.1.0

func (u *UpstreamAuthSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UpstreamAuthSettings.

type UpstreamAuthType

type UpstreamAuthType string

UpstreamAuthType - Upstream auth type enum.

const (
	UpstreamAuthTypeManagedIdentity UpstreamAuthType = "ManagedIdentity"
	UpstreamAuthTypeNone            UpstreamAuthType = "None"
)

func PossibleUpstreamAuthTypeValues

func PossibleUpstreamAuthTypeValues() []UpstreamAuthType

PossibleUpstreamAuthTypeValues returns the possible values for the UpstreamAuthType const type.

type UpstreamTemplate

type UpstreamTemplate struct {
	// REQUIRED; Gets or sets the Upstream URL template. You can use 3 predefined parameters {hub}, {category} {event} inside
	// the template, the value of the Upstream URL is dynamically calculated when the client
	// request comes in. For example, if the urlTemplate is http://example.com/{hub}/api/{event}, with a client request from hub
	// chat connects, it will first POST to this URL:
	// http://example.com/chat/api/connect.
	URLTemplate *string

	// Upstream auth settings. If not set, no auth is used for upstream messages.
	Auth *UpstreamAuthSettings

	// Gets or sets the matching pattern for category names. If not set, it matches any category. There are 3 kind of patterns
	// supported: 1. "*", it to matches any category name. 2. Combine multiple
	// categories with ",", for example "connections,messages", it matches category "connections" and "messages". 3. The single
	// category name, for example, "connections", it matches the category
	// "connections".
	CategoryPattern *string

	// Gets or sets the matching pattern for event names. If not set, it matches any event. There are 3 kind of patterns supported:
	// 1. "*", it to matches any event name. 2. Combine multiple events with ",",
	// for example "connect,disconnect", it matches event "connect" and "disconnect". 3. The single event name, for example, "connect",
	// it matches "connect".
	EventPattern *string

	// Gets or sets the matching pattern for hub names. If not set, it matches any hub. There are 3 kind of patterns supported:
	// 1. "*", it to matches any hub name. 2. Combine multiple hubs with ",", for
	// example "hub1,hub2", it matches "hub1" and "hub2". 3. The single hub name, for example, "hub1", it matches "hub1".
	HubPattern *string
}

UpstreamTemplate - Upstream template item settings. It defines the Upstream URL of the incoming requests. The template defines the pattern of the event, the hub or the category of the incoming request that matches current URL template.

func (UpstreamTemplate) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type UpstreamTemplate.

func (*UpstreamTemplate) UnmarshalJSON added in v1.1.0

func (u *UpstreamTemplate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UpstreamTemplate.

type Usage added in v0.2.0

type Usage struct {
	// Current value for the usage quota.
	CurrentValue *int64

	// Fully qualified ARM resource id
	ID *string

	// The maximum permitted value for the usage quota. If there is no limit, this value will be -1.
	Limit *int64

	// Localizable String object containing the name and a localized value.
	Name *UsageName

	// Representing the units of the usage quota. Possible values are: Count, Bytes, Seconds, Percent, CountPerSecond, BytesPerSecond.
	Unit *string
}

Usage - Object that describes a specific usage of the resources.

func (Usage) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type Usage.

func (*Usage) UnmarshalJSON added in v1.1.0

func (u *Usage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Usage.

type UsageList added in v0.2.0

type UsageList struct {
	// The URL the client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// List of the resource usages
	Value []*Usage
}

UsageList - Object that includes an array of the resource usages and a possible link for next set.

func (UsageList) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type UsageList.

func (*UsageList) UnmarshalJSON added in v1.1.0

func (u *UsageList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UsageList.

type UsageName added in v0.2.0

type UsageName struct {
	// Localized name of the usage.
	LocalizedValue *string

	// The identifier of the usage.
	Value *string
}

UsageName - Localizable String object containing the name and a localized value.

func (UsageName) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type UsageName.

func (*UsageName) UnmarshalJSON added in v1.1.0

func (u *UsageName) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UsageName.

type UsagesClient

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

UsagesClient contains the methods for the Usages group. Don't use this type directly, use NewUsagesClient() instead.

func NewUsagesClient

func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsagesClient, error)

NewUsagesClient creates a new instance of UsagesClient with the specified values.

  • subscriptionID - Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*UsagesClient) NewListPager added in v0.5.0

func (client *UsagesClient) NewListPager(location string, options *UsagesClientListOptions) *runtime.Pager[UsagesClientListResponse]

NewListPager - List resource usage quotas by location.

Generated from API version 2023-02-01

  • location - the location like "eastus"
  • options - UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/Usages_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewUsagesClient().NewListPager("eastus", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.UsageList = armsignalr.UsageList{
		// 	Value: []*armsignalr.Usage{
		// 		{
		// 			Name: &armsignalr.UsageName{
		// 				LocalizedValue: to.Ptr("Usage1"),
		// 				Value: to.Ptr("Usage1"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](0),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SignalRService/locations/eastus/usages/Usage1"),
		// 			Limit: to.Ptr[int64](100),
		// 			Unit: to.Ptr("Count"),
		// 		},
		// 		{
		// 			Name: &armsignalr.UsageName{
		// 				LocalizedValue: to.Ptr("Usage2"),
		// 				Value: to.Ptr("Usage2"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](0),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SignalRService/locations/eastus/usages/Usage2"),
		// 			Limit: to.Ptr[int64](100),
		// 			Unit: to.Ptr("Count"),
		// 	}},
		// }
	}
}
Output:

type UsagesClientListOptions added in v0.2.0

type UsagesClientListOptions struct {
}

UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method.

type UsagesClientListResponse added in v0.2.0

type UsagesClientListResponse struct {
	// Object that includes an array of the resource usages and a possible link for next set.
	UsageList
}

UsagesClientListResponse contains the response from method UsagesClient.NewListPager.

type UserAssignedIdentityProperty

type UserAssignedIdentityProperty struct {
	// READ-ONLY; Get the client id for the user assigned identity
	ClientID *string

	// READ-ONLY; Get the principal id for the user assigned identity
	PrincipalID *string
}

UserAssignedIdentityProperty - Properties of user assigned identity.

func (UserAssignedIdentityProperty) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentityProperty.

func (*UserAssignedIdentityProperty) UnmarshalJSON added in v1.1.0

func (u *UserAssignedIdentityProperty) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentityProperty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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