managedidentities

package
v0.20241126.2320 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2023-01-31/managedidentities Documentation

The managedidentities SDK allows for interaction with Azure Resource Manager managedidentity (API Version 2023-01-31).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2023-01-31/managedidentities"

Client Initialization

client := managedidentities.NewManagedIdentitiesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ManagedIdentitiesClient.FederatedIdentityCredentialsCreateOrUpdate

ctx := context.TODO()
id := managedidentities.NewFederatedIdentityCredentialID("12345678-1234-9876-4563-123456789012", "example-resource-group", "userAssignedIdentityName", "federatedIdentityCredentialName")

payload := managedidentities.FederatedIdentityCredential{
	// ...
}


read, err := client.FederatedIdentityCredentialsCreateOrUpdate(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ManagedIdentitiesClient.FederatedIdentityCredentialsDelete

ctx := context.TODO()
id := managedidentities.NewFederatedIdentityCredentialID("12345678-1234-9876-4563-123456789012", "example-resource-group", "userAssignedIdentityName", "federatedIdentityCredentialName")

read, err := client.FederatedIdentityCredentialsDelete(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ManagedIdentitiesClient.FederatedIdentityCredentialsGet

ctx := context.TODO()
id := managedidentities.NewFederatedIdentityCredentialID("12345678-1234-9876-4563-123456789012", "example-resource-group", "userAssignedIdentityName", "federatedIdentityCredentialName")

read, err := client.FederatedIdentityCredentialsGet(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ManagedIdentitiesClient.FederatedIdentityCredentialsList

ctx := context.TODO()
id := commonids.NewUserAssignedIdentityID("12345678-1234-9876-4563-123456789012", "example-resource-group", "userAssignedIdentityName")

// alternatively `client.FederatedIdentityCredentialsList(ctx, id, managedidentities.DefaultFederatedIdentityCredentialsListOperationOptions())` can be used to do batched pagination
items, err := client.FederatedIdentityCredentialsListComplete(ctx, id, managedidentities.DefaultFederatedIdentityCredentialsListOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: ManagedIdentitiesClient.SystemAssignedIdentitiesGetByScope

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

read, err := client.SystemAssignedIdentitiesGetByScope(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ManagedIdentitiesClient.UserAssignedIdentitiesCreateOrUpdate

ctx := context.TODO()
id := commonids.NewUserAssignedIdentityID("12345678-1234-9876-4563-123456789012", "example-resource-group", "userAssignedIdentityName")

payload := managedidentities.Identity{
	// ...
}


read, err := client.UserAssignedIdentitiesCreateOrUpdate(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ManagedIdentitiesClient.UserAssignedIdentitiesDelete

ctx := context.TODO()
id := commonids.NewUserAssignedIdentityID("12345678-1234-9876-4563-123456789012", "example-resource-group", "userAssignedIdentityName")

read, err := client.UserAssignedIdentitiesDelete(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ManagedIdentitiesClient.UserAssignedIdentitiesGet

ctx := context.TODO()
id := commonids.NewUserAssignedIdentityID("12345678-1234-9876-4563-123456789012", "example-resource-group", "userAssignedIdentityName")

read, err := client.UserAssignedIdentitiesGet(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ManagedIdentitiesClient.UserAssignedIdentitiesListByResourceGroup

ctx := context.TODO()
id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

// alternatively `client.UserAssignedIdentitiesListByResourceGroup(ctx, id)` can be used to do batched pagination
items, err := client.UserAssignedIdentitiesListByResourceGroupComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: ManagedIdentitiesClient.UserAssignedIdentitiesListBySubscription

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// alternatively `client.UserAssignedIdentitiesListBySubscription(ctx, id)` can be used to do batched pagination
items, err := client.UserAssignedIdentitiesListBySubscriptionComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: ManagedIdentitiesClient.UserAssignedIdentitiesUpdate

ctx := context.TODO()
id := commonids.NewUserAssignedIdentityID("12345678-1234-9876-4563-123456789012", "example-resource-group", "userAssignedIdentityName")

payload := managedidentities.IdentityUpdate{
	// ...
}


read, err := client.UserAssignedIdentitiesUpdate(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateFederatedIdentityCredentialID

func ValidateFederatedIdentityCredentialID(input interface{}, key string) (warnings []string, errors []error)

ValidateFederatedIdentityCredentialID checks that 'input' can be parsed as a Federated Identity Credential ID

Types

type FederatedIdentityCredential

type FederatedIdentityCredential struct {
	Id         *string                                `json:"id,omitempty"`
	Name       *string                                `json:"name,omitempty"`
	Properties *FederatedIdentityCredentialProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData                 `json:"systemData,omitempty"`
	Type       *string                                `json:"type,omitempty"`
}

type FederatedIdentityCredentialId

type FederatedIdentityCredentialId struct {
	SubscriptionId                  string
	ResourceGroupName               string
	UserAssignedIdentityName        string
	FederatedIdentityCredentialName string
}

FederatedIdentityCredentialId is a struct representing the Resource ID for a Federated Identity Credential

func NewFederatedIdentityCredentialID

func NewFederatedIdentityCredentialID(subscriptionId string, resourceGroupName string, userAssignedIdentityName string, federatedIdentityCredentialName string) FederatedIdentityCredentialId

NewFederatedIdentityCredentialID returns a new FederatedIdentityCredentialId struct

func ParseFederatedIdentityCredentialID

func ParseFederatedIdentityCredentialID(input string) (*FederatedIdentityCredentialId, error)

ParseFederatedIdentityCredentialID parses 'input' into a FederatedIdentityCredentialId

func ParseFederatedIdentityCredentialIDInsensitively

func ParseFederatedIdentityCredentialIDInsensitively(input string) (*FederatedIdentityCredentialId, error)

ParseFederatedIdentityCredentialIDInsensitively parses 'input' case-insensitively into a FederatedIdentityCredentialId note: this method should only be used for API response data and not user input

func (*FederatedIdentityCredentialId) FromParseResult

func (id *FederatedIdentityCredentialId) FromParseResult(input resourceids.ParseResult) error

func (FederatedIdentityCredentialId) ID

ID returns the formatted Federated Identity Credential ID

func (FederatedIdentityCredentialId) Segments

Segments returns a slice of Resource ID Segments which comprise this Federated Identity Credential ID

func (FederatedIdentityCredentialId) String

String returns a human-readable description of this Federated Identity Credential ID

type FederatedIdentityCredentialOperationPredicate

type FederatedIdentityCredentialOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (FederatedIdentityCredentialOperationPredicate) Matches

type FederatedIdentityCredentialProperties

type FederatedIdentityCredentialProperties struct {
	Audiences []string `json:"audiences"`
	Issuer    string   `json:"issuer"`
	Subject   string   `json:"subject"`
}

type FederatedIdentityCredentialsCreateOrUpdateOperationResponse

type FederatedIdentityCredentialsCreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *FederatedIdentityCredential
}

type FederatedIdentityCredentialsDeleteOperationResponse

type FederatedIdentityCredentialsDeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type FederatedIdentityCredentialsGetOperationResponse

type FederatedIdentityCredentialsGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *FederatedIdentityCredential
}

type FederatedIdentityCredentialsListCompleteResult

type FederatedIdentityCredentialsListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []FederatedIdentityCredential
}

type FederatedIdentityCredentialsListCustomPager

type FederatedIdentityCredentialsListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}

type FederatedIdentityCredentialsListOperationOptions

type FederatedIdentityCredentialsListOperationOptions struct {
	Top *int64
}

func DefaultFederatedIdentityCredentialsListOperationOptions

func DefaultFederatedIdentityCredentialsListOperationOptions() FederatedIdentityCredentialsListOperationOptions

func (FederatedIdentityCredentialsListOperationOptions) ToHeaders

func (FederatedIdentityCredentialsListOperationOptions) ToOData

func (FederatedIdentityCredentialsListOperationOptions) ToQuery

type FederatedIdentityCredentialsListOperationResponse

type FederatedIdentityCredentialsListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]FederatedIdentityCredential
}

type Identity

type Identity struct {
	Id         *string                         `json:"id,omitempty"`
	Location   string                          `json:"location"`
	Name       *string                         `json:"name,omitempty"`
	Properties *UserAssignedIdentityProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData          `json:"systemData,omitempty"`
	Tags       *map[string]string              `json:"tags,omitempty"`
	Type       *string                         `json:"type,omitempty"`
}

type IdentityOperationPredicate

type IdentityOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (IdentityOperationPredicate) Matches

func (p IdentityOperationPredicate) Matches(input Identity) bool

type IdentityUpdate

type IdentityUpdate struct {
	Id         *string                         `json:"id,omitempty"`
	Location   *string                         `json:"location,omitempty"`
	Name       *string                         `json:"name,omitempty"`
	Properties *UserAssignedIdentityProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData          `json:"systemData,omitempty"`
	Tags       *map[string]string              `json:"tags,omitempty"`
	Type       *string                         `json:"type,omitempty"`
}

type ManagedIdentitiesClient

type ManagedIdentitiesClient struct {
	Client *resourcemanager.Client
}

func NewManagedIdentitiesClientWithBaseURI

func NewManagedIdentitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedIdentitiesClient, error)

func (ManagedIdentitiesClient) FederatedIdentityCredentialsCreateOrUpdate

FederatedIdentityCredentialsCreateOrUpdate ...

func (ManagedIdentitiesClient) FederatedIdentityCredentialsDelete

FederatedIdentityCredentialsDelete ...

func (ManagedIdentitiesClient) FederatedIdentityCredentialsGet

FederatedIdentityCredentialsGet ...

func (ManagedIdentitiesClient) FederatedIdentityCredentialsList

FederatedIdentityCredentialsList ...

func (ManagedIdentitiesClient) FederatedIdentityCredentialsListComplete

FederatedIdentityCredentialsListComplete retrieves all the results into a single object

func (ManagedIdentitiesClient) FederatedIdentityCredentialsListCompleteMatchingPredicate

FederatedIdentityCredentialsListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ManagedIdentitiesClient) SystemAssignedIdentitiesGetByScope

func (c ManagedIdentitiesClient) SystemAssignedIdentitiesGetByScope(ctx context.Context, id commonids.ScopeId) (result SystemAssignedIdentitiesGetByScopeOperationResponse, err error)

SystemAssignedIdentitiesGetByScope ...

func (ManagedIdentitiesClient) UserAssignedIdentitiesCreateOrUpdate

UserAssignedIdentitiesCreateOrUpdate ...

func (ManagedIdentitiesClient) UserAssignedIdentitiesDelete

UserAssignedIdentitiesDelete ...

func (ManagedIdentitiesClient) UserAssignedIdentitiesGet

UserAssignedIdentitiesGet ...

func (ManagedIdentitiesClient) UserAssignedIdentitiesListByResourceGroup

UserAssignedIdentitiesListByResourceGroup ...

func (ManagedIdentitiesClient) UserAssignedIdentitiesListByResourceGroupComplete

UserAssignedIdentitiesListByResourceGroupComplete retrieves all the results into a single object

func (ManagedIdentitiesClient) UserAssignedIdentitiesListByResourceGroupCompleteMatchingPredicate

func (c ManagedIdentitiesClient) UserAssignedIdentitiesListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate IdentityOperationPredicate) (result UserAssignedIdentitiesListByResourceGroupCompleteResult, err error)

UserAssignedIdentitiesListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ManagedIdentitiesClient) UserAssignedIdentitiesListBySubscription

UserAssignedIdentitiesListBySubscription ...

func (ManagedIdentitiesClient) UserAssignedIdentitiesListBySubscriptionComplete

UserAssignedIdentitiesListBySubscriptionComplete retrieves all the results into a single object

func (ManagedIdentitiesClient) UserAssignedIdentitiesListBySubscriptionCompleteMatchingPredicate

func (c ManagedIdentitiesClient) UserAssignedIdentitiesListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate IdentityOperationPredicate) (result UserAssignedIdentitiesListBySubscriptionCompleteResult, err error)

UserAssignedIdentitiesListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ManagedIdentitiesClient) UserAssignedIdentitiesUpdate

UserAssignedIdentitiesUpdate ...

type SystemAssignedIdentitiesGetByScopeOperationResponse

type SystemAssignedIdentitiesGetByScopeOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SystemAssignedIdentity
}

type SystemAssignedIdentity

type SystemAssignedIdentity struct {
	Id         *string                           `json:"id,omitempty"`
	Location   string                            `json:"location"`
	Name       *string                           `json:"name,omitempty"`
	Properties *SystemAssignedIdentityProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData            `json:"systemData,omitempty"`
	Tags       *map[string]string                `json:"tags,omitempty"`
	Type       *string                           `json:"type,omitempty"`
}

type SystemAssignedIdentityProperties

type SystemAssignedIdentityProperties struct {
	ClientId        *string `json:"clientId,omitempty"`
	ClientSecretURL *string `json:"clientSecretUrl,omitempty"`
	PrincipalId     *string `json:"principalId,omitempty"`
	TenantId        *string `json:"tenantId,omitempty"`
}

type UserAssignedIdentitiesCreateOrUpdateOperationResponse

type UserAssignedIdentitiesCreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Identity
}

type UserAssignedIdentitiesDeleteOperationResponse

type UserAssignedIdentitiesDeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type UserAssignedIdentitiesGetOperationResponse

type UserAssignedIdentitiesGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Identity
}

type UserAssignedIdentitiesListByResourceGroupCompleteResult

type UserAssignedIdentitiesListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Identity
}

type UserAssignedIdentitiesListByResourceGroupCustomPager

type UserAssignedIdentitiesListByResourceGroupCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}

type UserAssignedIdentitiesListByResourceGroupOperationResponse

type UserAssignedIdentitiesListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Identity
}

type UserAssignedIdentitiesListBySubscriptionCompleteResult

type UserAssignedIdentitiesListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Identity
}

type UserAssignedIdentitiesListBySubscriptionCustomPager

type UserAssignedIdentitiesListBySubscriptionCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}

type UserAssignedIdentitiesListBySubscriptionOperationResponse

type UserAssignedIdentitiesListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Identity
}

type UserAssignedIdentitiesUpdateOperationResponse

type UserAssignedIdentitiesUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Identity
}

type UserAssignedIdentityProperties

type UserAssignedIdentityProperties struct {
	ClientId    *string `json:"clientId,omitempty"`
	PrincipalId *string `json:"principalId,omitempty"`
	TenantId    *string `json:"tenantId,omitempty"`
}

func (UserAssignedIdentityProperties) MarshalJSON

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

Jump to

Keyboard shortcuts

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