armhybridconnectivity

package module
v1.1.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: 13 Imported by: 4

README

Azure Arc Connectivity Module for Go

PkgGoDev

The armhybridconnectivity module provides operations for working with Azure Arc Connectivity.

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 Arc Connectivity module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridconnectivity/armhybridconnectivity

Authorization

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

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 Arc Connectivity 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 AADProfileProperties added in v0.5.0

type AADProfileProperties struct {
	// REQUIRED; The arc ingress gateway server app id.
	ServerID *string

	// REQUIRED; The target resource home tenant id.
	TenantID *string
}

AADProfileProperties - The AAD Profile

func (AADProfileProperties) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type AADProfileProperties.

func (*AADProfileProperties) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AADProfileProperties.

type ActionType

type ActionType string

ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.

const (
	ActionTypeInternal ActionType = "Internal"
)

func PossibleActionTypeValues

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type ClientFactory added in v0.6.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 v0.6.0

func NewClientFactory(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.

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

func (*ClientFactory) NewEndpointsClient added in v0.6.0

func (c *ClientFactory) NewEndpointsClient() *EndpointsClient

NewEndpointsClient creates a new instance of EndpointsClient.

func (*ClientFactory) NewOperationsClient added in v0.6.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewServiceConfigurationsClient added in v1.0.0

func (c *ClientFactory) NewServiceConfigurationsClient() *ServiceConfigurationsClient

NewServiceConfigurationsClient creates a new instance of ServiceConfigurationsClient.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

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

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type EndpointAccessResource

type EndpointAccessResource struct {
	// Azure relay hybrid connection access properties
	Relay *RelayNamespaceAccessProperties
}

EndpointAccessResource - The endpoint access for the target resource.

func (EndpointAccessResource) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type EndpointAccessResource.

func (*EndpointAccessResource) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EndpointAccessResource.

type EndpointProperties

type EndpointProperties struct {
	// REQUIRED; The type of endpoint.
	Type *Type

	// The resource Id of the connectivity endpoint (optional).
	ResourceID *string

	// READ-ONLY; The resource provisioning state.
	ProvisioningState *string
}

EndpointProperties - Endpoint details

func (EndpointProperties) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type EndpointProperties.

func (*EndpointProperties) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EndpointProperties.

type EndpointResource

type EndpointResource struct {
	// The endpoint properties.
	Properties *EndpointProperties

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

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

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

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

EndpointResource - The endpoint for the target resource.

func (EndpointResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EndpointResource.

func (*EndpointResource) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EndpointResource.

type EndpointsClient

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

EndpointsClient contains the methods for the Endpoints group. Don't use this type directly, use NewEndpointsClient() instead.

func NewEndpointsClient

func NewEndpointsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*EndpointsClient, error)

NewEndpointsClient creates a new instance of EndpointsClient with the specified values.

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

func (*EndpointsClient) CreateOrUpdate

func (client *EndpointsClient) CreateOrUpdate(ctx context.Context, resourceURI string, endpointName string, endpointResource EndpointResource, options *EndpointsClientCreateOrUpdateOptions) (EndpointsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create or update the endpoint to the target resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-15

  • resourceURI - The fully qualified Azure Resource manager identifier of the resource to be connected.
  • endpointName - The endpoint name.
  • endpointResource - Endpoint details
  • options - EndpointsClientCreateOrUpdateOptions contains the optional parameters for the EndpointsClient.CreateOrUpdate method.
Example (HybridConnectivityEndpointsPutCustom)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsPutCustom.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/hybridconnectivity/armhybridconnectivity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridconnectivity.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEndpointsClient().CreateOrUpdate(ctx, "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine", "custom", armhybridconnectivity.EndpointResource{
		Properties: &armhybridconnectivity.EndpointProperties{
			Type:       to.Ptr(armhybridconnectivity.TypeCustom),
			ResourceID: to.Ptr("/subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.Relay/namespaces/custom-relay-namespace"),
		},
	}, 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.EndpointResource = armhybridconnectivity.EndpointResource{
	// 	Name: to.Ptr("custom"),
	// 	Type: to.Ptr("Microsoft.HybridConnectivity/endpoints"),
	// 	ID: to.Ptr("/subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/custom"),
	// 	Properties: &armhybridconnectivity.EndpointProperties{
	// 		Type: to.Ptr(armhybridconnectivity.TypeCustom),
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		ResourceID: to.Ptr("/subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.Relay/namespaces/custom-relay-namespace"),
	// 	},
	// }
}
Output:

Example (HybridConnectivityEndpointsPutDefault)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsPutDefault.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/hybridconnectivity/armhybridconnectivity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridconnectivity.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEndpointsClient().CreateOrUpdate(ctx, "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine", "default", armhybridconnectivity.EndpointResource{
		Properties: &armhybridconnectivity.EndpointProperties{
			Type: to.Ptr(armhybridconnectivity.TypeDefault),
		},
	}, 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.EndpointResource = armhybridconnectivity.EndpointResource{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.HybridConnectivity/endpoints"),
	// 	ID: to.Ptr("/subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default"),
	// 	Properties: &armhybridconnectivity.EndpointProperties{
	// 		Type: to.Ptr(armhybridconnectivity.TypeDefault),
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 	},
	// }
}
Output:

func (*EndpointsClient) Delete

func (client *EndpointsClient) Delete(ctx context.Context, resourceURI string, endpointName string, options *EndpointsClientDeleteOptions) (EndpointsClientDeleteResponse, error)

Delete - Deletes the endpoint access to the target resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-15

  • resourceURI - The fully qualified Azure Resource manager identifier of the resource to be connected.
  • endpointName - The endpoint name.
  • options - EndpointsClientDeleteOptions contains the optional parameters for the EndpointsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsDeleteDefault.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridconnectivity/armhybridconnectivity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridconnectivity.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewEndpointsClient().Delete(ctx, "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine", "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*EndpointsClient) Get

func (client *EndpointsClient) Get(ctx context.Context, resourceURI string, endpointName string, options *EndpointsClientGetOptions) (EndpointsClientGetResponse, error)

Get - Gets the endpoint to the resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-15

  • resourceURI - The fully qualified Azure Resource manager identifier of the resource to be connected.
  • endpointName - The endpoint name.
  • options - EndpointsClientGetOptions contains the optional parameters for the EndpointsClient.Get method.
Example (HybridConnectivityEndpointsGetCustom)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsGetCustom.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridconnectivity/armhybridconnectivity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridconnectivity.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEndpointsClient().Get(ctx, "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine", "custom", 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.EndpointResource = armhybridconnectivity.EndpointResource{
	// 	Name: to.Ptr("custom"),
	// 	Type: to.Ptr("Microsoft.HybridConnectivity/endpoints"),
	// 	ID: to.Ptr("/subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/custom"),
	// 	Properties: &armhybridconnectivity.EndpointProperties{
	// 		Type: to.Ptr(armhybridconnectivity.TypeCustom),
	// 		ResourceID: to.Ptr("/subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.Relay/namespaces/custom-relay-namespace"),
	// 	},
	// }
}
Output:

Example (HybridConnectivityEndpointsGetDefault)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsGetDefault.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridconnectivity/armhybridconnectivity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridconnectivity.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEndpointsClient().Get(ctx, "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine", "default", 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.EndpointResource = armhybridconnectivity.EndpointResource{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.HybridConnectivity/endpoints"),
	// 	ID: to.Ptr("/subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default"),
	// 	Properties: &armhybridconnectivity.EndpointProperties{
	// 		Type: to.Ptr(armhybridconnectivity.TypeDefault),
	// 	},
	// }
}
Output:

func (*EndpointsClient) ListCredentials

func (client *EndpointsClient) ListCredentials(ctx context.Context, resourceURI string, endpointName string, options *EndpointsClientListCredentialsOptions) (EndpointsClientListCredentialsResponse, error)

ListCredentials - Gets the endpoint access credentials to the resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-15

  • resourceURI - The fully qualified Azure Resource manager identifier of the resource to be connected.
  • endpointName - The endpoint name.
  • options - EndpointsClientListCredentialsOptions contains the optional parameters for the EndpointsClient.ListCredentials method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsPostListCredentials.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/hybridconnectivity/armhybridconnectivity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridconnectivity.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEndpointsClient().ListCredentials(ctx, "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine", "default", &armhybridconnectivity.EndpointsClientListCredentialsOptions{Expiresin: to.Ptr[int64](10800),
		ListCredentialsRequest: &armhybridconnectivity.ListCredentialsRequest{
			ServiceName: to.Ptr(armhybridconnectivity.ServiceNameSSH),
		},
	})
	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.EndpointAccessResource = armhybridconnectivity.EndpointAccessResource{
	// 	Relay: &armhybridconnectivity.RelayNamespaceAccessProperties{
	// 		AccessKey: to.Ptr("SharedAccessSignature sr=http%3A%2F%2Fazgnrelay-eastus-l1.servicebus.windows.net%2Fmicrosoft.kubernetes%2Fconnectedclusters%2Fa0e1fd7d1d974ddf6b11a952d67679c9f12c006eee16861857a8268da4eb1498%2F1619989456957411072%2F&sig=WxDwPF6AmmODaMHNnBGDSm773UG%2B%2Be"),
	// 		ExpiresOn: to.Ptr[int64](1620000256),
	// 		HybridConnectionName: to.Ptr("microsoft.kubernetes/connectedclusters/a0e1fd7d1d974ddf6b11a952d67679c9f12c006eee16861857a8268da4eb1498/1619989456957411072"),
	// 		NamespaceName: to.Ptr("azgnrelay-eastus-l1"),
	// 		NamespaceNameSuffix: to.Ptr("servicebus.windows.net"),
	// 		ServiceConfigurationToken: to.Ptr("SSHvjqH=pTlKql=RtMGw/-k5VFBxSYHIiq5ZgbGFcLkNrDNz5fDsinCN2zkG"),
	// 	},
	// }
}
Output:

func (*EndpointsClient) ListIngressGatewayCredentials added in v1.0.0

ListIngressGatewayCredentials - Gets the ingress gateway endpoint credentials If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-15

  • resourceURI - The fully qualified Azure Resource manager identifier of the resource to be connected.
  • endpointName - The endpoint name.
  • options - EndpointsClientListIngressGatewayCredentialsOptions contains the optional parameters for the EndpointsClient.ListIngressGatewayCredentials method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsPostListIngressGatewayCredentials.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/hybridconnectivity/armhybridconnectivity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridconnectivity.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEndpointsClient().ListIngressGatewayCredentials(ctx, "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/arcGroup/providers/Microsoft.ArcPlaceHolder/ProvisionedClusters/cluster0", "default", &armhybridconnectivity.EndpointsClientListIngressGatewayCredentialsOptions{Expiresin: to.Ptr[int64](10800),
		ListIngressGatewayCredentialsRequest: 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.IngressGatewayResource = armhybridconnectivity.IngressGatewayResource{
	// 	Ingress: &armhybridconnectivity.IngressProfileProperties{
	// 		AADProfile: &armhybridconnectivity.AADProfileProperties{
	// 			ServerID: to.Ptr("6256c85f-0aad-4d50-b960-e6e9b21efe35"),
	// 			TenantID: to.Ptr("hy657tgh-8d16-42db-81b7-1234hygt67hy5"),
	// 		},
	// 		Hostname: to.Ptr("clusterhostname"),
	// 	},
	// 	Relay: &armhybridconnectivity.RelayNamespaceAccessProperties{
	// 		AccessKey: to.Ptr("SharedAccessSignature sr=http%3A%2F%2Fazgnrelay-eastus-l1.servicebus.windows.net%2Fmicrosoft.provisionedcluster%hci"),
	// 		ExpiresOn: to.Ptr[int64](1620000256),
	// 		HybridConnectionName: to.Ptr("microsoft.arcplaceholder/provisionedclusters/000/1619989456957411072"),
	// 		NamespaceName: to.Ptr("relaynamespace"),
	// 		NamespaceNameSuffix: to.Ptr("servicebus.windows.net"),
	// 		ServiceConfigurationToken: to.Ptr("SSHvjqH=pTlKql=RtMGw/-k5VFBxSYHIiq5ZgbGFcLkNrDNz5fDsinCN2zkG"),
	// 	},
	// }
}
Output:

func (*EndpointsClient) ListManagedProxyDetails added in v0.5.0

func (client *EndpointsClient) ListManagedProxyDetails(ctx context.Context, resourceURI string, endpointName string, managedProxyRequest ManagedProxyRequest, options *EndpointsClientListManagedProxyDetailsOptions) (EndpointsClientListManagedProxyDetailsResponse, error)

ListManagedProxyDetails - Fetches the managed proxy details If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-15

  • resourceURI - The fully qualified Azure Resource manager identifier of the resource to be connected.
  • endpointName - The endpoint name.
  • managedProxyRequest - Object of type ManagedProxyRequest
  • options - EndpointsClientListManagedProxyDetailsOptions contains the optional parameters for the EndpointsClient.ListManagedProxyDetails method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsPostListManagedProxyDetails.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/hybridconnectivity/armhybridconnectivity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridconnectivity.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEndpointsClient().ListManagedProxyDetails(ctx, "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/arcGroup/providers/Microsoft.Compute/virtualMachines/vm00006", "default", armhybridconnectivity.ManagedProxyRequest{
		Hostname:    to.Ptr("r.proxy.arc.com"),
		Service:     to.Ptr("127.0.0.1:65035"),
		ServiceName: to.Ptr(armhybridconnectivity.ServiceNameWAC),
	}, 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.ManagedProxyResource = armhybridconnectivity.ManagedProxyResource{
	// 	ExpiresOn: to.Ptr[int64](1620000256),
	// 	Proxy: to.Ptr("uid.r.proxy.arc.com"),
	// }
}
Output:

func (*EndpointsClient) NewListPager added in v0.4.0

func (client *EndpointsClient) NewListPager(resourceURI string, options *EndpointsClientListOptions) *runtime.Pager[EndpointsClientListResponse]

NewListPager - List of endpoints to the target resource.

Generated from API version 2023-03-15

  • resourceURI - The fully qualified Azure Resource manager identifier of the resource to be connected.
  • options - EndpointsClientListOptions contains the optional parameters for the EndpointsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridconnectivity/armhybridconnectivity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridconnectivity.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewEndpointsClient().NewListPager("subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine", 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.EndpointsList = armhybridconnectivity.EndpointsList{
		// 	Value: []*armhybridconnectivity.EndpointResource{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("Microsoft.HybridConnectivity/endpoints"),
		// 			ID: to.Ptr("/subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default"),
		// 			Properties: &armhybridconnectivity.EndpointProperties{
		// 				Type: to.Ptr(armhybridconnectivity.TypeDefault),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("custom"),
		// 			Type: to.Ptr("Microsoft.HybridConnectivity/endpoints"),
		// 			ID: to.Ptr("/subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/custom"),
		// 			Properties: &armhybridconnectivity.EndpointProperties{
		// 				Type: to.Ptr(armhybridconnectivity.TypeCustom),
		// 				ResourceID: to.Ptr("/subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.Relay/namespaces/custom-relay-namespace"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*EndpointsClient) Update

func (client *EndpointsClient) Update(ctx context.Context, resourceURI string, endpointName string, endpointResource EndpointResource, options *EndpointsClientUpdateOptions) (EndpointsClientUpdateResponse, error)

Update - Update the endpoint to the target resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-15

  • resourceURI - The fully qualified Azure Resource manager identifier of the resource to be connected.
  • endpointName - The endpoint name.
  • endpointResource - Endpoint details
  • options - EndpointsClientUpdateOptions contains the optional parameters for the EndpointsClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsPatchDefault.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/hybridconnectivity/armhybridconnectivity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridconnectivity.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEndpointsClient().Update(ctx, "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine", "default", armhybridconnectivity.EndpointResource{
		Properties: &armhybridconnectivity.EndpointProperties{
			Type: to.Ptr(armhybridconnectivity.TypeDefault),
		},
	}, 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.EndpointResource = armhybridconnectivity.EndpointResource{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.HybridConnectivity/endpoints"),
	// 	ID: to.Ptr("/subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default"),
	// 	Properties: &armhybridconnectivity.EndpointProperties{
	// 		Type: to.Ptr(armhybridconnectivity.TypeDefault),
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 	},
	// }
}
Output:

type EndpointsClientCreateOrUpdateOptions added in v0.2.0

type EndpointsClientCreateOrUpdateOptions struct {
}

EndpointsClientCreateOrUpdateOptions contains the optional parameters for the EndpointsClient.CreateOrUpdate method.

type EndpointsClientCreateOrUpdateResponse added in v0.2.0

type EndpointsClientCreateOrUpdateResponse struct {
	// The endpoint for the target resource.
	EndpointResource
}

EndpointsClientCreateOrUpdateResponse contains the response from method EndpointsClient.CreateOrUpdate.

type EndpointsClientDeleteOptions added in v0.2.0

type EndpointsClientDeleteOptions struct {
}

EndpointsClientDeleteOptions contains the optional parameters for the EndpointsClient.Delete method.

type EndpointsClientDeleteResponse added in v0.2.0

type EndpointsClientDeleteResponse struct {
}

EndpointsClientDeleteResponse contains the response from method EndpointsClient.Delete.

type EndpointsClientGetOptions added in v0.2.0

type EndpointsClientGetOptions struct {
}

EndpointsClientGetOptions contains the optional parameters for the EndpointsClient.Get method.

type EndpointsClientGetResponse added in v0.2.0

type EndpointsClientGetResponse struct {
	// The endpoint for the target resource.
	EndpointResource
}

EndpointsClientGetResponse contains the response from method EndpointsClient.Get.

type EndpointsClientListCredentialsOptions added in v0.2.0

type EndpointsClientListCredentialsOptions struct {
	// The is how long the endpoint access token is valid (in seconds).
	Expiresin *int64

	// Object of type ListCredentialsRequest
	ListCredentialsRequest *ListCredentialsRequest
}

EndpointsClientListCredentialsOptions contains the optional parameters for the EndpointsClient.ListCredentials method.

type EndpointsClientListCredentialsResponse added in v0.2.0

type EndpointsClientListCredentialsResponse struct {
	// The endpoint access for the target resource.
	EndpointAccessResource
}

EndpointsClientListCredentialsResponse contains the response from method EndpointsClient.ListCredentials.

type EndpointsClientListIngressGatewayCredentialsOptions added in v1.0.0

type EndpointsClientListIngressGatewayCredentialsOptions struct {
	// The is how long the endpoint access token is valid (in seconds).
	Expiresin *int64

	// Object of type ListIngressGatewayCredentialsRequest
	ListIngressGatewayCredentialsRequest *ListIngressGatewayCredentialsRequest
}

EndpointsClientListIngressGatewayCredentialsOptions contains the optional parameters for the EndpointsClient.ListIngressGatewayCredentials method.

type EndpointsClientListIngressGatewayCredentialsResponse added in v1.0.0

type EndpointsClientListIngressGatewayCredentialsResponse struct {
	// The ingress gateway access credentials
	IngressGatewayResource
}

EndpointsClientListIngressGatewayCredentialsResponse contains the response from method EndpointsClient.ListIngressGatewayCredentials.

type EndpointsClientListManagedProxyDetailsOptions added in v0.5.0

type EndpointsClientListManagedProxyDetailsOptions struct {
}

EndpointsClientListManagedProxyDetailsOptions contains the optional parameters for the EndpointsClient.ListManagedProxyDetails method.

type EndpointsClientListManagedProxyDetailsResponse added in v0.5.0

type EndpointsClientListManagedProxyDetailsResponse struct {
	// Managed Proxy
	ManagedProxyResource
}

EndpointsClientListManagedProxyDetailsResponse contains the response from method EndpointsClient.ListManagedProxyDetails.

type EndpointsClientListOptions added in v0.2.0

type EndpointsClientListOptions struct {
}

EndpointsClientListOptions contains the optional parameters for the EndpointsClient.NewListPager method.

type EndpointsClientListResponse added in v0.2.0

type EndpointsClientListResponse struct {
	// The list of endpoints.
	EndpointsList
}

EndpointsClientListResponse contains the response from method EndpointsClient.NewListPager.

type EndpointsClientUpdateOptions added in v0.2.0

type EndpointsClientUpdateOptions struct {
}

EndpointsClientUpdateOptions contains the optional parameters for the EndpointsClient.Update method.

type EndpointsClientUpdateResponse added in v0.2.0

type EndpointsClientUpdateResponse struct {
	// The endpoint for the target resource.
	EndpointResource
}

EndpointsClientUpdateResponse contains the response from method EndpointsClient.Update.

type EndpointsList

type EndpointsList struct {
	// The link used to get the next page of endpoints list.
	NextLink *string

	// The list of endpoint.
	Value []*EndpointResource
}

EndpointsList - The list of endpoints.

func (EndpointsList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EndpointsList.

func (*EndpointsList) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EndpointsList.

type ErrorAdditionalInfo

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 v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.

func (*ErrorAdditionalInfo) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.

type ErrorDetail

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

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

MarshalJSON implements the json.Marshaller interface for type ErrorDetail.

func (*ErrorDetail) UnmarshalJSON added in v0.6.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 v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

type IngressGatewayResource added in v0.5.0

type IngressGatewayResource struct {
	// Ingress gateway profile
	Ingress *IngressProfileProperties

	// Azure relay hybrid connection access properties
	Relay *RelayNamespaceAccessProperties
}

IngressGatewayResource - The ingress gateway access credentials

func (IngressGatewayResource) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type IngressGatewayResource.

func (*IngressGatewayResource) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type IngressGatewayResource.

type IngressProfileProperties added in v0.5.0

type IngressProfileProperties struct {
	// REQUIRED; The AAD Profile
	AADProfile *AADProfileProperties

	// REQUIRED; The ingress hostname.
	Hostname *string
}

IngressProfileProperties - Ingress gateway profile

func (IngressProfileProperties) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type IngressProfileProperties.

func (*IngressProfileProperties) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type IngressProfileProperties.

type ListCredentialsRequest added in v1.0.0

type ListCredentialsRequest struct {
	// The name of the service. If not provided, the request will by pass the generation of service configuration token
	ServiceName *ServiceName
}

ListCredentialsRequest - The details of the service for which credentials needs to be returned.

func (ListCredentialsRequest) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type ListCredentialsRequest.

func (*ListCredentialsRequest) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ListCredentialsRequest.

type ListIngressGatewayCredentialsRequest added in v1.0.0

type ListIngressGatewayCredentialsRequest struct {
	// The name of the service.
	ServiceName *ServiceName
}

ListIngressGatewayCredentialsRequest - Represent ListIngressGatewayCredentials Request object.

func (ListIngressGatewayCredentialsRequest) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type ListIngressGatewayCredentialsRequest.

func (*ListIngressGatewayCredentialsRequest) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ListIngressGatewayCredentialsRequest.

type ManagedProxyRequest added in v0.5.0

type ManagedProxyRequest struct {
	// REQUIRED; The name of the service.
	Service *string

	// The target host name.
	Hostname *string

	// The name of the service. It is an optional property, if not provided, service configuration tokens issue code would be
	// by passed.
	ServiceName *ServiceName
}

ManagedProxyRequest - Represent ManageProxy Request object.

func (ManagedProxyRequest) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type ManagedProxyRequest.

func (*ManagedProxyRequest) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedProxyRequest.

type ManagedProxyResource added in v0.5.0

type ManagedProxyResource struct {
	// REQUIRED; The expiration time of short lived proxy name in unix epoch.
	ExpiresOn *int64

	// REQUIRED; The short lived proxy name.
	Proxy *string
}

ManagedProxyResource - Managed Proxy

func (ManagedProxyResource) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type ManagedProxyResource.

func (*ManagedProxyResource) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedProxyResource.

type Operation

type Operation struct {
	// Localized display information for this particular operation.
	Display *OperationDisplay

	// READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
	ActionType *ActionType

	// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane
	// operations.
	IsDataAction *bool

	// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
	// "Microsoft.Compute/virtualMachines/capture/action"
	Name *string

	// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
	// value is "user,system"
	Origin *Origin
}

Operation - Details of a REST API operation, returned from the Resource Provider Operations API

func (Operation) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views.
	Description *string

	// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual
	// Machine", "Restart Virtual Machine".
	Operation *string

	// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft
	// Compute".
	Provider *string

	// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job
	// Schedule Collections".
	Resource *string
}

OperationDisplay - Localized display information for this particular operation.

func (OperationDisplay) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v0.6.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 operations supported by the resource provider
	Value []*Operation
}

OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an 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 v0.6.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.4.0

NewListPager - Lists the available Hybrid Connectivity REST API operations.

Generated from API version 2023-03-15

  • 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/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/OperationsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridconnectivity/armhybridconnectivity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridconnectivity.NewClientFactory(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 = armhybridconnectivity.OperationListResult{
		// 	Value: []*armhybridconnectivity.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.HybridConnectivity/operations/read"),
		// 			Display: &armhybridconnectivity.OperationDisplay{
		// 				Description: to.Ptr("Get the list of Operations"),
		// 				Operation: to.Ptr("Get operations"),
		// 				Provider: to.Ptr("Microsoft.HybridConnectivity"),
		// 				Resource: to.Ptr("Operations"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.HybridConnectivity/endpoints/read"),
		// 			Display: &armhybridconnectivity.OperationDisplay{
		// 				Description: to.Ptr("Get or list of endpoints to the target resource."),
		// 				Operation: to.Ptr("Get/List endpoints"),
		// 				Provider: to.Ptr("Microsoft.HybridConnectivity"),
		// 				Resource: to.Ptr("endpoints"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.HybridConnectivity/endpoints/write"),
		// 			Display: &armhybridconnectivity.OperationDisplay{
		// 				Description: to.Ptr("Create or update the endpoint to the target resource."),
		// 				Operation: to.Ptr("Create/Update endpoint"),
		// 				Provider: to.Ptr("Microsoft.HybridConnectivity"),
		// 				Resource: to.Ptr("endpoints"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.HybridConnectivity/endpoints/delete"),
		// 			Display: &armhybridconnectivity.OperationDisplay{
		// 				Description: to.Ptr("Deletes the endpoint access to the target resource."),
		// 				Operation: to.Ptr("Delete endpoint"),
		// 				Provider: to.Ptr("Microsoft.HybridConnectivity"),
		// 				Resource: to.Ptr("endpoints"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.HybridConnectivity/endpoints/listCredentials/action"),
		// 			Display: &armhybridconnectivity.OperationDisplay{
		// 				Description: to.Ptr("List the endpoint access credentials to the resource."),
		// 				Operation: to.Ptr("List credentials for endpoint access"),
		// 				Provider: to.Ptr("Microsoft.HybridConnectivity"),
		// 				Resource: to.Ptr("endpoints"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.HybridConnectivity/endpoints/listIngressGatewayCredentials/action"),
		// 			Display: &armhybridconnectivity.OperationDisplay{
		// 				Description: to.Ptr("List the ingress gateway credentials to the resource."),
		// 				Operation: to.Ptr("List credentials for ingress gateway"),
		// 				Provider: to.Ptr("Microsoft.HybridConnectivity"),
		// 				Resource: to.Ptr("endpoints"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.HybridConnectivity/register/action"),
		// 			Display: &armhybridconnectivity.OperationDisplay{
		// 				Description: to.Ptr("Register the subscription for Microsoft.HybridConnectivity"),
		// 				Operation: to.Ptr("Register the Microsoft.HybridConnectivity"),
		// 				Provider: to.Ptr("Microsoft.HybridConnectivity"),
		// 				Resource: to.Ptr("Microsoft.HybridConnectivity"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.HybridConnectivity/unregister/action"),
		// 			Display: &armhybridconnectivity.OperationDisplay{
		// 				Description: to.Ptr("Unregister the subscription for Microsoft.HybridConnectivity"),
		// 				Operation: to.Ptr("Unregister the Microsoft.HybridConnectivity"),
		// 				Provider: to.Ptr("Microsoft.HybridConnectivity"),
		// 				Resource: to.Ptr("Microsoft.HybridConnectivity"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions added in v0.2.0

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse added in v0.2.0

type OperationsClientListResponse struct {
	// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type Origin

type Origin string

Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"

const (
	OriginSystem     Origin = "system"
	OriginUser       Origin = "user"
	OriginUserSystem Origin = "user,system"
)

func PossibleOriginValues

func PossibleOriginValues() []Origin

PossibleOriginValues returns the possible values for the Origin const type.

type ProvisioningState added in v1.0.0

type ProvisioningState string

ProvisioningState - The resource provisioning state.

const (
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func PossibleProvisioningStateValues added in v1.0.0

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ProxyResource

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

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

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

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

ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location

func (ProxyResource) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.

type RelayNamespaceAccessProperties

type RelayNamespaceAccessProperties struct {
	// REQUIRED; Azure Relay hybrid connection name for the resource.
	HybridConnectionName *string

	// REQUIRED; The namespace name.
	NamespaceName *string

	// REQUIRED; The suffix domain name of relay namespace.
	NamespaceNameSuffix *string

	// The expiration of access key in unix time.
	ExpiresOn *int64

	// The token to access the enabled service.
	ServiceConfigurationToken *string

	// READ-ONLY; Access key for hybrid connection.
	AccessKey *string
}

RelayNamespaceAccessProperties - Azure relay hybrid connection access properties

func (RelayNamespaceAccessProperties) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type RelayNamespaceAccessProperties.

func (*RelayNamespaceAccessProperties) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type RelayNamespaceAccessProperties.

type Resource

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

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

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

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

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

func (Resource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type ServiceConfigurationList added in v1.0.0

type ServiceConfigurationList struct {
	// The link to fetch the next page of connected cluster
	NextLink *string

	// The list of service configuration
	Value []*ServiceConfigurationResource
}

ServiceConfigurationList - The paginated list of serviceConfigurations

func (ServiceConfigurationList) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type ServiceConfigurationList.

func (*ServiceConfigurationList) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceConfigurationList.

type ServiceConfigurationProperties added in v1.0.0

type ServiceConfigurationProperties struct {
	// REQUIRED; Name of the service.
	ServiceName *ServiceName

	// The port on which service is enabled.
	Port *int64

	// The resource Id of the connectivity endpoint (optional).
	ResourceID *string

	// READ-ONLY; The resource provisioning state.
	ProvisioningState *ProvisioningState
}

ServiceConfigurationProperties - Service configuration details

func (ServiceConfigurationProperties) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type ServiceConfigurationProperties.

func (*ServiceConfigurationProperties) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceConfigurationProperties.

type ServiceConfigurationPropertiesPatch added in v1.0.0

type ServiceConfigurationPropertiesPatch struct {
	// The port on which service is enabled.
	Port *int64
}

ServiceConfigurationPropertiesPatch - Service configuration details

func (ServiceConfigurationPropertiesPatch) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type ServiceConfigurationPropertiesPatch.

func (*ServiceConfigurationPropertiesPatch) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceConfigurationPropertiesPatch.

type ServiceConfigurationResource added in v1.0.0

type ServiceConfigurationResource struct {
	// The service configuration properties.
	Properties *ServiceConfigurationProperties

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

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

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

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

ServiceConfigurationResource - The service configuration details associated with the target resource.

func (ServiceConfigurationResource) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type ServiceConfigurationResource.

func (*ServiceConfigurationResource) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceConfigurationResource.

type ServiceConfigurationResourcePatch added in v1.0.0

type ServiceConfigurationResourcePatch struct {
	// The service configuration properties.
	Properties *ServiceConfigurationPropertiesPatch
}

ServiceConfigurationResourcePatch - The service details under service configuration for the target endpoint resource.

func (ServiceConfigurationResourcePatch) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type ServiceConfigurationResourcePatch.

func (*ServiceConfigurationResourcePatch) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceConfigurationResourcePatch.

type ServiceConfigurationsClient added in v1.0.0

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

ServiceConfigurationsClient contains the methods for the ServiceConfigurations group. Don't use this type directly, use NewServiceConfigurationsClient() instead.

func NewServiceConfigurationsClient added in v1.0.0

func NewServiceConfigurationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceConfigurationsClient, error)

NewServiceConfigurationsClient creates a new instance of ServiceConfigurationsClient with the specified values.

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

func (*ServiceConfigurationsClient) CreateOrupdate added in v1.0.0

func (client *ServiceConfigurationsClient) CreateOrupdate(ctx context.Context, resourceURI string, endpointName string, serviceConfigurationName string, serviceConfigurationResource ServiceConfigurationResource, options *ServiceConfigurationsClientCreateOrupdateOptions) (ServiceConfigurationsClientCreateOrupdateResponse, error)

CreateOrupdate - Create or update a service in serviceConfiguration for the endpoint resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-15

  • resourceURI - The fully qualified Azure Resource manager identifier of the resource to be connected.
  • endpointName - The endpoint name.
  • serviceConfigurationName - The service name.
  • serviceConfigurationResource - Service details
  • options - ServiceConfigurationsClientCreateOrupdateOptions contains the optional parameters for the ServiceConfigurationsClient.CreateOrupdate method.
Example (ServiceConfigurationsPutSsh)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/ServiceConfigurationsPutSSH.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/hybridconnectivity/armhybridconnectivity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridconnectivity.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewServiceConfigurationsClient().CreateOrupdate(ctx, "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default", "default", "SSH", armhybridconnectivity.ServiceConfigurationResource{
		Properties: &armhybridconnectivity.ServiceConfigurationProperties{
			Port:        to.Ptr[int64](22),
			ServiceName: to.Ptr(armhybridconnectivity.ServiceNameSSH),
		},
	}, 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.ServiceConfigurationResource = armhybridconnectivity.ServiceConfigurationResource{
	// 	Type: to.Ptr("Microsoft.HybridConnectivity/endpoints/serviceConfigurations"),
	// 	ID: to.Ptr("/subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default/serviceconfigurations/SSH"),
	// 	Properties: &armhybridconnectivity.ServiceConfigurationProperties{
	// 		Port: to.Ptr[int64](22),
	// 		ProvisioningState: to.Ptr(armhybridconnectivity.ProvisioningStateSucceeded),
	// 		ServiceName: to.Ptr(armhybridconnectivity.ServiceNameSSH),
	// 	},
	// }
}
Output:

Example (ServiceConfigurationsPutWac)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/ServiceConfigurationsPutWAC.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/hybridconnectivity/armhybridconnectivity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridconnectivity.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewServiceConfigurationsClient().CreateOrupdate(ctx, "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default", "default", "WAC", armhybridconnectivity.ServiceConfigurationResource{
		Properties: &armhybridconnectivity.ServiceConfigurationProperties{
			Port:        to.Ptr[int64](6516),
			ServiceName: to.Ptr(armhybridconnectivity.ServiceNameWAC),
		},
	}, 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.ServiceConfigurationResource = armhybridconnectivity.ServiceConfigurationResource{
	// 	Type: to.Ptr("Microsoft.HybridConnectivity/endpoints/serviceConfigurations"),
	// 	ID: to.Ptr("/subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default/serviceconfigurations/WAC"),
	// 	Properties: &armhybridconnectivity.ServiceConfigurationProperties{
	// 		Port: to.Ptr[int64](6516),
	// 		ProvisioningState: to.Ptr(armhybridconnectivity.ProvisioningStateSucceeded),
	// 		ServiceName: to.Ptr(armhybridconnectivity.ServiceNameWAC),
	// 	},
	// }
}
Output:

func (*ServiceConfigurationsClient) Delete added in v1.0.0

func (client *ServiceConfigurationsClient) Delete(ctx context.Context, resourceURI string, endpointName string, serviceConfigurationName string, options *ServiceConfigurationsClientDeleteOptions) (ServiceConfigurationsClientDeleteResponse, error)

Delete - Deletes the service details to the target resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-15

  • resourceURI - The fully qualified Azure Resource manager identifier of the resource to be connected.
  • endpointName - The endpoint name.
  • serviceConfigurationName - The service name.
  • options - ServiceConfigurationsClientDeleteOptions contains the optional parameters for the ServiceConfigurationsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/ServiceConfigurationsDeleteSSH.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridconnectivity/armhybridconnectivity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridconnectivity.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewServiceConfigurationsClient().Delete(ctx, "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default", "default", "SSH", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ServiceConfigurationsClient) Get added in v1.0.0

func (client *ServiceConfigurationsClient) Get(ctx context.Context, resourceURI string, endpointName string, serviceConfigurationName string, options *ServiceConfigurationsClientGetOptions) (ServiceConfigurationsClientGetResponse, error)

Get - Gets the details about the service to the resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-15

  • resourceURI - The fully qualified Azure Resource manager identifier of the resource to be connected.
  • endpointName - The endpoint name.
  • serviceConfigurationName - The service name.
  • options - ServiceConfigurationsClientGetOptions contains the optional parameters for the ServiceConfigurationsClient.Get method.
Example (HybridConnectivityEndpointsServiceconfigurationsGetSsh)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/ServiceConfigurationsGetSSH.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridconnectivity/armhybridconnectivity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridconnectivity.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewServiceConfigurationsClient().Get(ctx, "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default", "default", "SSH", 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.ServiceConfigurationResource = armhybridconnectivity.ServiceConfigurationResource{
	// 	Type: to.Ptr("Microsoft.HybridConnectivity/endpoints/serviceConfigurations"),
	// 	ID: to.Ptr("/subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default/serviceconfigurations/SSH"),
	// 	Properties: &armhybridconnectivity.ServiceConfigurationProperties{
	// 		Port: to.Ptr[int64](22),
	// 		ServiceName: to.Ptr(armhybridconnectivity.ServiceNameSSH),
	// 	},
	// }
}
Output:

Example (HybridConnectivityEndpointsServiceconfigurationsGetWac)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/ServiceConfigurationsGetWAC.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridconnectivity/armhybridconnectivity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridconnectivity.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewServiceConfigurationsClient().Get(ctx, "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default", "default", "WAC", 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.ServiceConfigurationResource = armhybridconnectivity.ServiceConfigurationResource{
	// 	Type: to.Ptr("Microsoft.HybridConnectivity/endpoints/serviceConfigurations"),
	// 	ID: to.Ptr("/subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default/serviceconfigurations/WAC"),
	// 	Properties: &armhybridconnectivity.ServiceConfigurationProperties{
	// 		Port: to.Ptr[int64](6516),
	// 		ServiceName: to.Ptr(armhybridconnectivity.ServiceNameWAC),
	// 	},
	// }
}
Output:

func (*ServiceConfigurationsClient) NewListByEndpointResourcePager added in v1.0.0

NewListByEndpointResourcePager - API to enumerate registered services in service configurations under a Endpoint Resource

Generated from API version 2023-03-15

  • resourceURI - The fully qualified Azure Resource manager identifier of the resource to be connected.
  • endpointName - The endpoint name.
  • options - ServiceConfigurationsClientListByEndpointResourceOptions contains the optional parameters for the ServiceConfigurationsClient.NewListByEndpointResourcePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/ServiceConfigurationsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridconnectivity/armhybridconnectivity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridconnectivity.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewServiceConfigurationsClient().NewListByEndpointResourcePager("subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default", "default", 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.ServiceConfigurationList = armhybridconnectivity.ServiceConfigurationList{
		// 	Value: []*armhybridconnectivity.ServiceConfigurationResource{
		// 		{
		// 			Type: to.Ptr("Microsoft.HybridConnectivity/endpoints/serviceConfigurations"),
		// 			ID: to.Ptr("/subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default/serviceconfigurations/SSH"),
		// 			Properties: &armhybridconnectivity.ServiceConfigurationProperties{
		// 				Port: to.Ptr[int64](22),
		// 				ServiceName: to.Ptr(armhybridconnectivity.ServiceNameSSH),
		// 			},
		// 		},
		// 		{
		// 			Type: to.Ptr("Microsoft.HybridConnectivity/endpoints/serviceConfigurations"),
		// 			ID: to.Ptr("/subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default/serviceconfigurations/WAC"),
		// 			Properties: &armhybridconnectivity.ServiceConfigurationProperties{
		// 				Port: to.Ptr[int64](6516),
		// 				ServiceName: to.Ptr(armhybridconnectivity.ServiceNameWAC),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*ServiceConfigurationsClient) Update added in v1.0.0

func (client *ServiceConfigurationsClient) Update(ctx context.Context, resourceURI string, endpointName string, serviceConfigurationName string, serviceConfigurationResource ServiceConfigurationResourcePatch, options *ServiceConfigurationsClientUpdateOptions) (ServiceConfigurationsClientUpdateResponse, error)

Update - Update the service details in the service configurations of the target resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-15

  • resourceURI - The fully qualified Azure Resource manager identifier of the resource to be connected.
  • endpointName - The endpoint name.
  • serviceConfigurationName - The service name.
  • serviceConfigurationResource - Service details
  • options - ServiceConfigurationsClientUpdateOptions contains the optional parameters for the ServiceConfigurationsClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/ServiceConfigurationsPatchSSH.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/hybridconnectivity/armhybridconnectivity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridconnectivity.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewServiceConfigurationsClient().Update(ctx, "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default", "default", "SSH", armhybridconnectivity.ServiceConfigurationResourcePatch{
		Properties: &armhybridconnectivity.ServiceConfigurationPropertiesPatch{
			Port: to.Ptr[int64](22),
		},
	}, 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.ServiceConfigurationResource = armhybridconnectivity.ServiceConfigurationResource{
	// 	ID: to.Ptr("/subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default/serviceConfigurations/SSH"),
	// 	Properties: &armhybridconnectivity.ServiceConfigurationProperties{
	// 		Port: to.Ptr[int64](22),
	// 		ServiceName: to.Ptr(armhybridconnectivity.ServiceNameSSH),
	// 	},
	// }
}
Output:

type ServiceConfigurationsClientCreateOrupdateOptions added in v1.0.0

type ServiceConfigurationsClientCreateOrupdateOptions struct {
}

ServiceConfigurationsClientCreateOrupdateOptions contains the optional parameters for the ServiceConfigurationsClient.CreateOrupdate method.

type ServiceConfigurationsClientCreateOrupdateResponse added in v1.0.0

type ServiceConfigurationsClientCreateOrupdateResponse struct {
	// The service configuration details associated with the target resource.
	ServiceConfigurationResource
}

ServiceConfigurationsClientCreateOrupdateResponse contains the response from method ServiceConfigurationsClient.CreateOrupdate.

type ServiceConfigurationsClientDeleteOptions added in v1.0.0

type ServiceConfigurationsClientDeleteOptions struct {
}

ServiceConfigurationsClientDeleteOptions contains the optional parameters for the ServiceConfigurationsClient.Delete method.

type ServiceConfigurationsClientDeleteResponse added in v1.0.0

type ServiceConfigurationsClientDeleteResponse struct {
}

ServiceConfigurationsClientDeleteResponse contains the response from method ServiceConfigurationsClient.Delete.

type ServiceConfigurationsClientGetOptions added in v1.0.0

type ServiceConfigurationsClientGetOptions struct {
}

ServiceConfigurationsClientGetOptions contains the optional parameters for the ServiceConfigurationsClient.Get method.

type ServiceConfigurationsClientGetResponse added in v1.0.0

type ServiceConfigurationsClientGetResponse struct {
	// The service configuration details associated with the target resource.
	ServiceConfigurationResource
}

ServiceConfigurationsClientGetResponse contains the response from method ServiceConfigurationsClient.Get.

type ServiceConfigurationsClientListByEndpointResourceOptions added in v1.0.0

type ServiceConfigurationsClientListByEndpointResourceOptions struct {
}

ServiceConfigurationsClientListByEndpointResourceOptions contains the optional parameters for the ServiceConfigurationsClient.NewListByEndpointResourcePager method.

type ServiceConfigurationsClientListByEndpointResourceResponse added in v1.0.0

type ServiceConfigurationsClientListByEndpointResourceResponse struct {
	// The paginated list of serviceConfigurations
	ServiceConfigurationList
}

ServiceConfigurationsClientListByEndpointResourceResponse contains the response from method ServiceConfigurationsClient.NewListByEndpointResourcePager.

type ServiceConfigurationsClientUpdateOptions added in v1.0.0

type ServiceConfigurationsClientUpdateOptions struct {
}

ServiceConfigurationsClientUpdateOptions contains the optional parameters for the ServiceConfigurationsClient.Update method.

type ServiceConfigurationsClientUpdateResponse added in v1.0.0

type ServiceConfigurationsClientUpdateResponse struct {
	// The service configuration details associated with the target resource.
	ServiceConfigurationResource
}

ServiceConfigurationsClientUpdateResponse contains the response from method ServiceConfigurationsClient.Update.

type ServiceName added in v1.0.0

type ServiceName string

ServiceName - Name of the service.

const (
	ServiceNameSSH ServiceName = "SSH"
	ServiceNameWAC ServiceName = "WAC"
)

func PossibleServiceNameValues added in v1.0.0

func PossibleServiceNameValues() []ServiceName

PossibleServiceNameValues returns the possible values for the ServiceName const type.

type SystemData

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

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

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

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

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

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

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

func (SystemData) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type Type

type Type string

Type - The type of endpoint.

const (
	TypeCustom  Type = "custom"
	TypeDefault Type = "default"
)

func PossibleTypeValues

func PossibleTypeValues() []Type

PossibleTypeValues returns the possible values for the Type const type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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