armmsi

package module
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: MIT Imports: 15 Imported by: 17

README

Azure Managed Service Identity Module for Go

PkgGoDev

The armmsi module provides operations for working with Azure Managed Service Identity.

Source code

Getting started

Prerequisites

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Managed Service Identity module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/msi/armmsi

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Managed Service Identity. 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.

Clients

Azure Managed Service Identity modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential.

client, err := armmsi.NewUserAssignedIdentitiesClient(<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,
    },
}
client, err := armmsi.NewUserAssignedIdentitiesClient(<subscription ID>, cred, &options)

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Managed Service Identity 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 AssociatedResourcesListResult added in v0.4.0

type AssociatedResourcesListResult struct {
	// READ-ONLY; The url to get the next page of results, if any.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Total number of Azure resources assigned to the identity.
	TotalCount *float32 `json:"totalCount,omitempty" azure:"ro"`

	// READ-ONLY; The collection of Azure resources returned by the resource action to get a list of assigned resources.
	Value []*AzureResource `json:"value,omitempty" azure:"ro"`
}

AssociatedResourcesListResult - Azure resources returned by the resource action to get a list of assigned resources.

func (AssociatedResourcesListResult) MarshalJSON added in v0.4.0

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

MarshalJSON implements the json.Marshaller interface for type AssociatedResourcesListResult.

func (*AssociatedResourcesListResult) UnmarshalJSON added in v0.7.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AssociatedResourcesListResult.

type AzureResource added in v0.4.0

type AzureResource struct {
	// READ-ONLY; The ID of this resource.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of this resource.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource group this resource belongs to.
	ResourceGroup *string `json:"resourceGroup,omitempty" azure:"ro"`

	// READ-ONLY; The name of the subscription this resource belongs to.
	SubscriptionDisplayName *string `json:"subscriptionDisplayName,omitempty" azure:"ro"`

	// READ-ONLY; The ID of the subscription this resource belongs to.
	SubscriptionID *string `json:"subscriptionId,omitempty" azure:"ro"`

	// READ-ONLY; The type of this resource.
	Type *string `json:"type,omitempty" azure:"ro"`
}

AzureResource - Describes an Azure resource that is attached to an identity.

func (AzureResource) MarshalJSON added in v0.7.0

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

MarshalJSON implements the json.Marshaller interface for type AzureResource.

func (*AzureResource) UnmarshalJSON added in v0.7.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureResource.

type CloudError

type CloudError struct {
	// A list of additional details about the error.
	Error *CloudErrorBody `json:"error,omitempty"`
}

CloudError - An error response from the ManagedServiceIdentity service.

func (CloudError) MarshalJSON added in v0.7.0

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

MarshalJSON implements the json.Marshaller interface for type CloudError.

func (*CloudError) UnmarshalJSON added in v0.7.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CloudError.

type CloudErrorBody

type CloudErrorBody struct {
	// An identifier for the error.
	Code *string `json:"code,omitempty"`

	// A list of additional details about the error.
	Details []*CloudErrorBody `json:"details,omitempty"`

	// A message describing the error, intended to be suitable for display in a user interface.
	Message *string `json:"message,omitempty"`

	// The target of the particular error. For example, the name of the property in error.
	Target *string `json:"target,omitempty"`
}

CloudErrorBody - An error response from the ManagedServiceIdentity service.

func (CloudErrorBody) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CloudErrorBody.

func (*CloudErrorBody) UnmarshalJSON added in v0.7.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CloudErrorBody.

type FederatedIdentityCredential added in v0.7.0

type FederatedIdentityCredential struct {
	// The properties associated with the federated identity credential.
	Properties *FederatedIdentityCredentialProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

FederatedIdentityCredential - Describes a federated identity credential.

func (FederatedIdentityCredential) MarshalJSON added in v0.7.0

func (f FederatedIdentityCredential) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FederatedIdentityCredential.

func (*FederatedIdentityCredential) UnmarshalJSON added in v0.7.0

func (f *FederatedIdentityCredential) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FederatedIdentityCredential.

type FederatedIdentityCredentialProperties added in v0.7.0

type FederatedIdentityCredentialProperties struct {
	// REQUIRED; The list of audiences that can appear in the issued token.
	Audiences []*string `json:"audiences,omitempty"`

	// REQUIRED; The URL of the issuer to be trusted.
	Issuer *string `json:"issuer,omitempty"`

	// REQUIRED; The identifier of the external identity.
	Subject *string `json:"subject,omitempty"`
}

FederatedIdentityCredentialProperties - The properties associated with a federated identity credential.

func (FederatedIdentityCredentialProperties) MarshalJSON added in v0.7.0

func (f FederatedIdentityCredentialProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FederatedIdentityCredentialProperties.

func (*FederatedIdentityCredentialProperties) UnmarshalJSON added in v0.7.0

func (f *FederatedIdentityCredentialProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FederatedIdentityCredentialProperties.

type FederatedIdentityCredentialsClient added in v0.7.0

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

FederatedIdentityCredentialsClient contains the methods for the FederatedIdentityCredentials group. Don't use this type directly, use NewFederatedIdentityCredentialsClient() instead.

func NewFederatedIdentityCredentialsClient added in v0.7.0

func NewFederatedIdentityCredentialsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FederatedIdentityCredentialsClient, error)

NewFederatedIdentityCredentialsClient creates a new instance of FederatedIdentityCredentialsClient with the specified values. subscriptionID - The Id of the Subscription to which the identity belongs. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*FederatedIdentityCredentialsClient) CreateOrUpdate added in v0.7.0

func (client *FederatedIdentityCredentialsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, federatedIdentityCredentialResourceName string, parameters FederatedIdentityCredential, options *FederatedIdentityCredentialsClientCreateOrUpdateOptions) (FederatedIdentityCredentialsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create or update a federated identity credential under the specified user assigned identity. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-31-preview resourceGroupName - The name of the Resource Group to which the identity belongs. resourceName - The name of the identity resource. federatedIdentityCredentialResourceName - The name of the federated identity credential resource. parameters - Parameters to create or update the federated identity credential. options - FederatedIdentityCredentialsClientCreateOrUpdateOptions contains the optional parameters for the FederatedIdentityCredentialsClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2022-01-31-preview/examples/FederatedIdentityCredentialCreate.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/msi/armmsi"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmsi.NewFederatedIdentityCredentialsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"rgName",
		"resourceName",
		"ficResourceName",
		armmsi.FederatedIdentityCredential{
			Properties: &armmsi.FederatedIdentityCredentialProperties{
				Audiences: []*string{
					to.Ptr("api://AzureADTokenExchange")},
				Issuer:  to.Ptr("https://oidc.prod-aks.azure.com/IssuerGUID"),
				Subject: to.Ptr("system:serviceaccount:ns:svcaccount"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*FederatedIdentityCredentialsClient) Delete added in v0.7.0

func (client *FederatedIdentityCredentialsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, federatedIdentityCredentialResourceName string, options *FederatedIdentityCredentialsClientDeleteOptions) (FederatedIdentityCredentialsClientDeleteResponse, error)

Delete - Deletes the federated identity credential. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-31-preview resourceGroupName - The name of the Resource Group to which the identity belongs. resourceName - The name of the identity resource. federatedIdentityCredentialResourceName - The name of the federated identity credential resource. options - FederatedIdentityCredentialsClientDeleteOptions contains the optional parameters for the FederatedIdentityCredentialsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2022-01-31-preview/examples/FederatedIdentityCredentialDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/msi/armmsi"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmsi.NewFederatedIdentityCredentialsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"rgName",
		"resourceName",
		"ficResourceName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*FederatedIdentityCredentialsClient) Get added in v0.7.0

func (client *FederatedIdentityCredentialsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, federatedIdentityCredentialResourceName string, options *FederatedIdentityCredentialsClientGetOptions) (FederatedIdentityCredentialsClientGetResponse, error)

Get - Gets the federated identity credential. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-31-preview resourceGroupName - The name of the Resource Group to which the identity belongs. resourceName - The name of the identity resource. federatedIdentityCredentialResourceName - The name of the federated identity credential resource. options - FederatedIdentityCredentialsClientGetOptions contains the optional parameters for the FederatedIdentityCredentialsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2022-01-31-preview/examples/FederatedIdentityCredentialGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/msi/armmsi"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmsi.NewFederatedIdentityCredentialsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"rgName",
		"resourceName",
		"ficResourceName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*FederatedIdentityCredentialsClient) NewListPager added in v0.7.0

NewListPager - Lists all the federated identity credentials under the specified user assigned identity. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-31-preview resourceGroupName - The name of the Resource Group to which the identity belongs. resourceName - The name of the identity resource. options - FederatedIdentityCredentialsClientListOptions contains the optional parameters for the FederatedIdentityCredentialsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2022-01-31-preview/examples/FederatedIdentityCredentialList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/msi/armmsi"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmsi.NewFederatedIdentityCredentialsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("rgName",
		"resourceName",
		&armmsi.FederatedIdentityCredentialsClientListOptions{Top: nil,
			Skiptoken: nil,
		})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type FederatedIdentityCredentialsClientCreateOrUpdateOptions added in v0.7.0

type FederatedIdentityCredentialsClientCreateOrUpdateOptions struct {
}

FederatedIdentityCredentialsClientCreateOrUpdateOptions contains the optional parameters for the FederatedIdentityCredentialsClient.CreateOrUpdate method.

type FederatedIdentityCredentialsClientCreateOrUpdateResponse added in v0.7.0

type FederatedIdentityCredentialsClientCreateOrUpdateResponse struct {
	FederatedIdentityCredential
}

FederatedIdentityCredentialsClientCreateOrUpdateResponse contains the response from method FederatedIdentityCredentialsClient.CreateOrUpdate.

type FederatedIdentityCredentialsClientDeleteOptions added in v0.7.0

type FederatedIdentityCredentialsClientDeleteOptions struct {
}

FederatedIdentityCredentialsClientDeleteOptions contains the optional parameters for the FederatedIdentityCredentialsClient.Delete method.

type FederatedIdentityCredentialsClientDeleteResponse added in v0.7.0

type FederatedIdentityCredentialsClientDeleteResponse struct {
}

FederatedIdentityCredentialsClientDeleteResponse contains the response from method FederatedIdentityCredentialsClient.Delete.

type FederatedIdentityCredentialsClientGetOptions added in v0.7.0

type FederatedIdentityCredentialsClientGetOptions struct {
}

FederatedIdentityCredentialsClientGetOptions contains the optional parameters for the FederatedIdentityCredentialsClient.Get method.

type FederatedIdentityCredentialsClientGetResponse added in v0.7.0

type FederatedIdentityCredentialsClientGetResponse struct {
	FederatedIdentityCredential
}

FederatedIdentityCredentialsClientGetResponse contains the response from method FederatedIdentityCredentialsClient.Get.

type FederatedIdentityCredentialsClientListOptions added in v0.7.0

type FederatedIdentityCredentialsClientListOptions struct {
	// A skip token is used to continue retrieving items after an operation returns a partial result. If a previous response contains
	// a nextLink element, the value of the nextLink element will include a
	// skipToken parameter that specifies a starting point to use for subsequent calls.
	Skiptoken *string
	// Number of records to return.
	Top *int32
}

FederatedIdentityCredentialsClientListOptions contains the optional parameters for the FederatedIdentityCredentialsClient.List method.

type FederatedIdentityCredentialsClientListResponse added in v0.7.0

type FederatedIdentityCredentialsClientListResponse struct {
	FederatedIdentityCredentialsListResult
}

FederatedIdentityCredentialsClientListResponse contains the response from method FederatedIdentityCredentialsClient.List.

type FederatedIdentityCredentialsListResult added in v0.7.0

type FederatedIdentityCredentialsListResult struct {
	// The url to get the next page of results, if any.
	NextLink *string `json:"nextLink,omitempty"`

	// The collection of federated identity credentials returned by the listing operation.
	Value []*FederatedIdentityCredential `json:"value,omitempty"`
}

FederatedIdentityCredentialsListResult - Values returned by the List operation for federated identity credentials.

func (FederatedIdentityCredentialsListResult) MarshalJSON added in v0.7.0

func (f FederatedIdentityCredentialsListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FederatedIdentityCredentialsListResult.

func (*FederatedIdentityCredentialsListResult) UnmarshalJSON added in v0.7.0

func (f *FederatedIdentityCredentialsListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FederatedIdentityCredentialsListResult.

type Identity

type Identity struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The properties associated with the identity.
	Properties *UserAssignedIdentityProperties `json:"properties,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

Identity - Describes an identity resource.

func (Identity) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Identity.

func (*Identity) UnmarshalJSON added in v0.7.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Identity.

type IdentityUpdate

type IdentityUpdate struct {
	// The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The properties associated with the identity.
	Properties *UserAssignedIdentityProperties `json:"properties,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

IdentityUpdate - Describes an identity resource.

func (IdentityUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IdentityUpdate.

func (*IdentityUpdate) UnmarshalJSON added in v0.7.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type IdentityUpdate.

type Operation

type Operation struct {
	// The object that describes the operation.
	Display *OperationDisplay `json:"display,omitempty"`

	// The name of the REST Operation. This is of the format {provider}/{resource}/{operation}.
	Name *string `json:"name,omitempty"`
}

Operation supported by the Microsoft.ManagedIdentity REST API.

func (Operation) MarshalJSON added in v0.7.0

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

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON added in v0.7.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// A description of the operation.
	Description *string `json:"description,omitempty"`

	// The type of operation. For example: read, write, delete.
	Operation *string `json:"operation,omitempty"`

	// Friendly name of the resource provider.
	Provider *string `json:"provider,omitempty"`

	// The resource type on which the operation is performed.
	Resource *string `json:"resource,omitempty"`
}

OperationDisplay - The object that describes the operation.

func (OperationDisplay) MarshalJSON added in v0.7.0

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v0.7.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

type OperationListResult struct {
	// The url to get the next page of results, if any.
	NextLink *string `json:"nextLink,omitempty"`

	// A list of operations supported by Microsoft.ManagedIdentity Resource Provider.
	Value []*Operation `json:"value,omitempty"`
}

OperationListResult - A list of operations supported by Microsoft.ManagedIdentity Resource Provider.

func (OperationListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON added in v0.7.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type OperationsClient

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

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

func NewOperationsClient

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

NewOperationsClient creates a new instance of OperationsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*OperationsClient) NewListPager added in v0.5.0

NewListPager - Lists available operations for the Microsoft.ManagedIdentity provider If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-31-preview options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2022-01-31-preview/examples/MsiOperationsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/msi/armmsi"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmsi.NewOperationsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type OperationsClientListOptions added in v0.3.0

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse added in v0.3.0

type OperationsClientListResponse struct {
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.List.

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 `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

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

func (ProxyResource) MarshalJSON added in v0.7.0

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

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON added in v0.7.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 `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

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

func (Resource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON added in v0.7.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type SystemAssignedIdentitiesClient

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

SystemAssignedIdentitiesClient contains the methods for the SystemAssignedIdentities group. Don't use this type directly, use NewSystemAssignedIdentitiesClient() instead.

func NewSystemAssignedIdentitiesClient

func NewSystemAssignedIdentitiesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*SystemAssignedIdentitiesClient, error)

NewSystemAssignedIdentitiesClient creates a new instance of SystemAssignedIdentitiesClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SystemAssignedIdentitiesClient) GetByScope

GetByScope - Gets the systemAssignedIdentity available under the specified RP scope. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-31-preview scope - The resource provider scope of the resource. Parent resource being extended by Managed Identities. options - SystemAssignedIdentitiesClientGetByScopeOptions contains the optional parameters for the SystemAssignedIdentitiesClient.GetByScope method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2022-01-31-preview/examples/SystemAssignedIdentityGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/msi/armmsi"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmsi.NewSystemAssignedIdentitiesClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetByScope(ctx,
		"scope",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type SystemAssignedIdentitiesClientGetByScopeOptions added in v0.3.0

type SystemAssignedIdentitiesClientGetByScopeOptions struct {
}

SystemAssignedIdentitiesClientGetByScopeOptions contains the optional parameters for the SystemAssignedIdentitiesClient.GetByScope method.

type SystemAssignedIdentitiesClientGetByScopeResponse added in v0.3.0

type SystemAssignedIdentitiesClientGetByScopeResponse struct {
	SystemAssignedIdentity
}

SystemAssignedIdentitiesClientGetByScopeResponse contains the response from method SystemAssignedIdentitiesClient.GetByScope.

type SystemAssignedIdentity

type SystemAssignedIdentity struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The properties associated with the identity.
	Properties *SystemAssignedIdentityProperties `json:"properties,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

SystemAssignedIdentity - Describes a system assigned identity resource.

func (SystemAssignedIdentity) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SystemAssignedIdentity.

func (*SystemAssignedIdentity) UnmarshalJSON added in v0.7.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SystemAssignedIdentity.

type SystemAssignedIdentityProperties

type SystemAssignedIdentityProperties struct {
	// READ-ONLY; The id of the app associated with the identity. This is a random generated UUID by MSI.
	ClientID *string `json:"clientId,omitempty" azure:"ro"`

	// READ-ONLY; The ManagedServiceIdentity DataPlane URL that can be queried to obtain the identity credentials.
	ClientSecretURL *string `json:"clientSecretUrl,omitempty" azure:"ro"`

	// READ-ONLY; The id of the service principal object associated with the created identity.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`

	// READ-ONLY; The id of the tenant which the identity belongs to.
	TenantID *string `json:"tenantId,omitempty" azure:"ro"`
}

SystemAssignedIdentityProperties - The properties associated with the system assigned identity.

func (SystemAssignedIdentityProperties) MarshalJSON added in v0.7.0

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

MarshalJSON implements the json.Marshaller interface for type SystemAssignedIdentityProperties.

func (*SystemAssignedIdentityProperties) UnmarshalJSON added in v0.7.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SystemAssignedIdentityProperties.

type TrackedResource

type TrackedResource struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'

func (TrackedResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

func (*TrackedResource) UnmarshalJSON added in v0.7.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.

type UserAssignedIdentitiesClient

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

UserAssignedIdentitiesClient contains the methods for the UserAssignedIdentities group. Don't use this type directly, use NewUserAssignedIdentitiesClient() instead.

func NewUserAssignedIdentitiesClient

func NewUserAssignedIdentitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UserAssignedIdentitiesClient, error)

NewUserAssignedIdentitiesClient creates a new instance of UserAssignedIdentitiesClient with the specified values. subscriptionID - The Id of the Subscription to which the identity belongs. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*UserAssignedIdentitiesClient) CreateOrUpdate

CreateOrUpdate - Create or update an identity in the specified subscription and resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-31-preview resourceGroupName - The name of the Resource Group to which the identity belongs. resourceName - The name of the identity resource. parameters - Parameters to create or update the identity options - UserAssignedIdentitiesClientCreateOrUpdateOptions contains the optional parameters for the UserAssignedIdentitiesClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2022-01-31-preview/examples/IdentityCreate.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/msi/armmsi"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmsi.NewUserAssignedIdentitiesClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"rgName",
		"resourceName",
		armmsi.Identity{
			Location: to.Ptr("eastus"),
			Tags: map[string]*string{
				"key1": to.Ptr("value1"),
				"key2": to.Ptr("value2"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*UserAssignedIdentitiesClient) Delete

Delete - Deletes the identity. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-31-preview resourceGroupName - The name of the Resource Group to which the identity belongs. resourceName - The name of the identity resource. options - UserAssignedIdentitiesClientDeleteOptions contains the optional parameters for the UserAssignedIdentitiesClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2022-01-31-preview/examples/IdentityDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/msi/armmsi"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmsi.NewUserAssignedIdentitiesClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"rgName",
		"resourceName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*UserAssignedIdentitiesClient) Get

Get - Gets the identity. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-31-preview resourceGroupName - The name of the Resource Group to which the identity belongs. resourceName - The name of the identity resource. options - UserAssignedIdentitiesClientGetOptions contains the optional parameters for the UserAssignedIdentitiesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2022-01-31-preview/examples/IdentityGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/msi/armmsi"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmsi.NewUserAssignedIdentitiesClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"rgName",
		"resourceName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*UserAssignedIdentitiesClient) NewListAssociatedResourcesPager added in v0.5.0

NewListAssociatedResourcesPager - Lists the associated resources for this identity. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-31-preview resourceGroupName - The name of the Resource Group to which the identity belongs. resourceName - The name of the identity resource. options - UserAssignedIdentitiesClientListAssociatedResourcesOptions contains the optional parameters for the UserAssignedIdentitiesClient.ListAssociatedResources method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2022-01-31-preview/examples/IdentityListAssociatedResources.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/msi/armmsi"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmsi.NewUserAssignedIdentitiesClient("1cscb752-d7c9-463f-9731-fd31edada74a", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListAssociatedResourcesPager("testrg",
		"testid",
		&armmsi.UserAssignedIdentitiesClientListAssociatedResourcesOptions{Filter: to.Ptr("contains(name, 'test')"),
			Orderby:   to.Ptr("name asc"),
			Top:       to.Ptr[int32](10),
			Skip:      to.Ptr[int32](1),
			Skiptoken: nil,
		})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*UserAssignedIdentitiesClient) NewListByResourceGroupPager added in v0.5.0

NewListByResourceGroupPager - Lists all the userAssignedIdentities available under the specified ResourceGroup. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-31-preview resourceGroupName - The name of the Resource Group to which the identity belongs. options - UserAssignedIdentitiesClientListByResourceGroupOptions contains the optional parameters for the UserAssignedIdentitiesClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2022-01-31-preview/examples/IdentityListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/msi/armmsi"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmsi.NewUserAssignedIdentitiesClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("rgName",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*UserAssignedIdentitiesClient) NewListBySubscriptionPager added in v0.5.0

NewListBySubscriptionPager - Lists all the userAssignedIdentities available under the specified subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-31-preview options - UserAssignedIdentitiesClientListBySubscriptionOptions contains the optional parameters for the UserAssignedIdentitiesClient.ListBySubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2022-01-31-preview/examples/IdentityListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/msi/armmsi"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmsi.NewUserAssignedIdentitiesClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*UserAssignedIdentitiesClient) Update

Update - Update an identity in the specified subscription and resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-31-preview resourceGroupName - The name of the Resource Group to which the identity belongs. resourceName - The name of the identity resource. parameters - Parameters to update the identity options - UserAssignedIdentitiesClientUpdateOptions contains the optional parameters for the UserAssignedIdentitiesClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2022-01-31-preview/examples/IdentityUpdate.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/msi/armmsi"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmsi.NewUserAssignedIdentitiesClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"rgName",
		"resourceName",
		armmsi.IdentityUpdate{
			Location: to.Ptr("eastus"),
			Tags: map[string]*string{
				"key1": to.Ptr("value1"),
				"key2": to.Ptr("value2"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type UserAssignedIdentitiesClientCreateOrUpdateOptions added in v0.3.0

type UserAssignedIdentitiesClientCreateOrUpdateOptions struct {
}

UserAssignedIdentitiesClientCreateOrUpdateOptions contains the optional parameters for the UserAssignedIdentitiesClient.CreateOrUpdate method.

type UserAssignedIdentitiesClientCreateOrUpdateResponse added in v0.3.0

type UserAssignedIdentitiesClientCreateOrUpdateResponse struct {
	Identity
}

UserAssignedIdentitiesClientCreateOrUpdateResponse contains the response from method UserAssignedIdentitiesClient.CreateOrUpdate.

type UserAssignedIdentitiesClientDeleteOptions added in v0.3.0

type UserAssignedIdentitiesClientDeleteOptions struct {
}

UserAssignedIdentitiesClientDeleteOptions contains the optional parameters for the UserAssignedIdentitiesClient.Delete method.

type UserAssignedIdentitiesClientDeleteResponse added in v0.3.0

type UserAssignedIdentitiesClientDeleteResponse struct {
}

UserAssignedIdentitiesClientDeleteResponse contains the response from method UserAssignedIdentitiesClient.Delete.

type UserAssignedIdentitiesClientGetOptions added in v0.3.0

type UserAssignedIdentitiesClientGetOptions struct {
}

UserAssignedIdentitiesClientGetOptions contains the optional parameters for the UserAssignedIdentitiesClient.Get method.

type UserAssignedIdentitiesClientGetResponse added in v0.3.0

type UserAssignedIdentitiesClientGetResponse struct {
	Identity
}

UserAssignedIdentitiesClientGetResponse contains the response from method UserAssignedIdentitiesClient.Get.

type UserAssignedIdentitiesClientListAssociatedResourcesOptions added in v0.4.0

type UserAssignedIdentitiesClientListAssociatedResourcesOptions struct {
	// OData filter expression to apply to the query.
	Filter *string
	// OData orderBy expression to apply to the query.
	Orderby *string
	// Number of records to skip.
	Skip *int32
	// A skip token is used to continue retrieving items after an operation returns a partial result. If a previous response contains
	// a nextLink element, the value of the nextLink element will include a
	// skipToken parameter that specifies a starting point to use for subsequent calls.
	Skiptoken *string
	// Number of records to return.
	Top *int32
}

UserAssignedIdentitiesClientListAssociatedResourcesOptions contains the optional parameters for the UserAssignedIdentitiesClient.ListAssociatedResources method.

type UserAssignedIdentitiesClientListAssociatedResourcesResponse added in v0.4.0

type UserAssignedIdentitiesClientListAssociatedResourcesResponse struct {
	AssociatedResourcesListResult
}

UserAssignedIdentitiesClientListAssociatedResourcesResponse contains the response from method UserAssignedIdentitiesClient.ListAssociatedResources.

type UserAssignedIdentitiesClientListByResourceGroupOptions added in v0.3.0

type UserAssignedIdentitiesClientListByResourceGroupOptions struct {
}

UserAssignedIdentitiesClientListByResourceGroupOptions contains the optional parameters for the UserAssignedIdentitiesClient.ListByResourceGroup method.

type UserAssignedIdentitiesClientListByResourceGroupResponse added in v0.3.0

type UserAssignedIdentitiesClientListByResourceGroupResponse struct {
	UserAssignedIdentitiesListResult
}

UserAssignedIdentitiesClientListByResourceGroupResponse contains the response from method UserAssignedIdentitiesClient.ListByResourceGroup.

type UserAssignedIdentitiesClientListBySubscriptionOptions added in v0.3.0

type UserAssignedIdentitiesClientListBySubscriptionOptions struct {
}

UserAssignedIdentitiesClientListBySubscriptionOptions contains the optional parameters for the UserAssignedIdentitiesClient.ListBySubscription method.

type UserAssignedIdentitiesClientListBySubscriptionResponse added in v0.3.0

type UserAssignedIdentitiesClientListBySubscriptionResponse struct {
	UserAssignedIdentitiesListResult
}

UserAssignedIdentitiesClientListBySubscriptionResponse contains the response from method UserAssignedIdentitiesClient.ListBySubscription.

type UserAssignedIdentitiesClientUpdateOptions added in v0.3.0

type UserAssignedIdentitiesClientUpdateOptions struct {
}

UserAssignedIdentitiesClientUpdateOptions contains the optional parameters for the UserAssignedIdentitiesClient.Update method.

type UserAssignedIdentitiesClientUpdateResponse added in v0.3.0

type UserAssignedIdentitiesClientUpdateResponse struct {
	Identity
}

UserAssignedIdentitiesClientUpdateResponse contains the response from method UserAssignedIdentitiesClient.Update.

type UserAssignedIdentitiesListResult

type UserAssignedIdentitiesListResult struct {
	// The url to get the next page of results, if any.
	NextLink *string `json:"nextLink,omitempty"`

	// The collection of userAssignedIdentities returned by the listing operation.
	Value []*Identity `json:"value,omitempty"`
}

UserAssignedIdentitiesListResult - Values returned by the List operation.

func (UserAssignedIdentitiesListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentitiesListResult.

func (*UserAssignedIdentitiesListResult) UnmarshalJSON added in v0.7.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentitiesListResult.

type UserAssignedIdentityProperties

type UserAssignedIdentityProperties struct {
	// READ-ONLY; The id of the app associated with the identity. This is a random generated UUID by MSI.
	ClientID *string `json:"clientId,omitempty" azure:"ro"`

	// READ-ONLY; The id of the service principal object associated with the created identity.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`

	// READ-ONLY; The id of the tenant which the identity belongs to.
	TenantID *string `json:"tenantId,omitempty" azure:"ro"`
}

UserAssignedIdentityProperties - The properties associated with the user assigned identity.

func (UserAssignedIdentityProperties) MarshalJSON added in v0.7.0

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

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentityProperties.

func (*UserAssignedIdentityProperties) UnmarshalJSON added in v0.7.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentityProperties.

Jump to

Keyboard shortcuts

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