armwebpubsub

package module
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: MIT Imports: 14 Imported by: 3

README

Azure Web PubSub Module for Go

PkgGoDev

The armwebpubsub module provides operations for working with Azure Web PubSub.

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 Web PubSub module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Web PubSub. 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 Web PubSub 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 := armwebpubsub.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 := armwebpubsub.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 Web PubSub 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 WebPubSub group. Don't use this type directly, use NewClient() instead.

func NewClient added in v0.2.0

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

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

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*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 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myWebPubSubService", armwebpubsub.ResourceInfo{
		Location: to.Ptr("eastus"),
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
		Identity: &armwebpubsub.ManagedIdentity{
			Type: to.Ptr(armwebpubsub.ManagedIdentityTypeSystemAssigned),
		},
		Kind: to.Ptr(armwebpubsub.ServiceKindWebPubSub),
		Properties: &armwebpubsub.Properties{
			DisableAADAuth:   to.Ptr(false),
			DisableLocalAuth: to.Ptr(false),
			LiveTraceConfiguration: &armwebpubsub.LiveTraceConfiguration{
				Categories: []*armwebpubsub.LiveTraceCategory{
					{
						Name:    to.Ptr("ConnectivityLogs"),
						Enabled: to.Ptr("true"),
					}},
				Enabled: to.Ptr("false"),
			},
			NetworkACLs: &armwebpubsub.NetworkACLs{
				DefaultAction: to.Ptr(armwebpubsub.ACLActionDeny),
				PrivateEndpoints: []*armwebpubsub.PrivateEndpointACL{
					{
						Allow: []*armwebpubsub.WebPubSubRequestType{
							to.Ptr(armwebpubsub.WebPubSubRequestTypeServerConnection)},
						Name: to.Ptr("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
					}},
				PublicNetwork: &armwebpubsub.NetworkACL{
					Allow: []*armwebpubsub.WebPubSubRequestType{
						to.Ptr(armwebpubsub.WebPubSubRequestTypeClientConnection)},
				},
			},
			PublicNetworkAccess: to.Ptr("Enabled"),
			SocketIO: &armwebpubsub.SocketIOSettings{
				ServiceMode: to.Ptr("Serverless"),
			},
			TLS: &armwebpubsub.TLSSettings{
				ClientCertEnabled: to.Ptr(false),
			},
		},
		SKU: &armwebpubsub.ResourceSKU{
			Name:     to.Ptr("Premium_P1"),
			Capacity: to.Ptr[int32](1),
			Tier:     to.Ptr(armwebpubsub.WebPubSubSKUTierPremium),
		},
	}, 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 = armwebpubsub.ResourceInfo{
	// 	Name: to.Ptr("myWebPubSubService"),
	// 	Type: to.Ptr("Microsoft.SignalRService/WebPubSub"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService"),
	// 	SystemData: &armwebpubsub.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(armwebpubsub.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(armwebpubsub.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("eastus"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Identity: &armwebpubsub.ManagedIdentity{
	// 		Type: to.Ptr(armwebpubsub.ManagedIdentityTypeSystemAssigned),
	// 		PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	},
	// 	Kind: to.Ptr(armwebpubsub.ServiceKindWebPubSub),
	// 	Properties: &armwebpubsub.Properties{
	// 		DisableAADAuth: to.Ptr(false),
	// 		DisableLocalAuth: to.Ptr(false),
	// 		ExternalIP: to.Ptr("10.0.0.1"),
	// 		HostName: to.Ptr("mywebpubsubservice.webpubsub.azure.com"),
	// 		LiveTraceConfiguration: &armwebpubsub.LiveTraceConfiguration{
	// 			Categories: []*armwebpubsub.LiveTraceCategory{
	// 				{
	// 					Name: to.Ptr("ConnectivityLogs"),
	// 					Enabled: to.Ptr("true"),
	// 			}},
	// 			Enabled: to.Ptr("false"),
	// 		},
	// 		NetworkACLs: &armwebpubsub.NetworkACLs{
	// 			DefaultAction: to.Ptr(armwebpubsub.ACLActionDeny),
	// 			IPRules: []*armwebpubsub.IPRule{
	// 				{
	// 					Action: to.Ptr(armwebpubsub.ACLActionAllow),
	// 					Value: to.Ptr("123.456.789.123/24"),
	// 				},
	// 				{
	// 					Action: to.Ptr(armwebpubsub.ACLActionAllow),
	// 					Value: to.Ptr("123.456.789.123"),
	// 				},
	// 				{
	// 					Action: to.Ptr(armwebpubsub.ACLActionAllow),
	// 					Value: to.Ptr("AppService"),
	// 			}},
	// 			PrivateEndpoints: []*armwebpubsub.PrivateEndpointACL{
	// 				{
	// 					Allow: []*armwebpubsub.WebPubSubRequestType{
	// 						to.Ptr(armwebpubsub.WebPubSubRequestTypeServerConnection)},
	// 						Name: to.Ptr("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 				}},
	// 				PublicNetwork: &armwebpubsub.NetworkACL{
	// 					Allow: []*armwebpubsub.WebPubSubRequestType{
	// 						to.Ptr(armwebpubsub.WebPubSubRequestTypeClientConnection)},
	// 					},
	// 				},
	// 				PrivateEndpointConnections: []*armwebpubsub.PrivateEndpointConnection{
	// 					{
	// 						Name: to.Ptr("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 						Type: to.Ptr("Microsoft.SignalRService/WebPubSub/privateEndpointConnections"),
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/privateEndpointConnections/mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 						SystemData: &armwebpubsub.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(armwebpubsub.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(armwebpubsub.CreatedByTypeUser),
	// 						},
	// 						Properties: &armwebpubsub.PrivateEndpointConnectionProperties{
	// 							PrivateEndpoint: &armwebpubsub.PrivateEndpoint{
	// 								ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"),
	// 							},
	// 							PrivateLinkServiceConnectionState: &armwebpubsub.PrivateLinkServiceConnectionState{
	// 								ActionsRequired: to.Ptr("None"),
	// 								Status: to.Ptr(armwebpubsub.PrivateLinkServiceConnectionStatusApproved),
	// 							},
	// 							ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
	// 						},
	// 				}},
	// 				ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
	// 				PublicNetworkAccess: to.Ptr("Enabled"),
	// 				PublicPort: to.Ptr[int32](443),
	// 				RegionEndpointEnabled: to.Ptr("Enabled"),
	// 				ResourceLogConfiguration: &armwebpubsub.ResourceLogConfiguration{
	// 					Categories: []*armwebpubsub.ResourceLogCategory{
	// 						{
	// 							Name: to.Ptr("ConnectivityLogs"),
	// 							Enabled: to.Ptr("true"),
	// 					}},
	// 				},
	// 				ResourceStopped: to.Ptr("false"),
	// 				ServerPort: to.Ptr[int32](443),
	// 				SocketIO: &armwebpubsub.SocketIOSettings{
	// 					ServiceMode: to.Ptr("Serverless"),
	// 				},
	// 				TLS: &armwebpubsub.TLSSettings{
	// 					ClientCertEnabled: to.Ptr(true),
	// 				},
	// 				Version: to.Ptr("1.0"),
	// 			},
	// 			SKU: &armwebpubsub.ResourceSKU{
	// 				Name: to.Ptr("Premium_P1"),
	// 				Capacity: to.Ptr[int32](1),
	// 				Size: to.Ptr("P1"),
	// 				Tier: to.Ptr(armwebpubsub.WebPubSubSKUTierPremium),
	// 			},
	// 		}
}
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 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginDelete(ctx, "myResourceGroup", "myWebPubSubService", 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 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginRegenerateKey(ctx, "myResourceGroup", "myWebPubSubService", armwebpubsub.RegenerateKeyParameters{
		KeyType: to.Ptr(armwebpubsub.KeyTypePrimary),
	}, 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.Keys = armwebpubsub.Keys{
	// }
}
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 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginRestart(ctx, "myResourceGroup", "myWebPubSubService", 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 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginUpdate(ctx, "myResourceGroup", "myWebPubSubService", armwebpubsub.ResourceInfo{
		Location: to.Ptr("eastus"),
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
		Identity: &armwebpubsub.ManagedIdentity{
			Type: to.Ptr(armwebpubsub.ManagedIdentityTypeSystemAssigned),
		},
		Kind: to.Ptr(armwebpubsub.ServiceKindWebPubSub),
		Properties: &armwebpubsub.Properties{
			DisableAADAuth:   to.Ptr(false),
			DisableLocalAuth: to.Ptr(false),
			LiveTraceConfiguration: &armwebpubsub.LiveTraceConfiguration{
				Categories: []*armwebpubsub.LiveTraceCategory{
					{
						Name:    to.Ptr("ConnectivityLogs"),
						Enabled: to.Ptr("true"),
					}},
				Enabled: to.Ptr("false"),
			},
			NetworkACLs: &armwebpubsub.NetworkACLs{
				DefaultAction: to.Ptr(armwebpubsub.ACLActionDeny),
				PrivateEndpoints: []*armwebpubsub.PrivateEndpointACL{
					{
						Allow: []*armwebpubsub.WebPubSubRequestType{
							to.Ptr(armwebpubsub.WebPubSubRequestTypeServerConnection)},
						Name: to.Ptr("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
					}},
				PublicNetwork: &armwebpubsub.NetworkACL{
					Allow: []*armwebpubsub.WebPubSubRequestType{
						to.Ptr(armwebpubsub.WebPubSubRequestTypeClientConnection)},
				},
			},
			PublicNetworkAccess: to.Ptr("Enabled"),
			SocketIO: &armwebpubsub.SocketIOSettings{
				ServiceMode: to.Ptr("Serverless"),
			},
			TLS: &armwebpubsub.TLSSettings{
				ClientCertEnabled: to.Ptr(false),
			},
		},
		SKU: &armwebpubsub.ResourceSKU{
			Name:     to.Ptr("Premium_P1"),
			Capacity: to.Ptr[int32](1),
			Tier:     to.Ptr(armwebpubsub.WebPubSubSKUTierPremium),
		},
	}, 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 = armwebpubsub.ResourceInfo{
	// 	Name: to.Ptr("myWebPubSubService"),
	// 	Type: to.Ptr("Microsoft.SignalRService/WebPubSub"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService"),
	// 	SystemData: &armwebpubsub.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(armwebpubsub.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(armwebpubsub.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("eastus"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Identity: &armwebpubsub.ManagedIdentity{
	// 		Type: to.Ptr(armwebpubsub.ManagedIdentityTypeSystemAssigned),
	// 		PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	},
	// 	Kind: to.Ptr(armwebpubsub.ServiceKindWebPubSub),
	// 	Properties: &armwebpubsub.Properties{
	// 		DisableAADAuth: to.Ptr(false),
	// 		DisableLocalAuth: to.Ptr(false),
	// 		ExternalIP: to.Ptr("10.0.0.1"),
	// 		HostName: to.Ptr("mywebpubsubservice.webpubsub.azure.com"),
	// 		LiveTraceConfiguration: &armwebpubsub.LiveTraceConfiguration{
	// 			Categories: []*armwebpubsub.LiveTraceCategory{
	// 				{
	// 					Name: to.Ptr("ConnectivityLogs"),
	// 					Enabled: to.Ptr("true"),
	// 			}},
	// 			Enabled: to.Ptr("false"),
	// 		},
	// 		NetworkACLs: &armwebpubsub.NetworkACLs{
	// 			DefaultAction: to.Ptr(armwebpubsub.ACLActionDeny),
	// 			IPRules: []*armwebpubsub.IPRule{
	// 				{
	// 					Action: to.Ptr(armwebpubsub.ACLActionAllow),
	// 					Value: to.Ptr("123.456.789.123/24"),
	// 				},
	// 				{
	// 					Action: to.Ptr(armwebpubsub.ACLActionAllow),
	// 					Value: to.Ptr("123.456.789.123"),
	// 				},
	// 				{
	// 					Action: to.Ptr(armwebpubsub.ACLActionAllow),
	// 					Value: to.Ptr("AppService"),
	// 			}},
	// 			PrivateEndpoints: []*armwebpubsub.PrivateEndpointACL{
	// 				{
	// 					Allow: []*armwebpubsub.WebPubSubRequestType{
	// 						to.Ptr(armwebpubsub.WebPubSubRequestTypeServerConnection)},
	// 						Name: to.Ptr("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 				}},
	// 				PublicNetwork: &armwebpubsub.NetworkACL{
	// 					Allow: []*armwebpubsub.WebPubSubRequestType{
	// 						to.Ptr(armwebpubsub.WebPubSubRequestTypeClientConnection)},
	// 					},
	// 				},
	// 				PrivateEndpointConnections: []*armwebpubsub.PrivateEndpointConnection{
	// 					{
	// 						Name: to.Ptr("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 						Type: to.Ptr("Microsoft.SignalRService/WebPubSub/privateEndpointConnections"),
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/privateEndpointConnections/mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 						SystemData: &armwebpubsub.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(armwebpubsub.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(armwebpubsub.CreatedByTypeUser),
	// 						},
	// 						Properties: &armwebpubsub.PrivateEndpointConnectionProperties{
	// 							PrivateEndpoint: &armwebpubsub.PrivateEndpoint{
	// 								ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"),
	// 							},
	// 							PrivateLinkServiceConnectionState: &armwebpubsub.PrivateLinkServiceConnectionState{
	// 								ActionsRequired: to.Ptr("None"),
	// 								Status: to.Ptr(armwebpubsub.PrivateLinkServiceConnectionStatusApproved),
	// 							},
	// 							ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
	// 						},
	// 				}},
	// 				ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
	// 				PublicNetworkAccess: to.Ptr("Enabled"),
	// 				PublicPort: to.Ptr[int32](443),
	// 				RegionEndpointEnabled: to.Ptr("Enabled"),
	// 				ResourceLogConfiguration: &armwebpubsub.ResourceLogConfiguration{
	// 					Categories: []*armwebpubsub.ResourceLogCategory{
	// 						{
	// 							Name: to.Ptr("ConnectivityLogs"),
	// 							Enabled: to.Ptr("true"),
	// 					}},
	// 				},
	// 				ResourceStopped: to.Ptr("false"),
	// 				ServerPort: to.Ptr[int32](443),
	// 				SocketIO: &armwebpubsub.SocketIOSettings{
	// 					ServiceMode: to.Ptr("Serverless"),
	// 				},
	// 				TLS: &armwebpubsub.TLSSettings{
	// 					ClientCertEnabled: to.Ptr(true),
	// 				},
	// 				Version: to.Ptr("1.0"),
	// 			},
	// 			SKU: &armwebpubsub.ResourceSKU{
	// 				Name: to.Ptr("Premium_P1"),
	// 				Capacity: to.Ptr[int32](1),
	// 				Size: to.Ptr("P1"),
	// 				Tier: to.Ptr(armwebpubsub.WebPubSubSKUTierPremium),
	// 			},
	// 		}
}
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 2024-03-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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().CheckNameAvailability(ctx, "eastus", armwebpubsub.NameAvailabilityParameters{
		Name: to.Ptr("myWebPubSubService"),
		Type: to.Ptr("Microsoft.SignalRService/WebPubSub"),
	}, 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 = armwebpubsub.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 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().Get(ctx, "myResourceGroup", "myWebPubSubService", 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 = armwebpubsub.ResourceInfo{
	// 	Name: to.Ptr("myWebPubSubService"),
	// 	Type: to.Ptr("Microsoft.SignalRService/WebPubSub"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService"),
	// 	SystemData: &armwebpubsub.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(armwebpubsub.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(armwebpubsub.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("eastus"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Identity: &armwebpubsub.ManagedIdentity{
	// 		Type: to.Ptr(armwebpubsub.ManagedIdentityTypeSystemAssigned),
	// 		PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	},
	// 	Kind: to.Ptr(armwebpubsub.ServiceKindWebPubSub),
	// 	Properties: &armwebpubsub.Properties{
	// 		DisableAADAuth: to.Ptr(false),
	// 		DisableLocalAuth: to.Ptr(false),
	// 		ExternalIP: to.Ptr("10.0.0.1"),
	// 		HostName: to.Ptr("mywebpubsubservice.webpubsub.azure.com"),
	// 		LiveTraceConfiguration: &armwebpubsub.LiveTraceConfiguration{
	// 			Categories: []*armwebpubsub.LiveTraceCategory{
	// 				{
	// 					Name: to.Ptr("ConnectivityLogs"),
	// 					Enabled: to.Ptr("true"),
	// 			}},
	// 			Enabled: to.Ptr("false"),
	// 		},
	// 		NetworkACLs: &armwebpubsub.NetworkACLs{
	// 			DefaultAction: to.Ptr(armwebpubsub.ACLActionDeny),
	// 			IPRules: []*armwebpubsub.IPRule{
	// 				{
	// 					Action: to.Ptr(armwebpubsub.ACLActionAllow),
	// 					Value: to.Ptr("123.456.789.123/24"),
	// 				},
	// 				{
	// 					Action: to.Ptr(armwebpubsub.ACLActionAllow),
	// 					Value: to.Ptr("123.456.789.123"),
	// 				},
	// 				{
	// 					Action: to.Ptr(armwebpubsub.ACLActionAllow),
	// 					Value: to.Ptr("AppService"),
	// 			}},
	// 			PrivateEndpoints: []*armwebpubsub.PrivateEndpointACL{
	// 				{
	// 					Allow: []*armwebpubsub.WebPubSubRequestType{
	// 						to.Ptr(armwebpubsub.WebPubSubRequestTypeServerConnection)},
	// 						Name: to.Ptr("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 				}},
	// 				PublicNetwork: &armwebpubsub.NetworkACL{
	// 					Allow: []*armwebpubsub.WebPubSubRequestType{
	// 						to.Ptr(armwebpubsub.WebPubSubRequestTypeClientConnection)},
	// 					},
	// 				},
	// 				PrivateEndpointConnections: []*armwebpubsub.PrivateEndpointConnection{
	// 					{
	// 						Name: to.Ptr("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 						Type: to.Ptr("Microsoft.SignalRService/WebPubSub/privateEndpointConnections"),
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/privateEndpointConnections/mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 						SystemData: &armwebpubsub.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(armwebpubsub.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(armwebpubsub.CreatedByTypeUser),
	// 						},
	// 						Properties: &armwebpubsub.PrivateEndpointConnectionProperties{
	// 							PrivateEndpoint: &armwebpubsub.PrivateEndpoint{
	// 								ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"),
	// 							},
	// 							PrivateLinkServiceConnectionState: &armwebpubsub.PrivateLinkServiceConnectionState{
	// 								ActionsRequired: to.Ptr("None"),
	// 								Status: to.Ptr(armwebpubsub.PrivateLinkServiceConnectionStatusApproved),
	// 							},
	// 							ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
	// 						},
	// 				}},
	// 				ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
	// 				PublicNetworkAccess: to.Ptr("Enabled"),
	// 				PublicPort: to.Ptr[int32](443),
	// 				RegionEndpointEnabled: to.Ptr("Enabled"),
	// 				ResourceLogConfiguration: &armwebpubsub.ResourceLogConfiguration{
	// 					Categories: []*armwebpubsub.ResourceLogCategory{
	// 						{
	// 							Name: to.Ptr("ConnectivityLogs"),
	// 							Enabled: to.Ptr("true"),
	// 					}},
	// 				},
	// 				ResourceStopped: to.Ptr("false"),
	// 				ServerPort: to.Ptr[int32](443),
	// 				SocketIO: &armwebpubsub.SocketIOSettings{
	// 					ServiceMode: to.Ptr("Serverless"),
	// 				},
	// 				TLS: &armwebpubsub.TLSSettings{
	// 					ClientCertEnabled: to.Ptr(true),
	// 				},
	// 				Version: to.Ptr("1.0"),
	// 			},
	// 			SKU: &armwebpubsub.ResourceSKU{
	// 				Name: to.Ptr("Premium_P1"),
	// 				Capacity: to.Ptr[int32](1),
	// 				Size: to.Ptr("P1"),
	// 				Tier: to.Ptr(armwebpubsub.WebPubSubSKUTierPremium),
	// 			},
	// 		}
}
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 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().ListKeys(ctx, "myResourceGroup", "myWebPubSubService", 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 = armwebpubsub.Keys{
	// }
}
Output:

func (*Client) ListReplicaSKUs added in v1.3.0

func (client *Client) ListReplicaSKUs(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, options *ClientListReplicaSKUsOptions) (ClientListReplicaSKUsResponse, error)

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

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the resource.
  • replicaName - The name of the replica.
  • options - ClientListReplicaSKUsOptions contains the optional parameters for the Client.ListReplicaSKUs method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_ListReplicaSkus.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().ListReplicaSKUs(ctx, "myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus", 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 = armwebpubsub.SKUList{
	// 	Value: []*armwebpubsub.SKU{
	// 		{
	// 			Capacity: &armwebpubsub.SKUCapacity{
	// 				Default: to.Ptr[int32](1),
	// 				AllowedValues: []*int32{
	// 					to.Ptr[int32](1)},
	// 					Maximum: to.Ptr[int32](1),
	// 					Minimum: to.Ptr[int32](0),
	// 					ScaleType: to.Ptr(armwebpubsub.ScaleTypeManual),
	// 				},
	// 				ResourceType: to.Ptr("Microsoft.SignalRService/WebPubSub/replicas"),
	// 				SKU: &armwebpubsub.ResourceSKU{
	// 					Name: to.Ptr("Free_F1"),
	// 					Tier: to.Ptr(armwebpubsub.WebPubSubSKUTierFree),
	// 				},
	// 			},
	// 			{
	// 				Capacity: &armwebpubsub.SKUCapacity{
	// 					Default: to.Ptr[int32](1),
	// 					AllowedValues: []*int32{
	// 						to.Ptr[int32](1),
	// 						to.Ptr[int32](2),
	// 						to.Ptr[int32](3),
	// 						to.Ptr[int32](4),
	// 						to.Ptr[int32](5),
	// 						to.Ptr[int32](6),
	// 						to.Ptr[int32](7),
	// 						to.Ptr[int32](8),
	// 						to.Ptr[int32](9),
	// 						to.Ptr[int32](10),
	// 						to.Ptr[int32](20),
	// 						to.Ptr[int32](30),
	// 						to.Ptr[int32](40),
	// 						to.Ptr[int32](50),
	// 						to.Ptr[int32](60),
	// 						to.Ptr[int32](70),
	// 						to.Ptr[int32](80),
	// 						to.Ptr[int32](90),
	// 						to.Ptr[int32](100)},
	// 						Maximum: to.Ptr[int32](100),
	// 						Minimum: to.Ptr[int32](0),
	// 						ScaleType: to.Ptr(armwebpubsub.ScaleTypeManual),
	// 					},
	// 					ResourceType: to.Ptr("Microsoft.SignalRService/WebPubSub/replicas"),
	// 					SKU: &armwebpubsub.ResourceSKU{
	// 						Name: to.Ptr("Standard_S1"),
	// 						Tier: to.Ptr(armwebpubsub.WebPubSubSKUTierStandard),
	// 					},
	// 				},
	// 				{
	// 					Capacity: &armwebpubsub.SKUCapacity{
	// 						Default: to.Ptr[int32](1),
	// 						AllowedValues: []*int32{
	// 							to.Ptr[int32](1),
	// 							to.Ptr[int32](2),
	// 							to.Ptr[int32](3),
	// 							to.Ptr[int32](4),
	// 							to.Ptr[int32](5),
	// 							to.Ptr[int32](6),
	// 							to.Ptr[int32](7),
	// 							to.Ptr[int32](8),
	// 							to.Ptr[int32](9),
	// 							to.Ptr[int32](10),
	// 							to.Ptr[int32](20),
	// 							to.Ptr[int32](30),
	// 							to.Ptr[int32](40),
	// 							to.Ptr[int32](50),
	// 							to.Ptr[int32](60),
	// 							to.Ptr[int32](70),
	// 							to.Ptr[int32](80),
	// 							to.Ptr[int32](90),
	// 							to.Ptr[int32](100)},
	// 							Maximum: to.Ptr[int32](100),
	// 							Minimum: to.Ptr[int32](0),
	// 							ScaleType: to.Ptr(armwebpubsub.ScaleTypeAutomatic),
	// 						},
	// 						ResourceType: to.Ptr("Microsoft.SignalRService/WebPubSub/replicas"),
	// 						SKU: &armwebpubsub.ResourceSKU{
	// 							Name: to.Ptr("Premium_P1"),
	// 							Tier: to.Ptr(armwebpubsub.WebPubSubSKUTierStandard),
	// 						},
	// 				}},
	// 			}
}
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 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().ListSKUs(ctx, "myResourceGroup", "myWebPubSubService", 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 = armwebpubsub.SKUList{
	// 	Value: []*armwebpubsub.SKU{
	// 		{
	// 			Capacity: &armwebpubsub.SKUCapacity{
	// 				Default: to.Ptr[int32](1),
	// 				AllowedValues: []*int32{
	// 					to.Ptr[int32](1)},
	// 					Maximum: to.Ptr[int32](1),
	// 					Minimum: to.Ptr[int32](0),
	// 					ScaleType: to.Ptr(armwebpubsub.ScaleTypeManual),
	// 				},
	// 				ResourceType: to.Ptr("Microsoft.SignalRService/WebPubSub"),
	// 				SKU: &armwebpubsub.ResourceSKU{
	// 					Name: to.Ptr("Free_F1"),
	// 					Tier: to.Ptr(armwebpubsub.WebPubSubSKUTierFree),
	// 				},
	// 			},
	// 			{
	// 				Capacity: &armwebpubsub.SKUCapacity{
	// 					Default: to.Ptr[int32](1),
	// 					AllowedValues: []*int32{
	// 						to.Ptr[int32](1),
	// 						to.Ptr[int32](2),
	// 						to.Ptr[int32](3),
	// 						to.Ptr[int32](4),
	// 						to.Ptr[int32](5),
	// 						to.Ptr[int32](6),
	// 						to.Ptr[int32](7),
	// 						to.Ptr[int32](8),
	// 						to.Ptr[int32](9),
	// 						to.Ptr[int32](10),
	// 						to.Ptr[int32](20),
	// 						to.Ptr[int32](30),
	// 						to.Ptr[int32](40),
	// 						to.Ptr[int32](50),
	// 						to.Ptr[int32](60),
	// 						to.Ptr[int32](70),
	// 						to.Ptr[int32](80),
	// 						to.Ptr[int32](90),
	// 						to.Ptr[int32](100)},
	// 						Maximum: to.Ptr[int32](100),
	// 						Minimum: to.Ptr[int32](0),
	// 						ScaleType: to.Ptr(armwebpubsub.ScaleTypeManual),
	// 					},
	// 					ResourceType: to.Ptr("Microsoft.SignalRService/WebPubSub"),
	// 					SKU: &armwebpubsub.ResourceSKU{
	// 						Name: to.Ptr("Standard_S1"),
	// 						Tier: to.Ptr(armwebpubsub.WebPubSubSKUTierStandard),
	// 					},
	// 				},
	// 				{
	// 					Capacity: &armwebpubsub.SKUCapacity{
	// 						Default: to.Ptr[int32](1),
	// 						AllowedValues: []*int32{
	// 							to.Ptr[int32](1),
	// 							to.Ptr[int32](2),
	// 							to.Ptr[int32](3),
	// 							to.Ptr[int32](4),
	// 							to.Ptr[int32](5),
	// 							to.Ptr[int32](6),
	// 							to.Ptr[int32](7),
	// 							to.Ptr[int32](8),
	// 							to.Ptr[int32](9),
	// 							to.Ptr[int32](10),
	// 							to.Ptr[int32](20),
	// 							to.Ptr[int32](30),
	// 							to.Ptr[int32](40),
	// 							to.Ptr[int32](50),
	// 							to.Ptr[int32](60),
	// 							to.Ptr[int32](70),
	// 							to.Ptr[int32](80),
	// 							to.Ptr[int32](90),
	// 							to.Ptr[int32](100)},
	// 							Maximum: to.Ptr[int32](100),
	// 							Minimum: to.Ptr[int32](0),
	// 							ScaleType: to.Ptr(armwebpubsub.ScaleTypeAutomatic),
	// 						},
	// 						ResourceType: to.Ptr("Microsoft.SignalRService/WebPubSub/replicas"),
	// 						SKU: &armwebpubsub.ResourceSKU{
	// 							Name: to.Ptr("Premium_P1"),
	// 							Tier: to.Ptr(armwebpubsub.WebPubSubSKUTierStandard),
	// 						},
	// 				}},
	// 			}
}
Output:

func (*Client) NewListByResourceGroupPager added in v0.4.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 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.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 = armwebpubsub.ResourceInfoList{
		// 	Value: []*armwebpubsub.ResourceInfo{
		// 		{
		// 			Name: to.Ptr("myWebPubSubService"),
		// 			Type: to.Ptr("Microsoft.SignalRService/WebPubSub"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService"),
		// 			SystemData: &armwebpubsub.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(armwebpubsub.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(armwebpubsub.CreatedByTypeUser),
		// 			},
		// 			Location: to.Ptr("eastus"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Identity: &armwebpubsub.ManagedIdentity{
		// 				Type: to.Ptr(armwebpubsub.ManagedIdentityTypeSystemAssigned),
		// 				PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			},
		// 			Kind: to.Ptr(armwebpubsub.ServiceKindWebPubSub),
		// 			Properties: &armwebpubsub.Properties{
		// 				DisableAADAuth: to.Ptr(false),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				ExternalIP: to.Ptr("10.0.0.1"),
		// 				HostName: to.Ptr("mywebpubsubservice.webpubsub.azure.com"),
		// 				LiveTraceConfiguration: &armwebpubsub.LiveTraceConfiguration{
		// 					Categories: []*armwebpubsub.LiveTraceCategory{
		// 						{
		// 							Name: to.Ptr("ConnectivityLogs"),
		// 							Enabled: to.Ptr("true"),
		// 					}},
		// 					Enabled: to.Ptr("false"),
		// 				},
		// 				NetworkACLs: &armwebpubsub.NetworkACLs{
		// 					DefaultAction: to.Ptr(armwebpubsub.ACLActionDeny),
		// 					IPRules: []*armwebpubsub.IPRule{
		// 						{
		// 							Action: to.Ptr(armwebpubsub.ACLActionAllow),
		// 							Value: to.Ptr("123.456.789.123/24"),
		// 						},
		// 						{
		// 							Action: to.Ptr(armwebpubsub.ACLActionAllow),
		// 							Value: to.Ptr("123.456.789.123"),
		// 						},
		// 						{
		// 							Action: to.Ptr(armwebpubsub.ACLActionAllow),
		// 							Value: to.Ptr("AppService"),
		// 					}},
		// 					PrivateEndpoints: []*armwebpubsub.PrivateEndpointACL{
		// 						{
		// 							Allow: []*armwebpubsub.WebPubSubRequestType{
		// 								to.Ptr(armwebpubsub.WebPubSubRequestTypeServerConnection)},
		// 								Name: to.Ptr("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
		// 						}},
		// 						PublicNetwork: &armwebpubsub.NetworkACL{
		// 							Allow: []*armwebpubsub.WebPubSubRequestType{
		// 								to.Ptr(armwebpubsub.WebPubSubRequestTypeClientConnection)},
		// 							},
		// 						},
		// 						PrivateEndpointConnections: []*armwebpubsub.PrivateEndpointConnection{
		// 							{
		// 								Name: to.Ptr("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
		// 								Type: to.Ptr("Microsoft.SignalRService/WebPubSub/privateEndpointConnections"),
		// 								ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/privateEndpointConnections/mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
		// 								SystemData: &armwebpubsub.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(armwebpubsub.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(armwebpubsub.CreatedByTypeUser),
		// 								},
		// 								Properties: &armwebpubsub.PrivateEndpointConnectionProperties{
		// 									PrivateEndpoint: &armwebpubsub.PrivateEndpoint{
		// 										ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"),
		// 									},
		// 									PrivateLinkServiceConnectionState: &armwebpubsub.PrivateLinkServiceConnectionState{
		// 										ActionsRequired: to.Ptr("None"),
		// 										Status: to.Ptr(armwebpubsub.PrivateLinkServiceConnectionStatusApproved),
		// 									},
		// 									ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
		// 								},
		// 						}},
		// 						ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
		// 						PublicNetworkAccess: to.Ptr("Enabled"),
		// 						PublicPort: to.Ptr[int32](443),
		// 						RegionEndpointEnabled: to.Ptr("Enabled"),
		// 						ResourceLogConfiguration: &armwebpubsub.ResourceLogConfiguration{
		// 							Categories: []*armwebpubsub.ResourceLogCategory{
		// 								{
		// 									Name: to.Ptr("ConnectivityLogs"),
		// 									Enabled: to.Ptr("true"),
		// 							}},
		// 						},
		// 						ResourceStopped: to.Ptr("false"),
		// 						ServerPort: to.Ptr[int32](443),
		// 						SocketIO: &armwebpubsub.SocketIOSettings{
		// 							ServiceMode: to.Ptr("Serverless"),
		// 						},
		// 						TLS: &armwebpubsub.TLSSettings{
		// 							ClientCertEnabled: to.Ptr(true),
		// 						},
		// 						Version: to.Ptr("1.0"),
		// 					},
		// 					SKU: &armwebpubsub.ResourceSKU{
		// 						Name: to.Ptr("Premium_P1"),
		// 						Capacity: to.Ptr[int32](1),
		// 						Size: to.Ptr("P1"),
		// 						Tier: to.Ptr(armwebpubsub.WebPubSubSKUTierPremium),
		// 					},
		// 			}},
		// 		}
	}
}
Output:

func (*Client) NewListBySubscriptionPager added in v0.4.0

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

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

Generated from API version 2024-03-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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.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 = armwebpubsub.ResourceInfoList{
		// 	Value: []*armwebpubsub.ResourceInfo{
		// 		{
		// 			Name: to.Ptr("myWebPubSubService"),
		// 			Type: to.Ptr("Microsoft.SignalRService/WebPubSub"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService"),
		// 			SystemData: &armwebpubsub.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(armwebpubsub.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(armwebpubsub.CreatedByTypeUser),
		// 			},
		// 			Location: to.Ptr("eastus"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Identity: &armwebpubsub.ManagedIdentity{
		// 				Type: to.Ptr(armwebpubsub.ManagedIdentityTypeSystemAssigned),
		// 				PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			},
		// 			Kind: to.Ptr(armwebpubsub.ServiceKindWebPubSub),
		// 			Properties: &armwebpubsub.Properties{
		// 				DisableAADAuth: to.Ptr(false),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				ExternalIP: to.Ptr("10.0.0.1"),
		// 				HostName: to.Ptr("mywebpubsubservice.webpubsub.azure.com"),
		// 				LiveTraceConfiguration: &armwebpubsub.LiveTraceConfiguration{
		// 					Categories: []*armwebpubsub.LiveTraceCategory{
		// 						{
		// 							Name: to.Ptr("ConnectivityLogs"),
		// 							Enabled: to.Ptr("true"),
		// 					}},
		// 					Enabled: to.Ptr("false"),
		// 				},
		// 				NetworkACLs: &armwebpubsub.NetworkACLs{
		// 					DefaultAction: to.Ptr(armwebpubsub.ACLActionDeny),
		// 					IPRules: []*armwebpubsub.IPRule{
		// 						{
		// 							Action: to.Ptr(armwebpubsub.ACLActionAllow),
		// 							Value: to.Ptr("123.456.789.123/24"),
		// 						},
		// 						{
		// 							Action: to.Ptr(armwebpubsub.ACLActionAllow),
		// 							Value: to.Ptr("123.456.789.123"),
		// 						},
		// 						{
		// 							Action: to.Ptr(armwebpubsub.ACLActionAllow),
		// 							Value: to.Ptr("AppService"),
		// 					}},
		// 					PrivateEndpoints: []*armwebpubsub.PrivateEndpointACL{
		// 						{
		// 							Allow: []*armwebpubsub.WebPubSubRequestType{
		// 								to.Ptr(armwebpubsub.WebPubSubRequestTypeServerConnection)},
		// 								Name: to.Ptr("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
		// 						}},
		// 						PublicNetwork: &armwebpubsub.NetworkACL{
		// 							Allow: []*armwebpubsub.WebPubSubRequestType{
		// 								to.Ptr(armwebpubsub.WebPubSubRequestTypeClientConnection)},
		// 							},
		// 						},
		// 						PrivateEndpointConnections: []*armwebpubsub.PrivateEndpointConnection{
		// 							{
		// 								Name: to.Ptr("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
		// 								Type: to.Ptr("Microsoft.SignalRService/WebPubSub/privateEndpointConnections"),
		// 								ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/privateEndpointConnections/mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
		// 								SystemData: &armwebpubsub.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(armwebpubsub.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(armwebpubsub.CreatedByTypeUser),
		// 								},
		// 								Properties: &armwebpubsub.PrivateEndpointConnectionProperties{
		// 									PrivateEndpoint: &armwebpubsub.PrivateEndpoint{
		// 										ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"),
		// 									},
		// 									PrivateLinkServiceConnectionState: &armwebpubsub.PrivateLinkServiceConnectionState{
		// 										ActionsRequired: to.Ptr("None"),
		// 										Status: to.Ptr(armwebpubsub.PrivateLinkServiceConnectionStatusApproved),
		// 									},
		// 									ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
		// 								},
		// 						}},
		// 						ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
		// 						PublicNetworkAccess: to.Ptr("Enabled"),
		// 						PublicPort: to.Ptr[int32](443),
		// 						RegionEndpointEnabled: to.Ptr("Enabled"),
		// 						ResourceLogConfiguration: &armwebpubsub.ResourceLogConfiguration{
		// 							Categories: []*armwebpubsub.ResourceLogCategory{
		// 								{
		// 									Name: to.Ptr("ConnectivityLogs"),
		// 									Enabled: to.Ptr("true"),
		// 							}},
		// 						},
		// 						ResourceStopped: to.Ptr("false"),
		// 						ServerPort: to.Ptr[int32](443),
		// 						SocketIO: &armwebpubsub.SocketIOSettings{
		// 							ServiceMode: to.Ptr("Serverless"),
		// 						},
		// 						TLS: &armwebpubsub.TLSSettings{
		// 							ClientCertEnabled: to.Ptr(true),
		// 						},
		// 						Version: to.Ptr("1.0"),
		// 					},
		// 					SKU: &armwebpubsub.ResourceSKU{
		// 						Name: to.Ptr("Premium_P1"),
		// 						Capacity: to.Ptr[int32](1),
		// 						Size: to.Ptr("P1"),
		// 						Tier: to.Ptr(armwebpubsub.WebPubSubSKUTierPremium),
		// 					},
		// 			}},
		// 		}
	}
}
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 - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) 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) NewHubsClient added in v1.1.0

func (c *ClientFactory) NewHubsClient() *HubsClient

NewHubsClient creates a new instance of HubsClient.

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) NewReplicaSharedPrivateLinkResourcesClient added in v1.3.0

func (c *ClientFactory) NewReplicaSharedPrivateLinkResourcesClient() *ReplicaSharedPrivateLinkResourcesClient

NewReplicaSharedPrivateLinkResourcesClient creates a new instance of ReplicaSharedPrivateLinkResourcesClient.

func (*ClientFactory) NewReplicasClient added in v1.3.0

func (c *ClientFactory) NewReplicasClient() *ReplicasClient

NewReplicasClient creates a new instance of ReplicasClient.

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 ClientListReplicaSKUsOptions added in v1.3.0

type ClientListReplicaSKUsOptions struct {
}

ClientListReplicaSKUsOptions contains the optional parameters for the Client.ListReplicaSKUs method.

type ClientListReplicaSKUsResponse added in v1.3.0

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

ClientListReplicaSKUsResponse contains the response from method Client.ListReplicaSKUs.

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

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

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

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

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

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

func NewCustomCertificatesClient added in v1.1.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 - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*CustomCertificatesClient) BeginCreateOrUpdate added in v1.1.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 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubCustomCertificates_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCustomCertificatesClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myWebPubSubService", "myCert", armwebpubsub.CustomCertificate{
		Properties: &armwebpubsub.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 = armwebpubsub.CustomCertificate{
	// 	Name: to.Ptr("myCert"),
	// 	Type: to.Ptr("Microsoft.SignalRService/WebPubSub/customCertificates"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/customCertificates/myCert"),
	// 	Properties: &armwebpubsub.CustomCertificateProperties{
	// 		KeyVaultBaseURI: to.Ptr("https://myvault.keyvault.azure.net/"),
	// 		KeyVaultSecretName: to.Ptr("mycert"),
	// 		KeyVaultSecretVersion: to.Ptr("bb6a44b2743f47f68dad0d6cc9756432"),
	// 		ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*CustomCertificatesClient) Delete added in v1.1.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 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubCustomCertificates_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/webpubsub/armwebpubsub"
)

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

func (*CustomCertificatesClient) Get added in v1.1.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 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubCustomCertificates_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCustomCertificatesClient().Get(ctx, "myResourceGroup", "myWebPubSubService", "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 = armwebpubsub.CustomCertificate{
	// 	Name: to.Ptr("myCert"),
	// 	Type: to.Ptr("Microsoft.SignalRService/WebPubSub/customCertificates"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/customCertificates/myCert"),
	// 	Properties: &armwebpubsub.CustomCertificateProperties{
	// 		KeyVaultBaseURI: to.Ptr("https://myvault.keyvault.azure.net/"),
	// 		KeyVaultSecretName: to.Ptr("mycert"),
	// 		KeyVaultSecretVersion: to.Ptr("bb6a44b2743f47f68dad0d6cc9756432"),
	// 		ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*CustomCertificatesClient) NewListPager added in v1.1.0

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

NewListPager - List all custom certificates.

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubCustomCertificates_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCustomCertificatesClient().NewListPager("myResourceGroup", "myWebPubSubService", 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 = armwebpubsub.CustomCertificateList{
		// 	Value: []*armwebpubsub.CustomCertificate{
		// 		{
		// 			Name: to.Ptr("myCert"),
		// 			Type: to.Ptr("Microsoft.SignalRService/WebPubSub/customCertificates"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/customCertificates/myCert"),
		// 			Properties: &armwebpubsub.CustomCertificateProperties{
		// 				KeyVaultBaseURI: to.Ptr("https://myvault.keyvault.azure.net/"),
		// 				KeyVaultSecretName: to.Ptr("mycert"),
		// 				KeyVaultSecretVersion: to.Ptr("bb6a44b2743f47f68dad0d6cc9756432"),
		// 				ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

type CustomCertificatesClientBeginCreateOrUpdateOptions added in v1.1.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 v1.1.0

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

CustomCertificatesClientCreateOrUpdateResponse contains the response from method CustomCertificatesClient.BeginCreateOrUpdate.

type CustomCertificatesClientDeleteOptions added in v1.1.0

type CustomCertificatesClientDeleteOptions struct {
}

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

type CustomCertificatesClientDeleteResponse added in v1.1.0

type CustomCertificatesClientDeleteResponse struct {
}

CustomCertificatesClientDeleteResponse contains the response from method CustomCertificatesClient.Delete.

type CustomCertificatesClientGetOptions added in v1.1.0

type CustomCertificatesClientGetOptions struct {
}

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

type CustomCertificatesClientGetResponse added in v1.1.0

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

CustomCertificatesClientGetResponse contains the response from method CustomCertificatesClient.Get.

type CustomCertificatesClientListOptions added in v1.1.0

type CustomCertificatesClientListOptions struct {
}

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

type CustomCertificatesClientListResponse added in v1.1.0

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

CustomCertificatesClientListResponse contains the response from method CustomCertificatesClient.NewListPager.

type CustomDomain added in v1.1.0

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

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

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

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

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

func NewCustomDomainsClient added in v1.1.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 - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*CustomDomainsClient) BeginCreateOrUpdate added in v1.1.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 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubCustomDomains_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCustomDomainsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myWebPubSubService", "myDomain", armwebpubsub.CustomDomain{
		Properties: &armwebpubsub.CustomDomainProperties{
			CustomCertificate: &armwebpubsub.ResourceReference{
				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/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 v1.1.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 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubCustomDomains_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCustomDomainsClient().BeginDelete(ctx, "myResourceGroup", "myWebPubSubService", "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 v1.1.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 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubCustomDomains_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCustomDomainsClient().Get(ctx, "myResourceGroup", "myWebPubSubService", "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 = armwebpubsub.CustomDomain{
	// 	Name: to.Ptr("myDomain"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/customDomains/myDomain"),
	// 	Properties: &armwebpubsub.CustomDomainProperties{
	// 		CustomCertificate: &armwebpubsub.ResourceReference{
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/customCertificates/myCert"),
	// 		},
	// 		DomainName: to.Ptr("example.com"),
	// 		ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*CustomDomainsClient) NewListPager added in v1.1.0

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

NewListPager - List all custom domains.

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubCustomDomains_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCustomDomainsClient().NewListPager("myResourceGroup", "myWebPubSubService", 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 = armwebpubsub.CustomDomainList{
		// 	Value: []*armwebpubsub.CustomDomain{
		// 		{
		// 			Name: to.Ptr("myDomain"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/customDomains/myDomain"),
		// 			Properties: &armwebpubsub.CustomDomainProperties{
		// 				CustomCertificate: &armwebpubsub.ResourceReference{
		// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/customCertificates/myCert"),
		// 				},
		// 				DomainName: to.Ptr("example.com"),
		// 				ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

type CustomDomainsClientBeginCreateOrUpdateOptions added in v1.1.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 v1.1.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 v1.1.0

type CustomDomainsClientCreateOrUpdateResponse struct {
	// A custom domain
	CustomDomain
}

CustomDomainsClientCreateOrUpdateResponse contains the response from method CustomDomainsClient.BeginCreateOrUpdate.

type CustomDomainsClientDeleteResponse added in v1.1.0

type CustomDomainsClientDeleteResponse struct {
}

CustomDomainsClientDeleteResponse contains the response from method CustomDomainsClient.BeginDelete.

type CustomDomainsClientGetOptions added in v1.1.0

type CustomDomainsClientGetOptions struct {
}

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

type CustomDomainsClientGetResponse added in v1.1.0

type CustomDomainsClientGetResponse struct {
	// A custom domain
	CustomDomain
}

CustomDomainsClientGetResponse contains the response from method CustomDomainsClient.Get.

type CustomDomainsClientListOptions added in v1.1.0

type CustomDomainsClientListOptions struct {
}

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

type CustomDomainsClientListResponse added in v1.1.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 EventHandler

type EventHandler struct {
	// REQUIRED; Gets or sets the EventHandler URL template. You can use a predefined parameter {hub} and {event} inside the template,
	// the value of the EventHandler URL is dynamically calculated when the client
	// request comes in. For example, UrlTemplate can be http://example.com/api/{hub}/{event}. The host part can't contains parameters.
	URLTemplate *string

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

	// Gets or sets the list of system events.
	SystemEvents []*string

	// Gets or sets the matching pattern for event names. There are 3 kinds of patterns supported: 1. "*", it matches any event
	// name 2. Combine multiple events with ",", for example "event1,event2", it
	// matches event "event1" and "event2" 3. A single event name, for example, "event1", it matches "event1"
	UserEventPattern *string
}

EventHandler - Properties of event handler.

func (EventHandler) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EventHandler.

func (*EventHandler) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EventHandler.

type EventHubEndpoint added in v1.1.0

type EventHubEndpoint struct {
	// REQUIRED; The name of the Event Hub.
	EventHubName *string

	// REQUIRED; The fully qualified namespace name of the Event Hub resource. For example, "example.servicebus.windows.net".
	FullyQualifiedNamespace *string

	// REQUIRED
	Type *EventListenerEndpointDiscriminator
}

EventHubEndpoint - An Event Hub endpoint. The managed identity of Web PubSub service must be enabled, and the identity should have the "Azure Event Hubs Data sender" role to access Event Hub.

func (*EventHubEndpoint) GetEventListenerEndpoint added in v1.1.0

func (e *EventHubEndpoint) GetEventListenerEndpoint() *EventListenerEndpoint

GetEventListenerEndpoint implements the EventListenerEndpointClassification interface for type EventHubEndpoint.

func (EventHubEndpoint) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type EventHubEndpoint.

func (*EventHubEndpoint) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EventHubEndpoint.

type EventListener added in v1.1.0

type EventListener struct {
	// REQUIRED; An endpoint specifying where Web PubSub should send events to.
	Endpoint EventListenerEndpointClassification

	// REQUIRED; A base class for event filter which determines whether an event should be sent to an event listener.
	Filter EventListenerFilterClassification
}

EventListener - A setting defines which kinds of events should be sent to which endpoint.

func (EventListener) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type EventListener.

func (*EventListener) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EventListener.

type EventListenerEndpoint added in v1.1.0

type EventListenerEndpoint struct {
	// REQUIRED
	Type *EventListenerEndpointDiscriminator
}

EventListenerEndpoint - An endpoint specifying where Web PubSub should send events to.

func (*EventListenerEndpoint) GetEventListenerEndpoint added in v1.1.0

func (e *EventListenerEndpoint) GetEventListenerEndpoint() *EventListenerEndpoint

GetEventListenerEndpoint implements the EventListenerEndpointClassification interface for type EventListenerEndpoint.

func (EventListenerEndpoint) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type EventListenerEndpoint.

func (*EventListenerEndpoint) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EventListenerEndpoint.

type EventListenerEndpointClassification added in v1.1.0

type EventListenerEndpointClassification interface {
	// GetEventListenerEndpoint returns the EventListenerEndpoint content of the underlying type.
	GetEventListenerEndpoint() *EventListenerEndpoint
}

EventListenerEndpointClassification provides polymorphic access to related types. Call the interface's GetEventListenerEndpoint() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *EventHubEndpoint, *EventListenerEndpoint

type EventListenerEndpointDiscriminator added in v1.1.0

type EventListenerEndpointDiscriminator string
const (
	EventListenerEndpointDiscriminatorEventHub EventListenerEndpointDiscriminator = "EventHub"
)

func PossibleEventListenerEndpointDiscriminatorValues added in v1.1.0

func PossibleEventListenerEndpointDiscriminatorValues() []EventListenerEndpointDiscriminator

PossibleEventListenerEndpointDiscriminatorValues returns the possible values for the EventListenerEndpointDiscriminator const type.

type EventListenerFilter added in v1.1.0

type EventListenerFilter struct {
	// REQUIRED
	Type *EventListenerFilterDiscriminator
}

EventListenerFilter - A base class for event filter which determines whether an event should be sent to an event listener.

func (*EventListenerFilter) GetEventListenerFilter added in v1.1.0

func (e *EventListenerFilter) GetEventListenerFilter() *EventListenerFilter

GetEventListenerFilter implements the EventListenerFilterClassification interface for type EventListenerFilter.

func (EventListenerFilter) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type EventListenerFilter.

func (*EventListenerFilter) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EventListenerFilter.

type EventListenerFilterClassification added in v1.1.0

type EventListenerFilterClassification interface {
	// GetEventListenerFilter returns the EventListenerFilter content of the underlying type.
	GetEventListenerFilter() *EventListenerFilter
}

EventListenerFilterClassification provides polymorphic access to related types. Call the interface's GetEventListenerFilter() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *EventListenerFilter, *EventNameFilter

type EventListenerFilterDiscriminator added in v1.1.0

type EventListenerFilterDiscriminator string
const (
	EventListenerFilterDiscriminatorEventName EventListenerFilterDiscriminator = "EventName"
)

func PossibleEventListenerFilterDiscriminatorValues added in v1.1.0

func PossibleEventListenerFilterDiscriminatorValues() []EventListenerFilterDiscriminator

PossibleEventListenerFilterDiscriminatorValues returns the possible values for the EventListenerFilterDiscriminator const type.

type EventNameFilter added in v1.1.0

type EventNameFilter struct {
	// REQUIRED
	Type *EventListenerFilterDiscriminator

	// Gets or sets a list of system events. Supported events: "connected" and "disconnected". Blocking event "connect" is not
	// supported because it requires a response.
	SystemEvents []*string

	// Gets or sets a matching pattern for event names. There are 3 kinds of patterns supported: 1. "*", it matches any event
	// name 2. Combine multiple events with ",", for example "event1,event2", it matches
	// events "event1" and "event2" 3. A single event name, for example, "event1", it matches "event1"
	UserEventPattern *string
}

EventNameFilter - Filter events by their name.

func (*EventNameFilter) GetEventListenerFilter added in v1.1.0

func (e *EventNameFilter) GetEventListenerFilter() *EventListenerFilter

GetEventListenerFilter implements the EventListenerFilterClassification interface for type EventNameFilter.

func (EventNameFilter) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type EventNameFilter.

func (*EventNameFilter) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EventNameFilter.

type Hub added in v0.2.0

type Hub struct {
	// REQUIRED; Properties of a hub.
	Properties *HubProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Hub - A hub setting

func (Hub) MarshalJSON added in v1.1.0

func (h Hub) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Hub.

func (*Hub) UnmarshalJSON added in v1.1.0

func (h *Hub) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Hub.

type HubList added in v0.2.0

type HubList struct {
	// List of hub settings to this resource.
	Value []*Hub

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

HubList - Hub setting list

func (HubList) MarshalJSON added in v0.2.0

func (h HubList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HubList.

func (*HubList) UnmarshalJSON added in v1.1.0

func (h *HubList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HubList.

type HubProperties added in v0.2.0

type HubProperties struct {
	// The settings for configuring if anonymous connections are allowed for this hub: "allow" or "deny". Default to "deny".
	AnonymousConnectPolicy *string

	// Event handler of a hub.
	EventHandlers []*EventHandler

	// Event listener settings for forwarding your client events to listeners. Event listener is transparent to Web PubSub clients,
	// and it doesn't return any result to clients nor interrupt the lifetime of
	// clients. One event can be sent to multiple listeners, as long as it matches the filters in those listeners. The order of
	// the array elements doesn't matter. Maximum count of event listeners among all
	// hubs is 10.
	EventListeners []*EventListener

	// The settings for configuring the WebSocket ping-pong interval in seconds for all clients in the hub. Valid range: 1 to
	// 120. Default to 20 seconds.
	WebSocketKeepAliveIntervalInSeconds *int32
}

HubProperties - Properties of a hub.

func (HubProperties) MarshalJSON added in v0.2.0

func (h HubProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HubProperties.

func (*HubProperties) UnmarshalJSON added in v1.1.0

func (h *HubProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HubProperties.

type HubsClient added in v0.2.0

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

HubsClient contains the methods for the WebPubSubHubs group. Don't use this type directly, use NewHubsClient() instead.

func NewHubsClient added in v0.2.0

func NewHubsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HubsClient, error)

NewHubsClient creates a new instance of HubsClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*HubsClient) BeginCreateOrUpdate added in v0.2.0

func (client *HubsClient) BeginCreateOrUpdate(ctx context.Context, hubName string, resourceGroupName string, resourceName string, parameters Hub, options *HubsClientBeginCreateOrUpdateOptions) (*runtime.Poller[HubsClientCreateOrUpdateResponse], error)

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

Generated from API version 2024-03-01

  • hubName - The hub name.
  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the resource.
  • parameters - The resource of WebPubSubHub and its properties
  • options - HubsClientBeginCreateOrUpdateOptions contains the optional parameters for the HubsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubHubs_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewHubsClient().BeginCreateOrUpdate(ctx, "exampleHub", "myResourceGroup", "myWebPubSubService", armwebpubsub.Hub{
		Properties: &armwebpubsub.HubProperties{
			AnonymousConnectPolicy: to.Ptr("allow"),
			EventHandlers: []*armwebpubsub.EventHandler{
				{
					Auth: &armwebpubsub.UpstreamAuthSettings{
						Type: to.Ptr(armwebpubsub.UpstreamAuthTypeManagedIdentity),
						ManagedIdentity: &armwebpubsub.ManagedIdentitySettings{
							Resource: to.Ptr("abc"),
						},
					},
					SystemEvents: []*string{
						to.Ptr("connect"),
						to.Ptr("connected")},
					URLTemplate:      to.Ptr("http://host.com"),
					UserEventPattern: to.Ptr("*"),
				}},
			EventListeners: []*armwebpubsub.EventListener{
				{
					Endpoint: &armwebpubsub.EventHubEndpoint{
						Type:                    to.Ptr(armwebpubsub.EventListenerEndpointDiscriminatorEventHub),
						EventHubName:            to.Ptr("eventHubName1"),
						FullyQualifiedNamespace: to.Ptr("example.servicebus.windows.net"),
					},
					Filter: &armwebpubsub.EventNameFilter{
						Type: to.Ptr(armwebpubsub.EventListenerFilterDiscriminatorEventName),
						SystemEvents: []*string{
							to.Ptr("connected"),
							to.Ptr("disconnected")},
						UserEventPattern: to.Ptr("*"),
					},
				}},
			WebSocketKeepAliveIntervalInSeconds: to.Ptr[int32](50),
		},
	}, 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.Hub = armwebpubsub.Hub{
	// 	Name: to.Ptr("exampleHub"),
	// 	Type: to.Ptr("Microsoft.SignalRService/WebPubSub/hubs"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/hubs/exampleHub"),
	// 	Properties: &armwebpubsub.HubProperties{
	// 		AnonymousConnectPolicy: to.Ptr("allow"),
	// 		EventHandlers: []*armwebpubsub.EventHandler{
	// 			{
	// 				Auth: &armwebpubsub.UpstreamAuthSettings{
	// 					Type: to.Ptr(armwebpubsub.UpstreamAuthTypeManagedIdentity),
	// 					ManagedIdentity: &armwebpubsub.ManagedIdentitySettings{
	// 						Resource: to.Ptr("abc"),
	// 					},
	// 				},
	// 				SystemEvents: []*string{
	// 					to.Ptr("connect"),
	// 					to.Ptr("connected")},
	// 					URLTemplate: to.Ptr("http://host.com"),
	// 					UserEventPattern: to.Ptr("*"),
	// 			}},
	// 			EventListeners: []*armwebpubsub.EventListener{
	// 				{
	// 					Endpoint: &armwebpubsub.EventHubEndpoint{
	// 						Type: to.Ptr(armwebpubsub.EventListenerEndpointDiscriminatorEventHub),
	// 						EventHubName: to.Ptr("eventHubName1"),
	// 						FullyQualifiedNamespace: to.Ptr("example.servicebus.windows.net"),
	// 					},
	// 					Filter: &armwebpubsub.EventNameFilter{
	// 						Type: to.Ptr(armwebpubsub.EventListenerFilterDiscriminatorEventName),
	// 						SystemEvents: []*string{
	// 							to.Ptr("connected"),
	// 							to.Ptr("disconnected")},
	// 							UserEventPattern: to.Ptr("*"),
	// 						},
	// 				}},
	// 				WebSocketKeepAliveIntervalInSeconds: to.Ptr[int32](50),
	// 			},
	// 		}
}
Output:

func (*HubsClient) BeginDelete added in v0.2.0

func (client *HubsClient) BeginDelete(ctx context.Context, hubName string, resourceGroupName string, resourceName string, options *HubsClientBeginDeleteOptions) (*runtime.Poller[HubsClientDeleteResponse], error)

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

Generated from API version 2024-03-01

  • hubName - The hub name.
  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the resource.
  • options - HubsClientBeginDeleteOptions contains the optional parameters for the HubsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubHubs_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewHubsClient().BeginDelete(ctx, "exampleHub", "myResourceGroup", "myWebPubSubService", 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 (*HubsClient) Get added in v0.2.0

func (client *HubsClient) Get(ctx context.Context, hubName string, resourceGroupName string, resourceName string, options *HubsClientGetOptions) (HubsClientGetResponse, error)

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

Generated from API version 2024-03-01

  • hubName - The hub name.
  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the resource.
  • options - HubsClientGetOptions contains the optional parameters for the HubsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubHubs_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewHubsClient().Get(ctx, "exampleHub", "myResourceGroup", "myWebPubSubService", 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.Hub = armwebpubsub.Hub{
	// 	Name: to.Ptr("exampleHub"),
	// 	Type: to.Ptr("Microsoft.SignalRService/WebPubSub/hubs"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/hubs/exampleHub"),
	// 	Properties: &armwebpubsub.HubProperties{
	// 		AnonymousConnectPolicy: to.Ptr("allow"),
	// 		EventHandlers: []*armwebpubsub.EventHandler{
	// 			{
	// 				Auth: &armwebpubsub.UpstreamAuthSettings{
	// 					Type: to.Ptr(armwebpubsub.UpstreamAuthTypeManagedIdentity),
	// 					ManagedIdentity: &armwebpubsub.ManagedIdentitySettings{
	// 						Resource: to.Ptr("abc"),
	// 					},
	// 				},
	// 				SystemEvents: []*string{
	// 					to.Ptr("connect"),
	// 					to.Ptr("connected")},
	// 					URLTemplate: to.Ptr("http://host.com"),
	// 					UserEventPattern: to.Ptr("*"),
	// 			}},
	// 			EventListeners: []*armwebpubsub.EventListener{
	// 				{
	// 					Endpoint: &armwebpubsub.EventHubEndpoint{
	// 						Type: to.Ptr(armwebpubsub.EventListenerEndpointDiscriminatorEventHub),
	// 						EventHubName: to.Ptr("eventHubName1"),
	// 						FullyQualifiedNamespace: to.Ptr("example.servicebus.windows.net"),
	// 					},
	// 					Filter: &armwebpubsub.EventNameFilter{
	// 						Type: to.Ptr(armwebpubsub.EventListenerFilterDiscriminatorEventName),
	// 						SystemEvents: []*string{
	// 							to.Ptr("connected"),
	// 							to.Ptr("disconnected")},
	// 							UserEventPattern: to.Ptr("*"),
	// 						},
	// 				}},
	// 				WebSocketKeepAliveIntervalInSeconds: to.Ptr[int32](50),
	// 			},
	// 		}
}
Output:

func (*HubsClient) NewListPager added in v0.4.0

func (client *HubsClient) NewListPager(resourceGroupName string, resourceName string, options *HubsClientListOptions) *runtime.Pager[HubsClientListResponse]

NewListPager - List hub settings.

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the resource.
  • options - HubsClientListOptions contains the optional parameters for the HubsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubHubs_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewHubsClient().NewListPager("myResourceGroup", "myWebPubSubService", 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.HubList = armwebpubsub.HubList{
		// 	Value: []*armwebpubsub.Hub{
		// 		{
		// 			Name: to.Ptr("exampleHub"),
		// 			Type: to.Ptr("Microsoft.SignalRService/WebPubSub/hubs"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/hubs/exampleHub"),
		// 			Properties: &armwebpubsub.HubProperties{
		// 				AnonymousConnectPolicy: to.Ptr("allow"),
		// 				EventHandlers: []*armwebpubsub.EventHandler{
		// 					{
		// 						Auth: &armwebpubsub.UpstreamAuthSettings{
		// 							Type: to.Ptr(armwebpubsub.UpstreamAuthTypeManagedIdentity),
		// 							ManagedIdentity: &armwebpubsub.ManagedIdentitySettings{
		// 								Resource: to.Ptr("abc"),
		// 							},
		// 						},
		// 						SystemEvents: []*string{
		// 							to.Ptr("connect"),
		// 							to.Ptr("connected")},
		// 							URLTemplate: to.Ptr("http://host.com"),
		// 							UserEventPattern: to.Ptr("*"),
		// 					}},
		// 					EventListeners: []*armwebpubsub.EventListener{
		// 						{
		// 							Endpoint: &armwebpubsub.EventHubEndpoint{
		// 								Type: to.Ptr(armwebpubsub.EventListenerEndpointDiscriminatorEventHub),
		// 								EventHubName: to.Ptr("eventHubName1"),
		// 								FullyQualifiedNamespace: to.Ptr("example.servicebus.windows.net"),
		// 							},
		// 							Filter: &armwebpubsub.EventNameFilter{
		// 								Type: to.Ptr(armwebpubsub.EventListenerFilterDiscriminatorEventName),
		// 								SystemEvents: []*string{
		// 									to.Ptr("connected"),
		// 									to.Ptr("disconnected")},
		// 									UserEventPattern: to.Ptr("*"),
		// 								},
		// 						}},
		// 						WebSocketKeepAliveIntervalInSeconds: to.Ptr[int32](50),
		// 					},
		// 			}},
		// 		}
	}
}
Output:

type HubsClientBeginCreateOrUpdateOptions added in v0.2.0

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

HubsClientBeginCreateOrUpdateOptions contains the optional parameters for the HubsClient.BeginCreateOrUpdate method.

type HubsClientBeginDeleteOptions added in v0.2.0

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

HubsClientBeginDeleteOptions contains the optional parameters for the HubsClient.BeginDelete method.

type HubsClientCreateOrUpdateResponse added in v0.2.0

type HubsClientCreateOrUpdateResponse struct {
	// A hub setting
	Hub
}

HubsClientCreateOrUpdateResponse contains the response from method HubsClient.BeginCreateOrUpdate.

type HubsClientDeleteResponse added in v0.2.0

type HubsClientDeleteResponse struct {
}

HubsClientDeleteResponse contains the response from method HubsClient.BeginDelete.

type HubsClientGetOptions added in v0.2.0

type HubsClientGetOptions struct {
}

HubsClientGetOptions contains the optional parameters for the HubsClient.Get method.

type HubsClientGetResponse added in v0.2.0

type HubsClientGetResponse struct {
	// A hub setting
	Hub
}

HubsClientGetResponse contains the response from method HubsClient.Get.

type HubsClientListOptions added in v0.2.0

type HubsClientListOptions struct {
}

HubsClientListOptions contains the optional parameters for the HubsClient.NewListPager method.

type HubsClientListResponse added in v0.2.0

type HubsClientListResponse struct {
	// Hub setting list
	HubList
}

HubsClientListResponse contains the response from method HubsClient.NewListPager.

type IPRule added in v1.3.0

type IPRule struct {
	// Azure Networking ACL Action.
	Action *ACLAction

	// An IP or CIDR or ServiceTag
	Value *string
}

IPRule - An IP rule

func (IPRule) MarshalJSON added in v1.3.0

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

MarshalJSON implements the json.Marshaller interface for type IPRule.

func (*IPRule) UnmarshalJSON added in v1.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type IPRule.

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

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

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

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", "Microsoft.SignalRService/WebPubSub", "Microsoft.SignalRService/SignalR/replicas"
	// or "Microsoft.SignalRService/WebPubSub/replicas"
	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 []*WebPubSubRequestType

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

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

	// IP rules for filtering public traffic
	IPRules []*IPRule

	// 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.4.0

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

Generated from API version 2024-03-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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.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 = armwebpubsub.OperationList{
		// 	Value: []*armwebpubsub.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.SignalRService/WebPubSub/read"),
		// 			Display: &armwebpubsub.OperationDisplay{
		// 				Description: to.Ptr("View the resource settings and configurations in the management portal or through API"),
		// 				Operation: to.Ptr("Manage WebPubSub (read-only)"),
		// 				Provider: to.Ptr("Microsoft.SignalRService"),
		// 				Resource: to.Ptr("WebPubSub"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Properties: &armwebpubsub.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 []*WebPubSubRequestType

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

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. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

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 WebPubSubPrivateEndpointConnections 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 - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*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 2024-03-01

  • privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource.
  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubPrivateEndpointConnections_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginDelete(ctx, "mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", "myResourceGroup", "myWebPubSubService", 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 2024-03-01

  • privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource.
  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubPrivateEndpointConnections_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", "myResourceGroup", "myWebPubSubService", 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 = armwebpubsub.PrivateEndpointConnection{
	// 	Name: to.Ptr("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 	Type: to.Ptr("Microsoft.SignalRService/WebPubSub/privateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/privateEndpointConnections/mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 	SystemData: &armwebpubsub.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(armwebpubsub.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(armwebpubsub.CreatedByTypeUser),
	// 	},
	// 	Properties: &armwebpubsub.PrivateEndpointConnectionProperties{
	// 		GroupIDs: []*string{
	// 			to.Ptr("webpubsub")},
	// 			PrivateEndpoint: &armwebpubsub.PrivateEndpoint{
	// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"),
	// 			},
	// 			PrivateLinkServiceConnectionState: &armwebpubsub.PrivateLinkServiceConnectionState{
	// 				ActionsRequired: to.Ptr("None"),
	// 				Status: to.Ptr(armwebpubsub.PrivateLinkServiceConnectionStatusApproved),
	// 			},
	// 			ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
	// 		},
	// 	}
}
Output:

func (*PrivateEndpointConnectionsClient) NewListPager added in v0.4.0

NewListPager - List private endpoint connections

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubPrivateEndpointConnections_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListPager("myResourceGroup", "myWebPubSubService", 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 = armwebpubsub.PrivateEndpointConnectionList{
		// 	Value: []*armwebpubsub.PrivateEndpointConnection{
		// 		{
		// 			Name: to.Ptr("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
		// 			Type: to.Ptr("Microsoft.SignalRService/WebPubSub/privateEndpointConnections"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/privateEndpointConnections/mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
		// 			SystemData: &armwebpubsub.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(armwebpubsub.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(armwebpubsub.CreatedByTypeUser),
		// 			},
		// 			Properties: &armwebpubsub.PrivateEndpointConnectionProperties{
		// 				GroupIDs: []*string{
		// 					to.Ptr("webpubsub")},
		// 					PrivateEndpoint: &armwebpubsub.PrivateEndpoint{
		// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"),
		// 					},
		// 					PrivateLinkServiceConnectionState: &armwebpubsub.PrivateLinkServiceConnectionState{
		// 						ActionsRequired: to.Ptr("None"),
		// 						Status: to.Ptr(armwebpubsub.PrivateLinkServiceConnectionStatusApproved),
		// 					},
		// 					ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
		// 				},
		// 		}},
		// 	}
	}
}
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 2024-03-01

  • privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource.
  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubPrivateEndpointConnections_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateEndpointConnectionsClient().Update(ctx, "mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", "myResourceGroup", "myWebPubSubService", armwebpubsub.PrivateEndpointConnection{
		Properties: &armwebpubsub.PrivateEndpointConnectionProperties{
			PrivateEndpoint: &armwebpubsub.PrivateEndpoint{},
			PrivateLinkServiceConnectionState: &armwebpubsub.PrivateLinkServiceConnectionState{
				ActionsRequired: to.Ptr("None"),
				Status:          to.Ptr(armwebpubsub.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 = armwebpubsub.PrivateEndpointConnection{
	// 	Name: to.Ptr("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 	Type: to.Ptr("Microsoft.SignalRService/WebPubSub/privateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/privateEndpointConnections/mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
	// 	SystemData: &armwebpubsub.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(armwebpubsub.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(armwebpubsub.CreatedByTypeUser),
	// 	},
	// 	Properties: &armwebpubsub.PrivateEndpointConnectionProperties{
	// 		GroupIDs: []*string{
	// 			to.Ptr("webpubsub")},
	// 			PrivateEndpoint: &armwebpubsub.PrivateEndpoint{
	// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"),
	// 			},
	// 			PrivateLinkServiceConnectionState: &armwebpubsub.PrivateLinkServiceConnectionState{
	// 				ActionsRequired: to.Ptr("None"),
	// 				Status: to.Ptr(armwebpubsub.PrivateLinkServiceConnectionStatusApproved),
	// 			},
	// 			ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
	// 		},
	// 	}
}
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. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

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 WebPubSubPrivateLinkResources 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 - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PrivateLinkResourcesClient) NewListPager added in v0.4.0

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

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubPrivateLinkResources_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPrivateLinkResourcesClient().NewListPager("myResourceGroup", "myWebPubSubService", 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 = armwebpubsub.PrivateLinkResourceList{
		// 	Value: []*armwebpubsub.PrivateLinkResource{
		// 		{
		// 			Name: to.Ptr("myPrivateLink"),
		// 			Type: to.Ptr("privateLinkResources"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/privateLinkResources/myPrivateLink"),
		// 			Properties: &armwebpubsub.PrivateLinkResourceProperties{
		// 				GroupID: to.Ptr("webpubsub"),
		// 				RequiredMembers: []*string{
		// 					to.Ptr("webpubsub")},
		// 					RequiredZoneNames: []*string{
		// 						to.Ptr("privatelink.webpubsub.azure.com")},
		// 						ShareablePrivateLinkResourceTypes: []*armwebpubsub.ShareablePrivateLinkResourceType{
		// 							{
		// 								Name: to.Ptr("site"),
		// 								Properties: &armwebpubsub.ShareablePrivateLinkResourceProperties{
		// 									Type: to.Ptr("Microsoft.Web/sites"),
		// 									Description: to.Ptr("Azure App Service can be used as an upstream"),
		// 									GroupID: to.Ptr("sites"),
		// 								},
		// 							},
		// 							{
		// 								Name: to.Ptr("vault"),
		// 								Properties: &armwebpubsub.ShareablePrivateLinkResourceProperties{
		// 									Type: to.Ptr("Microsoft.KeyVault/vaults"),
		// 									Description: to.Ptr("Azure Key Vault can be used as credentials store"),
		// 									GroupID: to.Ptr("vault"),
		// 								},
		// 							},
		// 							{
		// 								Name: to.Ptr("table"),
		// 								Properties: &armwebpubsub.ShareablePrivateLinkResourceProperties{
		// 									Type: to.Ptr("Microsoft.Storage/storageAccounts"),
		// 									Description: to.Ptr("Azure Storage Table can be used as message store"),
		// 									GroupID: to.Ptr("table"),
		// 								},
		// 						}},
		// 					},
		// 			}},
		// 		}
	}
}
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 {
	// 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

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

	// Enable or disable the regional endpoint. Default to "Enabled". When it's Disabled, new connections will not be routed to
	// this endpoint, however existing connections will not be affected. This property
	// is replica specific. Disable the regional endpoint without replica is not allowed.
	RegionEndpointEnabled *string

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

	// Stop or start the resource. Default to "False". When it's true, the data plane of the resource is shutdown. When it's false,
	// the data plane of the resource is started.
	ResourceStopped *string

	// SocketIO settings for the resource
	SocketIO *SocketIOSettings

	// TLS settings for the resource
	TLS *TLSSettings

	// 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 Replica added in v1.3.0

type Replica struct {
	// REQUIRED; The geo-location where the resource lives
	Location   *string
	Properties *ReplicaProperties

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

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

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Replica - A class represent a replica resource.

func (Replica) MarshalJSON added in v1.3.0

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

MarshalJSON implements the json.Marshaller interface for type Replica.

func (*Replica) UnmarshalJSON added in v1.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Replica.

type ReplicaList added in v1.3.0

type ReplicaList 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 replica
	Value []*Replica
}

func (ReplicaList) MarshalJSON added in v1.3.0

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

MarshalJSON implements the json.Marshaller interface for type ReplicaList.

func (*ReplicaList) UnmarshalJSON added in v1.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ReplicaList.

type ReplicaProperties added in v1.3.0

type ReplicaProperties struct {
	// Enable or disable the regional endpoint. Default to "Enabled". When it's Disabled, new connections will not be routed to
	// this endpoint, however existing connections will not be affected.
	RegionEndpointEnabled *string

	// Stop or start the resource. Default to "false". When it's true, the data plane of the resource is shutdown. When it's false,
	// the data plane of the resource is started.
	ResourceStopped *string

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

func (ReplicaProperties) MarshalJSON added in v1.3.0

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

MarshalJSON implements the json.Marshaller interface for type ReplicaProperties.

func (*ReplicaProperties) UnmarshalJSON added in v1.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ReplicaProperties.

type ReplicaSharedPrivateLinkResourcesClient added in v1.3.0

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

ReplicaSharedPrivateLinkResourcesClient contains the methods for the WebPubSubReplicaSharedPrivateLinkResources group. Don't use this type directly, use NewReplicaSharedPrivateLinkResourcesClient() instead.

func NewReplicaSharedPrivateLinkResourcesClient added in v1.3.0

func NewReplicaSharedPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicaSharedPrivateLinkResourcesClient, error)

NewReplicaSharedPrivateLinkResourcesClient creates a new instance of ReplicaSharedPrivateLinkResourcesClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ReplicaSharedPrivateLinkResourcesClient) BeginCreateOrUpdate added in v1.3.0

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

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the resource.
  • replicaName - The name of the replica.
  • sharedPrivateLinkResourceName - The name of the shared private link resource.
  • parameters - The shared private link resource
  • options - ReplicaSharedPrivateLinkResourcesClientBeginCreateOrUpdateOptions contains the optional parameters for the ReplicaSharedPrivateLinkResourcesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubReplicaSharedPrivateLinkResources_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewReplicaSharedPrivateLinkResourcesClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus", "upstream", armwebpubsub.SharedPrivateLinkResource{
		Properties: &armwebpubsub.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 = armwebpubsub.SharedPrivateLinkResource{
	// 	Name: to.Ptr("upstream"),
	// 	Type: to.Ptr("Microsoft.SignalRService/WebPubSub/privateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/privateEndpointConnections/upstream"),
	// 	Properties: &armwebpubsub.SharedPrivateLinkResourceProperties{
	// 		GroupID: to.Ptr("sites"),
	// 		PrivateLinkResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp"),
	// 		ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
	// 		RequestMessage: to.Ptr("Please approve"),
	// 		Status: to.Ptr(armwebpubsub.SharedPrivateLinkResourceStatusApproved),
	// 	},
	// }
}
Output:

func (*ReplicaSharedPrivateLinkResourcesClient) Get added in v1.3.0

func (client *ReplicaSharedPrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, sharedPrivateLinkResourceName string, options *ReplicaSharedPrivateLinkResourcesClientGetOptions) (ReplicaSharedPrivateLinkResourcesClientGetResponse, error)

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

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the resource.
  • replicaName - The name of the replica.
  • sharedPrivateLinkResourceName - The name of the shared private link resource.
  • options - ReplicaSharedPrivateLinkResourcesClientGetOptions contains the optional parameters for the ReplicaSharedPrivateLinkResourcesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubReplicaSharedPrivateLinkResources_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewReplicaSharedPrivateLinkResourcesClient().Get(ctx, "myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus", "upstream", 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 = armwebpubsub.SharedPrivateLinkResource{
	// 	Name: to.Ptr("upstream"),
	// 	Type: to.Ptr("Microsoft.SignalRService/WebPubSub/privateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/privateEndpointConnections/upstream"),
	// 	Properties: &armwebpubsub.SharedPrivateLinkResourceProperties{
	// 		GroupID: to.Ptr("sites"),
	// 		PrivateLinkResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp"),
	// 		ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
	// 		RequestMessage: to.Ptr("Please approve"),
	// 		Status: to.Ptr(armwebpubsub.SharedPrivateLinkResourceStatusApproved),
	// 	},
	// }
}
Output:

func (*ReplicaSharedPrivateLinkResourcesClient) NewListPager added in v1.3.0

NewListPager - List shared private link resources

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the resource.
  • replicaName - The name of the replica.
  • options - ReplicaSharedPrivateLinkResourcesClientListOptions contains the optional parameters for the ReplicaSharedPrivateLinkResourcesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubReplicaSharedPrivateLinkResources_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewReplicaSharedPrivateLinkResourcesClient().NewListPager("myResourceGroup", "myWebPubSubService", "myWebPubSubService-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.SharedPrivateLinkResourceList = armwebpubsub.SharedPrivateLinkResourceList{
		// 	Value: []*armwebpubsub.SharedPrivateLinkResource{
		// 		{
		// 			Name: to.Ptr("upstream"),
		// 			Type: to.Ptr("Microsoft.SignalRService/WebPubSub/privateEndpointConnections"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/privateEndpointConnections/upstream"),
		// 			Properties: &armwebpubsub.SharedPrivateLinkResourceProperties{
		// 				GroupID: to.Ptr("sites"),
		// 				PrivateLinkResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp"),
		// 				ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
		// 				RequestMessage: to.Ptr("Please approve"),
		// 				Status: to.Ptr(armwebpubsub.SharedPrivateLinkResourceStatusApproved),
		// 			},
		// 	}},
		// }
	}
}
Output:

type ReplicaSharedPrivateLinkResourcesClientBeginCreateOrUpdateOptions added in v1.3.0

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

ReplicaSharedPrivateLinkResourcesClientBeginCreateOrUpdateOptions contains the optional parameters for the ReplicaSharedPrivateLinkResourcesClient.BeginCreateOrUpdate method.

type ReplicaSharedPrivateLinkResourcesClientCreateOrUpdateResponse added in v1.3.0

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

ReplicaSharedPrivateLinkResourcesClientCreateOrUpdateResponse contains the response from method ReplicaSharedPrivateLinkResourcesClient.BeginCreateOrUpdate.

type ReplicaSharedPrivateLinkResourcesClientGetOptions added in v1.3.0

type ReplicaSharedPrivateLinkResourcesClientGetOptions struct {
}

ReplicaSharedPrivateLinkResourcesClientGetOptions contains the optional parameters for the ReplicaSharedPrivateLinkResourcesClient.Get method.

type ReplicaSharedPrivateLinkResourcesClientGetResponse added in v1.3.0

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

ReplicaSharedPrivateLinkResourcesClientGetResponse contains the response from method ReplicaSharedPrivateLinkResourcesClient.Get.

type ReplicaSharedPrivateLinkResourcesClientListOptions added in v1.3.0

type ReplicaSharedPrivateLinkResourcesClientListOptions struct {
}

ReplicaSharedPrivateLinkResourcesClientListOptions contains the optional parameters for the ReplicaSharedPrivateLinkResourcesClient.NewListPager method.

type ReplicaSharedPrivateLinkResourcesClientListResponse added in v1.3.0

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

ReplicaSharedPrivateLinkResourcesClientListResponse contains the response from method ReplicaSharedPrivateLinkResourcesClient.NewListPager.

type ReplicasClient added in v1.3.0

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

ReplicasClient contains the methods for the WebPubSubReplicas group. Don't use this type directly, use NewReplicasClient() instead.

func NewReplicasClient added in v1.3.0

func NewReplicasClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicasClient, error)

NewReplicasClient creates a new instance of ReplicasClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ReplicasClient) BeginCreateOrUpdate added in v1.3.0

func (client *ReplicasClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, parameters Replica, options *ReplicasClientBeginCreateOrUpdateOptions) (*runtime.Poller[ReplicasClientCreateOrUpdateResponse], error)

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

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the resource.
  • replicaName - The name of the replica.
  • parameters - Parameters for the create or update operation
  • options - ReplicasClientBeginCreateOrUpdateOptions contains the optional parameters for the ReplicasClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubReplicas_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewReplicasClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus", armwebpubsub.Replica{
		Location: to.Ptr("eastus"),
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
		Properties: &armwebpubsub.ReplicaProperties{
			ResourceStopped: to.Ptr("false"),
		},
		SKU: &armwebpubsub.ResourceSKU{
			Name:     to.Ptr("Premium_P1"),
			Capacity: to.Ptr[int32](1),
			Tier:     to.Ptr(armwebpubsub.WebPubSubSKUTierPremium),
		},
	}, 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.Replica = armwebpubsub.Replica{
	// 	Name: to.Ptr("myWebPubSubService-eastus"),
	// 	Type: to.Ptr("Microsoft.SignalRService/WebPubSub"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/replicas/myWebPubSubService-eastus"),
	// 	SystemData: &armwebpubsub.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(armwebpubsub.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(armwebpubsub.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("eastus"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Properties: &armwebpubsub.ReplicaProperties{
	// 		ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
	// 		RegionEndpointEnabled: to.Ptr("Enabled"),
	// 		ResourceStopped: to.Ptr("false"),
	// 	},
	// 	SKU: &armwebpubsub.ResourceSKU{
	// 		Name: to.Ptr("Premium_P1"),
	// 		Capacity: to.Ptr[int32](1),
	// 		Size: to.Ptr("P1"),
	// 		Tier: to.Ptr(armwebpubsub.WebPubSubSKUTierPremium),
	// 	},
	// }
}
Output:

func (*ReplicasClient) BeginRestart added in v1.3.0

func (client *ReplicasClient) BeginRestart(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, options *ReplicasClientBeginRestartOptions) (*runtime.Poller[ReplicasClientRestartResponse], error)

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

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the resource.
  • replicaName - The name of the replica.
  • options - ReplicasClientBeginRestartOptions contains the optional parameters for the ReplicasClient.BeginRestart method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubReplicas_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewReplicasClient().BeginRestart(ctx, "myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus", 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 (*ReplicasClient) BeginUpdate added in v1.3.0

func (client *ReplicasClient) BeginUpdate(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, parameters Replica, options *ReplicasClientBeginUpdateOptions) (*runtime.Poller[ReplicasClientUpdateResponse], error)

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

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the resource.
  • replicaName - The name of the replica.
  • parameters - Parameters for the update operation
  • options - ReplicasClientBeginUpdateOptions contains the optional parameters for the ReplicasClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubReplicas_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewReplicasClient().BeginUpdate(ctx, "myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus", armwebpubsub.Replica{
		Location: to.Ptr("eastus"),
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
		Properties: &armwebpubsub.ReplicaProperties{
			ResourceStopped: to.Ptr("false"),
		},
		SKU: &armwebpubsub.ResourceSKU{
			Name:     to.Ptr("Premium_P1"),
			Capacity: to.Ptr[int32](1),
			Tier:     to.Ptr(armwebpubsub.WebPubSubSKUTierPremium),
		},
	}, 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.Replica = armwebpubsub.Replica{
	// 	Name: to.Ptr("myWebPubSubService-eastus"),
	// 	Type: to.Ptr("Microsoft.SignalRService/WebPubSub"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/replicas/myWebPubSubService-eastus"),
	// 	SystemData: &armwebpubsub.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(armwebpubsub.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(armwebpubsub.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("eastus"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Properties: &armwebpubsub.ReplicaProperties{
	// 		ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
	// 		RegionEndpointEnabled: to.Ptr("Enabled"),
	// 		ResourceStopped: to.Ptr("false"),
	// 	},
	// 	SKU: &armwebpubsub.ResourceSKU{
	// 		Name: to.Ptr("Premium_P1"),
	// 		Capacity: to.Ptr[int32](1),
	// 		Size: to.Ptr("P1"),
	// 		Tier: to.Ptr(armwebpubsub.WebPubSubSKUTierPremium),
	// 	},
	// }
}
Output:

func (*ReplicasClient) Delete added in v1.3.0

func (client *ReplicasClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, options *ReplicasClientDeleteOptions) (ReplicasClientDeleteResponse, error)

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

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the resource.
  • replicaName - The name of the replica.
  • options - ReplicasClientDeleteOptions contains the optional parameters for the ReplicasClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubReplicas_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/webpubsub/armwebpubsub"
)

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

func (*ReplicasClient) Get added in v1.3.0

func (client *ReplicasClient) Get(ctx context.Context, resourceGroupName string, resourceName string, replicaName string, options *ReplicasClientGetOptions) (ReplicasClientGetResponse, error)

Get - Get the replica and its properties. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the resource.
  • replicaName - The name of the replica.
  • options - ReplicasClientGetOptions contains the optional parameters for the ReplicasClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubReplicas_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewReplicasClient().Get(ctx, "myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus", 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.Replica = armwebpubsub.Replica{
	// 	Name: to.Ptr("myWebPubSubService-eastus"),
	// 	Type: to.Ptr("Microsoft.SignalRService/WebPubSub"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/replicas/myWebPubSubService-eastus"),
	// 	SystemData: &armwebpubsub.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(armwebpubsub.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(armwebpubsub.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("eastus"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Properties: &armwebpubsub.ReplicaProperties{
	// 		ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
	// 		RegionEndpointEnabled: to.Ptr("Enabled"),
	// 		ResourceStopped: to.Ptr("false"),
	// 	},
	// 	SKU: &armwebpubsub.ResourceSKU{
	// 		Name: to.Ptr("Premium_P1"),
	// 		Capacity: to.Ptr[int32](1),
	// 		Size: to.Ptr("P1"),
	// 		Tier: to.Ptr(armwebpubsub.WebPubSubSKUTierPremium),
	// 	},
	// }
}
Output:

func (*ReplicasClient) NewListPager added in v1.3.0

func (client *ReplicasClient) NewListPager(resourceGroupName string, resourceName string, options *ReplicasClientListOptions) *runtime.Pager[ReplicasClientListResponse]

NewListPager - List all replicas belong to this resource

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the resource.
  • options - ReplicasClientListOptions contains the optional parameters for the ReplicasClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubReplicas_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewReplicasClient().NewListPager("myResourceGroup", "myWebPubSubService", 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.ReplicaList = armwebpubsub.ReplicaList{
		// 	Value: []*armwebpubsub.Replica{
		// 		{
		// 			Name: to.Ptr("myWebPubSubService-eastus"),
		// 			Type: to.Ptr("Microsoft.SignalRService/WebPubSub"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/replicas/myWebPubSubService-eastus"),
		// 			SystemData: &armwebpubsub.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(armwebpubsub.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(armwebpubsub.CreatedByTypeUser),
		// 			},
		// 			Location: to.Ptr("eastus"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Properties: &armwebpubsub.ReplicaProperties{
		// 				ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
		// 				RegionEndpointEnabled: to.Ptr("Enabled"),
		// 				ResourceStopped: to.Ptr("false"),
		// 			},
		// 			SKU: &armwebpubsub.ResourceSKU{
		// 				Name: to.Ptr("Premium_P1"),
		// 				Capacity: to.Ptr[int32](1),
		// 				Size: to.Ptr("P1"),
		// 				Tier: to.Ptr(armwebpubsub.WebPubSubSKUTierPremium),
		// 			},
		// 	}},
		// }
	}
}
Output:

type ReplicasClientBeginCreateOrUpdateOptions added in v1.3.0

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

ReplicasClientBeginCreateOrUpdateOptions contains the optional parameters for the ReplicasClient.BeginCreateOrUpdate method.

type ReplicasClientBeginRestartOptions added in v1.3.0

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

ReplicasClientBeginRestartOptions contains the optional parameters for the ReplicasClient.BeginRestart method.

type ReplicasClientBeginUpdateOptions added in v1.3.0

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

ReplicasClientBeginUpdateOptions contains the optional parameters for the ReplicasClient.BeginUpdate method.

type ReplicasClientCreateOrUpdateResponse added in v1.3.0

type ReplicasClientCreateOrUpdateResponse struct {
	// A class represent a replica resource.
	Replica
}

ReplicasClientCreateOrUpdateResponse contains the response from method ReplicasClient.BeginCreateOrUpdate.

type ReplicasClientDeleteOptions added in v1.3.0

type ReplicasClientDeleteOptions struct {
}

ReplicasClientDeleteOptions contains the optional parameters for the ReplicasClient.Delete method.

type ReplicasClientDeleteResponse added in v1.3.0

type ReplicasClientDeleteResponse struct {
}

ReplicasClientDeleteResponse contains the response from method ReplicasClient.Delete.

type ReplicasClientGetOptions added in v1.3.0

type ReplicasClientGetOptions struct {
}

ReplicasClientGetOptions contains the optional parameters for the ReplicasClient.Get method.

type ReplicasClientGetResponse added in v1.3.0

type ReplicasClientGetResponse struct {
	// A class represent a replica resource.
	Replica
}

ReplicasClientGetResponse contains the response from method ReplicasClient.Get.

type ReplicasClientListOptions added in v1.3.0

type ReplicasClientListOptions struct {
}

ReplicasClientListOptions contains the optional parameters for the ReplicasClient.NewListPager method.

type ReplicasClientListResponse added in v1.3.0

type ReplicasClientListResponse struct {
	ReplicaList
}

ReplicasClientListResponse contains the response from method ReplicasClient.NewListPager.

type ReplicasClientRestartResponse added in v1.3.0

type ReplicasClientRestartResponse struct {
}

ReplicasClientRestartResponse contains the response from method ReplicasClient.BeginRestart.

type ReplicasClientUpdateResponse added in v1.3.0

type ReplicasClientUpdateResponse struct {
	// A class represent a replica resource.
	Replica
}

ReplicasClientUpdateResponse contains the response from method ReplicasClient.BeginUpdate.

type ResourceInfo added in v0.2.0

type ResourceInfo struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// A class represent managed identities used for request and response
	Identity *ManagedIdentity

	// The kind of the service
	Kind *ServiceKind

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

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

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

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

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 v1.1.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, PremiumP1, PremiumP2
	Name *string

	// Optional, integer. The unit count of the resource. 1 for FreeF1/StandardS1/PremiumP1, 100 for PremiumP2 by default.
	// If present, following values are allowed: FreeF1: 1; StandardS1: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100; PremiumP1:
	// 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100; PremiumP2:
	// 100,200,300,400,500,600,700,800,900,1000;
	Capacity *int32

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

	// 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 ServiceKind added in v1.3.0

type ServiceKind string

ServiceKind - The kind of the service

const (
	ServiceKindSocketIO  ServiceKind = "SocketIO"
	ServiceKindWebPubSub ServiceKind = "WebPubSub"
)

func PossibleServiceKindValues added in v1.3.0

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. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

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 WebPubSubSharedPrivateLinkResources 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 - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*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 2024-03-01

  • sharedPrivateLinkResourceName - The name of the shared private link resource.
  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubSharedPrivateLinkResources_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewSharedPrivateLinkResourcesClient().BeginCreateOrUpdate(ctx, "upstream", "myResourceGroup", "myWebPubSubService", armwebpubsub.SharedPrivateLinkResource{
		Properties: &armwebpubsub.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 = armwebpubsub.SharedPrivateLinkResource{
	// 	Name: to.Ptr("upstream"),
	// 	Type: to.Ptr("Microsoft.SignalRService/WebPubSub/privateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/privateEndpointConnections/upstream"),
	// 	Properties: &armwebpubsub.SharedPrivateLinkResourceProperties{
	// 		GroupID: to.Ptr("sites"),
	// 		PrivateLinkResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp"),
	// 		ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
	// 		RequestMessage: to.Ptr("Please approve"),
	// 		Status: to.Ptr(armwebpubsub.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 2024-03-01

  • sharedPrivateLinkResourceName - The name of the shared private link resource.
  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubSharedPrivateLinkResources_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewSharedPrivateLinkResourcesClient().BeginDelete(ctx, "upstream", "myResourceGroup", "myWebPubSubService", 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 2024-03-01

  • sharedPrivateLinkResourceName - The name of the shared private link resource.
  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubSharedPrivateLinkResources_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSharedPrivateLinkResourcesClient().Get(ctx, "upstream", "myResourceGroup", "myWebPubSubService", 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 = armwebpubsub.SharedPrivateLinkResource{
	// 	Name: to.Ptr("upstream"),
	// 	Type: to.Ptr("Microsoft.SignalRService/WebPubSub/privateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/privateEndpointConnections/upstream"),
	// 	Properties: &armwebpubsub.SharedPrivateLinkResourceProperties{
	// 		GroupID: to.Ptr("sites"),
	// 		PrivateLinkResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp"),
	// 		ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
	// 		RequestMessage: to.Ptr("Please approve"),
	// 		Status: to.Ptr(armwebpubsub.SharedPrivateLinkResourceStatusApproved),
	// 	},
	// }
}
Output:

func (*SharedPrivateLinkResourcesClient) NewListPager added in v0.4.0

NewListPager - List shared private link resources

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubSharedPrivateLinkResources_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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSharedPrivateLinkResourcesClient().NewListPager("myResourceGroup", "myWebPubSubService", 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 = armwebpubsub.SharedPrivateLinkResourceList{
		// 	Value: []*armwebpubsub.SharedPrivateLinkResource{
		// 		{
		// 			Name: to.Ptr("upstream"),
		// 			Type: to.Ptr("Microsoft.SignalRService/WebPubSub/privateEndpointConnections"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/privateEndpointConnections/upstream"),
		// 			Properties: &armwebpubsub.SharedPrivateLinkResourceProperties{
		// 				GroupID: to.Ptr("sites"),
		// 				PrivateLinkResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp"),
		// 				ProvisioningState: to.Ptr(armwebpubsub.ProvisioningStateSucceeded),
		// 				RequestMessage: to.Ptr("Please approve"),
		// 				Status: to.Ptr(armwebpubsub.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 SignalRServiceUsage

type SignalRServiceUsage 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 *SignalRServiceUsageName

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

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

func (SignalRServiceUsage) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SignalRServiceUsage.

func (*SignalRServiceUsage) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SignalRServiceUsage.

type SignalRServiceUsageList

type SignalRServiceUsageList 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 []*SignalRServiceUsage
}

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

func (SignalRServiceUsageList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SignalRServiceUsageList.

func (*SignalRServiceUsageList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SignalRServiceUsageList.

type SignalRServiceUsageName

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

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

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

func (SignalRServiceUsageName) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SignalRServiceUsageName.

func (*SignalRServiceUsageName) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SignalRServiceUsageName.

type SocketIOSettings added in v1.3.0

type SocketIOSettings struct {
	// The service mode of Web PubSub for Socket.IO. Values allowed: "Default": have your own backend Socket.IO server "Serverless":
	// your application doesn't have a backend server
	ServiceMode *string
}

SocketIOSettings - SocketIO settings for the resource

func (SocketIOSettings) MarshalJSON added in v1.3.0

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

MarshalJSON implements the json.Marshaller interface for type SocketIOSettings.

func (*SocketIOSettings) UnmarshalJSON added in v1.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SocketIOSettings.

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. Not supported for free tier. Any input will be ignored for
	// free tier.
	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 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 - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*UsagesClient) NewListPager added in v0.4.0

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

NewListPager - List resource usage quotas by location.

Generated from API version 2024-03-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/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-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/webpubsub/armwebpubsub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armwebpubsub.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.SignalRServiceUsageList = armwebpubsub.SignalRServiceUsageList{
		// 	Value: []*armwebpubsub.SignalRServiceUsage{
		// 		{
		// 			Name: &armwebpubsub.SignalRServiceUsageName{
		// 				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: &armwebpubsub.SignalRServiceUsageName{
		// 				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.
	SignalRServiceUsageList
}

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.

type WebPubSubRequestType

type WebPubSubRequestType string

WebPubSubRequestType - The incoming request type to the service

const (
	WebPubSubRequestTypeClientConnection WebPubSubRequestType = "ClientConnection"
	WebPubSubRequestTypeRESTAPI          WebPubSubRequestType = "RESTAPI"
	WebPubSubRequestTypeServerConnection WebPubSubRequestType = "ServerConnection"
	WebPubSubRequestTypeTrace            WebPubSubRequestType = "Trace"
)

func PossibleWebPubSubRequestTypeValues

func PossibleWebPubSubRequestTypeValues() []WebPubSubRequestType

PossibleWebPubSubRequestTypeValues returns the possible values for the WebPubSubRequestType const type.

type WebPubSubSKUTier

type WebPubSubSKUTier string

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

const (
	WebPubSubSKUTierBasic    WebPubSubSKUTier = "Basic"
	WebPubSubSKUTierFree     WebPubSubSKUTier = "Free"
	WebPubSubSKUTierPremium  WebPubSubSKUTier = "Premium"
	WebPubSubSKUTierStandard WebPubSubSKUTier = "Standard"
)

func PossibleWebPubSubSKUTierValues

func PossibleWebPubSubSKUTierValues() []WebPubSubSKUTier

PossibleWebPubSubSKUTierValues returns the possible values for the WebPubSubSKUTier const type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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