groupuser

package
v0.20221011.1205130 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: MPL-2.0 Imports: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2021-08-01/groupuser Documentation

The groupuser SDK allows for interaction with the Azure Resource Manager Service apimanagement (API Version 2021-08-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/apimanagement/2021-08-01/groupuser"

Client Initialization

client := groupuser.NewGroupUserClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: GroupUserClient.CheckEntityExists

ctx := context.TODO()
id := groupuser.NewUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "userIdValue")

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

Example Usage: GroupUserClient.Create

ctx := context.TODO()
id := groupuser.NewUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "userIdValue")

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

Example Usage: GroupUserClient.Delete

ctx := context.TODO()
id := groupuser.NewUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "userIdValue")

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: GroupUserClient.List

ctx := context.TODO()
id := groupuser.NewGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "groupIdValue")

// alternatively `client.List(ctx, id, groupuser.DefaultListOperationOptions())` can be used to do batched pagination
items, err := client.ListComplete(ctx, id, groupuser.DefaultListOperationOptions())
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 PossibleValuesForGroupType

func PossibleValuesForGroupType() []string

func PossibleValuesForUserState

func PossibleValuesForUserState() []string

func ValidateGroupID

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

ValidateGroupID checks that 'input' can be parsed as a Group ID

func ValidateUserID

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

ValidateUserID checks that 'input' can be parsed as a User ID

Types

type CheckEntityExistsOperationResponse

type CheckEntityExistsOperationResponse struct {
	HttpResponse *http.Response
}

type CreateOperationResponse

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

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GroupContractProperties

type GroupContractProperties struct {
	BuiltIn     *bool      `json:"builtIn,omitempty"`
	Description *string    `json:"description,omitempty"`
	DisplayName string     `json:"displayName"`
	ExternalId  *string    `json:"externalId,omitempty"`
	Type        *GroupType `json:"type,omitempty"`
}

type GroupId

type GroupId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	GroupId           string
}

GroupId is a struct representing the Resource ID for a Group

func NewGroupID

func NewGroupID(subscriptionId string, resourceGroupName string, serviceName string, groupId string) GroupId

NewGroupID returns a new GroupId struct

func ParseGroupID

func ParseGroupID(input string) (*GroupId, error)

ParseGroupID parses 'input' into a GroupId

func ParseGroupIDInsensitively

func ParseGroupIDInsensitively(input string) (*GroupId, error)

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

func (GroupId) ID

func (id GroupId) ID() string

ID returns the formatted Group ID

func (GroupId) Segments

func (id GroupId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Group ID

func (GroupId) String

func (id GroupId) String() string

String returns a human-readable description of this Group ID

type GroupType

type GroupType string
const (
	GroupTypeCustom   GroupType = "custom"
	GroupTypeExternal GroupType = "external"
	GroupTypeSystem   GroupType = "system"
)

type GroupUserClient

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

func NewGroupUserClientWithBaseURI

func NewGroupUserClientWithBaseURI(endpoint string) GroupUserClient

func (GroupUserClient) CheckEntityExists

func (c GroupUserClient) CheckEntityExists(ctx context.Context, id UserId) (result CheckEntityExistsOperationResponse, err error)

CheckEntityExists ...

func (GroupUserClient) Create

func (c GroupUserClient) Create(ctx context.Context, id UserId) (result CreateOperationResponse, err error)

Create ...

func (GroupUserClient) Delete

func (c GroupUserClient) Delete(ctx context.Context, id UserId) (result DeleteOperationResponse, err error)

Delete ...

func (GroupUserClient) List

List ...

func (GroupUserClient) ListComplete

ListComplete retrieves all of the results into a single object

func (GroupUserClient) ListCompleteMatchingPredicate

func (c GroupUserClient) ListCompleteMatchingPredicate(ctx context.Context, id GroupId, options ListOperationOptions, predicate UserContractOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type ListCompleteResult

type ListCompleteResult struct {
	Items []UserContract
}

type ListOperationOptions

type ListOperationOptions struct {
	Filter *string
	Skip   *int64
	Top    *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

type ListOperationResponse

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

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type UserContract

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

type UserContractOperationPredicate

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

func (UserContractOperationPredicate) Matches

type UserContractProperties

type UserContractProperties struct {
	Email            *string                    `json:"email,omitempty"`
	FirstName        *string                    `json:"firstName,omitempty"`
	Groups           *[]GroupContractProperties `json:"groups,omitempty"`
	Identities       *[]UserIdentityContract    `json:"identities,omitempty"`
	LastName         *string                    `json:"lastName,omitempty"`
	Note             *string                    `json:"note,omitempty"`
	RegistrationDate *string                    `json:"registrationDate,omitempty"`
	State            *UserState                 `json:"state,omitempty"`
}

func (*UserContractProperties) GetRegistrationDateAsTime

func (o *UserContractProperties) GetRegistrationDateAsTime() (*time.Time, error)

func (*UserContractProperties) SetRegistrationDateAsTime

func (o *UserContractProperties) SetRegistrationDateAsTime(input time.Time)

type UserId

type UserId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	UserId            string
}

UserId is a struct representing the Resource ID for a User

func NewUserID

func NewUserID(subscriptionId string, resourceGroupName string, serviceName string, userId string) UserId

NewUserID returns a new UserId struct

func ParseUserID

func ParseUserID(input string) (*UserId, error)

ParseUserID parses 'input' into a UserId

func ParseUserIDInsensitively

func ParseUserIDInsensitively(input string) (*UserId, error)

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

func (UserId) ID

func (id UserId) ID() string

ID returns the formatted User ID

func (UserId) Segments

func (id UserId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this User ID

func (UserId) String

func (id UserId) String() string

String returns a human-readable description of this User ID

type UserIdentityContract

type UserIdentityContract struct {
	Id       *string `json:"id,omitempty"`
	Provider *string `json:"provider,omitempty"`
}

type UserState

type UserState string
const (
	UserStateActive  UserState = "active"
	UserStateBlocked UserState = "blocked"
	UserStateDeleted UserState = "deleted"
	UserStatePending UserState = "pending"
)

Jump to

Keyboard shortcuts

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