user

package
v0.20241023.1122425 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/user Documentation

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

Client Initialization

client := user.NewUserClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: UserClient.CreateOrUpdate

ctx := context.TODO()
id := user.NewUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "userId")

payload := user.UserCreateParameters{
	// ...
}


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

Example Usage: UserClient.Delete

ctx := context.TODO()
id := user.NewUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "userId")

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

Example Usage: UserClient.Get

ctx := context.TODO()
id := user.NewUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "userId")

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: UserClient.GetEntityTag

ctx := context.TODO()
id := user.NewUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "userId")

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

Example Usage: UserClient.ListByService

ctx := context.TODO()
id := user.NewServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName")

// alternatively `client.ListByService(ctx, id, user.DefaultListByServiceOperationOptions())` can be used to do batched pagination
items, err := client.ListByServiceComplete(ctx, id, user.DefaultListByServiceOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: UserClient.Update

ctx := context.TODO()
id := user.NewUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "userId")

payload := user.UserUpdateParameters{
	// ...
}


read, err := client.Update(ctx, id, payload, user.DefaultUpdateOperationOptions())
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 PossibleValuesForAppType

func PossibleValuesForAppType() []string

func PossibleValuesForConfirmation

func PossibleValuesForConfirmation() []string

func PossibleValuesForGroupType

func PossibleValuesForGroupType() []string

func PossibleValuesForUserState

func PossibleValuesForUserState() []string

func ValidateServiceID

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

ValidateServiceID checks that 'input' can be parsed as a Service 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 AppType

type AppType string
const (
	AppTypeDeveloperPortal AppType = "developerPortal"
	AppTypePortal          AppType = "portal"
)

func (*AppType) UnmarshalJSON

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

type Confirmation

type Confirmation string
const (
	ConfirmationInvite Confirmation = "invite"
	ConfirmationSignup Confirmation = "signup"
)

func (*Confirmation) UnmarshalJSON

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

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *string
	Notify  *bool
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

func (CreateOrUpdateOperationOptions) ToHeaders

func (CreateOrUpdateOperationOptions) ToOData

func (CreateOrUpdateOperationOptions) ToQuery

type CreateOrUpdateOperationResponse

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

type DeleteOperationOptions

type DeleteOperationOptions struct {
	AppType             *AppType
	DeleteSubscriptions *bool
	IfMatch             *string
	Notify              *bool
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders

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

func (DeleteOperationOptions) ToOData

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

func (DeleteOperationOptions) ToQuery

type DeleteOperationResponse

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

type GetEntityTagOperationResponse

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

type GetOperationResponse

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

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 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 ListByServiceCompleteResult

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

type ListByServiceCustomPager added in v0.20240628.1153531

type ListByServiceCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListByServiceCustomPager) NextPageLink() *odata.Link

type ListByServiceOperationOptions

type ListByServiceOperationOptions struct {
	ExpandGroups *bool
	Filter       *string
	Skip         *int64
	Top          *int64
}

func DefaultListByServiceOperationOptions

func DefaultListByServiceOperationOptions() ListByServiceOperationOptions

func (ListByServiceOperationOptions) ToHeaders

func (ListByServiceOperationOptions) ToOData

func (ListByServiceOperationOptions) ToQuery

type ListByServiceOperationResponse

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

type ServiceId

type ServiceId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
}

ServiceId is a struct representing the Resource ID for a Service

func NewServiceID

func NewServiceID(subscriptionId string, resourceGroupName string, serviceName string) ServiceId

NewServiceID returns a new ServiceId struct

func ParseServiceID

func ParseServiceID(input string) (*ServiceId, error)

ParseServiceID parses 'input' into a ServiceId

func ParseServiceIDInsensitively

func ParseServiceIDInsensitively(input string) (*ServiceId, error)

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

func (*ServiceId) FromParseResult

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

func (ServiceId) ID

func (id ServiceId) ID() string

ID returns the formatted Service ID

func (ServiceId) Segments

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

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

func (ServiceId) String

func (id ServiceId) String() string

String returns a human-readable description of this Service ID

type UpdateOperationOptions

type UpdateOperationOptions struct {
	IfMatch *string
}

func DefaultUpdateOperationOptions

func DefaultUpdateOperationOptions() UpdateOperationOptions

func (UpdateOperationOptions) ToHeaders

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

func (UpdateOperationOptions) ToOData

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

func (UpdateOperationOptions) ToQuery

type UpdateOperationResponse

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

type UserClient

type UserClient struct {
	Client *resourcemanager.Client
}

func NewUserClientWithBaseURI

func NewUserClientWithBaseURI(sdkApi sdkEnv.Api) (*UserClient, error)

func (UserClient) CreateOrUpdate

CreateOrUpdate ...

func (UserClient) Delete

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

Delete ...

func (UserClient) Get

func (c UserClient) Get(ctx context.Context, id UserId) (result GetOperationResponse, err error)

Get ...

func (UserClient) GetEntityTag

func (c UserClient) GetEntityTag(ctx context.Context, id UserId) (result GetEntityTagOperationResponse, err error)

GetEntityTag ...

func (UserClient) ListByService

ListByService ...

func (UserClient) ListByServiceComplete

ListByServiceComplete retrieves all the results into a single object

func (UserClient) ListByServiceCompleteMatchingPredicate

func (c UserClient) ListByServiceCompleteMatchingPredicate(ctx context.Context, id ServiceId, options ListByServiceOperationOptions, predicate UserContractOperationPredicate) (result ListByServiceCompleteResult, err error)

ListByServiceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (UserClient) Update

Update ...

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 UserCreateParameterProperties

type UserCreateParameterProperties struct {
	AppType      *AppType                `json:"appType,omitempty"`
	Confirmation *Confirmation           `json:"confirmation,omitempty"`
	Email        string                  `json:"email"`
	FirstName    string                  `json:"firstName"`
	Identities   *[]UserIdentityContract `json:"identities,omitempty"`
	LastName     string                  `json:"lastName"`
	Note         *string                 `json:"note,omitempty"`
	Password     *string                 `json:"password,omitempty"`
	State        *UserState              `json:"state,omitempty"`
}

type UserCreateParameters

type UserCreateParameters struct {
	Properties *UserCreateParameterProperties `json:"properties,omitempty"`
}

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

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

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

func (*UserState) UnmarshalJSON

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

type UserUpdateParameters

type UserUpdateParameters struct {
	Properties *UserUpdateParametersProperties `json:"properties,omitempty"`
}

type UserUpdateParametersProperties

type UserUpdateParametersProperties struct {
	Email      *string                 `json:"email,omitempty"`
	FirstName  *string                 `json:"firstName,omitempty"`
	Identities *[]UserIdentityContract `json:"identities,omitempty"`
	LastName   *string                 `json:"lastName,omitempty"`
	Note       *string                 `json:"note,omitempty"`
	Password   *string                 `json:"password,omitempty"`
	State      *UserState              `json:"state,omitempty"`
}

Jump to

Keyboard shortcuts

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