armaad

package module
v0.0.0-...-45adee8 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: MIT Imports: 12 Imported by: 0

README

Azure Active Directory Module for Go

The armaad module provides operations for working with Azure Active Directory.

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 Active Directory module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/aad/armaad

Authorization

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

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 Active Directory 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 ARMProxyResource

type ARMProxyResource struct {
	// READ-ONLY; The unique resource identifier of the Azure AD PrivateLink Policy.
	ID *string

	// READ-ONLY; The name of the Azure AD PrivateLink Policy.
	Name *string

	// READ-ONLY; The type of Azure resource.
	Type *string
}

ARMProxyResource - The resource model definition for a ARM proxy resource. It will have everything other than required location and tags

func (ARMProxyResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ARMProxyResource.

func (*ARMProxyResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ARMProxyResource.

type AzureResourceBase

type AzureResourceBase struct {
	// Name of this resource.
	Name *string

	// READ-ONLY; String Id used to locate any resource on Azure.
	ID *string

	// READ-ONLY; Type of this resource.
	Type *string
}

AzureResourceBase - Common properties for all Azure resources.

func (AzureResourceBase) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AzureResourceBase.

func (*AzureResourceBase) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureResourceBase.

type ClientFactory

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

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

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

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

func (*ClientFactory) NewPrivateEndpointConnectionsClient

func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.

func (*ClientFactory) NewPrivateLinkForAzureAdClient

func (c *ClientFactory) NewPrivateLinkForAzureAdClient() *PrivateLinkForAzureAdClient

NewPrivateLinkForAzureAdClient creates a new instance of PrivateLinkForAzureAdClient.

func (*ClientFactory) NewPrivateLinkResourcesClient

func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient.

type ErrorDefinition

type ErrorDefinition struct {
	// READ-ONLY; Service specific error code which serves as the substatus for the HTTP error code.
	Code *string

	// READ-ONLY; Internal error details.
	Details []*ErrorDefinition

	// READ-ONLY; Description of the error.
	Message *string
}

ErrorDefinition - Error definition.

func (ErrorDefinition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorDefinition.

func (*ErrorDefinition) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDefinition.

type ErrorResponse

type ErrorResponse struct {
	// The error details.
	Error *ErrorDefinition
}

ErrorResponse - Error response.

func (ErrorResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

type PrivateEndpoint

type PrivateEndpoint struct {
	// Full identifier of the private endpoint resource.
	ID *string
}

PrivateEndpoint - Private endpoint object properties.

func (PrivateEndpoint) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint.

func (*PrivateEndpoint) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint.

type PrivateEndpointConnection

type PrivateEndpointConnection struct {
	// Resource properties.
	Properties *PrivateEndpointConnectionProperties

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

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

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

PrivateEndpointConnection - Private endpoint connection resource.

func (PrivateEndpointConnection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.

func (*PrivateEndpointConnection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.

type PrivateEndpointConnectionListResult

type PrivateEndpointConnectionListResult struct {
	// URL to next page of results
	NextLink *string

	// Array of private link resources
	Value []*PrivateEndpointConnection
}

PrivateEndpointConnectionListResult - A list of private link resources

func (PrivateEndpointConnectionListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult.

func (*PrivateEndpointConnectionListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult.

type PrivateEndpointConnectionProperties

type PrivateEndpointConnectionProperties struct {
	// Properties of the private endpoint object.
	PrivateEndpoint *PrivateEndpoint

	// Updated tag information to set into the PrivateLinkConnection instance.
	PrivateLinkConnectionTags *TagsResource

	// Approval state of the private link connection.
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState

	// READ-ONLY; Provisioning state of the private endpoint connection.
	ProvisioningState *PrivateEndpointConnectionProvisioningState
}

PrivateEndpointConnectionProperties - Properties of the private endpoint connection resource.

func (PrivateEndpointConnectionProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.

func (*PrivateEndpointConnectionProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.

type PrivateEndpointConnectionProvisioningState

type PrivateEndpointConnectionProvisioningState string

PrivateEndpointConnectionProvisioningState - The current provisioning state.

const (
	PrivateEndpointConnectionProvisioningStateFailed       PrivateEndpointConnectionProvisioningState = "Failed"
	PrivateEndpointConnectionProvisioningStateProvisioning PrivateEndpointConnectionProvisioningState = "Provisioning"
	PrivateEndpointConnectionProvisioningStateSucceeded    PrivateEndpointConnectionProvisioningState = "Succeeded"
)

func PossiblePrivateEndpointConnectionProvisioningStateValues

func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState

PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type.

type PrivateEndpointConnectionsClient

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

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

func NewPrivateEndpointConnectionsClient

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

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

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

func (*PrivateEndpointConnectionsClient) BeginCreate

BeginCreate - Creates specified private endpoint connection associated with the given policy. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-03-01

  • resourceGroupName - Name of an Azure resource group.
  • policyName - The name of the private link policy in Azure AD.
  • privateEndpointConnectionName - The PrivateEndpointConnection name.
  • parameters - The intended state of private endpoint connection.
  • options - PrivateEndpointConnectionsClientBeginCreateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azureactivedirectory/resource-manager/Microsoft.Aadiam/stable/2020-03-01/examples/AzureADPrivateEndpointConnectionsCreate.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/aad/armaad"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armaad.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginCreate(ctx, "resourcegroup", "example-policy-5849", "{privateEndpointConnection name}", armaad.PrivateEndpointConnection{
		Properties: &armaad.PrivateEndpointConnectionProperties{
			PrivateEndpoint: &armaad.PrivateEndpoint{
				ID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/microsoft.aadiam/privateLinkForAzureAD/ddb1/privateLinkConnections/{privateEndpointConnection name}"),
			},
			PrivateLinkServiceConnectionState: &armaad.PrivateLinkServiceConnectionState{
				Description:     to.Ptr("You may pass"),
				ActionsRequired: to.Ptr("None"),
				Status:          to.Ptr(armaad.PrivateEndpointServiceConnectionStatusApproved),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*PrivateEndpointConnectionsClient) BeginDelete

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

BeginDelete - Deletes the specified private endpoint connection associated with the given policy. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-03-01

  • resourceGroupName - Name of an Azure resource group.
  • policyName - The name of the private link policy in Azure AD.
  • privateEndpointConnectionName - The PrivateEndpointConnection name.
  • options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azureactivedirectory/resource-manager/Microsoft.Aadiam/stable/2020-03-01/examples/AzureADPrivateEndpointConnectionsDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/aad/armaad"
)

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

func (*PrivateEndpointConnectionsClient) Get

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

Get - Gets the specified private endpoint connection associated with the given policy. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-03-01

  • resourceGroupName - Name of an Azure resource group.
  • policyName - The name of the private link policy in Azure AD.
  • privateEndpointConnectionName - The PrivateEndpointConnection name.
  • options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azureactivedirectory/resource-manager/Microsoft.Aadiam/stable/2020-03-01/examples/AzureADPrivateEndpointConnectionsGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/aad/armaad"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armaad.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "myResourceGroup", "example-policy-5849", "{privateEndpointConnection name}", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PrivateEndpointConnection = armaad.PrivateEndpointConnection{
	// 	Name: to.Ptr("{privateEndpointConnection name}"),
	// 	Type: to.Ptr("microsoft.aadiam/privateLinkForAzureAD/privateEndpointConnections"),
	// 	ID: to.Ptr("subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/microsoft.aadiam/privateLinkForAzureAD/example-policy-5849/privateLinkConnections/{privateEndpointConnection name}"),
	// 	Properties: &armaad.PrivateEndpointConnectionProperties{
	// 		PrivateEndpoint: &armaad.PrivateEndpoint{
	// 			ID: to.Ptr("subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/microsoft.aadiam/privateLinkForAzureAD/example-policy-5849/privateLinkConnections/{privateEndpointConnection name}"),
	// 		},
	// 		PrivateLinkServiceConnectionState: &armaad.PrivateLinkServiceConnectionState{
	// 			Description: to.Ptr("approve please"),
	// 			ActionsRequired: to.Ptr("None"),
	// 			Status: to.Ptr(armaad.PrivateEndpointServiceConnectionStatusPending),
	// 		},
	// 		ProvisioningState: to.Ptr(armaad.PrivateEndpointConnectionProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*PrivateEndpointConnectionsClient) NewListByPolicyNamePager

NewListByPolicyNamePager - Lists all Private Endpoint Connections for the given policy.

Generated from API version 2020-03-01

  • resourceGroupName - Name of an Azure resource group.
  • policyName - The name of the private link policy in Azure AD.
  • options - PrivateEndpointConnectionsClientListByPolicyNameOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByPolicyNamePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azureactivedirectory/resource-manager/Microsoft.Aadiam/stable/2020-03-01/examples/AzureADPrivateEndpointConnectionsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/aad/armaad"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armaad.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListByPolicyNamePager("myResourceGroup", "example-policy-5849", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.PrivateEndpointConnectionListResult = armaad.PrivateEndpointConnectionListResult{
		// 	Value: []*armaad.PrivateEndpointConnection{
		// 		{
		// 			Name: to.Ptr("{privateEndpointConnection name}"),
		// 			Type: to.Ptr("microsoft.aadiam/privateLinkForAzureAD/privateEndpointConnections"),
		// 			ID: to.Ptr("subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/microsoft.aadiam/privateLinkForAzureAD/example-policy-5849/privateLinkConnections/{privateEndpointConnection name}"),
		// 			Properties: &armaad.PrivateEndpointConnectionProperties{
		// 				PrivateEndpoint: &armaad.PrivateEndpoint{
		// 					ID: to.Ptr("subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/microsoft.aadiam/privateLinkForAzureAD/example-policy-5849/privateLinkConnections/{privateEndpointConnection name}"),
		// 				},
		// 				PrivateLinkServiceConnectionState: &armaad.PrivateLinkServiceConnectionState{
		// 					Description: to.Ptr("approve please"),
		// 					ActionsRequired: to.Ptr("None"),
		// 					Status: to.Ptr(armaad.PrivateEndpointServiceConnectionStatusPending),
		// 				},
		// 				ProvisioningState: to.Ptr(armaad.PrivateEndpointConnectionProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

type PrivateEndpointConnectionsClientBeginCreateOptions

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

PrivateEndpointConnectionsClientBeginCreateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreate method.

type PrivateEndpointConnectionsClientBeginDeleteOptions

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

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

type PrivateEndpointConnectionsClientCreateResponse

type PrivateEndpointConnectionsClientCreateResponse struct {
	// Private endpoint connection resource.
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientCreateResponse contains the response from method PrivateEndpointConnectionsClient.BeginCreate.

type PrivateEndpointConnectionsClientDeleteResponse

type PrivateEndpointConnectionsClientDeleteResponse struct {
}

PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete.

type PrivateEndpointConnectionsClientGetOptions

type PrivateEndpointConnectionsClientGetOptions struct {
}

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

type PrivateEndpointConnectionsClientGetResponse

type PrivateEndpointConnectionsClientGetResponse struct {
	// Private endpoint connection resource.
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.

type PrivateEndpointConnectionsClientListByPolicyNameOptions

type PrivateEndpointConnectionsClientListByPolicyNameOptions struct {
}

PrivateEndpointConnectionsClientListByPolicyNameOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByPolicyNamePager method.

type PrivateEndpointConnectionsClientListByPolicyNameResponse

type PrivateEndpointConnectionsClientListByPolicyNameResponse struct {
	// A list of private link resources
	PrivateEndpointConnectionListResult
}

PrivateEndpointConnectionsClientListByPolicyNameResponse contains the response from method PrivateEndpointConnectionsClient.NewListByPolicyNamePager.

type PrivateEndpointServiceConnectionStatus

type PrivateEndpointServiceConnectionStatus string

PrivateEndpointServiceConnectionStatus - The private endpoint connection status.

const (
	PrivateEndpointServiceConnectionStatusApproved     PrivateEndpointServiceConnectionStatus = "Approved"
	PrivateEndpointServiceConnectionStatusDisconnected PrivateEndpointServiceConnectionStatus = "Disconnected"
	PrivateEndpointServiceConnectionStatusPending      PrivateEndpointServiceConnectionStatus = "Pending"
	PrivateEndpointServiceConnectionStatusRejected     PrivateEndpointServiceConnectionStatus = "Rejected"
)

func PossiblePrivateEndpointServiceConnectionStatusValues

func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus

PossiblePrivateEndpointServiceConnectionStatusValues returns the possible values for the PrivateEndpointServiceConnectionStatus const type.

type PrivateLinkForAzureAdClient

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

PrivateLinkForAzureAdClient contains the methods for the PrivateLinkForAzureAd group. Don't use this type directly, use NewPrivateLinkForAzureAdClient() instead.

func NewPrivateLinkForAzureAdClient

func NewPrivateLinkForAzureAdClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkForAzureAdClient, error)

NewPrivateLinkForAzureAdClient creates a new instance of PrivateLinkForAzureAdClient with the specified values.

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

func (*PrivateLinkForAzureAdClient) BeginCreate

BeginCreate - Creates a private link policy. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-03-01

  • resourceGroupName - Name of an Azure resource group.
  • policyName - The name of the private link policy in Azure AD.
  • privateLinkPolicy - private link Policy supplied to the operation.
  • options - PrivateLinkForAzureAdClientBeginCreateOptions contains the optional parameters for the PrivateLinkForAzureAdClient.BeginCreate method.
Example (PrivateLinkPolicyCreate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azureactivedirectory/resource-manager/Microsoft.Aadiam/stable/2020-03-01/examples/AzureADPrivateLinkPolicyCreate.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/aad/armaad"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armaad.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateLinkForAzureAdClient().BeginCreate(ctx, "rg1", "ddb1", armaad.PrivateLinkPolicy{
		Name:           to.Ptr("myOrgPrivateLinkPolicy"),
		AllTenants:     to.Ptr(false),
		OwnerTenantID:  to.Ptr("950f8bca-bf4d-4a41-ad10-034e792a243d"),
		ResourceGroup:  to.Ptr("myOrgVnetRG"),
		ResourceName:   to.Ptr("myOrgVnetPrivateLink"),
		SubscriptionID: to.Ptr("57849194-ea1f-470b-abda-d195b25634c1"),
		Tenants: []*string{
			to.Ptr("3616657d-1c80-41ae-9d83-2a2776f2c9be"),
			to.Ptr("727b6ef1-18ab-4627-ac95-3f9cd945ed87")},
	}, 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.PrivateLinkPolicy = armaad.PrivateLinkPolicy{
	// 	Name: to.Ptr("myOrgPrivateLinkPolicy"),
	// 	AllTenants: to.Ptr(false),
	// 	OwnerTenantID: to.Ptr("950f8bca-bf4d-4a41-ad10-034e792a243d"),
	// 	ResourceGroup: to.Ptr("myOrgVnetRG"),
	// 	ResourceName: to.Ptr("myOrgVnetPrivateLink"),
	// 	SubscriptionID: to.Ptr("57849194-ea1f-470b-abda-d195b25634c1"),
	// 	Tenants: []*string{
	// 		to.Ptr("3616657d-1c80-41ae-9d83-2a2776f2c9be"),
	// 		to.Ptr("727b6ef1-18ab-4627-ac95-3f9cd945ed87")},
	// 	}
}
Output:

Example (PrivateLinkPolicyMinCreate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azureactivedirectory/resource-manager/Microsoft.Aadiam/stable/2020-03-01/examples/AzureADPrivateLinkPolicyMinCreate.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/aad/armaad"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armaad.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateLinkForAzureAdClient().BeginCreate(ctx, "rg1", "ddb1", armaad.PrivateLinkPolicy{
		Name:           to.Ptr("myOrgPrivateLinkPolicy"),
		AllTenants:     to.Ptr(false),
		OwnerTenantID:  to.Ptr("950f8bca-bf4d-4a41-ad10-034e792a243d"),
		ResourceGroup:  to.Ptr("myOrgVnetRG"),
		ResourceName:   to.Ptr("myOrgVnetPrivateLink"),
		SubscriptionID: to.Ptr("57849194-ea1f-470b-abda-d195b25634c1"),
		Tenants: []*string{
			to.Ptr("3616657d-1c80-41ae-9d83-2a2776f2c9be"),
			to.Ptr("727b6ef1-18ab-4627-ac95-3f9cd945ed87")},
	}, 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.PrivateLinkPolicy = armaad.PrivateLinkPolicy{
	// 	Name: to.Ptr("myOrgPrivateLinkPolicy"),
	// 	AllTenants: to.Ptr(false),
	// 	OwnerTenantID: to.Ptr("950f8bca-bf4d-4a41-ad10-034e792a243d"),
	// 	ResourceGroup: to.Ptr("myOrgVnetRG"),
	// 	ResourceName: to.Ptr("myOrgVnetPrivateLink"),
	// 	SubscriptionID: to.Ptr("57849194-ea1f-470b-abda-d195b25634c1"),
	// 	Tenants: []*string{
	// 		to.Ptr("3616657d-1c80-41ae-9d83-2a2776f2c9be"),
	// 		to.Ptr("727b6ef1-18ab-4627-ac95-3f9cd945ed87")},
	// 	}
}
Output:

func (*PrivateLinkForAzureAdClient) Delete

Delete - Deletes a private link policy. When operation completes, status code 200 returned without content. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-03-01

  • resourceGroupName - Name of an Azure resource group.
  • policyName - The name of the private link policy in Azure AD.
  • options - PrivateLinkForAzureAdClientDeleteOptions contains the optional parameters for the PrivateLinkForAzureAdClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azureactivedirectory/resource-manager/Microsoft.Aadiam/stable/2020-03-01/examples/AzureADPrivateLinkPolicyDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/aad/armaad"
)

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

func (*PrivateLinkForAzureAdClient) Get

Get - Gets a private link policy with a given name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-03-01

  • resourceGroupName - Name of an Azure resource group.
  • policyName - The name of the private link policy in Azure AD.
  • options - PrivateLinkForAzureAdClientGetOptions contains the optional parameters for the PrivateLinkForAzureAdClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azureactivedirectory/resource-manager/Microsoft.Aadiam/stable/2020-03-01/examples/AzureADPrivateLinkPolicyGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/aad/armaad"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armaad.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateLinkForAzureAdClient().Get(ctx, "rg1", "ddb1", 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.PrivateLinkPolicy = armaad.PrivateLinkPolicy{
	// 	Name: to.Ptr("myOrgPrivateLinkPolicy"),
	// 	AllTenants: to.Ptr(false),
	// 	OwnerTenantID: to.Ptr("950f8bca-bf4d-4a41-ad10-034e792a243d"),
	// 	ResourceGroup: to.Ptr("myOrgVnetRG"),
	// 	ResourceName: to.Ptr("myOrgVnetPrivateLink"),
	// 	SubscriptionID: to.Ptr("57849194-ea1f-470b-abda-d195b25634c1"),
	// 	Tenants: []*string{
	// 		to.Ptr("3616657d-1c80-41ae-9d83-2a2776f2c9be"),
	// 		to.Ptr("727b6ef1-18ab-4627-ac95-3f9cd945ed87")},
	// 	}
}
Output:

func (*PrivateLinkForAzureAdClient) NewListBySubscriptionPager

NewListBySubscriptionPager - Lists all Private Link Policies For AzureAD in the given subscription.

Generated from API version 2020-03-01

  • options - PrivateLinkForAzureAdClientListBySubscriptionOptions contains the optional parameters for the PrivateLinkForAzureAdClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azureactivedirectory/resource-manager/Microsoft.Aadiam/stable/2020-03-01/examples/AzureADPrivateLinkPolicyListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/aad/armaad"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armaad.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPrivateLinkForAzureAdClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.PrivateLinkPolicyListResult = armaad.PrivateLinkPolicyListResult{
		// 	Value: []*armaad.PrivateLinkPolicy{
		// 		{
		// 			Name: to.Ptr("myOrgPrivateLinkPolicy"),
		// 			AllTenants: to.Ptr(false),
		// 			OwnerTenantID: to.Ptr("950f8bca-bf4d-4a41-ad10-034e792a243d"),
		// 			ResourceGroup: to.Ptr("myOrgVnetRG"),
		// 			ResourceName: to.Ptr("myOrgVnetPrivateLink"),
		// 			SubscriptionID: to.Ptr("57849194-ea1f-470b-abda-d195b25634c1"),
		// 			Tenants: []*string{
		// 				to.Ptr("3616657d-1c80-41ae-9d83-2a2776f2c9be"),
		// 				to.Ptr("727b6ef1-18ab-4627-ac95-3f9cd945ed87")},
		// 		}},
		// 	}
	}
}
Output:

func (*PrivateLinkForAzureAdClient) NewListPager

NewListPager - Operation to return the list of Private Link Policies For AzureAD scoped to the resourceGroup.

Generated from API version 2020-03-01

  • resourceGroupName - Name of an Azure resource group.
  • options - PrivateLinkForAzureAdClientListOptions contains the optional parameters for the PrivateLinkForAzureAdClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azureactivedirectory/resource-manager/Microsoft.Aadiam/stable/2020-03-01/examples/AzureADPrivateLinkPolicyList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/aad/armaad"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armaad.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPrivateLinkForAzureAdClient().NewListPager("rg1", 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.PrivateLinkPolicyListResult = armaad.PrivateLinkPolicyListResult{
		// 	Value: []*armaad.PrivateLinkPolicy{
		// 		{
		// 			Name: to.Ptr("myOrgPrivateLinkPolicy"),
		// 			OwnerTenantID: to.Ptr("950f8bca-bf4d-4a41-ad10-034e792a243d"),
		// 			ResourceGroup: to.Ptr("myOrgVnetRG"),
		// 			ResourceName: to.Ptr("myOrgVnetPrivateLink"),
		// 			SubscriptionID: to.Ptr("57849194-ea1f-470b-abda-d195b25634c1"),
		// 			Tenants: []*string{
		// 				to.Ptr("3616657d-1c80-41ae-9d83-2a2776f2c9be"),
		// 				to.Ptr("727b6ef1-18ab-4627-ac95-3f9cd945ed87")},
		// 		}},
		// 	}
	}
}
Output:

func (*PrivateLinkForAzureAdClient) Update

Update - Updates private link policy tags with specified values. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-03-01

  • resourceGroupName - Name of an Azure resource group.
  • policyName - The name of the private link policy in Azure AD.
  • options - PrivateLinkForAzureAdClientUpdateOptions contains the optional parameters for the PrivateLinkForAzureAdClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azureactivedirectory/resource-manager/Microsoft.Aadiam/stable/2020-03-01/examples/AzureADPrivateLinkPolicyUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/aad/armaad"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armaad.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateLinkForAzureAdClient().Update(ctx, "rg1", "ddb1", &armaad.PrivateLinkForAzureAdClientUpdateOptions{PrivateLinkPolicy: &armaad.PrivateLinkPolicyUpdateParameter{
		Tags: map[string]*string{},
	},
	})
	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.PrivateLinkPolicy = armaad.PrivateLinkPolicy{
	// 	Name: to.Ptr("myOrgPrivateLinkPolicy"),
	// 	AllTenants: to.Ptr(false),
	// 	OwnerTenantID: to.Ptr("950f8bca-bf4d-4a41-ad10-034e792a243d"),
	// 	ResourceGroup: to.Ptr("myOrgVnetRG"),
	// 	ResourceName: to.Ptr("myOrgVnetPrivateLink"),
	// 	SubscriptionID: to.Ptr("57849194-ea1f-470b-abda-d195b25634c1"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Tenants: []*string{
	// 		to.Ptr("3616657d-1c80-41ae-9d83-2a2776f2c9be"),
	// 		to.Ptr("727b6ef1-18ab-4627-ac95-3f9cd945ed87")},
	// 	}
}
Output:

type PrivateLinkForAzureAdClientBeginCreateOptions

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

PrivateLinkForAzureAdClientBeginCreateOptions contains the optional parameters for the PrivateLinkForAzureAdClient.BeginCreate method.

type PrivateLinkForAzureAdClientCreateResponse

type PrivateLinkForAzureAdClientCreateResponse struct {
	// PrivateLink Policy configuration object.
	PrivateLinkPolicy
}

PrivateLinkForAzureAdClientCreateResponse contains the response from method PrivateLinkForAzureAdClient.BeginCreate.

type PrivateLinkForAzureAdClientDeleteOptions

type PrivateLinkForAzureAdClientDeleteOptions struct {
}

PrivateLinkForAzureAdClientDeleteOptions contains the optional parameters for the PrivateLinkForAzureAdClient.Delete method.

type PrivateLinkForAzureAdClientDeleteResponse

type PrivateLinkForAzureAdClientDeleteResponse struct {
}

PrivateLinkForAzureAdClientDeleteResponse contains the response from method PrivateLinkForAzureAdClient.Delete.

type PrivateLinkForAzureAdClientGetOptions

type PrivateLinkForAzureAdClientGetOptions struct {
}

PrivateLinkForAzureAdClientGetOptions contains the optional parameters for the PrivateLinkForAzureAdClient.Get method.

type PrivateLinkForAzureAdClientGetResponse

type PrivateLinkForAzureAdClientGetResponse struct {
	// PrivateLink Policy configuration object.
	PrivateLinkPolicy
}

PrivateLinkForAzureAdClientGetResponse contains the response from method PrivateLinkForAzureAdClient.Get.

type PrivateLinkForAzureAdClientListBySubscriptionOptions

type PrivateLinkForAzureAdClientListBySubscriptionOptions struct {
}

PrivateLinkForAzureAdClientListBySubscriptionOptions contains the optional parameters for the PrivateLinkForAzureAdClient.NewListBySubscriptionPager method.

type PrivateLinkForAzureAdClientListBySubscriptionResponse

type PrivateLinkForAzureAdClientListBySubscriptionResponse struct {
	// A list of private link policies
	PrivateLinkPolicyListResult
}

PrivateLinkForAzureAdClientListBySubscriptionResponse contains the response from method PrivateLinkForAzureAdClient.NewListBySubscriptionPager.

type PrivateLinkForAzureAdClientListOptions

type PrivateLinkForAzureAdClientListOptions struct {
}

PrivateLinkForAzureAdClientListOptions contains the optional parameters for the PrivateLinkForAzureAdClient.NewListPager method.

type PrivateLinkForAzureAdClientListResponse

type PrivateLinkForAzureAdClientListResponse struct {
	// A list of private link policies
	PrivateLinkPolicyListResult
}

PrivateLinkForAzureAdClientListResponse contains the response from method PrivateLinkForAzureAdClient.NewListPager.

type PrivateLinkForAzureAdClientUpdateOptions

type PrivateLinkForAzureAdClientUpdateOptions struct {
	// Private Link Policy resource with the tags to be updated.
	PrivateLinkPolicy *PrivateLinkPolicyUpdateParameter
}

PrivateLinkForAzureAdClientUpdateOptions contains the optional parameters for the PrivateLinkForAzureAdClient.Update method.

type PrivateLinkForAzureAdClientUpdateResponse

type PrivateLinkForAzureAdClientUpdateResponse struct {
	// PrivateLink Policy configuration object.
	PrivateLinkPolicy
}

PrivateLinkForAzureAdClientUpdateResponse contains the response from method PrivateLinkForAzureAdClient.Update.

type PrivateLinkPolicy

type PrivateLinkPolicy struct {
	// Flag indicating whether all tenants are allowed
	AllTenants *bool

	// Name of this resource.
	Name *string

	// Guid of the owner tenant
	OwnerTenantID *string

	// Name of the resource group
	ResourceGroup *string

	// Name of the private link policy resource
	ResourceName *string

	// Subscription Identifier
	SubscriptionID *string

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

	// The list of tenantIds.
	Tenants []*string

	// READ-ONLY; String Id used to locate any resource on Azure.
	ID *string

	// READ-ONLY; Type of this resource.
	Type *string
}

PrivateLinkPolicy - PrivateLink Policy configuration object.

func (PrivateLinkPolicy) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkPolicy.

func (*PrivateLinkPolicy) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkPolicy.

type PrivateLinkPolicyListResult

type PrivateLinkPolicyListResult struct {
	// The link used to get the next page of operations.
	NextLink *string

	// Array of private link policies
	Value []*PrivateLinkPolicy
}

PrivateLinkPolicyListResult - A list of private link policies

func (PrivateLinkPolicyListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkPolicyListResult.

func (*PrivateLinkPolicyListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkPolicyListResult.

type PrivateLinkPolicyUpdateParameter

type PrivateLinkPolicyUpdateParameter struct {
	// Resource tags to be updated.
	Tags map[string]*string
}

PrivateLinkPolicyUpdateParameter - private Link policy parameters to be updated.

func (PrivateLinkPolicyUpdateParameter) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkPolicyUpdateParameter.

func (*PrivateLinkPolicyUpdateParameter) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkPolicyUpdateParameter.

type PrivateLinkResource

type PrivateLinkResource struct {
	// Resource properties.
	Properties *PrivateLinkResourceProperties

	// READ-ONLY; The unique resource identifier of the Azure AD PrivateLink Policy.
	ID *string

	// READ-ONLY; The name of the Azure AD PrivateLink Policy.
	Name *string

	// READ-ONLY; The type of Azure resource.
	Type *string
}

PrivateLinkResource - A private link resource

func (PrivateLinkResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.

func (*PrivateLinkResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.

type PrivateLinkResourceListResult

type PrivateLinkResourceListResult struct {
	// The link used to get the next page of operations.
	NextLink *string

	// Array of private link resources
	Value []*PrivateLinkResource
}

PrivateLinkResourceListResult - A list of private link resources

func (PrivateLinkResourceListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult.

func (*PrivateLinkResourceListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult.

type PrivateLinkResourceProperties

type PrivateLinkResourceProperties struct {
	// READ-ONLY; The private link resource group id.
	GroupID *string

	// READ-ONLY; The private link resource required member names.
	RequiredMembers []*string
}

PrivateLinkResourceProperties - Properties of a private link resource.

func (PrivateLinkResourceProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.

func (*PrivateLinkResourceProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.

type PrivateLinkResourcesClient

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

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

func NewPrivateLinkResourcesClient

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

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

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

func (*PrivateLinkResourcesClient) Get

Get - Gets the private link resources that need to be created for a policy of AzureAD. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-03-01

  • resourceGroupName - Name of an Azure resource group.
  • policyName - The name of the private link policy in Azure AD.
  • groupName - The name of the private link resource.
  • options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azureactivedirectory/resource-manager/Microsoft.Aadiam/stable/2020-03-01/examples/AzureADPrivateLinkResourceGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/aad/armaad"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armaad.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateLinkResourcesClient().Get(ctx, "rg1", "ddb1", "azureactivedirectory", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PrivateLinkResource = armaad.PrivateLinkResource{
	// 	Name: to.Ptr("azureactivedirectory"),
	// 	Type: to.Ptr("microsoft.aadiam/privateLinkforAzureAD/privateLinkResources"),
	// 	ID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/microsoft.aadiam/privateLinkForAzureAD/ddb1/privateLinkResources/azureactivedirectory"),
	// 	Properties: &armaad.PrivateLinkResourceProperties{
	// 		GroupID: to.Ptr("azureactivedirectory"),
	// 		RequiredMembers: []*string{
	// 			to.Ptr("authentication"),
	// 			to.Ptr("nonauthentication")},
	// 		},
	// 	}
}
Output:

func (*PrivateLinkResourcesClient) NewListByPrivateLinkPolicyPager

NewListByPrivateLinkPolicyPager - Gets the private link resources that need to be created for a policy of AzureAD.

Generated from API version 2020-03-01

  • resourceGroupName - Name of an Azure resource group.
  • policyName - The name of the private link policy in Azure AD.
  • options - PrivateLinkResourcesClientListByPrivateLinkPolicyOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByPrivateLinkPolicyPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azureactivedirectory/resource-manager/Microsoft.Aadiam/stable/2020-03-01/examples/AzureADPrivateLinkResourceListGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/aad/armaad"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armaad.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPrivateLinkResourcesClient().NewListByPrivateLinkPolicyPager("rg1", "ddb1", 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.PrivateLinkResourceListResult = armaad.PrivateLinkResourceListResult{
		// 	Value: []*armaad.PrivateLinkResource{
		// 		{
		// 			Name: to.Ptr("azureactivedirectory"),
		// 			Type: to.Ptr("microsoft.aadiam/privateLinkforAzureAD/privateLinkResources"),
		// 			ID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/microsoft.aadiam/privateLinkForAzureAD/ddb1/privateLinkResources/azureactivedirectory"),
		// 			Properties: &armaad.PrivateLinkResourceProperties{
		// 				GroupID: to.Ptr("azureactivedirectory"),
		// 				RequiredMembers: []*string{
		// 					to.Ptr("authentication"),
		// 					to.Ptr("nonauthentication")},
		// 				},
		// 		}},
		// 	}
	}
}
Output:

type PrivateLinkResourcesClientGetOptions

type PrivateLinkResourcesClientGetOptions struct {
}

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

type PrivateLinkResourcesClientGetResponse

type PrivateLinkResourcesClientGetResponse struct {
	// A private link resource
	PrivateLinkResource
}

PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get.

type PrivateLinkResourcesClientListByPrivateLinkPolicyOptions

type PrivateLinkResourcesClientListByPrivateLinkPolicyOptions struct {
}

PrivateLinkResourcesClientListByPrivateLinkPolicyOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByPrivateLinkPolicyPager method.

type PrivateLinkResourcesClientListByPrivateLinkPolicyResponse

type PrivateLinkResourcesClientListByPrivateLinkPolicyResponse struct {
	// A list of private link resources
	PrivateLinkResourceListResult
}

PrivateLinkResourcesClientListByPrivateLinkPolicyResponse contains the response from method PrivateLinkResourcesClient.NewListByPrivateLinkPolicyPager.

type PrivateLinkServiceConnectionState

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

	// The reason for approval or rejection.
	Description *string

	// Indicates whether the connection has been approved, rejected or removed by the given policy owner.
	Status *PrivateEndpointServiceConnectionStatus
}

PrivateLinkServiceConnectionState - An object that represents the approval state of the private link connection.

func (PrivateLinkServiceConnectionState) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState.

func (*PrivateLinkServiceConnectionState) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState.

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

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

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON

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

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

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type TagsResource

type TagsResource struct {
	// Resource tags
	Tags map[string]*string
}

TagsResource - A container holding only the Tags for a resource, allowing the user to update the tags on a PrivateLinkConnection instance.

func (TagsResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TagsResource.

func (*TagsResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type TagsResource.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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