rolemanagementpolicyassignments

package
v0.20230427.1140223 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments Documentation

The rolemanagementpolicyassignments SDK allows for interaction with the Azure Resource Manager Service authorization (API Version 2020-10-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/2020-10-01/rolemanagementpolicyassignments"

Client Initialization

client := rolemanagementpolicyassignments.NewRoleManagementPolicyAssignmentsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: RoleManagementPolicyAssignmentsClient.Create

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

payload := rolemanagementpolicyassignments.RoleManagementPolicyAssignment{
	// ...
}


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

Example Usage: RoleManagementPolicyAssignmentsClient.Delete

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

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

Example Usage: RoleManagementPolicyAssignmentsClient.Get

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

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: RoleManagementPolicyAssignmentsClient.ListForScope

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

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

func PossibleValuesForRoleManagementPolicyRuleType() []string

func ValidateScopedRoleManagementPolicyAssignmentID

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

ValidateScopedRoleManagementPolicyAssignmentID checks that 'input' can be parsed as a Scoped Role Management Policy Assignment ID

Types

type CreateOperationResponse

type CreateOperationResponse struct {
	HttpResponse *http.Response
	Model        *RoleManagementPolicyAssignment
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *RoleManagementPolicyAssignment
}

type ListForScopeCompleteResult

type ListForScopeCompleteResult struct {
	Items []RoleManagementPolicyAssignment
}

type ListForScopeOperationResponse

type ListForScopeOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]RoleManagementPolicyAssignment
	// contains filtered or unexported fields
}

func (ListForScopeOperationResponse) HasMore

func (r ListForScopeOperationResponse) HasMore() bool

func (ListForScopeOperationResponse) LoadMore

type PolicyAssignmentProperties

type PolicyAssignmentProperties struct {
	Policy         *PolicyAssignmentPropertiesPolicy         `json:"policy,omitempty"`
	RoleDefinition *PolicyAssignmentPropertiesRoleDefinition `json:"roleDefinition,omitempty"`
	Scope          *PolicyAssignmentPropertiesScope          `json:"scope,omitempty"`
}

type PolicyAssignmentPropertiesPolicy

type PolicyAssignmentPropertiesPolicy struct {
	Id                   *string    `json:"id,omitempty"`
	LastModifiedBy       *Principal `json:"lastModifiedBy,omitempty"`
	LastModifiedDateTime *string    `json:"lastModifiedDateTime,omitempty"`
}

func (*PolicyAssignmentPropertiesPolicy) GetLastModifiedDateTimeAsTime

func (o *PolicyAssignmentPropertiesPolicy) GetLastModifiedDateTimeAsTime() (*time.Time, error)

func (*PolicyAssignmentPropertiesPolicy) SetLastModifiedDateTimeAsTime

func (o *PolicyAssignmentPropertiesPolicy) SetLastModifiedDateTimeAsTime(input time.Time)

type PolicyAssignmentPropertiesRoleDefinition

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

type PolicyAssignmentPropertiesScope

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

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 RoleManagementPolicyAssignment

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

type RoleManagementPolicyAssignmentOperationPredicate

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

func (RoleManagementPolicyAssignmentOperationPredicate) Matches

type RoleManagementPolicyAssignmentProperties

type RoleManagementPolicyAssignmentProperties struct {
	EffectiveRules             *[]RoleManagementPolicyRule `json:"effectiveRules,omitempty"`
	PolicyAssignmentProperties *PolicyAssignmentProperties `json:"policyAssignmentProperties,omitempty"`
	PolicyId                   *string                     `json:"policyId,omitempty"`
	RoleDefinitionId           *string                     `json:"roleDefinitionId,omitempty"`
	Scope                      *string                     `json:"scope,omitempty"`
}

func (*RoleManagementPolicyAssignmentProperties) UnmarshalJSON

func (s *RoleManagementPolicyAssignmentProperties) UnmarshalJSON(bytes []byte) error

type RoleManagementPolicyAssignmentsClient

type RoleManagementPolicyAssignmentsClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewRoleManagementPolicyAssignmentsClientWithBaseURI

func NewRoleManagementPolicyAssignmentsClientWithBaseURI(endpoint string) RoleManagementPolicyAssignmentsClient

func (RoleManagementPolicyAssignmentsClient) Create

Create ...

func (RoleManagementPolicyAssignmentsClient) Delete

Delete ...

func (RoleManagementPolicyAssignmentsClient) Get

Get ...

func (RoleManagementPolicyAssignmentsClient) ListForScope

ListForScope ...

func (RoleManagementPolicyAssignmentsClient) ListForScopeComplete

ListForScopeComplete retrieves all of the results into a single object

func (RoleManagementPolicyAssignmentsClient) ListForScopeCompleteMatchingPredicate

ListForScopeCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type RoleManagementPolicyRule

type RoleManagementPolicyRule interface {
}

type RoleManagementPolicyRuleTarget

type RoleManagementPolicyRuleTarget struct {
	Caller              *string   `json:"caller,omitempty"`
	EnforcedSettings    *[]string `json:"enforcedSettings,omitempty"`
	InheritableSettings *[]string `json:"inheritableSettings,omitempty"`
	Level               *string   `json:"level,omitempty"`
	Operations          *[]string `json:"operations,omitempty"`
	TargetObjects       *[]string `json:"targetObjects,omitempty"`
}

type RoleManagementPolicyRuleType

type RoleManagementPolicyRuleType string
const (
	RoleManagementPolicyRuleTypeRoleManagementPolicyApprovalRule              RoleManagementPolicyRuleType = "RoleManagementPolicyApprovalRule"
	RoleManagementPolicyRuleTypeRoleManagementPolicyAuthenticationContextRule RoleManagementPolicyRuleType = "RoleManagementPolicyAuthenticationContextRule"
	RoleManagementPolicyRuleTypeRoleManagementPolicyEnablementRule            RoleManagementPolicyRuleType = "RoleManagementPolicyEnablementRule"
	RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule            RoleManagementPolicyRuleType = "RoleManagementPolicyExpirationRule"
	RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule          RoleManagementPolicyRuleType = "RoleManagementPolicyNotificationRule"
)

type ScopedRoleManagementPolicyAssignmentId

type ScopedRoleManagementPolicyAssignmentId struct {
	Scope                              string
	RoleManagementPolicyAssignmentName string
}

ScopedRoleManagementPolicyAssignmentId is a struct representing the Resource ID for a Scoped Role Management Policy Assignment

func NewScopedRoleManagementPolicyAssignmentID

func NewScopedRoleManagementPolicyAssignmentID(scope string, roleManagementPolicyAssignmentName string) ScopedRoleManagementPolicyAssignmentId

NewScopedRoleManagementPolicyAssignmentID returns a new ScopedRoleManagementPolicyAssignmentId struct

func ParseScopedRoleManagementPolicyAssignmentID

func ParseScopedRoleManagementPolicyAssignmentID(input string) (*ScopedRoleManagementPolicyAssignmentId, error)

ParseScopedRoleManagementPolicyAssignmentID parses 'input' into a ScopedRoleManagementPolicyAssignmentId

func ParseScopedRoleManagementPolicyAssignmentIDInsensitively

func ParseScopedRoleManagementPolicyAssignmentIDInsensitively(input string) (*ScopedRoleManagementPolicyAssignmentId, error)

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

func (ScopedRoleManagementPolicyAssignmentId) ID

ID returns the formatted Scoped Role Management Policy Assignment ID

func (ScopedRoleManagementPolicyAssignmentId) Segments

Segments returns a slice of Resource ID Segments which comprise this Scoped Role Management Policy Assignment ID

func (ScopedRoleManagementPolicyAssignmentId) String

String returns a human-readable description of this Scoped Role Management Policy Assignment ID

Jump to

Keyboard shortcuts

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