armrelay

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 14 Imported by: 11

README

Azure Relay Module for Go

PkgGoDev

The armrelay module provides operations for working with Azure Relay.

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 Relay module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay

Authorization

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

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

type AccessKeys struct {
	// A string that describes the authorization rule.
	KeyName *string

	// Primary connection string of the created namespace authorization rule.
	PrimaryConnectionString *string

	// A base64-encoded 256-bit primary key for signing and validating the SAS token.
	PrimaryKey *string

	// Secondary connection string of the created namespace authorization rule.
	SecondaryConnectionString *string

	// A base64-encoded 256-bit secondary key for signing and validating the SAS token.
	SecondaryKey *string
}

AccessKeys - Namespace/Relay Connection String

func (AccessKeys) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type AccessKeys.

func (*AccessKeys) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccessKeys.

type AccessRights

type AccessRights string
const (
	AccessRightsListen AccessRights = "Listen"
	AccessRightsManage AccessRights = "Manage"
	AccessRightsSend   AccessRights = "Send"
)

func PossibleAccessRightsValues

func PossibleAccessRightsValues() []AccessRights

PossibleAccessRightsValues returns the possible values for the AccessRights const type.

type AuthorizationRule

type AuthorizationRule struct {
	// Properties supplied to create or update AuthorizationRule
	Properties *AuthorizationRuleProperties

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

	// READ-ONLY; The geo-location where the resource lives
	Location *string

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

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string
}

AuthorizationRule - Single item in a List or Get AuthorizationRule operation

func (AuthorizationRule) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AuthorizationRule.

func (*AuthorizationRule) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationRule.

type AuthorizationRuleListResult

type AuthorizationRuleListResult struct {
	// Link to the next set of results. Not empty if value contains incomplete list of authorization rules.
	NextLink *string

	// Result of the list authorization rules operation.
	Value []*AuthorizationRule
}

AuthorizationRuleListResult - The response from the list namespace operation.

func (AuthorizationRuleListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AuthorizationRuleListResult.

func (*AuthorizationRuleListResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationRuleListResult.

type AuthorizationRuleProperties

type AuthorizationRuleProperties struct {
	// REQUIRED; The rights associated with the rule.
	Rights []*AccessRights
}

AuthorizationRuleProperties - Properties supplied to create or update AuthorizationRule

func (AuthorizationRuleProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AuthorizationRuleProperties.

func (*AuthorizationRuleProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationRuleProperties.

type CheckNameAvailability

type CheckNameAvailability struct {
	// REQUIRED; The namespace name to check for availability. The namespace name can contain only letters, numbers, and hyphens.
	// The namespace must start with a letter, and it must end with a letter or number.
	Name *string
}

CheckNameAvailability - Description of the check name availability request properties.

func (CheckNameAvailability) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailability.

func (*CheckNameAvailability) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailability.

type CheckNameAvailabilityResult

type CheckNameAvailabilityResult struct {
	// Value indicating namespace is available. Returns true if the namespace is available; otherwise, false.
	NameAvailable *bool

	// The reason for unavailability of a namespace.
	Reason *UnavailableReason

	// READ-ONLY; The detailed info regarding the reason associated with the namespace.
	Message *string
}

CheckNameAvailabilityResult - Description of the check name availability request properties.

func (CheckNameAvailabilityResult) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResult.

func (*CheckNameAvailabilityResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResult.

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 - Subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewHybridConnectionsClient added in v1.1.0

func (c *ClientFactory) NewHybridConnectionsClient() *HybridConnectionsClient

NewHybridConnectionsClient creates a new instance of HybridConnectionsClient.

func (*ClientFactory) NewNamespacesClient added in v1.1.0

func (c *ClientFactory) NewNamespacesClient() *NamespacesClient

NewNamespacesClient creates a new instance of NamespacesClient.

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) NewWCFRelaysClient added in v1.1.0

func (c *ClientFactory) NewWCFRelaysClient() *WCFRelaysClient

NewWCFRelaysClient creates a new instance of WCFRelaysClient.

type ConnectionState added in v1.0.0

type ConnectionState struct {
	// Description of the connection state.
	Description *string

	// Status of the connection.
	Status *PrivateLinkConnectionStatus
}

ConnectionState information.

func (ConnectionState) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ConnectionState.

func (*ConnectionState) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionState.

type CreatedByType added in v1.0.0

type CreatedByType string

CreatedByType - The type of identity that created the resource.

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

func PossibleCreatedByTypeValues added in v1.0.0

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type DefaultAction added in v1.0.0

type DefaultAction string

DefaultAction - Default Action for Network Rule Set

const (
	DefaultActionAllow DefaultAction = "Allow"
	DefaultActionDeny  DefaultAction = "Deny"
)

func PossibleDefaultActionValues added in v1.0.0

func PossibleDefaultActionValues() []DefaultAction

PossibleDefaultActionValues returns the possible values for the DefaultAction const type.

type EndPointProvisioningState added in v1.0.0

type EndPointProvisioningState string

EndPointProvisioningState - Provisioning state of the Private Endpoint Connection.

const (
	EndPointProvisioningStateCanceled  EndPointProvisioningState = "Canceled"
	EndPointProvisioningStateCreating  EndPointProvisioningState = "Creating"
	EndPointProvisioningStateDeleting  EndPointProvisioningState = "Deleting"
	EndPointProvisioningStateFailed    EndPointProvisioningState = "Failed"
	EndPointProvisioningStateSucceeded EndPointProvisioningState = "Succeeded"
	EndPointProvisioningStateUpdating  EndPointProvisioningState = "Updating"
)

func PossibleEndPointProvisioningStateValues added in v1.0.0

func PossibleEndPointProvisioningStateValues() []EndPointProvisioningState

PossibleEndPointProvisioningStateValues returns the possible values for the EndPointProvisioningState const type.

type ErrorAdditionalInfo added in v1.0.0

type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info any

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

ErrorAdditionalInfo - The resource management error additional info.

func (ErrorAdditionalInfo) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.

func (*ErrorAdditionalInfo) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.

type ErrorDetail added in v1.0.0

type ErrorDetail struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo

	// READ-ONLY; The error code.
	Code *string

	// READ-ONLY; The error details.
	Details []*ErrorDetail

	// READ-ONLY; The error message.
	Message *string

	// READ-ONLY; The error target.
	Target *string
}

ErrorDetail - The error detail.

func (ErrorDetail) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ErrorDetail.

func (*ErrorDetail) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.

type ErrorResponse

type ErrorResponse struct {
	// The error object.
	Error *ErrorDetail
}

ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

func (ErrorResponse) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

type HybridConnection

type HybridConnection struct {
	// Properties of the HybridConnection.
	Properties *HybridConnectionProperties

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

	// READ-ONLY; The geo-location where the resource lives
	Location *string

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

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string
}

HybridConnection - Description of hybrid connection resource.

func (HybridConnection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type HybridConnection.

func (*HybridConnection) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type HybridConnection.

type HybridConnectionListResult

type HybridConnectionListResult struct {
	// Link to the next set of results. Not empty if value contains incomplete list hybrid connection operation.
	NextLink *string

	// Result of the list hybrid connections.
	Value []*HybridConnection
}

HybridConnectionListResult - The response of the list hybrid connection operation.

func (HybridConnectionListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type HybridConnectionListResult.

func (*HybridConnectionListResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type HybridConnectionListResult.

type HybridConnectionProperties

type HybridConnectionProperties struct {
	// Returns true if client authorization is needed for this hybrid connection; otherwise, false.
	RequiresClientAuthorization *bool

	// The usermetadata is a placeholder to store user-defined string data for the hybrid connection endpoint. For example, it
	// can be used to store descriptive data, such as a list of teams and their contact
	// information. Also, user-defined configuration settings can be stored.
	UserMetadata *string

	// READ-ONLY; The time the hybrid connection was created.
	CreatedAt *time.Time

	// READ-ONLY; The number of listeners for this hybrid connection. Note that min : 1 and max:25 are supported.
	ListenerCount *int32

	// READ-ONLY; The time the namespace was updated.
	UpdatedAt *time.Time
}

HybridConnectionProperties - Properties of the HybridConnection.

func (HybridConnectionProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type HybridConnectionProperties.

func (*HybridConnectionProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type HybridConnectionProperties.

type HybridConnectionsClient

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

HybridConnectionsClient contains the methods for the HybridConnections group. Don't use this type directly, use NewHybridConnectionsClient() instead.

func NewHybridConnectionsClient

func NewHybridConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HybridConnectionsClient, error)

NewHybridConnectionsClient creates a new instance of HybridConnectionsClient with the specified values.

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

func (*HybridConnectionsClient) CreateOrUpdate

func (client *HybridConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, hybridConnectionName string, parameters HybridConnection, options *HybridConnectionsClientCreateOrUpdateOptions) (HybridConnectionsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates a service hybrid connection. This operation is idempotent. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • hybridConnectionName - The hybrid connection name.
  • parameters - Parameters supplied to create a hybrid connection.
  • options - HybridConnectionsClientCreateOrUpdateOptions contains the optional parameters for the HybridConnectionsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/HybridConnection/RelayHybridConnectionCreate.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/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewHybridConnectionsClient().CreateOrUpdate(ctx, "resourcegroup", "example-RelayNamespace-01", "example-Relay-Hybrid-01", armrelay.HybridConnection{
		Properties: &armrelay.HybridConnectionProperties{
			RequiresClientAuthorization: to.Ptr(true),
		},
	}, 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.HybridConnection = armrelay.HybridConnection{
	// 	Name: to.Ptr("example-Relay-Hybrid-01"),
	// 	Type: to.Ptr("Microsoft.Relay/Namespaces/HybridConnections"),
	// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-01/HybridConnections/example-Relay-Hybrid-01"),
	// 	Properties: &armrelay.HybridConnectionProperties{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-23T20:34:49.413Z"); return t}()),
	// 		RequiresClientAuthorization: to.Ptr(true),
	// 		UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-23T20:34:49.413Z"); return t}()),
	// 	},
	// }
}
Output:

func (*HybridConnectionsClient) CreateOrUpdateAuthorizationRule

func (client *HybridConnectionsClient) CreateOrUpdateAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string, parameters AuthorizationRule, options *HybridConnectionsClientCreateOrUpdateAuthorizationRuleOptions) (HybridConnectionsClientCreateOrUpdateAuthorizationRuleResponse, error)

CreateOrUpdateAuthorizationRule - Creates or updates an authorization rule for a hybrid connection. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • hybridConnectionName - The hybrid connection name.
  • authorizationRuleName - The authorization rule name.
  • parameters - The authorization rule parameters.
  • options - HybridConnectionsClientCreateOrUpdateAuthorizationRuleOptions contains the optional parameters for the HybridConnectionsClient.CreateOrUpdateAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/HybridConnection/RelayHybridConnectionAuthorizationRuleCreate.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/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewHybridConnectionsClient().CreateOrUpdateAuthorizationRule(ctx, "resourcegroup", "example-RelayNamespace-01", "example-Relay-Hybrid-01", "example-RelayAuthRules-01", armrelay.AuthorizationRule{
		Properties: &armrelay.AuthorizationRuleProperties{
			Rights: []*armrelay.AccessRights{
				to.Ptr(armrelay.AccessRightsListen),
				to.Ptr(armrelay.AccessRightsSend)},
		},
	}, 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.AuthorizationRule = armrelay.AuthorizationRule{
	// 	Name: to.Ptr("example-RelayAuthRules-01"),
	// 	Type: to.Ptr("Microsoft.Relay/Namespaces/Hybridconnections/AuthorizationRules"),
	// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-01/HybridConnections/example-Relay-Hybrid-01/AuthorizationRules/example-RelayAuthRules-01"),
	// 	Properties: &armrelay.AuthorizationRuleProperties{
	// 		Rights: []*armrelay.AccessRights{
	// 			to.Ptr(armrelay.AccessRightsListen),
	// 			to.Ptr(armrelay.AccessRightsSend)},
	// 		},
	// 	}
}
Output:

func (*HybridConnectionsClient) Delete

func (client *HybridConnectionsClient) Delete(ctx context.Context, resourceGroupName string, namespaceName string, hybridConnectionName string, options *HybridConnectionsClientDeleteOptions) (HybridConnectionsClientDeleteResponse, error)

Delete - Deletes a hybrid connection. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • hybridConnectionName - The hybrid connection name.
  • options - HybridConnectionsClientDeleteOptions contains the optional parameters for the HybridConnectionsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/HybridConnection/RelayHybridconnectionDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewHybridConnectionsClient().Delete(ctx, "resourcegroup", "example-RelayNamespace-01", "example-Relay-Hybrid-01", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*HybridConnectionsClient) DeleteAuthorizationRule

func (client *HybridConnectionsClient) DeleteAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string, options *HybridConnectionsClientDeleteAuthorizationRuleOptions) (HybridConnectionsClientDeleteAuthorizationRuleResponse, error)

DeleteAuthorizationRule - Deletes a hybrid connection authorization rule. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • hybridConnectionName - The hybrid connection name.
  • authorizationRuleName - The authorization rule name.
  • options - HybridConnectionsClientDeleteAuthorizationRuleOptions contains the optional parameters for the HybridConnectionsClient.DeleteAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/HybridConnection/RelayHybridConnectionAuthorizationRuleDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewHybridConnectionsClient().DeleteAuthorizationRule(ctx, "resourcegroup", "example-RelayNamespace-01", "example-Relay-Hybrid-01", "example-RelayAuthRules-01", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*HybridConnectionsClient) Get

func (client *HybridConnectionsClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, hybridConnectionName string, options *HybridConnectionsClientGetOptions) (HybridConnectionsClientGetResponse, error)

Get - Returns the description for the specified hybrid connection. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • hybridConnectionName - The hybrid connection name.
  • options - HybridConnectionsClientGetOptions contains the optional parameters for the HybridConnectionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/HybridConnection/RelayHybridConnectionGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewHybridConnectionsClient().Get(ctx, "resourcegroup", "example-RelayNamespace-01", "example-Relay-Hybrid-01", 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.HybridConnection = armrelay.HybridConnection{
	// 	Name: to.Ptr("example-Relay-Hybrid-01"),
	// 	Type: to.Ptr("Microsoft.Relay/Namespaces/HybridConnections"),
	// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-01/HybridConnections/example-Relay-Hybrid-01"),
	// 	Properties: &armrelay.HybridConnectionProperties{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-23T20:34:49.413Z"); return t}()),
	// 		ListenerCount: to.Ptr[int32](1),
	// 		RequiresClientAuthorization: to.Ptr(true),
	// 		UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-23T20:34:49.413Z"); return t}()),
	// 		UserMetadata: to.Ptr("usermetadata is a placeholder to store user-defined string data for the HybridConnection endpoint.e.g. it can be used to store  descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored."),
	// 	},
	// }
}
Output:

func (*HybridConnectionsClient) GetAuthorizationRule

func (client *HybridConnectionsClient) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string, options *HybridConnectionsClientGetAuthorizationRuleOptions) (HybridConnectionsClientGetAuthorizationRuleResponse, error)

GetAuthorizationRule - Hybrid connection authorization rule for a hybrid connection by name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • hybridConnectionName - The hybrid connection name.
  • authorizationRuleName - The authorization rule name.
  • options - HybridConnectionsClientGetAuthorizationRuleOptions contains the optional parameters for the HybridConnectionsClient.GetAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/HybridConnection/RelayHybridConnectionAuthorizationRuleGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewHybridConnectionsClient().GetAuthorizationRule(ctx, "resourcegroup", "example-RelayNamespace-01", "example-Relay-Hybrid-01", "example-RelayAuthRules-01", 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.AuthorizationRule = armrelay.AuthorizationRule{
	// 	Name: to.Ptr("example-RelayAuthRules-01"),
	// 	Type: to.Ptr("Microsoft.Relay/Namespaces/Hybridconnections/AuthorizationRules"),
	// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-01/HybridConnections/example-Relay-Hybrid-01/AuthorizationRules/example-RelayAuthRules-01"),
	// 	Properties: &armrelay.AuthorizationRuleProperties{
	// 		Rights: []*armrelay.AccessRights{
	// 			to.Ptr(armrelay.AccessRightsListen)},
	// 		},
	// 	}
}
Output:

func (*HybridConnectionsClient) ListKeys

func (client *HybridConnectionsClient) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string, options *HybridConnectionsClientListKeysOptions) (HybridConnectionsClientListKeysResponse, error)

ListKeys - Primary and secondary connection strings to the hybrid connection. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • hybridConnectionName - The hybrid connection name.
  • authorizationRuleName - The authorization rule name.
  • options - HybridConnectionsClientListKeysOptions contains the optional parameters for the HybridConnectionsClient.ListKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/HybridConnection/RelayHybridConnectionAuthorizationRuleListKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewHybridConnectionsClient().ListKeys(ctx, "resourcegroup", "example-RelayNamespace-01", "example-Relay-Hybrid-01", "example-RelayAuthRules-01", 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.AccessKeys = armrelay.AccessKeys{
	// 	KeyName: to.Ptr("example-RelayAuthRules-01"),
	// 	PrimaryConnectionString: to.Ptr("Endpoint=sb://example-Relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=example-RelayAuthRules-01;SharedAccessKey=############################################"),
	// 	PrimaryKey: to.Ptr("############################################"),
	// 	SecondaryConnectionString: to.Ptr("Endpoint=sb://example-Relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=example-RelayAuthRules-01;SharedAccessKey=############################################"),
	// 	SecondaryKey: to.Ptr("############################################"),
	// }
}
Output:

func (*HybridConnectionsClient) NewListAuthorizationRulesPager added in v0.5.0

func (client *HybridConnectionsClient) NewListAuthorizationRulesPager(resourceGroupName string, namespaceName string, hybridConnectionName string, options *HybridConnectionsClientListAuthorizationRulesOptions) *runtime.Pager[HybridConnectionsClientListAuthorizationRulesResponse]

NewListAuthorizationRulesPager - Authorization rules for a hybrid connection.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • hybridConnectionName - The hybrid connection name.
  • options - HybridConnectionsClientListAuthorizationRulesOptions contains the optional parameters for the HybridConnectionsClient.NewListAuthorizationRulesPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/HybridConnection/RelayHybridConnectionAuthorizationRuleListAll.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewHybridConnectionsClient().NewListAuthorizationRulesPager("resourcegroup", "example-RelayNamespace-01", "example-Relay-Hybrid-01", 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.AuthorizationRuleListResult = armrelay.AuthorizationRuleListResult{
		// 	Value: []*armrelay.AuthorizationRule{
		// 		{
		// 			Name: to.Ptr("example-RelayAuthRules-01"),
		// 			Type: to.Ptr("Microsoft.Relay/Namespaces/Hybridconnections/AuthorizationRules"),
		// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-01/HybridConnections/example-Relay-Hybrid-01/AuthorizationRules/example-RelayAuthRules-01"),
		// 			Properties: &armrelay.AuthorizationRuleProperties{
		// 				Rights: []*armrelay.AccessRights{
		// 					to.Ptr(armrelay.AccessRightsListen),
		// 					to.Ptr(armrelay.AccessRightsSend)},
		// 				},
		// 		}},
		// 	}
	}
}
Output:

func (*HybridConnectionsClient) NewListByNamespacePager added in v0.5.0

func (client *HybridConnectionsClient) NewListByNamespacePager(resourceGroupName string, namespaceName string, options *HybridConnectionsClientListByNamespaceOptions) *runtime.Pager[HybridConnectionsClientListByNamespaceResponse]

NewListByNamespacePager - Lists the hybrid connection within the namespace.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • options - HybridConnectionsClientListByNamespaceOptions contains the optional parameters for the HybridConnectionsClient.NewListByNamespacePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/HybridConnection/RelayHybridConnectionListAll.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewHybridConnectionsClient().NewListByNamespacePager("resourcegroup", "example-RelayNamespace-01", 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.HybridConnectionListResult = armrelay.HybridConnectionListResult{
		// 	Value: []*armrelay.HybridConnection{
		// 		{
		// 			Name: to.Ptr("example-Relay-Hybrid-01"),
		// 			Type: to.Ptr("Microsoft.Relay/Namespaces/HybridConnections"),
		// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-01/HybridConnections/example-Relay-Hybrid-01"),
		// 			Properties: &armrelay.HybridConnectionProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-23T20:34:49.413Z"); return t}()),
		// 				ListenerCount: to.Ptr[int32](1),
		// 				RequiresClientAuthorization: to.Ptr(true),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-23T20:34:49.413Z"); return t}()),
		// 				UserMetadata: to.Ptr("usermetadata is a placeholder to store user-defined string data for the HybridConnection endpoint.e.g. it can be used to store  descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored."),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*HybridConnectionsClient) RegenerateKeys

func (client *HybridConnectionsClient) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters, options *HybridConnectionsClientRegenerateKeysOptions) (HybridConnectionsClientRegenerateKeysResponse, error)

RegenerateKeys - Regenerates the primary or secondary connection strings to the hybrid connection. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • hybridConnectionName - The hybrid connection name.
  • authorizationRuleName - The authorization rule name.
  • parameters - Parameters supplied to regenerate authorization rule.
  • options - HybridConnectionsClientRegenerateKeysOptions contains the optional parameters for the HybridConnectionsClient.RegenerateKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/HybridConnection/RelayHybridConnectionAuthorizationRuleRegenerateKey.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/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewHybridConnectionsClient().RegenerateKeys(ctx, "resourcegroup", "example-RelayNamespace-01", "example-Relay-Hybrid-01", "example-RelayAuthRules-01", armrelay.RegenerateAccessKeyParameters{
		KeyType: to.Ptr(armrelay.KeyTypePrimaryKey),
	}, 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.AccessKeys = armrelay.AccessKeys{
	// 	KeyName: to.Ptr("example-RelayAuthRules-01"),
	// 	PrimaryConnectionString: to.Ptr("Endpoint=sb://example-Relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=example-RelayAuthRules-01;SharedAccessKey=############################################"),
	// 	PrimaryKey: to.Ptr("############################################"),
	// 	SecondaryConnectionString: to.Ptr("Endpoint=sb://example-Relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=example-RelayAuthRules-01;SharedAccessKey=############################################"),
	// 	SecondaryKey: to.Ptr("############################################"),
	// }
}
Output:

type HybridConnectionsClientCreateOrUpdateAuthorizationRuleOptions added in v0.3.0

type HybridConnectionsClientCreateOrUpdateAuthorizationRuleOptions struct {
}

HybridConnectionsClientCreateOrUpdateAuthorizationRuleOptions contains the optional parameters for the HybridConnectionsClient.CreateOrUpdateAuthorizationRule method.

type HybridConnectionsClientCreateOrUpdateAuthorizationRuleResponse added in v0.3.0

type HybridConnectionsClientCreateOrUpdateAuthorizationRuleResponse struct {
	// Single item in a List or Get AuthorizationRule operation
	AuthorizationRule
}

HybridConnectionsClientCreateOrUpdateAuthorizationRuleResponse contains the response from method HybridConnectionsClient.CreateOrUpdateAuthorizationRule.

type HybridConnectionsClientCreateOrUpdateOptions added in v0.3.0

type HybridConnectionsClientCreateOrUpdateOptions struct {
}

HybridConnectionsClientCreateOrUpdateOptions contains the optional parameters for the HybridConnectionsClient.CreateOrUpdate method.

type HybridConnectionsClientCreateOrUpdateResponse added in v0.3.0

type HybridConnectionsClientCreateOrUpdateResponse struct {
	// Description of hybrid connection resource.
	HybridConnection
}

HybridConnectionsClientCreateOrUpdateResponse contains the response from method HybridConnectionsClient.CreateOrUpdate.

type HybridConnectionsClientDeleteAuthorizationRuleOptions added in v0.3.0

type HybridConnectionsClientDeleteAuthorizationRuleOptions struct {
}

HybridConnectionsClientDeleteAuthorizationRuleOptions contains the optional parameters for the HybridConnectionsClient.DeleteAuthorizationRule method.

type HybridConnectionsClientDeleteAuthorizationRuleResponse added in v0.3.0

type HybridConnectionsClientDeleteAuthorizationRuleResponse struct {
}

HybridConnectionsClientDeleteAuthorizationRuleResponse contains the response from method HybridConnectionsClient.DeleteAuthorizationRule.

type HybridConnectionsClientDeleteOptions added in v0.3.0

type HybridConnectionsClientDeleteOptions struct {
}

HybridConnectionsClientDeleteOptions contains the optional parameters for the HybridConnectionsClient.Delete method.

type HybridConnectionsClientDeleteResponse added in v0.3.0

type HybridConnectionsClientDeleteResponse struct {
}

HybridConnectionsClientDeleteResponse contains the response from method HybridConnectionsClient.Delete.

type HybridConnectionsClientGetAuthorizationRuleOptions added in v0.3.0

type HybridConnectionsClientGetAuthorizationRuleOptions struct {
}

HybridConnectionsClientGetAuthorizationRuleOptions contains the optional parameters for the HybridConnectionsClient.GetAuthorizationRule method.

type HybridConnectionsClientGetAuthorizationRuleResponse added in v0.3.0

type HybridConnectionsClientGetAuthorizationRuleResponse struct {
	// Single item in a List or Get AuthorizationRule operation
	AuthorizationRule
}

HybridConnectionsClientGetAuthorizationRuleResponse contains the response from method HybridConnectionsClient.GetAuthorizationRule.

type HybridConnectionsClientGetOptions added in v0.3.0

type HybridConnectionsClientGetOptions struct {
}

HybridConnectionsClientGetOptions contains the optional parameters for the HybridConnectionsClient.Get method.

type HybridConnectionsClientGetResponse added in v0.3.0

type HybridConnectionsClientGetResponse struct {
	// Description of hybrid connection resource.
	HybridConnection
}

HybridConnectionsClientGetResponse contains the response from method HybridConnectionsClient.Get.

type HybridConnectionsClientListAuthorizationRulesOptions added in v0.3.0

type HybridConnectionsClientListAuthorizationRulesOptions struct {
}

HybridConnectionsClientListAuthorizationRulesOptions contains the optional parameters for the HybridConnectionsClient.NewListAuthorizationRulesPager method.

type HybridConnectionsClientListAuthorizationRulesResponse added in v0.3.0

type HybridConnectionsClientListAuthorizationRulesResponse struct {
	// The response from the list namespace operation.
	AuthorizationRuleListResult
}

HybridConnectionsClientListAuthorizationRulesResponse contains the response from method HybridConnectionsClient.NewListAuthorizationRulesPager.

type HybridConnectionsClientListByNamespaceOptions added in v0.3.0

type HybridConnectionsClientListByNamespaceOptions struct {
}

HybridConnectionsClientListByNamespaceOptions contains the optional parameters for the HybridConnectionsClient.NewListByNamespacePager method.

type HybridConnectionsClientListByNamespaceResponse added in v0.3.0

type HybridConnectionsClientListByNamespaceResponse struct {
	// The response of the list hybrid connection operation.
	HybridConnectionListResult
}

HybridConnectionsClientListByNamespaceResponse contains the response from method HybridConnectionsClient.NewListByNamespacePager.

type HybridConnectionsClientListKeysOptions added in v0.3.0

type HybridConnectionsClientListKeysOptions struct {
}

HybridConnectionsClientListKeysOptions contains the optional parameters for the HybridConnectionsClient.ListKeys method.

type HybridConnectionsClientListKeysResponse added in v0.3.0

type HybridConnectionsClientListKeysResponse struct {
	// Namespace/Relay Connection String
	AccessKeys
}

HybridConnectionsClientListKeysResponse contains the response from method HybridConnectionsClient.ListKeys.

type HybridConnectionsClientRegenerateKeysOptions added in v0.3.0

type HybridConnectionsClientRegenerateKeysOptions struct {
}

HybridConnectionsClientRegenerateKeysOptions contains the optional parameters for the HybridConnectionsClient.RegenerateKeys method.

type HybridConnectionsClientRegenerateKeysResponse added in v0.3.0

type HybridConnectionsClientRegenerateKeysResponse struct {
	// Namespace/Relay Connection String
	AccessKeys
}

HybridConnectionsClientRegenerateKeysResponse contains the response from method HybridConnectionsClient.RegenerateKeys.

type KeyType

type KeyType string

KeyType - The access key to regenerate.

const (
	KeyTypePrimaryKey   KeyType = "PrimaryKey"
	KeyTypeSecondaryKey KeyType = "SecondaryKey"
)

func PossibleKeyTypeValues

func PossibleKeyTypeValues() []KeyType

PossibleKeyTypeValues returns the possible values for the KeyType const type.

type NWRuleSetIPRules added in v1.0.0

type NWRuleSetIPRules struct {
	// The IP Filter Action
	Action *NetworkRuleIPAction

	// IP Mask
	IPMask *string
}

NWRuleSetIPRules - The response from the List namespace operation.

func (NWRuleSetIPRules) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type NWRuleSetIPRules.

func (*NWRuleSetIPRules) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type NWRuleSetIPRules.

type Namespace added in v0.3.0

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

	// Description of Relay namespace
	Properties *NamespaceProperties

	// SKU of the namespace.
	SKU *SKU

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

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; Resource type.
	Type *string
}

Namespace - Description of a namespace resource.

func (Namespace) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type Namespace.

func (*Namespace) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Namespace.

type NamespaceListResult added in v0.3.0

type NamespaceListResult struct {
	// Link to the next set of results. Not empty if value contains incomplete list of namespaces.
	NextLink *string

	// Result of the list namespace operation.
	Value []*Namespace
}

NamespaceListResult - The response from the list namespace operation.

func (NamespaceListResult) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type NamespaceListResult.

func (*NamespaceListResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type NamespaceListResult.

type NamespaceProperties added in v0.3.0

type NamespaceProperties struct {
	// List of private endpoint connections.
	PrivateEndpointConnections []*PrivateEndpointConnection

	// This determines if traffic is allowed over public network. By default it is enabled.
	PublicNetworkAccess *PublicNetworkAccess

	// READ-ONLY; The time the namespace was created.
	CreatedAt *time.Time

	// READ-ONLY; Identifier for Azure Insights metrics.
	MetricID *string

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

	// READ-ONLY; Endpoint you can use to perform Service Bus operations.
	ServiceBusEndpoint *string

	// READ-ONLY; Status of the Namespace.
	Status *string

	// READ-ONLY; The time the namespace was updated.
	UpdatedAt *time.Time
}

NamespaceProperties - Properties of the namespace.

func (NamespaceProperties) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type NamespaceProperties.

func (*NamespaceProperties) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type NamespaceProperties.

type NamespacesClient

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

NamespacesClient contains the methods for the Namespaces group. Don't use this type directly, use NewNamespacesClient() instead.

func NewNamespacesClient

func NewNamespacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NamespacesClient, error)

NewNamespacesClient creates a new instance of NamespacesClient with the specified values.

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

func (*NamespacesClient) BeginCreateOrUpdate

func (client *NamespacesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, parameters Namespace, options *NamespacesClientBeginCreateOrUpdateOptions) (*runtime.Poller[NamespacesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create Azure Relay namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • parameters - Parameters supplied to create a namespace resource.
  • options - NamespacesClientBeginCreateOrUpdateOptions contains the optional parameters for the NamespacesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/NameSpaces/RelayNameSpaceCreate.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/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewNamespacesClient().BeginCreateOrUpdate(ctx, "resourcegroup", "example-RelayNamespace-5849", armrelay.Namespace{
		Location: to.Ptr("South Central US"),
		Tags: map[string]*string{
			"tag1": to.Ptr("value1"),
			"tag2": to.Ptr("value2"),
		},
		SKU: &armrelay.SKU{
			Name: to.Ptr(armrelay.SKUNameStandard),
			Tier: to.Ptr(armrelay.SKUTierStandard),
		},
	}, 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.Namespace = armrelay.Namespace{
	// 	Name: to.Ptr("example-RelayNamespace-5849"),
	// 	Type: to.Ptr("Microsoft.Relay/Namespaces"),
	// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-5849"),
	// 	Location: to.Ptr("South Central US"),
	// 	Tags: map[string]*string{
	// 		"tag1": to.Ptr("value1"),
	// 		"tag2": to.Ptr("value2"),
	// 	},
	// 	Properties: &armrelay.NamespaceProperties{
	// 		MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relaynamespace-5849"),
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		ServiceBusEndpoint: to.Ptr("https://example-RelayNamespace-5849.servicebus.windows-int.net:443/"),
	// 	},
	// 	SKU: &armrelay.SKU{
	// 		Name: to.Ptr(armrelay.SKUNameStandard),
	// 		Tier: to.Ptr(armrelay.SKUTierStandard),
	// 	},
	// }
}
Output:

func (*NamespacesClient) BeginDelete

func (client *NamespacesClient) BeginDelete(ctx context.Context, resourceGroupName string, namespaceName string, options *NamespacesClientBeginDeleteOptions) (*runtime.Poller[NamespacesClientDeleteResponse], error)

BeginDelete - Deletes an existing namespace. This operation also removes all associated resources under the namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • options - NamespacesClientBeginDeleteOptions contains the optional parameters for the NamespacesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/NameSpaces/RelayNameSpaceDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewNamespacesClient().BeginDelete(ctx, "SouthCentralUS", "example-RelayNamespace-5849", 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 (*NamespacesClient) CheckNameAvailability

CheckNameAvailability - Check the specified namespace name availability. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • parameters - Parameters to check availability of the specified namespace name.
  • options - NamespacesClientCheckNameAvailabilityOptions contains the optional parameters for the NamespacesClient.CheckNameAvailability method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/NameSpaces/RelayNameSpaceCheckNameAvailability.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/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().CheckNameAvailability(ctx, armrelay.CheckNameAvailability{
		Name: to.Ptr("example-RelayNamespace1321"),
	}, 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.CheckNameAvailabilityResult = armrelay.CheckNameAvailabilityResult{
	// 	Message: to.Ptr(""),
	// 	NameAvailable: to.Ptr(true),
	// 	Reason: to.Ptr(armrelay.UnavailableReasonNone),
	// }
}
Output:

func (*NamespacesClient) CreateOrUpdateAuthorizationRule

func (client *NamespacesClient) CreateOrUpdateAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, parameters AuthorizationRule, options *NamespacesClientCreateOrUpdateAuthorizationRuleOptions) (NamespacesClientCreateOrUpdateAuthorizationRuleResponse, error)

CreateOrUpdateAuthorizationRule - Creates or updates an authorization rule for a namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • authorizationRuleName - The authorization rule name.
  • parameters - The authorization rule parameters.
  • options - NamespacesClientCreateOrUpdateAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.CreateOrUpdateAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/NameSpaces/RelayNameSpaceAuthorizationRuleCreate.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/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().CreateOrUpdateAuthorizationRule(ctx, "resourcegroup", "example-RelayNamespace-01", "example-RelayAuthRules-01", armrelay.AuthorizationRule{
		Properties: &armrelay.AuthorizationRuleProperties{
			Rights: []*armrelay.AccessRights{
				to.Ptr(armrelay.AccessRightsListen),
				to.Ptr(armrelay.AccessRightsSend)},
		},
	}, 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.AuthorizationRule = armrelay.AuthorizationRule{
	// 	Name: to.Ptr("example-RelayAuthRules-01"),
	// 	Type: to.Ptr("Microsoft.Relay/Namespaces/AuthorizationRules"),
	// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-01/AuthorizationRules/example-RelayAuthRules-01"),
	// 	Properties: &armrelay.AuthorizationRuleProperties{
	// 		Rights: []*armrelay.AccessRights{
	// 			to.Ptr(armrelay.AccessRightsListen),
	// 			to.Ptr(armrelay.AccessRightsSend)},
	// 		},
	// 	}
}
Output:

func (*NamespacesClient) CreateOrUpdateNetworkRuleSet added in v1.0.0

func (client *NamespacesClient) CreateOrUpdateNetworkRuleSet(ctx context.Context, resourceGroupName string, namespaceName string, parameters NetworkRuleSet, options *NamespacesClientCreateOrUpdateNetworkRuleSetOptions) (NamespacesClientCreateOrUpdateNetworkRuleSetResponse, error)

CreateOrUpdateNetworkRuleSet - Create or update NetworkRuleSet for a Namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • parameters - The Namespace IpFilterRule.
  • options - NamespacesClientCreateOrUpdateNetworkRuleSetOptions contains the optional parameters for the NamespacesClient.CreateOrUpdateNetworkRuleSet method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/VirtualNetworkRules/RelayNetworkRuleSetCreate.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/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().CreateOrUpdateNetworkRuleSet(ctx, "ResourceGroup", "example-RelayNamespace-6019", armrelay.NetworkRuleSet{
		Properties: &armrelay.NetworkRuleSetProperties{
			DefaultAction: to.Ptr(armrelay.DefaultActionDeny),
			IPRules: []*armrelay.NWRuleSetIPRules{
				{
					Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
					IPMask: to.Ptr("1.1.1.1"),
				},
				{
					Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
					IPMask: to.Ptr("1.1.1.2"),
				},
				{
					Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
					IPMask: to.Ptr("1.1.1.3"),
				},
				{
					Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
					IPMask: to.Ptr("1.1.1.4"),
				},
				{
					Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
					IPMask: to.Ptr("1.1.1.5"),
				}},
		},
	}, 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.NetworkRuleSet = armrelay.NetworkRuleSet{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.Relay/Namespaces/NetworkRuleSet"),
	// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroupid/providers/Microsoft.Relay/namespaces/example-RelayNamespace-9659/networkruleset/default"),
	// 	Properties: &armrelay.NetworkRuleSetProperties{
	// 		DefaultAction: to.Ptr(armrelay.DefaultActionDeny),
	// 		IPRules: []*armrelay.NWRuleSetIPRules{
	// 			{
	// 				Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.1"),
	// 			},
	// 			{
	// 				Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.2"),
	// 			},
	// 			{
	// 				Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.3"),
	// 			},
	// 			{
	// 				Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.4"),
	// 			},
	// 			{
	// 				Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.5"),
	// 		}},
	// 	},
	// }
}
Output:

func (*NamespacesClient) DeleteAuthorizationRule

func (client *NamespacesClient) DeleteAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, options *NamespacesClientDeleteAuthorizationRuleOptions) (NamespacesClientDeleteAuthorizationRuleResponse, error)

DeleteAuthorizationRule - Deletes a namespace authorization rule. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • authorizationRuleName - The authorization rule name.
  • options - NamespacesClientDeleteAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.DeleteAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/NameSpaces/RelayNameSpaceAuthorizationRuleDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewNamespacesClient().DeleteAuthorizationRule(ctx, "resourcegroup", "example-RelayNamespace-01", "example-RelayAuthRules-01", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*NamespacesClient) Get

func (client *NamespacesClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, options *NamespacesClientGetOptions) (NamespacesClientGetResponse, error)

Get - Returns the description for the specified namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • options - NamespacesClientGetOptions contains the optional parameters for the NamespacesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/NameSpaces/RelayNameSpaceGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().Get(ctx, "RG-eg", "example-RelayRelayNamespace-01", 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.Namespace = armrelay.Namespace{
	// 	Name: to.Ptr("example-RelayRelayNamespace-01"),
	// 	Type: to.Ptr("Microsoft.Relay/Namespaces"),
	// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/example-RelayRelayNamespace-01"),
	// 	Location: to.Ptr("West US"),
	// 	Tags: map[string]*string{
	// 		"tag1": to.Ptr("value1"),
	// 		"tag2": to.Ptr("value2"),
	// 	},
	// 	Properties: &armrelay.NamespaceProperties{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-23T20:38:12.460Z"); return t}()),
	// 		MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-RelayRelayNamespace-01"),
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		ServiceBusEndpoint: to.Ptr("https://example-RelayRelayNamespace-01.servicebus.windows.net:443/"),
	// 		UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-23T20:38:34.533Z"); return t}()),
	// 	},
	// 	SKU: &armrelay.SKU{
	// 		Name: to.Ptr(armrelay.SKUNameStandard),
	// 		Tier: to.Ptr(armrelay.SKUTierStandard),
	// 	},
	// }
}
Output:

func (*NamespacesClient) GetAuthorizationRule

func (client *NamespacesClient) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, options *NamespacesClientGetAuthorizationRuleOptions) (NamespacesClientGetAuthorizationRuleResponse, error)

GetAuthorizationRule - Authorization rule for a namespace by name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • authorizationRuleName - The authorization rule name.
  • options - NamespacesClientGetAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.GetAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/NameSpaces/RelayNameSpaceAuthorizationRuleGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().GetAuthorizationRule(ctx, "resourcegroup", "example-RelayNamespace-01", "example-RelayAuthRules-01", 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.AuthorizationRule = armrelay.AuthorizationRule{
	// 	Name: to.Ptr("example-RelayAuthRules-01"),
	// 	Type: to.Ptr("Microsoft.Relay/Namespaces/AuthorizationRules"),
	// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-01/AuthorizationRules/example-RelayAuthRules-01"),
	// 	Properties: &armrelay.AuthorizationRuleProperties{
	// 		Rights: []*armrelay.AccessRights{
	// 			to.Ptr(armrelay.AccessRightsListen)},
	// 		},
	// 	}
}
Output:

func (*NamespacesClient) GetNetworkRuleSet added in v1.0.0

func (client *NamespacesClient) GetNetworkRuleSet(ctx context.Context, resourceGroupName string, namespaceName string, options *NamespacesClientGetNetworkRuleSetOptions) (NamespacesClientGetNetworkRuleSetResponse, error)

GetNetworkRuleSet - Gets NetworkRuleSet for a Namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • options - NamespacesClientGetNetworkRuleSetOptions contains the optional parameters for the NamespacesClient.GetNetworkRuleSet method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/VirtualNetworkRules/RelayNetworkRuleSetGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().GetNetworkRuleSet(ctx, "ResourceGroup", "example-RelayNamespace-6019", 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.NetworkRuleSet = armrelay.NetworkRuleSet{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.Relay/Namespaces/NetworkRuleSet"),
	// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroupid/providers/Microsoft.Relay/namespaces/example-RelayNamespace-9659/networkruleset/default"),
	// 	Properties: &armrelay.NetworkRuleSetProperties{
	// 		DefaultAction: to.Ptr(armrelay.DefaultActionDeny),
	// 		IPRules: []*armrelay.NWRuleSetIPRules{
	// 			{
	// 				Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.1"),
	// 			},
	// 			{
	// 				Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.2"),
	// 			},
	// 			{
	// 				Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.3"),
	// 			},
	// 			{
	// 				Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.4"),
	// 			},
	// 			{
	// 				Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.5"),
	// 		}},
	// 	},
	// }
}
Output:

func (*NamespacesClient) ListKeys

func (client *NamespacesClient) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, options *NamespacesClientListKeysOptions) (NamespacesClientListKeysResponse, error)

ListKeys - Primary and secondary connection strings to the namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • authorizationRuleName - The authorization rule name.
  • options - NamespacesClientListKeysOptions contains the optional parameters for the NamespacesClient.ListKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/NameSpaces/RelayNameSpaceAuthorizationRuleListKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().ListKeys(ctx, "resourcegroup", "example-RelayNamespace-01", "example-RelayAuthRules-01", 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.AccessKeys = armrelay.AccessKeys{
	// 	KeyName: to.Ptr("example-RelayAuthRules-01"),
	// 	PrimaryConnectionString: to.Ptr("Endpoint=sb://example-Relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=example-RelayAuthRules-01;SharedAccessKey=############################################"),
	// 	PrimaryKey: to.Ptr("############################################"),
	// 	SecondaryConnectionString: to.Ptr("Endpoint=sb://example-Relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=example-RelayAuthRules-01;SharedAccessKey=############################################"),
	// 	SecondaryKey: to.Ptr("############################################"),
	// }
}
Output:

func (*NamespacesClient) NewListAuthorizationRulesPager added in v0.5.0

func (client *NamespacesClient) NewListAuthorizationRulesPager(resourceGroupName string, namespaceName string, options *NamespacesClientListAuthorizationRulesOptions) *runtime.Pager[NamespacesClientListAuthorizationRulesResponse]

NewListAuthorizationRulesPager - Authorization rules for a namespace.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • options - NamespacesClientListAuthorizationRulesOptions contains the optional parameters for the NamespacesClient.NewListAuthorizationRulesPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/NameSpaces/RelayNameSpaceAuthorizationRuleListAll.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewNamespacesClient().NewListAuthorizationRulesPager("resourcegroup", "example-RelayNamespace-01", 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.AuthorizationRuleListResult = armrelay.AuthorizationRuleListResult{
		// 	Value: []*armrelay.AuthorizationRule{
		// 		{
		// 			Name: to.Ptr("RootManageSharedAccessKey"),
		// 			Type: to.Ptr("Microsoft.Relay/Namespaces/AuthorizationRules"),
		// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-01/AuthorizationRules/RootManageSharedAccessKey"),
		// 			Properties: &armrelay.AuthorizationRuleProperties{
		// 				Rights: []*armrelay.AccessRights{
		// 					to.Ptr(armrelay.AccessRightsListen),
		// 					to.Ptr(armrelay.AccessRightsManage),
		// 					to.Ptr(armrelay.AccessRightsSend)},
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("example-RelayAuthRules-01"),
		// 				Type: to.Ptr("Microsoft.Relay/Namespaces/AuthorizationRules"),
		// 				ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-01/AuthorizationRules/example-RelayAuthRules-01"),
		// 				Properties: &armrelay.AuthorizationRuleProperties{
		// 					Rights: []*armrelay.AccessRights{
		// 						to.Ptr(armrelay.AccessRightsListen),
		// 						to.Ptr(armrelay.AccessRightsSend)},
		// 					},
		// 			}},
		// 		}
	}
}
Output:

func (*NamespacesClient) NewListByResourceGroupPager added in v0.5.0

func (client *NamespacesClient) NewListByResourceGroupPager(resourceGroupName string, options *NamespacesClientListByResourceGroupOptions) *runtime.Pager[NamespacesClientListByResourceGroupResponse]

NewListByResourceGroupPager - Lists all the available namespaces within the ResourceGroup.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • options - NamespacesClientListByResourceGroupOptions contains the optional parameters for the NamespacesClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/NameSpaces/RelayNameSpaceListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewNamespacesClient().NewListByResourceGroupPager("resourcegroup", 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.NamespaceListResult = armrelay.NamespaceListResult{
		// 	Value: []*armrelay.Namespace{
		// 		{
		// 			Name: to.Ptr("example-RelayNamespace-3054"),
		// 			Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-3054"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armrelay.NamespaceProperties{
		// 				MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relaynamespace-3054"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://example-RelayNamespace-3054.servicebus.windows-int.net:443/"),
		// 			},
		// 			SKU: &armrelay.SKU{
		// 				Name: to.Ptr(armrelay.SKUNameStandard),
		// 				Tier: to.Ptr(armrelay.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("oaisdjfoiasdjfoiajsdfoijasd"),
		// 			Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/oaisdjfoiasdjfoiajsdfoijasd"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armrelay.NamespaceProperties{
		// 				MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:oaisdjfoiasdjfoiajsdfoijasd"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://oaisdjfoiasdjfoiajsdfoijasd.servicebus.windows-int.net:443/"),
		// 			},
		// 			SKU: &armrelay.SKU{
		// 				Name: to.Ptr(armrelay.SKUNameStandard),
		// 				Tier: to.Ptr(armrelay.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("abc123"),
		// 			Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/abc123"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armrelay.NamespaceProperties{
		// 				MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:abc123"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://abc123.servicebus.windows-int.net:443/"),
		// 			},
		// 			SKU: &armrelay.SKU{
		// 				Name: to.Ptr(armrelay.SKUNameStandard),
		// 				Tier: to.Ptr(armrelay.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("example-RelayNamespace-5849"),
		// 			Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-5849"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 				"tag1": to.Ptr("value1"),
		// 				"tag2": to.Ptr("value2"),
		// 			},
		// 			Properties: &armrelay.NamespaceProperties{
		// 				MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relaynamespace-5849"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://example-RelayNamespace-5849.servicebus.windows-int.net:443/"),
		// 			},
		// 			SKU: &armrelay.SKU{
		// 				Name: to.Ptr(armrelay.SKUNameStandard),
		// 				Tier: to.Ptr(armrelay.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("example-RelayNamespace-4984"),
		// 			Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-4984"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armrelay.NamespaceProperties{
		// 				MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relaynamespace-4984"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://example-RelayNamespace-4984.servicebus.windows-int.net:443/"),
		// 			},
		// 			SKU: &armrelay.SKU{
		// 				Name: to.Ptr(armrelay.SKUNameStandard),
		// 				Tier: to.Ptr(armrelay.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("example-RelayNamespace-5606"),
		// 			Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-5606"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armrelay.NamespaceProperties{
		// 				MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relaynamespace-5606"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://example-RelayNamespace-5606.servicebus.windows-int.net:443/"),
		// 			},
		// 			SKU: &armrelay.SKU{
		// 				Name: to.Ptr(armrelay.SKUNameStandard),
		// 				Tier: to.Ptr(armrelay.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("example-RelayNamespace-7703"),
		// 			Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-7703"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armrelay.NamespaceProperties{
		// 				MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relaynamespace-7703"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://example-RelayNamespace-7703.servicebus.windows-int.net:443/"),
		// 			},
		// 			SKU: &armrelay.SKU{
		// 				Name: to.Ptr(armrelay.SKUNameStandard),
		// 				Tier: to.Ptr(armrelay.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("zzzzzzzzzzzzzzzzzzzzzz-00001"),
		// 			Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/zzzzzzzzzzzzzzzzzzzzzz-00001"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armrelay.NamespaceProperties{
		// 				MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:zzzzzzzzzzzzzzzzzzzzzz-00001"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://zzzzzzzzzzzzzzzzzzzzzz-00001.servicebus.windows-int.net:443/"),
		// 			},
		// 			SKU: &armrelay.SKU{
		// 				Name: to.Ptr(armrelay.SKUNameStandard),
		// 				Tier: to.Ptr(armrelay.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("example-RelayNamespace-3919"),
		// 			Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-3919"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armrelay.NamespaceProperties{
		// 				MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relaynamespace-3919"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://example-RelayNamespace-3919.servicebus.windows-int.net:443/"),
		// 			},
		// 			SKU: &armrelay.SKU{
		// 				Name: to.Ptr(armrelay.SKUNameStandard),
		// 				Tier: to.Ptr(armrelay.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("aiosdjfaoidjasdoijasdfoijasdfofijsdf"),
		// 			Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/aiosdjfaoidjasdoijasdfoijasdfofijsdf"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armrelay.NamespaceProperties{
		// 				MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:aiosdjfaoidjasdoijasdfoijasdfofijsdf"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://aiosdjfaoidjasdoijasdfoijasdfofijsdf.servicebus.windows-int.net:443/"),
		// 			},
		// 			SKU: &armrelay.SKU{
		// 				Name: to.Ptr(armrelay.SKUNameStandard),
		// 				Tier: to.Ptr(armrelay.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("example-RelayNamespace-3413"),
		// 			Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-3413"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armrelay.NamespaceProperties{
		// 				MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relaynamespace-3413"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://example-RelayNamespace-3413.servicebus.windows-int.net:443/"),
		// 			},
		// 			SKU: &armrelay.SKU{
		// 				Name: to.Ptr(armrelay.SKUNameStandard),
		// 				Tier: to.Ptr(armrelay.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("example-RelayNamespace-8695"),
		// 			Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-8695"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armrelay.NamespaceProperties{
		// 				MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relaynamespace-8695"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://example-RelayNamespace-8695.servicebus.windows-int.net:443/"),
		// 			},
		// 			SKU: &armrelay.SKU{
		// 				Name: to.Ptr(armrelay.SKUNameStandard),
		// 				Tier: to.Ptr(armrelay.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("example-RelayNamespace-4801"),
		// 			Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-4801"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armrelay.NamespaceProperties{
		// 				MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relaynamespace-4801"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://example-RelayNamespace-4801.servicebus.windows-int.net:443/"),
		// 			},
		// 			SKU: &armrelay.SKU{
		// 				Name: to.Ptr(armrelay.SKUNameStandard),
		// 				Tier: to.Ptr(armrelay.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("example-RelayNamespace-2812"),
		// 			Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-2812"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armrelay.NamespaceProperties{
		// 				MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relaynamespace-2812"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://example-RelayNamespace-2812.servicebus.windows-int.net:443/"),
		// 			},
		// 			SKU: &armrelay.SKU{
		// 				Name: to.Ptr(armrelay.SKUNameStandard),
		// 				Tier: to.Ptr(armrelay.SKUTierStandard),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*NamespacesClient) NewListPager added in v0.5.0

NewListPager - Lists all the available namespaces within the subscription regardless of the resourceGroups.

Generated from API version 2021-11-01

  • options - NamespacesClientListOptions contains the optional parameters for the NamespacesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/NameSpaces/RelayNameSpaceListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewNamespacesClient().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.NamespaceListResult = armrelay.NamespaceListResult{
		// 	Value: []*armrelay.Namespace{
		// 		{
		// 			Name: to.Ptr("example-RelayRelayNamespace-01"),
		// 			Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/RG1-eg/providers/Microsoft.Relay/namespaces/example-RelayRelayNamespace-01"),
		// 			Location: to.Ptr("West US"),
		// 			Tags: map[string]*string{
		// 				"tag1": to.Ptr("value1"),
		// 				"tag2": to.Ptr("value2"),
		// 			},
		// 			Properties: &armrelay.NamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-23T20:34:49.413Z"); return t}()),
		// 				MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-RelayRelayNamespace-01"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://example-RelayRelayNamespace-01.servicebus.windows.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-23T20:34:59.413Z"); return t}()),
		// 			},
		// 			SKU: &armrelay.SKU{
		// 				Name: to.Ptr(armrelay.SKUNameStandard),
		// 				Tier: to.Ptr(armrelay.SKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("example-RelayRelayNamespace-02"),
		// 			Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/RG1-eg/providers/Microsoft.Relay/namespaces/example-RelayRelayNamespace-02"),
		// 			Location: to.Ptr("West US"),
		// 			Tags: map[string]*string{
		// 				"tag1": to.Ptr("value1"),
		// 				"tag2": to.Ptr("value2"),
		// 			},
		// 			Properties: &armrelay.NamespaceProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-23T20:34:39.413Z"); return t}()),
		// 				MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-RelayRelayNamespace-02"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://example-RelayRelayNamespace-02.servicebus.windows.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-23T20:34:49.413Z"); return t}()),
		// 			},
		// 			SKU: &armrelay.SKU{
		// 				Name: to.Ptr(armrelay.SKUNameStandard),
		// 				Tier: to.Ptr(armrelay.SKUTierStandard),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*NamespacesClient) RegenerateKeys

func (client *NamespacesClient) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters, options *NamespacesClientRegenerateKeysOptions) (NamespacesClientRegenerateKeysResponse, error)

RegenerateKeys - Regenerates the primary or secondary connection strings to the namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • authorizationRuleName - The authorization rule name.
  • parameters - Parameters supplied to regenerate authorization rule.
  • options - NamespacesClientRegenerateKeysOptions contains the optional parameters for the NamespacesClient.RegenerateKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/NameSpaces/RelayNameSpaceAuthorizationRuleRegenerateKey.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/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().RegenerateKeys(ctx, "resourcegroup", "example-RelayNamespace-01", "example-RelayAuthRules-01", armrelay.RegenerateAccessKeyParameters{
		KeyType: to.Ptr(armrelay.KeyTypePrimaryKey),
	}, 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.AccessKeys = armrelay.AccessKeys{
	// 	KeyName: to.Ptr("example-RelayAuthRules-01"),
	// 	PrimaryConnectionString: to.Ptr("Endpoint=sb://example-Relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=example-RelayAuthRules-01;SharedAccessKey=############################################"),
	// 	PrimaryKey: to.Ptr("############################################"),
	// 	SecondaryConnectionString: to.Ptr("Endpoint=sb://example-Relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=example-RelayAuthRules-01;SharedAccessKey=############################################"),
	// 	SecondaryKey: to.Ptr("############################################"),
	// }
}
Output:

func (*NamespacesClient) Update

func (client *NamespacesClient) Update(ctx context.Context, resourceGroupName string, namespaceName string, parameters UpdateParameters, options *NamespacesClientUpdateOptions) (NamespacesClientUpdateResponse, error)

Update - Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • parameters - Parameters for updating a namespace resource.
  • options - NamespacesClientUpdateOptions contains the optional parameters for the NamespacesClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/NameSpaces/RelayNameSpaceUpdate.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/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().Update(ctx, "RG-eg", "example-RelayRelayNamespace-01", armrelay.UpdateParameters{
		Tags: map[string]*string{
			"tag3": to.Ptr("value3"),
			"tag4": to.Ptr("value4"),
			"tag5": to.Ptr("value5"),
			"tag6": to.Ptr("value6"),
		},
	}, 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.Namespace = armrelay.Namespace{
	// 	Name: to.Ptr("example-RelayRelayNamespace-01"),
	// 	Type: to.Ptr("Microsoft.Relay/Namespaces"),
	// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/example-RelayRelayNamespace-01"),
	// 	Location: to.Ptr("West US"),
	// 	Tags: map[string]*string{
	// 		"tag3": to.Ptr("value3"),
	// 		"tag4": to.Ptr("value4"),
	// 		"tag5": to.Ptr("value5"),
	// 		"tag6": to.Ptr("value6"),
	// 	},
	// 	Properties: &armrelay.NamespaceProperties{
	// 		MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relayrelaynamespace-01"),
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 	},
	// }
}
Output:

type NamespacesClientBeginCreateOrUpdateOptions added in v0.3.0

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

NamespacesClientBeginCreateOrUpdateOptions contains the optional parameters for the NamespacesClient.BeginCreateOrUpdate method.

type NamespacesClientBeginDeleteOptions added in v0.3.0

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

NamespacesClientBeginDeleteOptions contains the optional parameters for the NamespacesClient.BeginDelete method.

type NamespacesClientCheckNameAvailabilityOptions added in v0.3.0

type NamespacesClientCheckNameAvailabilityOptions struct {
}

NamespacesClientCheckNameAvailabilityOptions contains the optional parameters for the NamespacesClient.CheckNameAvailability method.

type NamespacesClientCheckNameAvailabilityResponse added in v0.3.0

type NamespacesClientCheckNameAvailabilityResponse struct {
	// Description of the check name availability request properties.
	CheckNameAvailabilityResult
}

NamespacesClientCheckNameAvailabilityResponse contains the response from method NamespacesClient.CheckNameAvailability.

type NamespacesClientCreateOrUpdateAuthorizationRuleOptions added in v0.3.0

type NamespacesClientCreateOrUpdateAuthorizationRuleOptions struct {
}

NamespacesClientCreateOrUpdateAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.CreateOrUpdateAuthorizationRule method.

type NamespacesClientCreateOrUpdateAuthorizationRuleResponse added in v0.3.0

type NamespacesClientCreateOrUpdateAuthorizationRuleResponse struct {
	// Single item in a List or Get AuthorizationRule operation
	AuthorizationRule
}

NamespacesClientCreateOrUpdateAuthorizationRuleResponse contains the response from method NamespacesClient.CreateOrUpdateAuthorizationRule.

type NamespacesClientCreateOrUpdateNetworkRuleSetOptions added in v1.0.0

type NamespacesClientCreateOrUpdateNetworkRuleSetOptions struct {
}

NamespacesClientCreateOrUpdateNetworkRuleSetOptions contains the optional parameters for the NamespacesClient.CreateOrUpdateNetworkRuleSet method.

type NamespacesClientCreateOrUpdateNetworkRuleSetResponse added in v1.0.0

type NamespacesClientCreateOrUpdateNetworkRuleSetResponse struct {
	// Description of topic resource.
	NetworkRuleSet
}

NamespacesClientCreateOrUpdateNetworkRuleSetResponse contains the response from method NamespacesClient.CreateOrUpdateNetworkRuleSet.

type NamespacesClientCreateOrUpdateResponse added in v0.3.0

type NamespacesClientCreateOrUpdateResponse struct {
	// Description of a namespace resource.
	Namespace
}

NamespacesClientCreateOrUpdateResponse contains the response from method NamespacesClient.BeginCreateOrUpdate.

type NamespacesClientDeleteAuthorizationRuleOptions added in v0.3.0

type NamespacesClientDeleteAuthorizationRuleOptions struct {
}

NamespacesClientDeleteAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.DeleteAuthorizationRule method.

type NamespacesClientDeleteAuthorizationRuleResponse added in v0.3.0

type NamespacesClientDeleteAuthorizationRuleResponse struct {
}

NamespacesClientDeleteAuthorizationRuleResponse contains the response from method NamespacesClient.DeleteAuthorizationRule.

type NamespacesClientDeleteResponse added in v0.3.0

type NamespacesClientDeleteResponse struct {
}

NamespacesClientDeleteResponse contains the response from method NamespacesClient.BeginDelete.

type NamespacesClientGetAuthorizationRuleOptions added in v0.3.0

type NamespacesClientGetAuthorizationRuleOptions struct {
}

NamespacesClientGetAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.GetAuthorizationRule method.

type NamespacesClientGetAuthorizationRuleResponse added in v0.3.0

type NamespacesClientGetAuthorizationRuleResponse struct {
	// Single item in a List or Get AuthorizationRule operation
	AuthorizationRule
}

NamespacesClientGetAuthorizationRuleResponse contains the response from method NamespacesClient.GetAuthorizationRule.

type NamespacesClientGetNetworkRuleSetOptions added in v1.0.0

type NamespacesClientGetNetworkRuleSetOptions struct {
}

NamespacesClientGetNetworkRuleSetOptions contains the optional parameters for the NamespacesClient.GetNetworkRuleSet method.

type NamespacesClientGetNetworkRuleSetResponse added in v1.0.0

type NamespacesClientGetNetworkRuleSetResponse struct {
	// Description of topic resource.
	NetworkRuleSet
}

NamespacesClientGetNetworkRuleSetResponse contains the response from method NamespacesClient.GetNetworkRuleSet.

type NamespacesClientGetOptions added in v0.3.0

type NamespacesClientGetOptions struct {
}

NamespacesClientGetOptions contains the optional parameters for the NamespacesClient.Get method.

type NamespacesClientGetResponse added in v0.3.0

type NamespacesClientGetResponse struct {
	// Description of a namespace resource.
	Namespace
}

NamespacesClientGetResponse contains the response from method NamespacesClient.Get.

type NamespacesClientListAuthorizationRulesOptions added in v0.3.0

type NamespacesClientListAuthorizationRulesOptions struct {
}

NamespacesClientListAuthorizationRulesOptions contains the optional parameters for the NamespacesClient.NewListAuthorizationRulesPager method.

type NamespacesClientListAuthorizationRulesResponse added in v0.3.0

type NamespacesClientListAuthorizationRulesResponse struct {
	// The response from the list namespace operation.
	AuthorizationRuleListResult
}

NamespacesClientListAuthorizationRulesResponse contains the response from method NamespacesClient.NewListAuthorizationRulesPager.

type NamespacesClientListByResourceGroupOptions added in v0.3.0

type NamespacesClientListByResourceGroupOptions struct {
}

NamespacesClientListByResourceGroupOptions contains the optional parameters for the NamespacesClient.NewListByResourceGroupPager method.

type NamespacesClientListByResourceGroupResponse added in v0.3.0

type NamespacesClientListByResourceGroupResponse struct {
	// The response from the list namespace operation.
	NamespaceListResult
}

NamespacesClientListByResourceGroupResponse contains the response from method NamespacesClient.NewListByResourceGroupPager.

type NamespacesClientListKeysOptions added in v0.3.0

type NamespacesClientListKeysOptions struct {
}

NamespacesClientListKeysOptions contains the optional parameters for the NamespacesClient.ListKeys method.

type NamespacesClientListKeysResponse added in v0.3.0

type NamespacesClientListKeysResponse struct {
	// Namespace/Relay Connection String
	AccessKeys
}

NamespacesClientListKeysResponse contains the response from method NamespacesClient.ListKeys.

type NamespacesClientListOptions added in v0.3.0

type NamespacesClientListOptions struct {
}

NamespacesClientListOptions contains the optional parameters for the NamespacesClient.NewListPager method.

type NamespacesClientListResponse added in v0.3.0

type NamespacesClientListResponse struct {
	// The response from the list namespace operation.
	NamespaceListResult
}

NamespacesClientListResponse contains the response from method NamespacesClient.NewListPager.

type NamespacesClientRegenerateKeysOptions added in v0.3.0

type NamespacesClientRegenerateKeysOptions struct {
}

NamespacesClientRegenerateKeysOptions contains the optional parameters for the NamespacesClient.RegenerateKeys method.

type NamespacesClientRegenerateKeysResponse added in v0.3.0

type NamespacesClientRegenerateKeysResponse struct {
	// Namespace/Relay Connection String
	AccessKeys
}

NamespacesClientRegenerateKeysResponse contains the response from method NamespacesClient.RegenerateKeys.

type NamespacesClientUpdateOptions added in v0.3.0

type NamespacesClientUpdateOptions struct {
}

NamespacesClientUpdateOptions contains the optional parameters for the NamespacesClient.Update method.

type NamespacesClientUpdateResponse added in v0.3.0

type NamespacesClientUpdateResponse struct {
	// Description of a namespace resource.
	Namespace
}

NamespacesClientUpdateResponse contains the response from method NamespacesClient.Update.

type NetworkRuleIPAction added in v1.0.0

type NetworkRuleIPAction string

NetworkRuleIPAction - The IP Filter Action

const (
	NetworkRuleIPActionAllow NetworkRuleIPAction = "Allow"
)

func PossibleNetworkRuleIPActionValues added in v1.0.0

func PossibleNetworkRuleIPActionValues() []NetworkRuleIPAction

PossibleNetworkRuleIPActionValues returns the possible values for the NetworkRuleIPAction const type.

type NetworkRuleSet added in v1.0.0

type NetworkRuleSet struct {
	// NetworkRuleSet properties
	Properties *NetworkRuleSetProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; Resource type.
	Type *string
}

NetworkRuleSet - Description of topic resource.

func (NetworkRuleSet) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type NetworkRuleSet.

func (*NetworkRuleSet) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkRuleSet.

type NetworkRuleSetProperties added in v1.0.0

type NetworkRuleSetProperties struct {
	// Default Action for Network Rule Set
	DefaultAction *DefaultAction

	// List of IpRules
	IPRules []*NWRuleSetIPRules
}

NetworkRuleSetProperties - NetworkRuleSet properties

func (NetworkRuleSetProperties) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type NetworkRuleSetProperties.

func (*NetworkRuleSetProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkRuleSetProperties.

type Operation

type Operation struct {
	// Properties of the operation
	Properties any

	// READ-ONLY; Display of the operation
	Display *OperationDisplay

	// READ-ONLY; Indicates whether the operation is a data action
	IsDataAction *bool

	// READ-ONLY; Operation name: {provider}/{resource}/{operation}
	Name *string

	// READ-ONLY; Origin of the operation
	Origin *string
}

Operation - A Relay REST API operation

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 {
	// READ-ONLY; Localized friendly description for the operation
	Description *string

	// READ-ONLY; Localized friendly name for the operation
	Operation *string

	// READ-ONLY; Resource provider of the operation
	Provider *string

	// READ-ONLY; Resource of the operation
	Resource *string
}

OperationDisplay - Operation display payload

func (OperationDisplay) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

type OperationListResult struct {
	// READ-ONLY; URL to get the next set of operation list results if there are any.
	NextLink *string

	// READ-ONLY; List of Relay operations supported by the Microsoft.EventHub resource provider.
	Value []*Operation
}

OperationListResult - Result of the request to list Relay operations. It contains a list of operations and a URL link to get the next set of results.

func (OperationListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type OperationsClient

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

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

func NewOperationsClient

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

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

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

func (*OperationsClient) NewListPager added in v0.5.0

NewListPager - Lists all available Relay REST API operations.

Generated from API version 2021-11-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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/RelayOperations_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/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OperationListResult = armrelay.OperationListResult{
		// 	Value: []*armrelay.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.Relay/checkNameAvailability/action"),
		// 			Display: &armrelay.OperationDisplay{
		// 				Operation: to.Ptr("Get namespace availability."),
		// 				Provider: to.Ptr("Microsoft Azure Relay"),
		// 				Resource: to.Ptr("Non Resource Operation"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Relay/register/action"),
		// 			Display: &armrelay.OperationDisplay{
		// 				Operation: to.Ptr("Registers the Relay Resource Provider"),
		// 				Provider: to.Ptr("Microsoft Azure Relay"),
		// 				Resource: to.Ptr("Relay Resource Provider"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Relay/namespaces/write"),
		// 			Display: &armrelay.OperationDisplay{
		// 				Operation: to.Ptr("Create Or Update Namespace "),
		// 				Provider: to.Ptr("Microsoft Azure Relay"),
		// 				Resource: to.Ptr("Namespace"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Relay/namespaces/read"),
		// 			Display: &armrelay.OperationDisplay{
		// 				Operation: to.Ptr("Get Namespace Resource"),
		// 				Provider: to.Ptr("Microsoft Azure Relay"),
		// 				Resource: to.Ptr("Namespace"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Relay/namespaces/Delete"),
		// 			Display: &armrelay.OperationDisplay{
		// 				Operation: to.Ptr("Delete Namespace"),
		// 				Provider: to.Ptr("Microsoft Azure Relay"),
		// 				Resource: to.Ptr("Namespace"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Relay/namespaces/Relays/write"),
		// 			Display: &armrelay.OperationDisplay{
		// 				Operation: to.Ptr("Create or Update Relay"),
		// 				Provider: to.Ptr("Microsoft Azure Relay"),
		// 				Resource: to.Ptr("Relay"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Relay/namespaces/Relays/read"),
		// 			Display: &armrelay.OperationDisplay{
		// 				Operation: to.Ptr("Get Relay"),
		// 				Provider: to.Ptr("Microsoft Azure Relay"),
		// 				Resource: to.Ptr("Relay"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Relay/namespaces/Relays/Delete"),
		// 			Display: &armrelay.OperationDisplay{
		// 				Operation: to.Ptr("Delete Relay"),
		// 				Provider: to.Ptr("Microsoft Azure Relay"),
		// 				Resource: to.Ptr("Relay"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Relay/namespaces/metricDefinitions/read"),
		// 			Display: &armrelay.OperationDisplay{
		// 				Operation: to.Ptr("Get Namespace metrics"),
		// 				Provider: to.Ptr("Microsoft Azure Relay"),
		// 				Resource: to.Ptr("Namespace metrics"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Relay/namespaces/diagnosticSettings/read"),
		// 			Display: &armrelay.OperationDisplay{
		// 				Operation: to.Ptr("Get Namespace diagnostic settings"),
		// 				Provider: to.Ptr("Microsoft Azure Relay"),
		// 				Resource: to.Ptr("Namespace diagnostic settings"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Relay/namespaces/diagnosticSettings/write"),
		// 			Display: &armrelay.OperationDisplay{
		// 				Operation: to.Ptr("Create or Update Namespace diagnostic settings"),
		// 				Provider: to.Ptr("Microsoft Azure Relay"),
		// 				Resource: to.Ptr("Namespace diagnostic settings"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Relay/namespaces/logDefinitions/read"),
		// 			Display: &armrelay.OperationDisplay{
		// 				Operation: to.Ptr("Get Namespace logs"),
		// 				Provider: to.Ptr("Microsoft Azure Relay"),
		// 				Resource: to.Ptr("Namespace logs"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions added in v0.3.0

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse added in v0.3.0

type OperationsClientListResponse struct {
	// Result of the request to list Relay operations. It contains a list of operations and a URL link to get the next set of
	// results.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type PrivateEndpoint added in v1.0.0

type PrivateEndpoint struct {
	// The ARM identifier for Private Endpoint.
	ID *string
}

PrivateEndpoint information.

func (PrivateEndpoint) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint.

func (*PrivateEndpoint) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint.

type PrivateEndpointConnection added in v1.0.0

type PrivateEndpointConnection struct {
	// Properties of the PrivateEndpointConnection.
	Properties *PrivateEndpointConnectionProperties

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

	// READ-ONLY; The geo-location where the resource lives
	Location *string

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

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string
}

PrivateEndpointConnection - Properties of the PrivateEndpointConnection.

func (PrivateEndpointConnection) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.

func (*PrivateEndpointConnection) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.

type PrivateEndpointConnectionListResult added in v1.0.0

type PrivateEndpointConnectionListResult struct {
	// A link for the next page of private endpoint connection resources.
	NextLink *string

	// A collection of private endpoint connection resources.
	Value []*PrivateEndpointConnection
}

PrivateEndpointConnectionListResult - Result of the list of all private endpoint connections operation.

func (PrivateEndpointConnectionListResult) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult.

func (*PrivateEndpointConnectionListResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult.

type PrivateEndpointConnectionProperties added in v1.0.0

type PrivateEndpointConnectionProperties struct {
	// The Private Endpoint resource for this Connection.
	PrivateEndpoint *PrivateEndpoint

	// Details about the state of the connection.
	PrivateLinkServiceConnectionState *ConnectionState

	// Provisioning state of the Private Endpoint Connection.
	ProvisioningState *EndPointProvisioningState
}

PrivateEndpointConnectionProperties - Properties of the private endpoint connection resource.

func (PrivateEndpointConnectionProperties) MarshalJSON added in v1.1.0

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

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

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

func NewPrivateEndpointConnectionsClient added in v1.0.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 - Subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PrivateEndpointConnectionsClient) BeginDelete added in v1.0.0

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

BeginDelete - Deletes an existing namespace. This operation also removes all associated resources under the namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • privateEndpointConnectionName - The PrivateEndpointConnection name
  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/PrivateEndpointConnections/PrivateEndpointConnectionsDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginDelete(ctx, "myResourceGroup", "example-RelayNamespace-5849", "{privateEndpointConnection name}", 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) CreateOrUpdate added in v1.0.0

func (client *PrivateEndpointConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientCreateOrUpdateOptions) (PrivateEndpointConnectionsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates PrivateEndpointConnections of service namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • privateEndpointConnectionName - The PrivateEndpointConnection name
  • parameters - Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource.
  • options - PrivateEndpointConnectionsClientCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/PrivateEndpointConnections/PrivateEndpointConnectionsCreate.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/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateEndpointConnectionsClient().CreateOrUpdate(ctx, "resourcegroup", "example-RelayNamespace-5849", "{privateEndpointConnection name}", armrelay.PrivateEndpointConnection{
		Properties: &armrelay.PrivateEndpointConnectionProperties{
			PrivateEndpoint: &armrelay.PrivateEndpoint{
				ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Network/privateEndpoints/ali-relay-pve-1"),
			},
			PrivateLinkServiceConnectionState: &armrelay.ConnectionState{
				Description: to.Ptr("You may pass"),
				Status:      to.Ptr(armrelay.PrivateLinkConnectionStatusApproved),
			},
		},
	}, 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 = armrelay.PrivateEndpointConnection{
	// 	Name: to.Ptr("{privateEndpointConnection name}"),
	// 	Type: to.Ptr("Microsoft.Relay/Namespaces/PrivateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/alitest/providers/Microsoft.Relay/namespaces/relay-private-endpoint-test/privateEndpointConnections/{privateEndpointConnection name}"),
	// 	Location: to.Ptr("South Central US"),
	// 	Properties: &armrelay.PrivateEndpointConnectionProperties{
	// 		PrivateEndpoint: &armrelay.PrivateEndpoint{
	// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Network/privateEndpoints/ali-relay-pve-1"),
	// 		},
	// 		PrivateLinkServiceConnectionState: &armrelay.ConnectionState{
	// 			Description: to.Ptr("You may pass"),
	// 			Status: to.Ptr(armrelay.PrivateLinkConnectionStatusApproved),
	// 		},
	// 		ProvisioningState: to.Ptr(armrelay.EndPointProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*PrivateEndpointConnectionsClient) Get added in v1.0.0

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

Get - Gets a description for the specified Private Endpoint Connection name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • privateEndpointConnectionName - The PrivateEndpointConnection name
  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/PrivateEndpointConnections/PrivateEndpointConnectionsGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "myResourceGroup", "example-RelayNamespace-5849", "{privateEndpointConnection name}", 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 = armrelay.PrivateEndpointConnection{
	// 	Name: to.Ptr("{privateEndpointConnection name}"),
	// 	Type: to.Ptr("Microsoft.Relay/Namespaces/PrivateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/{RGName}/providers/Microsoft.Relay/namespaces/relay-private-endpoint-test/privateEndpointConnections/{privateEndpointConnection name}"),
	// 	Location: to.Ptr("South Central US"),
	// 	Properties: &armrelay.PrivateEndpointConnectionProperties{
	// 		PrivateEndpoint: &armrelay.PrivateEndpoint{
	// 			ID: to.Ptr("/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourcegroup/providers/Microsoft.Network/privateEndpoints/ali-relay-pve-1"),
	// 		},
	// 		PrivateLinkServiceConnectionState: &armrelay.ConnectionState{
	// 			Description: to.Ptr("approve please"),
	// 			Status: to.Ptr(armrelay.PrivateLinkConnectionStatusPending),
	// 		},
	// 		ProvisioningState: to.Ptr(armrelay.EndPointProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*PrivateEndpointConnectionsClient) NewListPager added in v1.0.0

NewListPager - Gets the available PrivateEndpointConnections within a namespace.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/PrivateEndpointConnections/PrivateEndpointConnectionsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListPager("myResourceGroup", "example-RelayNamespace-5849", 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.PrivateEndpointConnectionListResult = armrelay.PrivateEndpointConnectionListResult{
		// 	Value: []*armrelay.PrivateEndpointConnection{
		// 		{
		// 			Name: to.Ptr("{privateEndpointConnection name}"),
		// 			Type: to.Ptr("Microsoft.Relay/Namespaces/PrivateEndpointConnections"),
		// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/alitest/providers/Microsoft.Relay/namespaces/relay-private-endpoint-test/privateEndpointConnections/{privateEndpointConnection name}"),
		// 			Location: to.Ptr("South Central US"),
		// 			Properties: &armrelay.PrivateEndpointConnectionProperties{
		// 				PrivateEndpoint: &armrelay.PrivateEndpoint{
		// 					ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Network/privateEndpoints/ali-relay-pve-1"),
		// 				},
		// 				PrivateLinkServiceConnectionState: &armrelay.ConnectionState{
		// 					Description: to.Ptr("approve please"),
		// 					Status: to.Ptr(armrelay.PrivateLinkConnectionStatusPending),
		// 				},
		// 				ProvisioningState: to.Ptr(armrelay.EndPointProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

type PrivateEndpointConnectionsClientBeginDeleteOptions added in v1.0.0

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

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

type PrivateEndpointConnectionsClientCreateOrUpdateOptions added in v1.0.0

type PrivateEndpointConnectionsClientCreateOrUpdateOptions struct {
}

PrivateEndpointConnectionsClientCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.CreateOrUpdate method.

type PrivateEndpointConnectionsClientCreateOrUpdateResponse added in v1.0.0

type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct {
	// Properties of the PrivateEndpointConnection.
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.CreateOrUpdate.

type PrivateEndpointConnectionsClientDeleteResponse added in v1.0.0

type PrivateEndpointConnectionsClientDeleteResponse struct {
}

PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete.

type PrivateEndpointConnectionsClientGetOptions added in v1.0.0

type PrivateEndpointConnectionsClientGetOptions struct {
}

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

type PrivateEndpointConnectionsClientGetResponse added in v1.0.0

type PrivateEndpointConnectionsClientGetResponse struct {
	// Properties of the PrivateEndpointConnection.
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.

type PrivateEndpointConnectionsClientListOptions added in v1.0.0

type PrivateEndpointConnectionsClientListOptions struct {
}

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

type PrivateEndpointConnectionsClientListResponse added in v1.0.0

type PrivateEndpointConnectionsClientListResponse struct {
	// Result of the list of all private endpoint connections operation.
	PrivateEndpointConnectionListResult
}

PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.NewListPager.

type PrivateLinkConnectionStatus added in v1.0.0

type PrivateLinkConnectionStatus string

PrivateLinkConnectionStatus - Status of the connection.

const (
	PrivateLinkConnectionStatusApproved     PrivateLinkConnectionStatus = "Approved"
	PrivateLinkConnectionStatusDisconnected PrivateLinkConnectionStatus = "Disconnected"
	PrivateLinkConnectionStatusPending      PrivateLinkConnectionStatus = "Pending"
	PrivateLinkConnectionStatusRejected     PrivateLinkConnectionStatus = "Rejected"
)

func PossiblePrivateLinkConnectionStatusValues added in v1.0.0

func PossiblePrivateLinkConnectionStatusValues() []PrivateLinkConnectionStatus

PossiblePrivateLinkConnectionStatusValues returns the possible values for the PrivateLinkConnectionStatus const type.

type PrivateLinkResource added in v1.0.0

type PrivateLinkResource struct {
	// Fully qualified identifier of the resource.
	ID *string

	// Name of the resource
	Name *string

	// Properties of the private link resource.
	Properties *PrivateLinkResourceProperties

	// Type of the resource
	Type *string
}

PrivateLinkResource - Information of the private link resource.

func (PrivateLinkResource) MarshalJSON added in v1.1.0

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 PrivateLinkResourceProperties added in v1.0.0

type PrivateLinkResourceProperties struct {
	// The private link resource group id.
	GroupID *string

	// The private link resource required member names.
	RequiredMembers []*string

	// The private link resource Private link DNS zone name.
	RequiredZoneNames []*string
}

PrivateLinkResourceProperties - Properties of PrivateLinkResource

func (PrivateLinkResourceProperties) MarshalJSON added in v1.1.0

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

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

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

func NewPrivateLinkResourcesClient added in v1.0.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 - Subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PrivateLinkResourcesClient) Get added in v1.0.0

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

Get - Gets a description for the specified Private Endpoint Connection name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • privateLinkResourceName - The PrivateLinkResource name
  • options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/PrivateEndpointConnections/PrivateLinkResourcesGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateLinkResourcesClient().Get(ctx, "resourcegroup", "example-RelayNamespace-5849", "{PrivateLinkResource name}", 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.PrivateLinkResource = armrelay.PrivateLinkResource{
	// 	Name: to.Ptr("namespace"),
	// 	Type: to.Ptr("Microsoft.Relay/namespaces/privateLinkResources"),
	// 	ID: to.Ptr("subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/alitest/providers/Microsoft.Relay/namespaces/relay-private-endpoint-test/privateLinkResources/namespace"),
	// 	Properties: &armrelay.PrivateLinkResourceProperties{
	// 		GroupID: to.Ptr("namespace"),
	// 		RequiredMembers: []*string{
	// 			to.Ptr("namespace")},
	// 			RequiredZoneNames: []*string{
	// 				to.Ptr("privatelink.servicebus.windows.net")},
	// 			},
	// 		}
}
Output:

func (*PrivateLinkResourcesClient) List added in v1.0.0

List - Gets lists of resources that supports Privatelinks. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/PrivateEndpointConnections/PrivateLinkResourcesList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateLinkResourcesClient().List(ctx, "resourcegroup", "example-RelayNamespace-5849", 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.PrivateLinkResourcesListResult = armrelay.PrivateLinkResourcesListResult{
	// 	Value: []*armrelay.PrivateLinkResource{
	// 		{
	// 			Name: to.Ptr("namespace"),
	// 			Type: to.Ptr("Microsoft.Relay/namespaces/privateLinkResources"),
	// 			ID: to.Ptr("subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/alitest/providers/Microsoft.Relay/namespaces/relay-private-endpoint-test/privateLinkResources/namespace"),
	// 			Properties: &armrelay.PrivateLinkResourceProperties{
	// 				GroupID: to.Ptr("namespace"),
	// 				RequiredMembers: []*string{
	// 					to.Ptr("namespace")},
	// 					RequiredZoneNames: []*string{
	// 						to.Ptr("privatelink.servicebus.windows.net")},
	// 					},
	// 			}},
	// 		}
}
Output:

type PrivateLinkResourcesClientGetOptions added in v1.0.0

type PrivateLinkResourcesClientGetOptions struct {
}

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

type PrivateLinkResourcesClientGetResponse added in v1.0.0

type PrivateLinkResourcesClientGetResponse struct {
	// Information of the private link resource.
	PrivateLinkResource
}

PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get.

type PrivateLinkResourcesClientListOptions added in v1.0.0

type PrivateLinkResourcesClientListOptions struct {
}

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

type PrivateLinkResourcesClientListResponse added in v1.0.0

type PrivateLinkResourcesClientListResponse struct {
	// Result of the List private link resources operation.
	PrivateLinkResourcesListResult
}

PrivateLinkResourcesClientListResponse contains the response from method PrivateLinkResourcesClient.List.

type PrivateLinkResourcesListResult added in v1.0.0

type PrivateLinkResourcesListResult struct {
	// A link for the next page of private link resources.
	NextLink *string

	// A collection of private link resources
	Value []*PrivateLinkResource
}

PrivateLinkResourcesListResult - Result of the List private link resources operation.

func (PrivateLinkResourcesListResult) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourcesListResult.

func (*PrivateLinkResourcesListResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourcesListResult.

type ProxyResource added in v1.0.0

type ProxyResource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The geo-location where the resource lives
	Location *string

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

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string
}

ProxyResource - Common fields that are returned in the response for all Azure Resource Manager resources

func (ProxyResource) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.

type PublicNetworkAccess added in v1.0.0

type PublicNetworkAccess string

PublicNetworkAccess - This determines if traffic is allowed over public network. By default it is enabled.

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

func PossiblePublicNetworkAccessValues added in v1.0.0

func PossiblePublicNetworkAccessValues() []PublicNetworkAccess

PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type.

type RegenerateAccessKeyParameters

type RegenerateAccessKeyParameters struct {
	// REQUIRED; The access key to regenerate.
	KeyType *KeyType

	// Optional. If the key value is provided, this is set to key type, or autogenerated key value set for key type.
	Key *string
}

RegenerateAccessKeyParameters - Parameters supplied to the regenerate authorization rule operation, specifies which key needs to be reset.

func (RegenerateAccessKeyParameters) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type RegenerateAccessKeyParameters.

func (*RegenerateAccessKeyParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type RegenerateAccessKeyParameters.

type Relaytype

type Relaytype string

Relaytype - WCF relay type.

const (
	RelaytypeHTTP   Relaytype = "Http"
	RelaytypeNetTCP Relaytype = "NetTcp"
)

func PossibleRelaytypeValues

func PossibleRelaytypeValues() []Relaytype

PossibleRelaytypeValues returns the possible values for the Relaytype const type.

type Resource

type Resource struct {
	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

Resource - The resource definition.

func (Resource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type ResourceNamespacePatch

type ResourceNamespacePatch struct {
	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

ResourceNamespacePatch - Definition of resource.

func (ResourceNamespacePatch) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceNamespacePatch.

func (*ResourceNamespacePatch) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceNamespacePatch.

type SKU

type SKU struct {
	// REQUIRED; Name of this SKU.
	Name *SKUName

	// The tier of this SKU.
	Tier *SKUTier
}

SKU of the namespace.

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 SKUName added in v1.0.0

type SKUName string

SKUName - Name of this SKU.

const (
	SKUNameStandard SKUName = "Standard"
)

func PossibleSKUNameValues added in v1.0.0

func PossibleSKUNameValues() []SKUName

PossibleSKUNameValues returns the possible values for the SKUName const type.

type SKUTier added in v1.0.0

type SKUTier string

SKUTier - The tier of this SKU.

const (
	SKUTierStandard SKUTier = "Standard"
)

func PossibleSKUTierValues added in v1.0.0

func PossibleSKUTierValues() []SKUTier

PossibleSKUTierValues returns the possible values for the SKUTier const type.

type SystemData added in v1.0.0

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

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

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

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

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

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

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

func (SystemData) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TrackedResource

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

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

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

TrackedResource - Definition of resource.

func (TrackedResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

func (*TrackedResource) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.

type UnavailableReason

type UnavailableReason string

UnavailableReason - Specifies the reason for the unavailability of the service.

const (
	UnavailableReasonInvalidName                           UnavailableReason = "InvalidName"
	UnavailableReasonNameInLockdown                        UnavailableReason = "NameInLockdown"
	UnavailableReasonNameInUse                             UnavailableReason = "NameInUse"
	UnavailableReasonNone                                  UnavailableReason = "None"
	UnavailableReasonSubscriptionIsDisabled                UnavailableReason = "SubscriptionIsDisabled"
	UnavailableReasonTooManyNamespaceInCurrentSubscription UnavailableReason = "TooManyNamespaceInCurrentSubscription"
)

func PossibleUnavailableReasonValues

func PossibleUnavailableReasonValues() []UnavailableReason

PossibleUnavailableReasonValues returns the possible values for the UnavailableReason const type.

type UpdateParameters added in v0.3.0

type UpdateParameters struct {
	// Description of Relay namespace.
	Properties *NamespaceProperties

	// SKU of the namespace.
	SKU *SKU

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

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

UpdateParameters - Description of a namespace resource.

func (UpdateParameters) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type UpdateParameters.

func (*UpdateParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type UpdateParameters.

type WCFRelaysClient

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

WCFRelaysClient contains the methods for the WCFRelays group. Don't use this type directly, use NewWCFRelaysClient() instead.

func NewWCFRelaysClient

func NewWCFRelaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WCFRelaysClient, error)

NewWCFRelaysClient creates a new instance of WCFRelaysClient with the specified values.

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

func (*WCFRelaysClient) CreateOrUpdate

func (client *WCFRelaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, relayName string, parameters WcfRelay, options *WCFRelaysClientCreateOrUpdateOptions) (WCFRelaysClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates a WCF relay. This operation is idempotent. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • relayName - The relay name.
  • parameters - Parameters supplied to create a WCF relay.
  • options - WCFRelaysClientCreateOrUpdateOptions contains the optional parameters for the WCFRelaysClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/Relay/RelayCreate.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/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWCFRelaysClient().CreateOrUpdate(ctx, "resourcegroup", "example-RelayNamespace-9953", "example-Relay-Wcf-1194", armrelay.WcfRelay{
		Properties: &armrelay.WcfRelayProperties{
			RelayType:                   to.Ptr(armrelay.RelaytypeNetTCP),
			RequiresClientAuthorization: to.Ptr(true),
			RequiresTransportSecurity:   to.Ptr(true),
		},
	}, 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.WcfRelay = armrelay.WcfRelay{
	// 	Name: to.Ptr("example-Relay-Wcf-1194"),
	// 	Type: to.Ptr("Microsoft.Relay/WcfRelays"),
	// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-9953/WcfRelays/example-Relay-Wcf-1194"),
	// 	Properties: &armrelay.WcfRelayProperties{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-16T00:26:17.501Z"); return t}()),
	// 		IsDynamic: to.Ptr(false),
	// 		RelayType: to.Ptr(armrelay.RelaytypeNetTCP),
	// 		RequiresClientAuthorization: to.Ptr(true),
	// 		RequiresTransportSecurity: to.Ptr(true),
	// 		UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-16T00:26:17.501Z"); return t}()),
	// 	},
	// }
}
Output:

func (*WCFRelaysClient) CreateOrUpdateAuthorizationRule

func (client *WCFRelaysClient) CreateOrUpdateAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string, parameters AuthorizationRule, options *WCFRelaysClientCreateOrUpdateAuthorizationRuleOptions) (WCFRelaysClientCreateOrUpdateAuthorizationRuleResponse, error)

CreateOrUpdateAuthorizationRule - Creates or updates an authorization rule for a WCF relay. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • relayName - The relay name.
  • authorizationRuleName - The authorization rule name.
  • parameters - The authorization rule parameters.
  • options - WCFRelaysClientCreateOrUpdateAuthorizationRuleOptions contains the optional parameters for the WCFRelaysClient.CreateOrUpdateAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/Relay/RelayAuthorizationRuleCreate.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/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWCFRelaysClient().CreateOrUpdateAuthorizationRule(ctx, "resourcegroup", "example-RelayNamespace-01", "example-Relay-wcf-01", "example-RelayAuthRules-01", armrelay.AuthorizationRule{
		Properties: &armrelay.AuthorizationRuleProperties{
			Rights: []*armrelay.AccessRights{
				to.Ptr(armrelay.AccessRightsListen),
				to.Ptr(armrelay.AccessRightsSend)},
		},
	}, 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.AuthorizationRule = armrelay.AuthorizationRule{
	// 	Name: to.Ptr("example-RelayAuthRules-01"),
	// 	Type: to.Ptr("Microsoft.Relay/Namespaces/WcfRelay/AuthorizationRules"),
	// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-01/WcfRelays/example-Relay-Wcf-01/AuthorizationRules/example-RelayAuthRules-01"),
	// 	Properties: &armrelay.AuthorizationRuleProperties{
	// 		Rights: []*armrelay.AccessRights{
	// 			to.Ptr(armrelay.AccessRightsListen),
	// 			to.Ptr(armrelay.AccessRightsSend)},
	// 		},
	// 	}
}
Output:

func (*WCFRelaysClient) Delete

func (client *WCFRelaysClient) Delete(ctx context.Context, resourceGroupName string, namespaceName string, relayName string, options *WCFRelaysClientDeleteOptions) (WCFRelaysClientDeleteResponse, error)

Delete - Deletes a WCF relay. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • relayName - The relay name.
  • options - WCFRelaysClientDeleteOptions contains the optional parameters for the WCFRelaysClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/Relay/RelayDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewWCFRelaysClient().Delete(ctx, "resourcegroup", "example-RelayNamespace-01", "example-Relay-wcf-01", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*WCFRelaysClient) DeleteAuthorizationRule

func (client *WCFRelaysClient) DeleteAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string, options *WCFRelaysClientDeleteAuthorizationRuleOptions) (WCFRelaysClientDeleteAuthorizationRuleResponse, error)

DeleteAuthorizationRule - Deletes a WCF relay authorization rule. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • relayName - The relay name.
  • authorizationRuleName - The authorization rule name.
  • options - WCFRelaysClientDeleteAuthorizationRuleOptions contains the optional parameters for the WCFRelaysClient.DeleteAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/Relay/RelayAuthorizationRuleDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewWCFRelaysClient().DeleteAuthorizationRule(ctx, "resourcegroup", "example-RelayNamespace-01", "example-Relay-wcf-01", "example-RelayAuthRules-01", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*WCFRelaysClient) Get

func (client *WCFRelaysClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, relayName string, options *WCFRelaysClientGetOptions) (WCFRelaysClientGetResponse, error)

Get - Returns the description for the specified WCF relay. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • relayName - The relay name.
  • options - WCFRelaysClientGetOptions contains the optional parameters for the WCFRelaysClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/Relay/RelayGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWCFRelaysClient().Get(ctx, "resourcegroup", "example-RelayNamespace-9953", "example-Relay-Wcf-1194", 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.WcfRelay = armrelay.WcfRelay{
	// 	Name: to.Ptr("example-Relay-Wcf-1194"),
	// 	Type: to.Ptr("Microsoft.Relay/WcfRelays"),
	// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/example-RelayNamespace-9953/WcfRelays/example-Relay-Wcf-1194"),
	// 	Properties: &armrelay.WcfRelayProperties{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-16T00:26:17.501Z"); return t}()),
	// 		IsDynamic: to.Ptr(false),
	// 		ListenerCount: to.Ptr[int32](0),
	// 		RelayType: to.Ptr(armrelay.RelaytypeNetTCP),
	// 		RequiresClientAuthorization: to.Ptr(true),
	// 		RequiresTransportSecurity: to.Ptr(true),
	// 		UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-16T00:26:17.501Z"); return t}()),
	// 	},
	// }
}
Output:

func (*WCFRelaysClient) GetAuthorizationRule

func (client *WCFRelaysClient) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string, options *WCFRelaysClientGetAuthorizationRuleOptions) (WCFRelaysClientGetAuthorizationRuleResponse, error)

GetAuthorizationRule - Get authorizationRule for a WCF relay by name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • relayName - The relay name.
  • authorizationRuleName - The authorization rule name.
  • options - WCFRelaysClientGetAuthorizationRuleOptions contains the optional parameters for the WCFRelaysClient.GetAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/Relay/RelayAuthorizationRuleGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWCFRelaysClient().GetAuthorizationRule(ctx, "resourcegroup", "example-RelayNamespace-01", "example-Relay-wcf-01", "example-RelayAuthRules-01", 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.AuthorizationRule = armrelay.AuthorizationRule{
	// 	Name: to.Ptr("example-RelayAuthRules-01"),
	// 	Type: to.Ptr("Microsoft.Relay/Namespaces/WcfRelay/AuthorizationRules"),
	// 	ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-01/WcfRelays/example-Relay-Wcf-01/AuthorizationRules/example-RelayAuthRules-01"),
	// 	Properties: &armrelay.AuthorizationRuleProperties{
	// 		Rights: []*armrelay.AccessRights{
	// 			to.Ptr(armrelay.AccessRightsListen)},
	// 		},
	// 	}
}
Output:

func (*WCFRelaysClient) ListKeys

func (client *WCFRelaysClient) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string, options *WCFRelaysClientListKeysOptions) (WCFRelaysClientListKeysResponse, error)

ListKeys - Primary and secondary connection strings to the WCF relay. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • relayName - The relay name.
  • authorizationRuleName - The authorization rule name.
  • options - WCFRelaysClientListKeysOptions contains the optional parameters for the WCFRelaysClient.ListKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/Relay/RelayAuthorizationRuleListKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWCFRelaysClient().ListKeys(ctx, "resourcegroup", "example-RelayNamespace-01", "example-Relay-wcf-01", "example-RelayAuthRules-01", 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.AccessKeys = armrelay.AccessKeys{
	// 	KeyName: to.Ptr("example-RelayAuthRules-01"),
	// 	PrimaryConnectionString: to.Ptr("Endpoint=sb://example-Relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=example-RelayAuthRules-01;SharedAccessKey=############################################"),
	// 	PrimaryKey: to.Ptr("############################################"),
	// 	SecondaryConnectionString: to.Ptr("Endpoint=sb://example-Relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=example-RelayAuthRules-01;SharedAccessKey=############################################"),
	// 	SecondaryKey: to.Ptr("############################################"),
	// }
}
Output:

func (*WCFRelaysClient) NewListAuthorizationRulesPager added in v0.5.0

func (client *WCFRelaysClient) NewListAuthorizationRulesPager(resourceGroupName string, namespaceName string, relayName string, options *WCFRelaysClientListAuthorizationRulesOptions) *runtime.Pager[WCFRelaysClientListAuthorizationRulesResponse]

NewListAuthorizationRulesPager - Authorization rules for a WCF relay.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • relayName - The relay name.
  • options - WCFRelaysClientListAuthorizationRulesOptions contains the optional parameters for the WCFRelaysClient.NewListAuthorizationRulesPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/Relay/RelayAuthorizationRuleListAll.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWCFRelaysClient().NewListAuthorizationRulesPager("resourcegroup", "example-RelayNamespace-01", "example-Relay-Wcf-01", 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.AuthorizationRuleListResult = armrelay.AuthorizationRuleListResult{
		// 	Value: []*armrelay.AuthorizationRule{
		// 		{
		// 			Name: to.Ptr("example-RelayAuthRules-01"),
		// 			Type: to.Ptr("Microsoft.Relay/Namespaces/WcfRelay/AuthorizationRules"),
		// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-01/WcfRelays/example-Relay-Wcf-01/AuthorizationRules/example-RelayAuthRules-01"),
		// 			Properties: &armrelay.AuthorizationRuleProperties{
		// 				Rights: []*armrelay.AccessRights{
		// 					to.Ptr(armrelay.AccessRightsListen),
		// 					to.Ptr(armrelay.AccessRightsSend)},
		// 				},
		// 		}},
		// 	}
	}
}
Output:

func (*WCFRelaysClient) NewListByNamespacePager added in v0.5.0

func (client *WCFRelaysClient) NewListByNamespacePager(resourceGroupName string, namespaceName string, options *WCFRelaysClientListByNamespaceOptions) *runtime.Pager[WCFRelaysClientListByNamespaceResponse]

NewListByNamespacePager - Lists the WCF relays within the namespace.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • options - WCFRelaysClientListByNamespaceOptions contains the optional parameters for the WCFRelaysClient.NewListByNamespacePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/Relay/RelayListAll.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWCFRelaysClient().NewListByNamespacePager("resourcegroup", "example-RelayNamespace-01", 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.WcfRelaysListResult = armrelay.WcfRelaysListResult{
		// 	Value: []*armrelay.WcfRelay{
		// 		{
		// 			Name: to.Ptr("example-Relay-Wcf-01"),
		// 			Type: to.Ptr("Microsoft.Relay/Namespaces/WcfRelays"),
		// 			ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/RG1-eg/providers/Microsoft.Relay/namespaces/example-RelayNamespace-01/WcfRelays/example-Relay-Wcf-01"),
		// 			Properties: &armrelay.WcfRelayProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-24T00:46:27.004Z"); return t}()),
		// 				IsDynamic: to.Ptr(false),
		// 				RelayType: to.Ptr(armrelay.RelaytypeNetTCP),
		// 				RequiresClientAuthorization: to.Ptr(true),
		// 				RequiresTransportSecurity: to.Ptr(true),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-24T00:46:27.004Z"); return t}()),
		// 				UserMetadata: to.Ptr("usermetadata is a placeholder to store user-defined string data for the HybridConnection endpoint.e.g. it can be used to store  descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*WCFRelaysClient) RegenerateKeys

func (client *WCFRelaysClient) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters, options *WCFRelaysClientRegenerateKeysOptions) (WCFRelaysClientRegenerateKeysResponse, error)

RegenerateKeys - Regenerates the primary or secondary connection strings to the WCF relay. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • namespaceName - The namespace name
  • relayName - The relay name.
  • authorizationRuleName - The authorization rule name.
  • parameters - Parameters supplied to regenerate authorization rule.
  • options - WCFRelaysClientRegenerateKeysOptions contains the optional parameters for the WCFRelaysClient.RegenerateKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/relay/resource-manager/Microsoft.Relay/stable/2021-11-01/examples/Relay/RelayAuthorizationRuleRegenerateKey.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/relay/armrelay"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWCFRelaysClient().RegenerateKeys(ctx, "resourcegroup", "example-RelayNamespace-01", "example-Relay-wcf-01", "example-RelayAuthRules-01", armrelay.RegenerateAccessKeyParameters{
		KeyType: to.Ptr(armrelay.KeyTypePrimaryKey),
	}, 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.AccessKeys = armrelay.AccessKeys{
	// 	KeyName: to.Ptr("example-RelayAuthRules-01"),
	// 	PrimaryConnectionString: to.Ptr("Endpoint=sb://example-Relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=example-RelayAuthRules-01;SharedAccessKey=############################################"),
	// 	PrimaryKey: to.Ptr("############################################"),
	// 	SecondaryConnectionString: to.Ptr("Endpoint=sb://example-Relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=example-RelayAuthRules-01;SharedAccessKey=############################################"),
	// 	SecondaryKey: to.Ptr("############################################"),
	// }
}
Output:

type WCFRelaysClientCreateOrUpdateAuthorizationRuleOptions added in v0.3.0

type WCFRelaysClientCreateOrUpdateAuthorizationRuleOptions struct {
}

WCFRelaysClientCreateOrUpdateAuthorizationRuleOptions contains the optional parameters for the WCFRelaysClient.CreateOrUpdateAuthorizationRule method.

type WCFRelaysClientCreateOrUpdateAuthorizationRuleResponse added in v0.3.0

type WCFRelaysClientCreateOrUpdateAuthorizationRuleResponse struct {
	// Single item in a List or Get AuthorizationRule operation
	AuthorizationRule
}

WCFRelaysClientCreateOrUpdateAuthorizationRuleResponse contains the response from method WCFRelaysClient.CreateOrUpdateAuthorizationRule.

type WCFRelaysClientCreateOrUpdateOptions added in v0.3.0

type WCFRelaysClientCreateOrUpdateOptions struct {
}

WCFRelaysClientCreateOrUpdateOptions contains the optional parameters for the WCFRelaysClient.CreateOrUpdate method.

type WCFRelaysClientCreateOrUpdateResponse added in v0.3.0

type WCFRelaysClientCreateOrUpdateResponse struct {
	// Description of the WCF relay resource.
	WcfRelay
}

WCFRelaysClientCreateOrUpdateResponse contains the response from method WCFRelaysClient.CreateOrUpdate.

type WCFRelaysClientDeleteAuthorizationRuleOptions added in v0.3.0

type WCFRelaysClientDeleteAuthorizationRuleOptions struct {
}

WCFRelaysClientDeleteAuthorizationRuleOptions contains the optional parameters for the WCFRelaysClient.DeleteAuthorizationRule method.

type WCFRelaysClientDeleteAuthorizationRuleResponse added in v0.3.0

type WCFRelaysClientDeleteAuthorizationRuleResponse struct {
}

WCFRelaysClientDeleteAuthorizationRuleResponse contains the response from method WCFRelaysClient.DeleteAuthorizationRule.

type WCFRelaysClientDeleteOptions added in v0.3.0

type WCFRelaysClientDeleteOptions struct {
}

WCFRelaysClientDeleteOptions contains the optional parameters for the WCFRelaysClient.Delete method.

type WCFRelaysClientDeleteResponse added in v0.3.0

type WCFRelaysClientDeleteResponse struct {
}

WCFRelaysClientDeleteResponse contains the response from method WCFRelaysClient.Delete.

type WCFRelaysClientGetAuthorizationRuleOptions added in v0.3.0

type WCFRelaysClientGetAuthorizationRuleOptions struct {
}

WCFRelaysClientGetAuthorizationRuleOptions contains the optional parameters for the WCFRelaysClient.GetAuthorizationRule method.

type WCFRelaysClientGetAuthorizationRuleResponse added in v0.3.0

type WCFRelaysClientGetAuthorizationRuleResponse struct {
	// Single item in a List or Get AuthorizationRule operation
	AuthorizationRule
}

WCFRelaysClientGetAuthorizationRuleResponse contains the response from method WCFRelaysClient.GetAuthorizationRule.

type WCFRelaysClientGetOptions added in v0.3.0

type WCFRelaysClientGetOptions struct {
}

WCFRelaysClientGetOptions contains the optional parameters for the WCFRelaysClient.Get method.

type WCFRelaysClientGetResponse added in v0.3.0

type WCFRelaysClientGetResponse struct {
	// Description of the WCF relay resource.
	WcfRelay
}

WCFRelaysClientGetResponse contains the response from method WCFRelaysClient.Get.

type WCFRelaysClientListAuthorizationRulesOptions added in v0.3.0

type WCFRelaysClientListAuthorizationRulesOptions struct {
}

WCFRelaysClientListAuthorizationRulesOptions contains the optional parameters for the WCFRelaysClient.NewListAuthorizationRulesPager method.

type WCFRelaysClientListAuthorizationRulesResponse added in v0.3.0

type WCFRelaysClientListAuthorizationRulesResponse struct {
	// The response from the list namespace operation.
	AuthorizationRuleListResult
}

WCFRelaysClientListAuthorizationRulesResponse contains the response from method WCFRelaysClient.NewListAuthorizationRulesPager.

type WCFRelaysClientListByNamespaceOptions added in v0.3.0

type WCFRelaysClientListByNamespaceOptions struct {
}

WCFRelaysClientListByNamespaceOptions contains the optional parameters for the WCFRelaysClient.NewListByNamespacePager method.

type WCFRelaysClientListByNamespaceResponse added in v0.3.0

type WCFRelaysClientListByNamespaceResponse struct {
	// The response of the list WCF relay operation.
	WcfRelaysListResult
}

WCFRelaysClientListByNamespaceResponse contains the response from method WCFRelaysClient.NewListByNamespacePager.

type WCFRelaysClientListKeysOptions added in v0.3.0

type WCFRelaysClientListKeysOptions struct {
}

WCFRelaysClientListKeysOptions contains the optional parameters for the WCFRelaysClient.ListKeys method.

type WCFRelaysClientListKeysResponse added in v0.3.0

type WCFRelaysClientListKeysResponse struct {
	// Namespace/Relay Connection String
	AccessKeys
}

WCFRelaysClientListKeysResponse contains the response from method WCFRelaysClient.ListKeys.

type WCFRelaysClientRegenerateKeysOptions added in v0.3.0

type WCFRelaysClientRegenerateKeysOptions struct {
}

WCFRelaysClientRegenerateKeysOptions contains the optional parameters for the WCFRelaysClient.RegenerateKeys method.

type WCFRelaysClientRegenerateKeysResponse added in v0.3.0

type WCFRelaysClientRegenerateKeysResponse struct {
	// Namespace/Relay Connection String
	AccessKeys
}

WCFRelaysClientRegenerateKeysResponse contains the response from method WCFRelaysClient.RegenerateKeys.

type WcfRelay

type WcfRelay struct {
	// Properties of the WCF relay.
	Properties *WcfRelayProperties

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

	// READ-ONLY; The geo-location where the resource lives
	Location *string

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

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string
}

WcfRelay - Description of the WCF relay resource.

func (WcfRelay) MarshalJSON

func (w WcfRelay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WcfRelay.

func (*WcfRelay) UnmarshalJSON added in v1.1.0

func (w *WcfRelay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WcfRelay.

type WcfRelayProperties

type WcfRelayProperties struct {
	// WCF relay type.
	RelayType *Relaytype

	// Returns true if client authorization is needed for this relay; otherwise, false.
	RequiresClientAuthorization *bool

	// Returns true if transport security is needed for this relay; otherwise, false.
	RequiresTransportSecurity *bool

	// The usermetadata is a placeholder to store user-defined string data for the WCF Relay endpoint. For example, it can be
	// used to store descriptive data, such as list of teams and their contact
	// information. Also, user-defined configuration settings can be stored.
	UserMetadata *string

	// READ-ONLY; The time the WCF relay was created.
	CreatedAt *time.Time

	// READ-ONLY; Returns true if the relay is dynamic; otherwise, false.
	IsDynamic *bool

	// READ-ONLY; The number of listeners for this relay. Note that min :1 and max:25 are supported.
	ListenerCount *int32

	// READ-ONLY; The time the namespace was updated.
	UpdatedAt *time.Time
}

WcfRelayProperties - Properties of the WCF relay.

func (WcfRelayProperties) MarshalJSON

func (w WcfRelayProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WcfRelayProperties.

func (*WcfRelayProperties) UnmarshalJSON

func (w *WcfRelayProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WcfRelayProperties.

type WcfRelaysListResult

type WcfRelaysListResult struct {
	// Link to the next set of results. Not empty if value contains incomplete list of WCF relays.
	NextLink *string

	// Result of the list WCF relay operation.
	Value []*WcfRelay
}

WcfRelaysListResult - The response of the list WCF relay operation.

func (WcfRelaysListResult) MarshalJSON

func (w WcfRelaysListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WcfRelaysListResult.

func (*WcfRelaysListResult) UnmarshalJSON added in v1.1.0

func (w *WcfRelaysListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WcfRelaysListResult.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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