rolemanagementpolicies

package
v0.20230204.1123804 Latest Latest
Warning

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

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

README

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

The rolemanagementpolicies 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/rolemanagementpolicies"

Client Initialization

client := rolemanagementpolicies.NewRoleManagementPoliciesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: RoleManagementPoliciesClient.Delete

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

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: RoleManagementPoliciesClient.Get

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

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

ctx := context.TODO()
id := rolemanagementpolicies.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
}

Example Usage: RoleManagementPoliciesClient.Update

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

payload := rolemanagementpolicies.RoleManagementPolicy{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForRoleManagementPolicyRuleType

func PossibleValuesForRoleManagementPolicyRuleType() []string

func ValidateScopedRoleManagementPolicyID

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

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

Types

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GetOperationResponse

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

type ListForScopeCompleteResult

type ListForScopeCompleteResult struct {
	Items []RoleManagementPolicy
}

type ListForScopeOperationResponse

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

func (ListForScopeOperationResponse) HasMore

func (r ListForScopeOperationResponse) HasMore() bool

func (ListForScopeOperationResponse) LoadMore

type PolicyProperties

type PolicyProperties struct {
	Scope *PolicyPropertiesScope `json:"scope,omitempty"`
}

type PolicyPropertiesScope

type PolicyPropertiesScope 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 RoleManagementPoliciesClient

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

func NewRoleManagementPoliciesClientWithBaseURI

func NewRoleManagementPoliciesClientWithBaseURI(endpoint string) RoleManagementPoliciesClient

func (RoleManagementPoliciesClient) Delete

Delete ...

func (RoleManagementPoliciesClient) Get

Get ...

func (RoleManagementPoliciesClient) ListForScope

ListForScope ...

func (RoleManagementPoliciesClient) ListForScopeComplete

ListForScopeComplete retrieves all of the results into a single object

func (RoleManagementPoliciesClient) ListForScopeCompleteMatchingPredicate

func (c RoleManagementPoliciesClient) ListForScopeCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, predicate RoleManagementPolicyOperationPredicate) (resp ListForScopeCompleteResult, err error)

ListForScopeCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (RoleManagementPoliciesClient) Update

Update ...

type RoleManagementPolicy

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

type RoleManagementPolicyOperationPredicate

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

func (RoleManagementPolicyOperationPredicate) Matches

type RoleManagementPolicyProperties

type RoleManagementPolicyProperties struct {
	Description           *string                     `json:"description,omitempty"`
	DisplayName           *string                     `json:"displayName,omitempty"`
	EffectiveRules        *[]RoleManagementPolicyRule `json:"effectiveRules,omitempty"`
	IsOrganizationDefault *bool                       `json:"isOrganizationDefault,omitempty"`
	LastModifiedBy        *Principal                  `json:"lastModifiedBy,omitempty"`
	LastModifiedDateTime  *string                     `json:"lastModifiedDateTime,omitempty"`
	PolicyProperties      *PolicyProperties           `json:"policyProperties,omitempty"`
	Rules                 *[]RoleManagementPolicyRule `json:"rules,omitempty"`
	Scope                 *string                     `json:"scope,omitempty"`
}

func (*RoleManagementPolicyProperties) GetLastModifiedDateTimeAsTime

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

func (*RoleManagementPolicyProperties) SetLastModifiedDateTimeAsTime

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

func (*RoleManagementPolicyProperties) UnmarshalJSON

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

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 ScopedRoleManagementPolicyId

type ScopedRoleManagementPolicyId struct {
	Scope                    string
	RoleManagementPolicyName string
}

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

func NewScopedRoleManagementPolicyID

func NewScopedRoleManagementPolicyID(scope string, roleManagementPolicyName string) ScopedRoleManagementPolicyId

NewScopedRoleManagementPolicyID returns a new ScopedRoleManagementPolicyId struct

func ParseScopedRoleManagementPolicyID

func ParseScopedRoleManagementPolicyID(input string) (*ScopedRoleManagementPolicyId, error)

ParseScopedRoleManagementPolicyID parses 'input' into a ScopedRoleManagementPolicyId

func ParseScopedRoleManagementPolicyIDInsensitively

func ParseScopedRoleManagementPolicyIDInsensitively(input string) (*ScopedRoleManagementPolicyId, error)

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

func (ScopedRoleManagementPolicyId) ID

ID returns the formatted Scoped Role Management Policy ID

func (ScopedRoleManagementPolicyId) Segments

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

func (ScopedRoleManagementPolicyId) String

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

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *RoleManagementPolicy
}

Jump to

Keyboard shortcuts

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