armservicelinker

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

README

Azure Service Linker Module for Go

PkgGoDev

The armservicelinker module provides operations for working with Azure Service Linker.

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 Service Linker module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicelinker/armservicelinker

Authorization

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

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 Service Linker 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 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 AuthInfoBase

type AuthInfoBase struct {
	// REQUIRED; The authentication type.
	AuthType *AuthType
}

AuthInfoBase - The authentication info

func (*AuthInfoBase) GetAuthInfoBase

func (a *AuthInfoBase) GetAuthInfoBase() *AuthInfoBase

GetAuthInfoBase implements the AuthInfoBaseClassification interface for type AuthInfoBase.

func (AuthInfoBase) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type AuthInfoBase.

func (*AuthInfoBase) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthInfoBase.

type AuthInfoBaseClassification

type AuthInfoBaseClassification interface {
	// GetAuthInfoBase returns the AuthInfoBase content of the underlying type.
	GetAuthInfoBase() *AuthInfoBase
}

AuthInfoBaseClassification provides polymorphic access to related types. Call the interface's GetAuthInfoBase() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AuthInfoBase, *SecretAuthInfo, *ServicePrincipalCertificateAuthInfo, *ServicePrincipalSecretAuthInfo, *SystemAssignedIdentityAuthInfo, - *UserAssignedIdentityAuthInfo

type AuthType

type AuthType string

AuthType - The authentication type.

const (
	AuthTypeSecret                      AuthType = "secret"
	AuthTypeServicePrincipalCertificate AuthType = "servicePrincipalCertificate"
	AuthTypeServicePrincipalSecret      AuthType = "servicePrincipalSecret"
	AuthTypeSystemAssignedIdentity      AuthType = "systemAssignedIdentity"
	AuthTypeUserAssignedIdentity        AuthType = "userAssignedIdentity"
)

func PossibleAuthTypeValues

func PossibleAuthTypeValues() []AuthType

PossibleAuthTypeValues returns the possible values for the AuthType const type.

type AzureKeyVaultProperties added in v0.3.0

type AzureKeyVaultProperties struct {
	// REQUIRED; The azure resource type.
	Type *AzureResourceType

	// True if connect via Kubernetes CSI Driver.
	ConnectAsKubernetesCsiDriver *bool
}

AzureKeyVaultProperties - The resource properties when type is Azure Key Vault

func (*AzureKeyVaultProperties) GetAzureResourcePropertiesBase added in v0.3.0

func (a *AzureKeyVaultProperties) GetAzureResourcePropertiesBase() *AzureResourcePropertiesBase

GetAzureResourcePropertiesBase implements the AzureResourcePropertiesBaseClassification interface for type AzureKeyVaultProperties.

func (AzureKeyVaultProperties) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type AzureKeyVaultProperties.

func (*AzureKeyVaultProperties) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureKeyVaultProperties.

type AzureResource added in v0.3.0

type AzureResource struct {
	// REQUIRED; The target service type.
	Type *TargetServiceType

	// The Id of azure resource.
	ID *string

	// The azure resource connection related properties.
	ResourceProperties AzureResourcePropertiesBaseClassification
}

AzureResource - The azure resource info when target service type is AzureResource

func (*AzureResource) GetTargetServiceBase added in v0.3.0

func (a *AzureResource) GetTargetServiceBase() *TargetServiceBase

GetTargetServiceBase implements the TargetServiceBaseClassification interface for type AzureResource.

func (AzureResource) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type AzureResource.

func (*AzureResource) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureResource.

type AzureResourcePropertiesBase added in v0.3.0

type AzureResourcePropertiesBase struct {
	// REQUIRED; The azure resource type.
	Type *AzureResourceType
}

AzureResourcePropertiesBase - The azure resource properties

func (*AzureResourcePropertiesBase) GetAzureResourcePropertiesBase added in v0.3.0

func (a *AzureResourcePropertiesBase) GetAzureResourcePropertiesBase() *AzureResourcePropertiesBase

GetAzureResourcePropertiesBase implements the AzureResourcePropertiesBaseClassification interface for type AzureResourcePropertiesBase.

func (AzureResourcePropertiesBase) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type AzureResourcePropertiesBase.

func (*AzureResourcePropertiesBase) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureResourcePropertiesBase.

type AzureResourcePropertiesBaseClassification added in v0.3.0

type AzureResourcePropertiesBaseClassification interface {
	// GetAzureResourcePropertiesBase returns the AzureResourcePropertiesBase content of the underlying type.
	GetAzureResourcePropertiesBase() *AzureResourcePropertiesBase
}

AzureResourcePropertiesBaseClassification provides polymorphic access to related types. Call the interface's GetAzureResourcePropertiesBase() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AzureKeyVaultProperties, *AzureResourcePropertiesBase

type AzureResourceType added in v1.0.0

type AzureResourceType string

AzureResourceType - The azure resource type.

const (
	AzureResourceTypeKeyVault AzureResourceType = "KeyVault"
)

func PossibleAzureResourceTypeValues added in v1.0.0

func PossibleAzureResourceTypeValues() []AzureResourceType

PossibleAzureResourceTypeValues returns the possible values for the AzureResourceType const type.

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

func (c *ClientFactory) NewLinkerClient() *LinkerClient

NewLinkerClient creates a new instance of LinkerClient.

func (*ClientFactory) NewOperationsClient added in v1.1.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

type ClientType

type ClientType string

ClientType - The application client type

const (
	ClientTypeDjango     ClientType = "django"
	ClientTypeDotnet     ClientType = "dotnet"
	ClientTypeGo         ClientType = "go"
	ClientTypeJava       ClientType = "java"
	ClientTypeNodejs     ClientType = "nodejs"
	ClientTypeNone       ClientType = "none"
	ClientTypePhp        ClientType = "php"
	ClientTypePython     ClientType = "python"
	ClientTypeRuby       ClientType = "ruby"
	ClientTypeSpringBoot ClientType = "springBoot"
)

func PossibleClientTypeValues

func PossibleClientTypeValues() []ClientType

PossibleClientTypeValues returns the possible values for the ClientType const type.

type ConfluentBootstrapServer added in v0.3.0

type ConfluentBootstrapServer struct {
	// REQUIRED; The target service type.
	Type *TargetServiceType

	// The endpoint of service.
	Endpoint *string
}

ConfluentBootstrapServer - The service properties when target service type is ConfluentBootstrapServer

func (*ConfluentBootstrapServer) GetTargetServiceBase added in v0.3.0

func (c *ConfluentBootstrapServer) GetTargetServiceBase() *TargetServiceBase

GetTargetServiceBase implements the TargetServiceBaseClassification interface for type ConfluentBootstrapServer.

func (ConfluentBootstrapServer) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type ConfluentBootstrapServer.

func (*ConfluentBootstrapServer) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConfluentBootstrapServer.

type ConfluentSchemaRegistry added in v0.3.0

type ConfluentSchemaRegistry struct {
	// REQUIRED; The target service type.
	Type *TargetServiceType

	// The endpoint of service.
	Endpoint *string
}

ConfluentSchemaRegistry - The service properties when target service type is ConfluentSchemaRegistry

func (*ConfluentSchemaRegistry) GetTargetServiceBase added in v0.3.0

func (c *ConfluentSchemaRegistry) GetTargetServiceBase() *TargetServiceBase

GetTargetServiceBase implements the TargetServiceBaseClassification interface for type ConfluentSchemaRegistry.

func (ConfluentSchemaRegistry) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type ConfluentSchemaRegistry.

func (*ConfluentSchemaRegistry) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConfluentSchemaRegistry.

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

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 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 KeyVaultSecretReferenceSecretInfo added in v0.3.0

type KeyVaultSecretReferenceSecretInfo struct {
	// REQUIRED; The secret type.
	SecretType *SecretType

	// Name of the Key Vault secret.
	Name *string

	// Version of the Key Vault secret.
	Version *string
}

KeyVaultSecretReferenceSecretInfo - The secret info when type is keyVaultSecretReference. It's for scenario that user provides a secret stored in user's keyvault and source is Azure Kubernetes. The key Vault's resource id is linked to secretStore.keyVaultId.

func (*KeyVaultSecretReferenceSecretInfo) GetSecretInfoBase added in v0.3.0

func (k *KeyVaultSecretReferenceSecretInfo) GetSecretInfoBase() *SecretInfoBase

GetSecretInfoBase implements the SecretInfoBaseClassification interface for type KeyVaultSecretReferenceSecretInfo.

func (KeyVaultSecretReferenceSecretInfo) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type KeyVaultSecretReferenceSecretInfo.

func (*KeyVaultSecretReferenceSecretInfo) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultSecretReferenceSecretInfo.

type KeyVaultSecretURISecretInfo added in v0.3.0

type KeyVaultSecretURISecretInfo struct {
	// REQUIRED; The secret type.
	SecretType *SecretType

	// URI to the keyvault secret
	Value *string
}

KeyVaultSecretURISecretInfo - The secret info when type is keyVaultSecretUri. It's for scenario that user provides a secret stored in user's keyvault and source is Web App, Spring Cloud or Container App.

func (*KeyVaultSecretURISecretInfo) GetSecretInfoBase added in v0.3.0

func (k *KeyVaultSecretURISecretInfo) GetSecretInfoBase() *SecretInfoBase

GetSecretInfoBase implements the SecretInfoBaseClassification interface for type KeyVaultSecretURISecretInfo.

func (KeyVaultSecretURISecretInfo) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type KeyVaultSecretURISecretInfo.

func (*KeyVaultSecretURISecretInfo) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultSecretURISecretInfo.

type LinkerClient

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

LinkerClient contains the methods for the Linker group. Don't use this type directly, use NewLinkerClient() instead.

func NewLinkerClient

func NewLinkerClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*LinkerClient, error)

NewLinkerClient creates a new instance of LinkerClient with the specified values.

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

func (*LinkerClient) BeginCreateOrUpdate

func (client *LinkerClient) BeginCreateOrUpdate(ctx context.Context, resourceURI string, linkerName string, parameters LinkerResource, options *LinkerClientBeginCreateOrUpdateOptions) (*runtime.Poller[LinkerClientCreateOrUpdateResponse], error)

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

Generated from API version 2022-05-01

  • resourceURI - The fully qualified Azure Resource manager identifier of the resource to be connected.
  • linkerName - The name Linker resource.
  • parameters - Linker details.
  • options - LinkerClientBeginCreateOrUpdateOptions contains the optional parameters for the LinkerClient.BeginCreateOrUpdate method.
Example (PutLinkWithSecretStore)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PutLinkWithSecretStore.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/servicelinker/armservicelinker"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicelinker.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewLinkerClient().BeginCreateOrUpdate(ctx, "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", "linkName", armservicelinker.LinkerResource{
		Properties: &armservicelinker.LinkerProperties{
			AuthInfo: &armservicelinker.SecretAuthInfo{
				AuthType: to.Ptr(armservicelinker.AuthTypeSecret),
			},
			SecretStore: &armservicelinker.SecretStore{
				KeyVaultID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.KeyVault/vaults/test-kv"),
			},
			TargetService: &armservicelinker.AzureResource{
				Type: to.Ptr(armservicelinker.TargetServiceTypeAzureResource),
				ID:   to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db"),
			},
		},
	}, 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.LinkerResource = armservicelinker.LinkerResource{
	// 	Name: to.Ptr("linkName"),
	// 	Type: to.Ptr("Microsoft.ServiceLinker/links"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app/providers/Microsoft.ServiceLinker/links/linkName"),
	// 	Properties: &armservicelinker.LinkerProperties{
	// 		AuthInfo: &armservicelinker.SecretAuthInfo{
	// 			AuthType: to.Ptr(armservicelinker.AuthTypeSecret),
	// 		},
	// 		SecretStore: &armservicelinker.SecretStore{
	// 			KeyVaultID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.KeyVault/vaults/test-kv"),
	// 		},
	// 		TargetService: &armservicelinker.AzureResource{
	// 			Type: to.Ptr(armservicelinker.TargetServiceTypeAzureResource),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db"),
	// 		},
	// 	},
	// }
}
Output:

Example (PutLinkWithServiceEndpoint)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PutLinkWithServiceEndpoint.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/servicelinker/armservicelinker"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicelinker.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewLinkerClient().BeginCreateOrUpdate(ctx, "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", "linkName", armservicelinker.LinkerResource{
		Properties: &armservicelinker.LinkerProperties{
			AuthInfo: &armservicelinker.SecretAuthInfo{
				AuthType: to.Ptr(armservicelinker.AuthTypeSecret),
				Name:     to.Ptr("name"),
				SecretInfo: &armservicelinker.KeyVaultSecretURISecretInfo{
					SecretType: to.Ptr(armservicelinker.SecretTypeKeyVaultSecretURI),
					Value:      to.Ptr("https://vault-name.vault.azure.net/secrets/secret-name/00000000000000000000000000000000"),
				},
			},
			TargetService: &armservicelinker.AzureResource{
				Type: to.Ptr(armservicelinker.TargetServiceTypeAzureResource),
				ID:   to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DBforPostgreSQL/servers/test-pg/databases/test-db"),
			},
			VNetSolution: &armservicelinker.VNetSolution{
				Type: to.Ptr(armservicelinker.VNetSolutionTypeServiceEndpoint),
			},
		},
	}, 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.LinkerResource = armservicelinker.LinkerResource{
	// 	Name: to.Ptr("linkName"),
	// 	Type: to.Ptr("Microsoft.ServiceLinker/links"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app/providers/Microsoft.ServiceLinker/links/linkName"),
	// 	Properties: &armservicelinker.LinkerProperties{
	// 		AuthInfo: &armservicelinker.SecretAuthInfo{
	// 			AuthType: to.Ptr(armservicelinker.AuthTypeSecret),
	// 			Name: to.Ptr("name"),
	// 		},
	// 		TargetService: &armservicelinker.AzureResource{
	// 			Type: to.Ptr(armservicelinker.TargetServiceTypeAzureResource),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DBforPostgreSQL/servers/test-pg/databases/test-db"),
	// 		},
	// 		VNetSolution: &armservicelinker.VNetSolution{
	// 			Type: to.Ptr(armservicelinker.VNetSolutionTypeServiceEndpoint),
	// 		},
	// 	},
	// }
}
Output:

func (*LinkerClient) BeginDelete

func (client *LinkerClient) BeginDelete(ctx context.Context, resourceURI string, linkerName string, options *LinkerClientBeginDeleteOptions) (*runtime.Poller[LinkerClientDeleteResponse], error)

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

Generated from API version 2022-05-01

  • resourceURI - The fully qualified Azure Resource manager identifier of the resource to be connected.
  • linkerName - The name Linker resource.
  • options - LinkerClientBeginDeleteOptions contains the optional parameters for the LinkerClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/DeleteLink.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicelinker/armservicelinker"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicelinker.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewLinkerClient().BeginDelete(ctx, "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", "linkName", 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 (*LinkerClient) BeginUpdate

func (client *LinkerClient) BeginUpdate(ctx context.Context, resourceURI string, linkerName string, parameters LinkerPatch, options *LinkerClientBeginUpdateOptions) (*runtime.Poller[LinkerClientUpdateResponse], error)

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

Generated from API version 2022-05-01

  • resourceURI - The fully qualified Azure Resource manager identifier of the resource to be connected.
  • linkerName - The name Linker resource.
  • parameters - Linker details.
  • options - LinkerClientBeginUpdateOptions contains the optional parameters for the LinkerClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PatchLink.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/servicelinker/armservicelinker"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicelinker.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewLinkerClient().BeginUpdate(ctx, "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", "linkName", armservicelinker.LinkerPatch{
		Properties: &armservicelinker.LinkerProperties{
			AuthInfo: &armservicelinker.ServicePrincipalSecretAuthInfo{
				AuthType:    to.Ptr(armservicelinker.AuthTypeServicePrincipalSecret),
				ClientID:    to.Ptr("name"),
				PrincipalID: to.Ptr("id"),
				Secret:      to.Ptr("secret"),
			},
			TargetService: &armservicelinker.AzureResource{
				Type: to.Ptr(armservicelinker.TargetServiceTypeAzureResource),
				ID:   to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db"),
			},
		},
	}, 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.LinkerResource = armservicelinker.LinkerResource{
	// 	Name: to.Ptr("linkName"),
	// 	Type: to.Ptr("Microsoft.ServiceLinker/links"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app/providers/Microsoft.ServiceLinker/links/linkName"),
	// 	Properties: &armservicelinker.LinkerProperties{
	// 		AuthInfo: &armservicelinker.ServicePrincipalSecretAuthInfo{
	// 			AuthType: to.Ptr(armservicelinker.AuthTypeServicePrincipalSecret),
	// 			ClientID: to.Ptr("name"),
	// 			PrincipalID: to.Ptr("id"),
	// 		},
	// 		TargetService: &armservicelinker.AzureResource{
	// 			Type: to.Ptr(armservicelinker.TargetServiceTypeAzureResource),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db"),
	// 		},
	// 	},
	// }
}
Output:

func (*LinkerClient) BeginValidate

func (client *LinkerClient) BeginValidate(ctx context.Context, resourceURI string, linkerName string, options *LinkerClientBeginValidateOptions) (*runtime.Poller[LinkerClientValidateResponse], error)

BeginValidate - Validate a link. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-05-01

  • resourceURI - The fully qualified Azure Resource manager identifier of the resource to be connected.
  • linkerName - The name Linker resource.
  • options - LinkerClientBeginValidateOptions contains the optional parameters for the LinkerClient.BeginValidate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/ValidateLinkSuccess.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicelinker/armservicelinker"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicelinker.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewLinkerClient().BeginValidate(ctx, "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", "linkName", 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.ValidateOperationResult = armservicelinker.ValidateOperationResult{
	// 	Properties: &armservicelinker.ValidateResult{
	// 		AuthType: to.Ptr(armservicelinker.AuthTypeSecret),
	// 		IsConnectionAvailable: to.Ptr(true),
	// 		LinkerName: to.Ptr("linkName"),
	// 		ReportEndTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-07-12T22:06:09.000Z"); return t}()),
	// 		ReportStartTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-07-12T22:05:09.000Z"); return t}()),
	// 		SourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db"),
	// 		TargetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db"),
	// 		ValidationDetail: []*armservicelinker.ValidationResultItem{
	// 			{
	// 				Name: to.Ptr("TargetExistence"),
	// 				Description: to.Ptr("The target existence is validated"),
	// 				Result: to.Ptr(armservicelinker.ValidationResultStatusSuccess),
	// 			},
	// 			{
	// 				Name: to.Ptr("TargetNetworkAccess"),
	// 				Description: to.Ptr("Deny public network access is set to yes. Please confirm you are using private endpoint connection to access target resource."),
	// 				Result: to.Ptr(armservicelinker.ValidationResultStatusWarning),
	// 		}},
	// 	},
	// }
}
Output:

func (*LinkerClient) Get

func (client *LinkerClient) Get(ctx context.Context, resourceURI string, linkerName string, options *LinkerClientGetOptions) (LinkerClientGetResponse, error)

Get - Returns Linker resource for a given name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-05-01

  • resourceURI - The fully qualified Azure Resource manager identifier of the resource to be connected.
  • linkerName - The name Linker resource.
  • options - LinkerClientGetOptions contains the optional parameters for the LinkerClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/Link.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicelinker/armservicelinker"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicelinker.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewLinkerClient().Get(ctx, "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", "linkName", 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.LinkerResource = armservicelinker.LinkerResource{
	// 	Name: to.Ptr("linkName"),
	// 	Type: to.Ptr("Microsoft.ServiceLinker/links"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app/providers/Microsoft.ServiceLinker/links/linkName"),
	// 	Properties: &armservicelinker.LinkerProperties{
	// 		AuthInfo: &armservicelinker.SecretAuthInfo{
	// 			AuthType: to.Ptr(armservicelinker.AuthTypeSecret),
	// 			Name: to.Ptr("name"),
	// 		},
	// 		TargetService: &armservicelinker.AzureResource{
	// 			Type: to.Ptr(armservicelinker.TargetServiceTypeAzureResource),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db"),
	// 		},
	// 	},
	// 	SystemData: &armservicelinker.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-07-12T22:05:09.000Z"); return t}()),
	// 	},
	// }
}
Output:

func (*LinkerClient) ListConfigurations

func (client *LinkerClient) ListConfigurations(ctx context.Context, resourceURI string, linkerName string, options *LinkerClientListConfigurationsOptions) (LinkerClientListConfigurationsResponse, error)

ListConfigurations - list source configurations for a linker. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-05-01

  • resourceURI - The fully qualified Azure Resource manager identifier of the resource to be connected.
  • linkerName - The name Linker resource.
  • options - LinkerClientListConfigurationsOptions contains the optional parameters for the LinkerClient.ListConfigurations method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/GetConfigurations.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicelinker/armservicelinker"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicelinker.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewLinkerClient().ListConfigurations(ctx, "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", "linkName", 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.SourceConfigurationResult = armservicelinker.SourceConfigurationResult{
	// 	Configurations: []*armservicelinker.SourceConfiguration{
	// 		{
	// 			Name: to.Ptr("ASL_DocumentDb_ConnectionString"),
	// 			Value: to.Ptr("ConnectionString"),
	// 	}},
	// }
}
Output:

func (*LinkerClient) NewListPager added in v0.4.0

func (client *LinkerClient) NewListPager(resourceURI string, options *LinkerClientListOptions) *runtime.Pager[LinkerClientListResponse]

NewListPager - Returns list of Linkers which connects to the resource.

Generated from API version 2022-05-01

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

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/LinkList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicelinker/armservicelinker"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicelinker.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewLinkerClient().NewListPager("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", 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.LinkerList = armservicelinker.LinkerList{
		// 	Value: []*armservicelinker.LinkerResource{
		// 		{
		// 			Name: to.Ptr("linkName"),
		// 			Type: to.Ptr("Microsoft.ServiceLinker/links"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.ServiceLinker/links/linkName"),
		// 			Properties: &armservicelinker.LinkerProperties{
		// 				AuthInfo: &armservicelinker.SecretAuthInfo{
		// 					AuthType: to.Ptr(armservicelinker.AuthTypeSecret),
		// 					Name: to.Ptr("username"),
		// 				},
		// 				TargetService: &armservicelinker.AzureResource{
		// 					Type: to.Ptr(armservicelinker.TargetServiceTypeAzureResource),
		// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db"),
		// 				},
		// 			},
		// 			SystemData: &armservicelinker.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-07-12T22:05:09.000Z"); return t}()),
		// 			},
		// 	}},
		// }
	}
}
Output:

type LinkerClientBeginCreateOrUpdateOptions added in v0.2.0

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

LinkerClientBeginCreateOrUpdateOptions contains the optional parameters for the LinkerClient.BeginCreateOrUpdate method.

type LinkerClientBeginDeleteOptions added in v0.2.0

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

LinkerClientBeginDeleteOptions contains the optional parameters for the LinkerClient.BeginDelete method.

type LinkerClientBeginUpdateOptions added in v0.2.0

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

LinkerClientBeginUpdateOptions contains the optional parameters for the LinkerClient.BeginUpdate method.

type LinkerClientBeginValidateOptions added in v0.2.0

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

LinkerClientBeginValidateOptions contains the optional parameters for the LinkerClient.BeginValidate method.

type LinkerClientCreateOrUpdateResponse added in v0.2.0

type LinkerClientCreateOrUpdateResponse struct {
	// Linker of source and target resource
	LinkerResource
}

LinkerClientCreateOrUpdateResponse contains the response from method LinkerClient.BeginCreateOrUpdate.

type LinkerClientDeleteResponse added in v0.2.0

type LinkerClientDeleteResponse struct {
}

LinkerClientDeleteResponse contains the response from method LinkerClient.BeginDelete.

type LinkerClientGetOptions added in v0.2.0

type LinkerClientGetOptions struct {
}

LinkerClientGetOptions contains the optional parameters for the LinkerClient.Get method.

type LinkerClientGetResponse added in v0.2.0

type LinkerClientGetResponse struct {
	// Linker of source and target resource
	LinkerResource
}

LinkerClientGetResponse contains the response from method LinkerClient.Get.

type LinkerClientListConfigurationsOptions added in v0.2.0

type LinkerClientListConfigurationsOptions struct {
}

LinkerClientListConfigurationsOptions contains the optional parameters for the LinkerClient.ListConfigurations method.

type LinkerClientListConfigurationsResponse added in v0.2.0

type LinkerClientListConfigurationsResponse struct {
	// Configurations for source resource, include appSettings, connectionString and serviceBindings
	SourceConfigurationResult
}

LinkerClientListConfigurationsResponse contains the response from method LinkerClient.ListConfigurations.

type LinkerClientListOptions added in v0.2.0

type LinkerClientListOptions struct {
}

LinkerClientListOptions contains the optional parameters for the LinkerClient.NewListPager method.

type LinkerClientListResponse added in v0.2.0

type LinkerClientListResponse struct {
	// The list of Linker.
	LinkerList
}

LinkerClientListResponse contains the response from method LinkerClient.NewListPager.

type LinkerClientUpdateResponse added in v0.2.0

type LinkerClientUpdateResponse struct {
	// Linker of source and target resource
	LinkerResource
}

LinkerClientUpdateResponse contains the response from method LinkerClient.BeginUpdate.

type LinkerClientValidateResponse added in v0.2.0

type LinkerClientValidateResponse struct {
	// The validation operation result for a linker.
	ValidateOperationResult
}

LinkerClientValidateResponse contains the response from method LinkerClient.BeginValidate.

type LinkerList

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

	// The list of Linkers.
	Value []*LinkerResource
}

LinkerList - The list of Linker.

func (LinkerList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type LinkerList.

func (*LinkerList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type LinkerList.

type LinkerPatch

type LinkerPatch struct {
	// Linker properties
	Properties *LinkerProperties
}

LinkerPatch - A linker to be updated.

func (LinkerPatch) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type LinkerPatch.

func (*LinkerPatch) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type LinkerPatch.

type LinkerProperties

type LinkerProperties struct {
	// The authentication type.
	AuthInfo AuthInfoBaseClassification

	// The application client type
	ClientType *ClientType

	// connection scope in source service.
	Scope *string

	// An option to store secret value in secure place
	SecretStore *SecretStore

	// The target service properties
	TargetService TargetServiceBaseClassification

	// The VNet solution.
	VNetSolution *VNetSolution

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

LinkerProperties - The properties of the linker.

func (LinkerProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type LinkerProperties.

func (*LinkerProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type LinkerProperties.

type LinkerResource

type LinkerResource struct {
	// REQUIRED; The properties of the linker.
	Properties *LinkerProperties

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

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

	// READ-ONLY; The system data.
	SystemData *SystemData

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

LinkerResource - Linker of source and target resource

func (LinkerResource) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type LinkerResource.

func (*LinkerResource) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type LinkerResource.

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

NewListPager - Lists the available ServiceLinker REST API operations.

Generated from API version 2022-05-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/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/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/servicelinker/armservicelinker"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicelinker.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 = armservicelinker.OperationListResult{
		// 	Value: []*armservicelinker.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceLinker/register/action"),
		// 			Display: &armservicelinker.OperationDisplay{
		// 				Description: to.Ptr("Register the subscription for Microsoft.ServiceLinker"),
		// 				Operation: to.Ptr("Register the Microsoft.ServiceLinker"),
		// 				Provider: to.Ptr("Microsoft.ServiceLinker"),
		// 				Resource: to.Ptr("Microsoft.ServiceLinker"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceLinker/unregister/action"),
		// 			Display: &armservicelinker.OperationDisplay{
		// 				Description: to.Ptr("Unregister the subscription for Microsoft.ServiceLinker"),
		// 				Operation: to.Ptr("Unregister the Microsoft.ServiceLinker"),
		// 				Provider: to.Ptr("Microsoft.ServiceLinker"),
		// 				Resource: to.Ptr("Microsoft.ServiceLinker"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceLinker/operations/read"),
		// 			Display: &armservicelinker.OperationDisplay{
		// 				Description: to.Ptr("read operations"),
		// 				Operation: to.Ptr("read_operations"),
		// 				Provider: to.Ptr("Microsoft.ServiceLinker"),
		// 				Resource: to.Ptr("operations"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceLinker/dryruns/read"),
		// 			Display: &armservicelinker.OperationDisplay{
		// 				Description: to.Ptr("list dryrun jobs"),
		// 				Operation: to.Ptr("Dryrun_List"),
		// 				Provider: to.Ptr("Microsoft.ServiceLinker"),
		// 				Resource: to.Ptr("dryruns"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceLinker/dryruns/read"),
		// 			Display: &armservicelinker.OperationDisplay{
		// 				Description: to.Ptr("get a dryrun job"),
		// 				Operation: to.Ptr("Dryrun_Get"),
		// 				Provider: to.Ptr("Microsoft.ServiceLinker"),
		// 				Resource: to.Ptr("dryruns"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceLinker/dryruns/write"),
		// 			Display: &armservicelinker.OperationDisplay{
		// 				Description: to.Ptr("create a dryrun job to do necessary check before actual creation"),
		// 				Operation: to.Ptr("Dryrun_Create"),
		// 				Provider: to.Ptr("Microsoft.ServiceLinker"),
		// 				Resource: to.Ptr("dryruns"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceLinker/dryruns/delete"),
		// 			Display: &armservicelinker.OperationDisplay{
		// 				Description: to.Ptr("delete a dryrun job"),
		// 				Operation: to.Ptr("Dryrun_Delete"),
		// 				Provider: to.Ptr("Microsoft.ServiceLinker"),
		// 				Resource: to.Ptr("dryruns"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceLinker/dryruns/write"),
		// 			Display: &armservicelinker.OperationDisplay{
		// 				Description: to.Ptr("add a dryrun job to do necessary check before actual creation"),
		// 				Operation: to.Ptr("Dryrun_Update"),
		// 				Provider: to.Ptr("Microsoft.ServiceLinker"),
		// 				Resource: to.Ptr("dryruns"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceLinker/locations/operationStatuses/read"),
		// 			Display: &armservicelinker.OperationDisplay{
		// 				Description: to.Ptr("read operationStatuses"),
		// 				Operation: to.Ptr("read_operationStatuses"),
		// 				Provider: to.Ptr("Microsoft.ServiceLinker"),
		// 				Resource: to.Ptr("locations/operationStatuses"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceLinker/locations/operationStatuses/write"),
		// 			Display: &armservicelinker.OperationDisplay{
		// 				Description: to.Ptr("write operationStatuses"),
		// 				Operation: to.Ptr("write_operationStatuses"),
		// 				Provider: to.Ptr("Microsoft.ServiceLinker"),
		// 				Resource: to.Ptr("locations/operationStatuses"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceLinker/linkers/read"),
		// 			Display: &armservicelinker.OperationDisplay{
		// 				Description: to.Ptr("Returns list of Linkers which connects to the resource."),
		// 				Operation: to.Ptr("Linker_List"),
		// 				Provider: to.Ptr("Microsoft.ServiceLinker"),
		// 				Resource: to.Ptr("linkers"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceLinker/linkers/read"),
		// 			Display: &armservicelinker.OperationDisplay{
		// 				Description: to.Ptr("Returns Linker resource for a given name."),
		// 				Operation: to.Ptr("Linker_Get"),
		// 				Provider: to.Ptr("Microsoft.ServiceLinker"),
		// 				Resource: to.Ptr("linkers"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceLinker/linkers/write"),
		// 			Display: &armservicelinker.OperationDisplay{
		// 				Description: to.Ptr("Create or update linker resource."),
		// 				Operation: to.Ptr("Linker_CreateOrUpdate"),
		// 				Provider: to.Ptr("Microsoft.ServiceLinker"),
		// 				Resource: to.Ptr("linkers"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceLinker/linkers/delete"),
		// 			Display: &armservicelinker.OperationDisplay{
		// 				Description: to.Ptr("Delete a link."),
		// 				Operation: to.Ptr("Linker_Delete"),
		// 				Provider: to.Ptr("Microsoft.ServiceLinker"),
		// 				Resource: to.Ptr("linkers"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceLinker/linkers/write"),
		// 			Display: &armservicelinker.OperationDisplay{
		// 				Description: to.Ptr("Operation to update an existing link."),
		// 				Operation: to.Ptr("Linker_Update"),
		// 				Provider: to.Ptr("Microsoft.ServiceLinker"),
		// 				Resource: to.Ptr("linkers"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceLinker/linkers/validateLinker/action"),
		// 			Display: &armservicelinker.OperationDisplay{
		// 				Description: to.Ptr("Validate a link."),
		// 				Operation: to.Ptr("Linker_Validate"),
		// 				Provider: to.Ptr("Microsoft.ServiceLinker"),
		// 				Resource: to.Ptr("linkers"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceLinker/linkers/listConfigurations/action"),
		// 			Display: &armservicelinker.OperationDisplay{
		// 				Description: to.Ptr("list source configurations for a linker."),
		// 				Operation: to.Ptr("Linker_ListConfigurations"),
		// 				Provider: to.Ptr("Microsoft.ServiceLinker"),
		// 				Resource: to.Ptr("linkers"),
		// 			},
		// 			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 ProxyResource

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 name of the resource
	Name *string

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

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

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

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

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 SecretAuthInfo

type SecretAuthInfo struct {
	// REQUIRED; The authentication type.
	AuthType *AuthType

	// Username or account name for secret auth.
	Name *string

	// Password or key vault secret for secret auth.
	SecretInfo SecretInfoBaseClassification
}

SecretAuthInfo - The authentication info when authType is secret

func (*SecretAuthInfo) GetAuthInfoBase added in v0.2.0

func (s *SecretAuthInfo) GetAuthInfoBase() *AuthInfoBase

GetAuthInfoBase implements the AuthInfoBaseClassification interface for type SecretAuthInfo.

func (SecretAuthInfo) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SecretAuthInfo.

func (*SecretAuthInfo) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SecretAuthInfo.

type SecretInfoBase added in v0.3.0

type SecretInfoBase struct {
	// REQUIRED; The secret type.
	SecretType *SecretType
}

SecretInfoBase - The secret info

func (*SecretInfoBase) GetSecretInfoBase added in v0.3.0

func (s *SecretInfoBase) GetSecretInfoBase() *SecretInfoBase

GetSecretInfoBase implements the SecretInfoBaseClassification interface for type SecretInfoBase.

func (SecretInfoBase) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SecretInfoBase.

func (*SecretInfoBase) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SecretInfoBase.

type SecretInfoBaseClassification added in v0.3.0

type SecretInfoBaseClassification interface {
	// GetSecretInfoBase returns the SecretInfoBase content of the underlying type.
	GetSecretInfoBase() *SecretInfoBase
}

SecretInfoBaseClassification provides polymorphic access to related types. Call the interface's GetSecretInfoBase() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *KeyVaultSecretReferenceSecretInfo, *KeyVaultSecretURISecretInfo, *SecretInfoBase, *ValueSecretInfo

type SecretStore added in v0.3.0

type SecretStore struct {
	// The key vault id to store secret
	KeyVaultID *string
}

SecretStore - An option to store secret value in secure place

func (SecretStore) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SecretStore.

func (*SecretStore) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SecretStore.

type SecretType added in v0.3.0

type SecretType string

SecretType - The secret type.

const (
	SecretTypeKeyVaultSecretReference SecretType = "keyVaultSecretReference"
	SecretTypeKeyVaultSecretURI       SecretType = "keyVaultSecretUri"
	SecretTypeRawValue                SecretType = "rawValue"
)

func PossibleSecretTypeValues added in v0.3.0

func PossibleSecretTypeValues() []SecretType

PossibleSecretTypeValues returns the possible values for the SecretType const type.

type ServicePrincipalCertificateAuthInfo

type ServicePrincipalCertificateAuthInfo struct {
	// REQUIRED; The authentication type.
	AuthType *AuthType

	// REQUIRED; ServicePrincipal certificate for servicePrincipal auth.
	Certificate *string

	// REQUIRED; Application clientId for servicePrincipal auth.
	ClientID *string

	// REQUIRED; Principal Id for servicePrincipal auth.
	PrincipalID *string
}

ServicePrincipalCertificateAuthInfo - The authentication info when authType is servicePrincipal certificate

func (*ServicePrincipalCertificateAuthInfo) GetAuthInfoBase added in v0.2.0

func (s *ServicePrincipalCertificateAuthInfo) GetAuthInfoBase() *AuthInfoBase

GetAuthInfoBase implements the AuthInfoBaseClassification interface for type ServicePrincipalCertificateAuthInfo.

func (ServicePrincipalCertificateAuthInfo) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServicePrincipalCertificateAuthInfo.

func (*ServicePrincipalCertificateAuthInfo) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipalCertificateAuthInfo.

type ServicePrincipalSecretAuthInfo

type ServicePrincipalSecretAuthInfo struct {
	// REQUIRED; The authentication type.
	AuthType *AuthType

	// REQUIRED; ServicePrincipal application clientId for servicePrincipal auth.
	ClientID *string

	// REQUIRED; Principal Id for servicePrincipal auth.
	PrincipalID *string

	// REQUIRED; Secret for servicePrincipal auth.
	Secret *string
}

ServicePrincipalSecretAuthInfo - The authentication info when authType is servicePrincipal secret

func (*ServicePrincipalSecretAuthInfo) GetAuthInfoBase added in v0.2.0

func (s *ServicePrincipalSecretAuthInfo) GetAuthInfoBase() *AuthInfoBase

GetAuthInfoBase implements the AuthInfoBaseClassification interface for type ServicePrincipalSecretAuthInfo.

func (ServicePrincipalSecretAuthInfo) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServicePrincipalSecretAuthInfo.

func (*ServicePrincipalSecretAuthInfo) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipalSecretAuthInfo.

type SourceConfiguration

type SourceConfiguration struct {
	// The name of setting.
	Name *string

	// The value of setting
	Value *string
}

SourceConfiguration - A configuration item for source resource

func (SourceConfiguration) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SourceConfiguration.

func (*SourceConfiguration) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SourceConfiguration.

type SourceConfigurationResult

type SourceConfigurationResult struct {
	// The configuration properties for source resource.
	Configurations []*SourceConfiguration
}

SourceConfigurationResult - Configurations for source resource, include appSettings, connectionString and serviceBindings

func (SourceConfigurationResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SourceConfigurationResult.

func (*SourceConfigurationResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SourceConfigurationResult.

type SystemAssignedIdentityAuthInfo

type SystemAssignedIdentityAuthInfo struct {
	// REQUIRED; The authentication type.
	AuthType *AuthType
}

SystemAssignedIdentityAuthInfo - The authentication info when authType is systemAssignedIdentity

func (*SystemAssignedIdentityAuthInfo) GetAuthInfoBase added in v0.2.0

func (s *SystemAssignedIdentityAuthInfo) GetAuthInfoBase() *AuthInfoBase

GetAuthInfoBase implements the AuthInfoBaseClassification interface for type SystemAssignedIdentityAuthInfo.

func (SystemAssignedIdentityAuthInfo) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SystemAssignedIdentityAuthInfo.

func (*SystemAssignedIdentityAuthInfo) UnmarshalJSON added in v0.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SystemAssignedIdentityAuthInfo.

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 TargetServiceBase added in v0.3.0

type TargetServiceBase struct {
	// REQUIRED; The target service type.
	Type *TargetServiceType
}

TargetServiceBase - The target service properties

func (*TargetServiceBase) GetTargetServiceBase added in v0.3.0

func (t *TargetServiceBase) GetTargetServiceBase() *TargetServiceBase

GetTargetServiceBase implements the TargetServiceBaseClassification interface for type TargetServiceBase.

func (TargetServiceBase) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type TargetServiceBase.

func (*TargetServiceBase) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type TargetServiceBase.

type TargetServiceBaseClassification added in v0.3.0

type TargetServiceBaseClassification interface {
	// GetTargetServiceBase returns the TargetServiceBase content of the underlying type.
	GetTargetServiceBase() *TargetServiceBase
}

TargetServiceBaseClassification provides polymorphic access to related types. Call the interface's GetTargetServiceBase() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AzureResource, *ConfluentBootstrapServer, *ConfluentSchemaRegistry, *TargetServiceBase

type TargetServiceType added in v1.0.0

type TargetServiceType string

TargetServiceType - The target service type.

const (
	TargetServiceTypeAzureResource            TargetServiceType = "AzureResource"
	TargetServiceTypeConfluentBootstrapServer TargetServiceType = "ConfluentBootstrapServer"
	TargetServiceTypeConfluentSchemaRegistry  TargetServiceType = "ConfluentSchemaRegistry"
)

func PossibleTargetServiceTypeValues added in v1.0.0

func PossibleTargetServiceTypeValues() []TargetServiceType

PossibleTargetServiceTypeValues returns the possible values for the TargetServiceType const type.

type UserAssignedIdentityAuthInfo

type UserAssignedIdentityAuthInfo struct {
	// REQUIRED; The authentication type.
	AuthType *AuthType

	// Client Id for userAssignedIdentity.
	ClientID *string

	// Subscription id for userAssignedIdentity.
	SubscriptionID *string
}

UserAssignedIdentityAuthInfo - The authentication info when authType is userAssignedIdentity

func (*UserAssignedIdentityAuthInfo) GetAuthInfoBase added in v0.2.0

func (u *UserAssignedIdentityAuthInfo) GetAuthInfoBase() *AuthInfoBase

GetAuthInfoBase implements the AuthInfoBaseClassification interface for type UserAssignedIdentityAuthInfo.

func (UserAssignedIdentityAuthInfo) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentityAuthInfo.

func (*UserAssignedIdentityAuthInfo) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentityAuthInfo.

type VNetSolution added in v0.3.0

type VNetSolution struct {
	// Type of VNet solution.
	Type *VNetSolutionType
}

VNetSolution - The VNet solution for linker

func (VNetSolution) MarshalJSON added in v1.1.0

func (v VNetSolution) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VNetSolution.

func (*VNetSolution) UnmarshalJSON added in v1.1.0

func (v *VNetSolution) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VNetSolution.

type VNetSolutionType added in v0.3.0

type VNetSolutionType string

VNetSolutionType - Type of VNet solution.

const (
	VNetSolutionTypePrivateLink     VNetSolutionType = "privateLink"
	VNetSolutionTypeServiceEndpoint VNetSolutionType = "serviceEndpoint"
)

func PossibleVNetSolutionTypeValues added in v0.3.0

func PossibleVNetSolutionTypeValues() []VNetSolutionType

PossibleVNetSolutionTypeValues returns the possible values for the VNetSolutionType const type.

type ValidateOperationResult added in v1.0.0

type ValidateOperationResult struct {
	// The validation result detail.
	Properties *ValidateResult

	// Validated linker id.
	ResourceID *string

	// Validation operation status.
	Status *string
}

ValidateOperationResult - The validation operation result for a linker.

func (ValidateOperationResult) MarshalJSON added in v1.1.0

func (v ValidateOperationResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ValidateOperationResult.

func (*ValidateOperationResult) UnmarshalJSON added in v1.1.0

func (v *ValidateOperationResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ValidateOperationResult.

type ValidateResult

type ValidateResult struct {
	// The authentication type.
	AuthType *AuthType

	// A boolean value indicating whether the connection is available or not
	IsConnectionAvailable *bool

	// The linker name.
	LinkerName *string

	// The end time of the validation report.
	ReportEndTimeUTC *time.Time

	// The start time of the validation report.
	ReportStartTimeUTC *time.Time

	// The resource id of the linker source application.
	SourceID *string

	// The resource Id of target service.
	TargetID *string

	// The detail of validation result
	ValidationDetail []*ValidationResultItem
}

ValidateResult - The validation result for a linker.

func (ValidateResult) MarshalJSON

func (v ValidateResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ValidateResult.

func (*ValidateResult) UnmarshalJSON

func (v *ValidateResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ValidateResult.

type ValidationResultItem added in v0.3.0

type ValidationResultItem struct {
	// The display name of validation item
	Description *string

	// The error code of validation result
	ErrorCode *string

	// The error message of validation result
	ErrorMessage *string

	// The validation item name.
	Name *string

	// The result of validation
	Result *ValidationResultStatus
}

ValidationResultItem - The validation item for a linker.

func (ValidationResultItem) MarshalJSON added in v1.1.0

func (v ValidationResultItem) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ValidationResultItem.

func (*ValidationResultItem) UnmarshalJSON added in v1.1.0

func (v *ValidationResultItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ValidationResultItem.

type ValidationResultStatus added in v0.4.0

type ValidationResultStatus string

ValidationResultStatus - The result of validation

const (
	ValidationResultStatusFailure ValidationResultStatus = "failure"
	ValidationResultStatusSuccess ValidationResultStatus = "success"
	ValidationResultStatusWarning ValidationResultStatus = "warning"
)

func PossibleValidationResultStatusValues added in v0.4.0

func PossibleValidationResultStatusValues() []ValidationResultStatus

PossibleValidationResultStatusValues returns the possible values for the ValidationResultStatus const type.

type ValueSecretInfo added in v0.3.0

type ValueSecretInfo struct {
	// REQUIRED; The secret type.
	SecretType *SecretType

	// The actual value of the secret.
	Value *string
}

ValueSecretInfo - The secret info when type is rawValue. It's for scenarios that user input the secret.

func (*ValueSecretInfo) GetSecretInfoBase added in v0.3.0

func (v *ValueSecretInfo) GetSecretInfoBase() *SecretInfoBase

GetSecretInfoBase implements the SecretInfoBaseClassification interface for type ValueSecretInfo.

func (ValueSecretInfo) MarshalJSON added in v0.3.0

func (v ValueSecretInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ValueSecretInfo.

func (*ValueSecretInfo) UnmarshalJSON added in v0.3.0

func (v *ValueSecretInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ValueSecretInfo.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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