permissions

package
v0.20230712.1163130 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: MPL-2.0 Imports: 10 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2022-04-01/permissions Documentation

The permissions SDK allows for interaction with the Azure Resource Manager Service authorization (API Version 2022-04-01).

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-sdk/resource-manager/authorization/2022-04-01/permissions"

Client Initialization

client := permissions.NewPermissionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: PermissionsClient.ListForResource

ctx := context.TODO()
id := permissions.NewResourceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "providerValue", "parentResourcePathValue", "resourceTypeValue", "resourceValue")

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

Example Usage: PermissionsClient.ListForResourceGroup

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateResourceID

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

ValidateResourceID checks that 'input' can be parsed as a Resource ID

Types

type ListForResourceCompleteResult

type ListForResourceCompleteResult struct {
	Items []Permission
}

type ListForResourceGroupCompleteResult

type ListForResourceGroupCompleteResult struct {
	Items []Permission
}

type ListForResourceGroupOperationResponse

type ListForResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Permission
}

type ListForResourceOperationResponse

type ListForResourceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Permission
}

type Permission

type Permission struct {
	Actions        *[]string `json:"actions,omitempty"`
	DataActions    *[]string `json:"dataActions,omitempty"`
	NotActions     *[]string `json:"notActions,omitempty"`
	NotDataActions *[]string `json:"notDataActions,omitempty"`
}

type PermissionOperationPredicate

type PermissionOperationPredicate struct {
}

func (PermissionOperationPredicate) Matches

func (p PermissionOperationPredicate) Matches(input Permission) bool

type PermissionsClient

type PermissionsClient struct {
	Client *resourcemanager.Client
}

func NewPermissionsClientWithBaseURI

func NewPermissionsClientWithBaseURI(api environments.Api) (*PermissionsClient, error)

func (PermissionsClient) ListForResource

func (c PermissionsClient) ListForResource(ctx context.Context, id ResourceId) (result ListForResourceOperationResponse, err error)

ListForResource ...

func (PermissionsClient) ListForResourceComplete

func (c PermissionsClient) ListForResourceComplete(ctx context.Context, id ResourceId) (ListForResourceCompleteResult, error)

ListForResourceComplete retrieves all the results into a single object

func (PermissionsClient) ListForResourceCompleteMatchingPredicate

func (c PermissionsClient) ListForResourceCompleteMatchingPredicate(ctx context.Context, id ResourceId, predicate PermissionOperationPredicate) (result ListForResourceCompleteResult, err error)

ListForResourceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (PermissionsClient) ListForResourceGroup

ListForResourceGroup ...

func (PermissionsClient) ListForResourceGroupComplete

ListForResourceGroupComplete retrieves all the results into a single object

func (PermissionsClient) ListForResourceGroupCompleteMatchingPredicate

func (c PermissionsClient) ListForResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate PermissionOperationPredicate) (result ListForResourceGroupCompleteResult, err error)

ListForResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ResourceId

type ResourceId struct {
	SubscriptionId     string
	ResourceGroupName  string
	ProviderName       string
	ParentResourcePath string
	ResourceType       string
	ResourceName       string
}

ResourceId is a struct representing the Resource ID for a Resource

func NewResourceID

func NewResourceID(subscriptionId string, resourceGroupName string, providerName string, parentResourcePath string, resourceType string, resourceName string) ResourceId

NewResourceID returns a new ResourceId struct

func ParseResourceID

func ParseResourceID(input string) (*ResourceId, error)

ParseResourceID parses 'input' into a ResourceId

func ParseResourceIDInsensitively

func ParseResourceIDInsensitively(input string) (*ResourceId, error)

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

func (ResourceId) ID

func (id ResourceId) ID() string

ID returns the formatted Resource ID

func (ResourceId) Segments

func (id ResourceId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Resource ID

func (ResourceId) String

func (id ResourceId) String() string

String returns a human-readable description of this Resource ID

Jump to

Keyboard shortcuts

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