rolemanagementpolicyassignments

package
v0.20240320.1144505 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: 13 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-helpers/resourcemanager/commonids"
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 := commonids.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
	OData        *odata.OData
	Model        *RoleManagementPolicyAssignment
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListForScopeCompleteResult

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

type ListForScopeOperationResponse

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

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 RawRoleManagementPolicyRuleImpl

type RawRoleManagementPolicyRuleImpl struct {
	Type   string
	Values map[string]interface{}
}

RawRoleManagementPolicyRuleImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g. this cannot be used as a Request Payload).

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 *resourcemanager.Client
}

func NewRoleManagementPolicyAssignmentsClientWithBaseURI

func NewRoleManagementPolicyAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*RoleManagementPolicyAssignmentsClient, error)

func (RoleManagementPolicyAssignmentsClient) Create

Create ...

func (RoleManagementPolicyAssignmentsClient) Delete

Delete ...

func (RoleManagementPolicyAssignmentsClient) Get

Get ...

func (RoleManagementPolicyAssignmentsClient) ListForScope

ListForScope ...

func (RoleManagementPolicyAssignmentsClient) ListForScopeComplete

ListForScopeComplete retrieves all the results into a single object

func (RoleManagementPolicyAssignmentsClient) ListForScopeCompleteMatchingPredicate

ListForScopeCompleteMatchingPredicate retrieves all the results and then applies 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"
)

func (*RoleManagementPolicyRuleType) UnmarshalJSON

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

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) FromParseResult

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