groupuser

package
v0.20240611.1112045 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/groupuser Documentation

The groupuser SDK allows for interaction with the Azure Resource Manager Service apimanagement (API Version 2023-05-01-preview).

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/2023-05-01-preview/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
}

Example Usage: GroupUserClient.WorkspaceGroupUserCheckEntityExists

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

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

Example Usage: GroupUserClient.WorkspaceGroupUserCreate

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

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

Example Usage: GroupUserClient.WorkspaceGroupUserDelete

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

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

Example Usage: GroupUserClient.WorkspaceGroupUserList

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

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

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

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

func ValidateWorkspaceGroupID

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

ValidateWorkspaceGroupID checks that 'input' can be parsed as a Workspace Group ID

func ValidateWorkspaceGroupUserID

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

ValidateWorkspaceGroupUserID checks that 'input' can be parsed as a Workspace 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

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

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

func (GroupUserClient) WorkspaceGroupUserCheckEntityExists

func (c GroupUserClient) WorkspaceGroupUserCheckEntityExists(ctx context.Context, id WorkspaceGroupUserId) (result WorkspaceGroupUserCheckEntityExistsOperationResponse, err error)

WorkspaceGroupUserCheckEntityExists ...

func (GroupUserClient) WorkspaceGroupUserCreate

func (c GroupUserClient) WorkspaceGroupUserCreate(ctx context.Context, id WorkspaceGroupUserId) (result WorkspaceGroupUserCreateOperationResponse, err error)

WorkspaceGroupUserCreate ...

func (GroupUserClient) WorkspaceGroupUserDelete

func (c GroupUserClient) WorkspaceGroupUserDelete(ctx context.Context, id WorkspaceGroupUserId) (result WorkspaceGroupUserDeleteOperationResponse, err error)

WorkspaceGroupUserDelete ...

func (GroupUserClient) WorkspaceGroupUserList

WorkspaceGroupUserList ...

func (GroupUserClient) WorkspaceGroupUserListComplete

WorkspaceGroupUserListComplete retrieves all the results into a single object

func (GroupUserClient) WorkspaceGroupUserListCompleteMatchingPredicate

func (c GroupUserClient) WorkspaceGroupUserListCompleteMatchingPredicate(ctx context.Context, id WorkspaceGroupId, options WorkspaceGroupUserListOperationOptions, predicate UserContractOperationPredicate) (result WorkspaceGroupUserListCompleteResult, err error)

WorkspaceGroupUserListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type GroupUserId

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

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

NewGroupUserID returns a new GroupUserId struct

func ParseGroupUserID

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

ParseGroupUserID parses 'input' into a GroupUserId

func ParseGroupUserIDInsensitively

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

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

func (GroupUserId) ID

func (id GroupUserId) ID() string

ID returns the formatted Group User ID

func (GroupUserId) Segments

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

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

func (GroupUserId) String

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

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

func (ListOperationOptions) ToOData

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

func (ListOperationOptions) ToQuery

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

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

type WorkspaceGroupId

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

WorkspaceGroupId is a struct representing the Resource ID for a Workspace Group

func NewWorkspaceGroupID

func NewWorkspaceGroupID(subscriptionId string, resourceGroupName string, serviceName string, workspaceId string, groupId string) WorkspaceGroupId

NewWorkspaceGroupID returns a new WorkspaceGroupId struct

func ParseWorkspaceGroupID

func ParseWorkspaceGroupID(input string) (*WorkspaceGroupId, error)

ParseWorkspaceGroupID parses 'input' into a WorkspaceGroupId

func ParseWorkspaceGroupIDInsensitively

func ParseWorkspaceGroupIDInsensitively(input string) (*WorkspaceGroupId, error)

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

func (*WorkspaceGroupId) FromParseResult

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

func (WorkspaceGroupId) ID

func (id WorkspaceGroupId) ID() string

ID returns the formatted Workspace Group ID

func (WorkspaceGroupId) Segments

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

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

func (WorkspaceGroupId) String

func (id WorkspaceGroupId) String() string

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

type WorkspaceGroupUserCheckEntityExistsOperationResponse

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

type WorkspaceGroupUserCreateOperationResponse

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

type WorkspaceGroupUserDeleteOperationResponse

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

type WorkspaceGroupUserId

type WorkspaceGroupUserId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	WorkspaceId       string
	GroupId           string
	UserId            string
}

WorkspaceGroupUserId is a struct representing the Resource ID for a Workspace Group User

func NewWorkspaceGroupUserID

func NewWorkspaceGroupUserID(subscriptionId string, resourceGroupName string, serviceName string, workspaceId string, groupId string, userId string) WorkspaceGroupUserId

NewWorkspaceGroupUserID returns a new WorkspaceGroupUserId struct

func ParseWorkspaceGroupUserID

func ParseWorkspaceGroupUserID(input string) (*WorkspaceGroupUserId, error)

ParseWorkspaceGroupUserID parses 'input' into a WorkspaceGroupUserId

func ParseWorkspaceGroupUserIDInsensitively

func ParseWorkspaceGroupUserIDInsensitively(input string) (*WorkspaceGroupUserId, error)

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

func (*WorkspaceGroupUserId) FromParseResult

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

func (WorkspaceGroupUserId) ID

func (id WorkspaceGroupUserId) ID() string

ID returns the formatted Workspace Group User ID

func (WorkspaceGroupUserId) Segments

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

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

func (WorkspaceGroupUserId) String

func (id WorkspaceGroupUserId) String() string

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

type WorkspaceGroupUserListCompleteResult

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

type WorkspaceGroupUserListOperationOptions

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

func DefaultWorkspaceGroupUserListOperationOptions

func DefaultWorkspaceGroupUserListOperationOptions() WorkspaceGroupUserListOperationOptions

func (WorkspaceGroupUserListOperationOptions) ToHeaders

func (WorkspaceGroupUserListOperationOptions) ToOData

func (WorkspaceGroupUserListOperationOptions) ToQuery

type WorkspaceGroupUserListOperationResponse

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

Jump to

Keyboard shortcuts

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