denyassignments

package
v0.20240320.1143605 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

README

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

The denyassignments 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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2022-04-01/denyassignments"

Client Initialization

client := denyassignments.NewDenyAssignmentsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DenyAssignmentsClient.Get

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

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

Example Usage: DenyAssignmentsClient.GetById

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

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

Example Usage: DenyAssignmentsClient.List

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

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

Example Usage: DenyAssignmentsClient.ListForResource

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

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

Example Usage: DenyAssignmentsClient.ListForResourceGroup

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

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

Example Usage: DenyAssignmentsClient.ListForScope

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

// alternatively `client.ListForScope(ctx, id, denyassignments.DefaultListForScopeOperationOptions())` can be used to do batched pagination
items, err := client.ListForScopeComplete(ctx, id, denyassignments.DefaultListForScopeOperationOptions())
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 ValidateScopedDenyAssignmentIdID

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

ValidateScopedDenyAssignmentIdID checks that 'input' can be parsed as a Scoped Deny Assignment Id ID

Types

type DenyAssignment

type DenyAssignment struct {
	Id         *string                   `json:"id,omitempty"`
	Name       *string                   `json:"name,omitempty"`
	Properties *DenyAssignmentProperties `json:"properties,omitempty"`
	Type       *string                   `json:"type,omitempty"`
}

type DenyAssignmentOperationPredicate

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

func (DenyAssignmentOperationPredicate) Matches

type DenyAssignmentPermission

type DenyAssignmentPermission struct {
	Actions          *[]string `json:"actions,omitempty"`
	Condition        *string   `json:"condition,omitempty"`
	ConditionVersion *string   `json:"conditionVersion,omitempty"`
	DataActions      *[]string `json:"dataActions,omitempty"`
	NotActions       *[]string `json:"notActions,omitempty"`
	NotDataActions   *[]string `json:"notDataActions,omitempty"`
}

type DenyAssignmentProperties

type DenyAssignmentProperties struct {
	Condition               *string                     `json:"condition,omitempty"`
	ConditionVersion        *string                     `json:"conditionVersion,omitempty"`
	CreatedBy               *string                     `json:"createdBy,omitempty"`
	CreatedOn               *string                     `json:"createdOn,omitempty"`
	DenyAssignmentName      *string                     `json:"denyAssignmentName,omitempty"`
	Description             *string                     `json:"description,omitempty"`
	DoNotApplyToChildScopes *bool                       `json:"doNotApplyToChildScopes,omitempty"`
	ExcludePrincipals       *[]Principal                `json:"excludePrincipals,omitempty"`
	IsSystemProtected       *bool                       `json:"isSystemProtected,omitempty"`
	Permissions             *[]DenyAssignmentPermission `json:"permissions,omitempty"`
	Principals              *[]Principal                `json:"principals,omitempty"`
	Scope                   *string                     `json:"scope,omitempty"`
	UpdatedBy               *string                     `json:"updatedBy,omitempty"`
	UpdatedOn               *string                     `json:"updatedOn,omitempty"`
}

func (*DenyAssignmentProperties) GetCreatedOnAsTime

func (o *DenyAssignmentProperties) GetCreatedOnAsTime() (*time.Time, error)

func (*DenyAssignmentProperties) GetUpdatedOnAsTime

func (o *DenyAssignmentProperties) GetUpdatedOnAsTime() (*time.Time, error)

func (*DenyAssignmentProperties) SetCreatedOnAsTime

func (o *DenyAssignmentProperties) SetCreatedOnAsTime(input time.Time)

func (*DenyAssignmentProperties) SetUpdatedOnAsTime

func (o *DenyAssignmentProperties) SetUpdatedOnAsTime(input time.Time)

type DenyAssignmentsClient

type DenyAssignmentsClient struct {
	Client *resourcemanager.Client
}

func NewDenyAssignmentsClientWithBaseURI

func NewDenyAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DenyAssignmentsClient, error)

func (DenyAssignmentsClient) Get

Get ...

func (DenyAssignmentsClient) GetById

GetById ...

func (DenyAssignmentsClient) List

List ...

func (DenyAssignmentsClient) ListComplete

ListComplete retrieves all the results into a single object

func (DenyAssignmentsClient) ListCompleteMatchingPredicate

func (c DenyAssignmentsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions, predicate DenyAssignmentOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DenyAssignmentsClient) ListForResource

ListForResource ...

func (DenyAssignmentsClient) ListForResourceComplete

ListForResourceComplete retrieves all the results into a single object

func (DenyAssignmentsClient) ListForResourceCompleteMatchingPredicate

func (c DenyAssignmentsClient) ListForResourceCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, options ListForResourceOperationOptions, predicate DenyAssignmentOperationPredicate) (result ListForResourceCompleteResult, err error)

ListForResourceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DenyAssignmentsClient) ListForResourceGroup

ListForResourceGroup ...

func (DenyAssignmentsClient) ListForResourceGroupComplete

ListForResourceGroupComplete retrieves all the results into a single object

func (DenyAssignmentsClient) ListForResourceGroupCompleteMatchingPredicate

ListForResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DenyAssignmentsClient) ListForScope

ListForScope ...

func (DenyAssignmentsClient) ListForScopeComplete

ListForScopeComplete retrieves all the results into a single object

func (DenyAssignmentsClient) ListForScopeCompleteMatchingPredicate

func (c DenyAssignmentsClient) ListForScopeCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, options ListForScopeOperationOptions, predicate DenyAssignmentOperationPredicate) (result ListForScopeCompleteResult, err error)

ListForScopeCompleteMatchingPredicate retrieves all the results and then applies the predicate

type GetByIdOperationResponse

type GetByIdOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DenyAssignment
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DenyAssignment
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []DenyAssignment
}

type ListForResourceCompleteResult

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

type ListForResourceGroupCompleteResult

type ListForResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []DenyAssignment
}

type ListForResourceGroupOperationOptions

type ListForResourceGroupOperationOptions struct {
	Filter *string
}

func DefaultListForResourceGroupOperationOptions

func DefaultListForResourceGroupOperationOptions() ListForResourceGroupOperationOptions

func (ListForResourceGroupOperationOptions) ToHeaders

func (ListForResourceGroupOperationOptions) ToOData

func (ListForResourceGroupOperationOptions) ToQuery

type ListForResourceGroupOperationResponse

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

type ListForResourceOperationOptions

type ListForResourceOperationOptions struct {
	Filter *string
}

func DefaultListForResourceOperationOptions

func DefaultListForResourceOperationOptions() ListForResourceOperationOptions

func (ListForResourceOperationOptions) ToHeaders

func (ListForResourceOperationOptions) ToOData

func (ListForResourceOperationOptions) ToQuery

type ListForResourceOperationResponse

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

type ListForScopeCompleteResult

type ListForScopeCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []DenyAssignment
}

type ListForScopeOperationOptions

type ListForScopeOperationOptions struct {
	Filter *string
}

func DefaultListForScopeOperationOptions

func DefaultListForScopeOperationOptions() ListForScopeOperationOptions

func (ListForScopeOperationOptions) ToHeaders

func (ListForScopeOperationOptions) ToOData

func (ListForScopeOperationOptions) ToQuery

type ListForScopeOperationResponse

type ListForScopeOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]DenyAssignment
}

type ListOperationOptions

type ListOperationOptions struct {
	Filter *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]DenyAssignment
}

type Principal

type Principal struct {
	DisplayName *string `json:"displayName,omitempty"`
	Email       *string `json:"email,omitempty"`
	Id          *string `json:"id,omitempty"`
	Type        *string `json:"type,omitempty"`
}

type ScopedDenyAssignmentIdId

type ScopedDenyAssignmentIdId struct {
	Scope            string
	DenyAssignmentId string
}

ScopedDenyAssignmentIdId is a struct representing the Resource ID for a Scoped Deny Assignment Id

func NewScopedDenyAssignmentIdID

func NewScopedDenyAssignmentIdID(scope string, denyAssignmentId string) ScopedDenyAssignmentIdId

NewScopedDenyAssignmentIdID returns a new ScopedDenyAssignmentIdId struct

func ParseScopedDenyAssignmentIdID

func ParseScopedDenyAssignmentIdID(input string) (*ScopedDenyAssignmentIdId, error)

ParseScopedDenyAssignmentIdID parses 'input' into a ScopedDenyAssignmentIdId

func ParseScopedDenyAssignmentIdIDInsensitively

func ParseScopedDenyAssignmentIdIDInsensitively(input string) (*ScopedDenyAssignmentIdId, error)

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

func (*ScopedDenyAssignmentIdId) FromParseResult

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

func (ScopedDenyAssignmentIdId) ID

ID returns the formatted Scoped Deny Assignment Id ID

func (ScopedDenyAssignmentIdId) Segments

Segments returns a slice of Resource ID Segments which comprise this Scoped Deny Assignment Id ID

func (ScopedDenyAssignmentIdId) String

func (id ScopedDenyAssignmentIdId) String() string

String returns a human-readable description of this Scoped Deny Assignment Id ID

Jump to

Keyboard shortcuts

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