rolemanagementpolicies

package
v0.20230823.1052657 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: MPL-2.0 Imports: 13 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, rolemanagementpolicies.DefaultListForScopeOperationOptions())` can be used to do batched pagination
items, err := client.ListForScopeComplete(ctx, id, rolemanagementpolicies.DefaultListForScopeOperationOptions())
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
	OData        *odata.OData
}

type GetOperationResponse

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

type ListForScopeCompleteResult

type ListForScopeCompleteResult struct {
	Items []RoleManagementPolicy
}

type ListForScopeOperationOptions added in v0.20230802.1055140

type ListForScopeOperationOptions struct {
	Filter *string
}

func DefaultListForScopeOperationOptions added in v0.20230802.1055140

func DefaultListForScopeOperationOptions() ListForScopeOperationOptions

func (ListForScopeOperationOptions) ToHeaders added in v0.20230802.1055140

func (ListForScopeOperationOptions) ToOData added in v0.20230802.1055140

func (ListForScopeOperationOptions) ToQuery added in v0.20230802.1055140

type ListForScopeOperationResponse

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

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 RawRoleManagementPolicyRuleImpl added in v0.20230807.1063129

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

RawModeOfTransitImpl 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 RoleManagementPoliciesClient

type RoleManagementPoliciesClient struct {
	Client *resourcemanager.Client
}

func NewRoleManagementPoliciesClientWithBaseURI

func NewRoleManagementPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*RoleManagementPoliciesClient, error)

func (RoleManagementPoliciesClient) Delete

Delete ...

func (RoleManagementPoliciesClient) Get

Get ...

func (RoleManagementPoliciesClient) ListForScope

ListForScope ...

func (RoleManagementPoliciesClient) ListForScopeComplete

ListForScopeComplete retrieves all the results into a single object

func (RoleManagementPoliciesClient) ListForScopeCompleteMatchingPredicate

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

func (*RoleManagementPolicyRuleType) UnmarshalJSON added in v0.20230516.1215417

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

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
	OData        *odata.OData
	Model        *RoleManagementPolicy
}

Jump to

Keyboard shortcuts

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