permissions

package
v0.20240207.1162109 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MPL-2.0 Imports: 8 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2018-01-01-preview/permissions Documentation

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

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/authorization/2018-01-01-preview/permissions"

Client Initialization

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

Example Usage: PermissionsClient.ListForResource

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

// 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 := commonids.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

This section is empty.

Types

type ListForResourceCompleteResult

type ListForResourceCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Permission
}

type ListForResourceGroupCompleteResult

type ListForResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	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(sdkApi sdkEnv.Api) (*PermissionsClient, error)

func (PermissionsClient) ListForResource

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

ListForResource ...

func (PermissionsClient) ListForResourceComplete

ListForResourceComplete retrieves all the results into a single object

func (PermissionsClient) ListForResourceCompleteMatchingPredicate

func (c PermissionsClient) ListForResourceCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, 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

Jump to

Keyboard shortcuts

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