groupuser

package
v0.20240118.1101651 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: MPL-2.0 Imports: 12 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.NewGroupUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "groupIdValue", "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.NewGroupUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "groupIdValue", "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.NewGroupUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "groupIdValue", "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 ValidateGroupUserID added in v0.20230523.1140858

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

ValidateGroupUserID checks that 'input' can be parsed as a Group User ID

Types

type CheckEntityExistsOperationResponse

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

type CreateOperationResponse

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

type DeleteOperationResponse

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

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) FromParseResult added in v0.20231127.1171502

func (id *GroupId) FromParseResult(input resourceids.ParseResult) error

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

func (*GroupType) UnmarshalJSON added in v0.20230801.1071415

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

type GroupUserClient

type GroupUserClient struct {
	Client *resourcemanager.Client
}

func NewGroupUserClientWithBaseURI

func NewGroupUserClientWithBaseURI(sdkApi sdkEnv.Api) (*GroupUserClient, error)

func (GroupUserClient) CheckEntityExists

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

CheckEntityExists ...

func (GroupUserClient) Create

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

Create ...

func (GroupUserClient) Delete

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

Delete ...

func (GroupUserClient) List

List ...

func (GroupUserClient) ListComplete

ListComplete retrieves all the results into a single object

func (GroupUserClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type GroupUserId added in v0.20230523.1140858

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

GroupUserId is a struct representing the Resource ID for a Group User

func NewGroupUserID added in v0.20230523.1140858

func NewGroupUserID(subscriptionId string, resourceGroupName string, serviceName string, groupId string, userId string) GroupUserId

NewGroupUserID returns a new GroupUserId struct

func ParseGroupUserID added in v0.20230523.1140858

func ParseGroupUserID(input string) (*GroupUserId, error)

ParseGroupUserID parses 'input' into a GroupUserId

func ParseGroupUserIDInsensitively added in v0.20230523.1140858

func ParseGroupUserIDInsensitively(input string) (*GroupUserId, error)

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

func (*GroupUserId) FromParseResult added in v0.20231127.1171502

func (id *GroupUserId) FromParseResult(input resourceids.ParseResult) error

func (GroupUserId) ID added in v0.20230523.1140858

func (id GroupUserId) ID() string

ID returns the formatted Group User ID

func (GroupUserId) Segments added in v0.20230523.1140858

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

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

func (GroupUserId) String added in v0.20230523.1140858

func (id GroupUserId) String() string

String returns a human-readable description of this Group User ID

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []UserContract
}

type ListOperationOptions

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

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders added in v0.20230801.1071415

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData added in v0.20230801.1071415

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery added in v0.20230801.1071415

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]UserContract
}

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

func (*UserState) UnmarshalJSON added in v0.20230801.1071415

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

Jump to

Keyboard shortcuts

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