group

package
v0.20240715.1100358 Latest Latest
Warning

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

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

README

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

The group SDK allows for interaction with the Azure Resource Manager Service apimanagement (API Version 2023-03-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-03-01-preview/group"

Client Initialization

client := group.NewGroupClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: GroupClient.CreateOrUpdate

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

payload := group.GroupCreateParameters{
	// ...
}


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

Example Usage: GroupClient.Delete

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

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

Example Usage: GroupClient.Get

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

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

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

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: GroupClient.ListByService

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

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

Example Usage: GroupClient.Update

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

payload := group.GroupUpdateParameters{
	// ...
}


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

Example Usage: GroupClient.WorkspaceGroupCreateOrUpdate

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

payload := group.GroupCreateParameters{
	// ...
}


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

Example Usage: GroupClient.WorkspaceGroupDelete

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

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

Example Usage: GroupClient.WorkspaceGroupGet

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

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

Example Usage: GroupClient.WorkspaceGroupGetEntityTag

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

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

Example Usage: GroupClient.WorkspaceGroupListByService

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

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

Example Usage: GroupClient.WorkspaceGroupUpdate

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

payload := group.GroupUpdateParameters{
	// ...
}


read, err := client.WorkspaceGroupUpdate(ctx, id, payload, group.DefaultWorkspaceGroupUpdateOperationOptions())
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 PossibleValuesForGroupType

func PossibleValuesForGroupType() []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 ValidateServiceID

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

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

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

ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID

Types

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *string
}

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        *GroupContract
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	IfMatch *string
}

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        *GroupContract
}

type GroupClient

type GroupClient struct {
	Client *resourcemanager.Client
}

func NewGroupClientWithBaseURI

func NewGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*GroupClient, error)

func (GroupClient) CreateOrUpdate

CreateOrUpdate ...

func (GroupClient) Delete

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

Delete ...

func (GroupClient) Get

func (c GroupClient) Get(ctx context.Context, id GroupId) (result GetOperationResponse, err error)

Get ...

func (GroupClient) GetEntityTag

func (c GroupClient) GetEntityTag(ctx context.Context, id GroupId) (result GetEntityTagOperationResponse, err error)

GetEntityTag ...

func (GroupClient) ListByService

ListByService ...

func (GroupClient) ListByServiceComplete

ListByServiceComplete retrieves all the results into a single object

func (GroupClient) ListByServiceCompleteMatchingPredicate

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

ListByServiceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (GroupClient) Update

Update ...

func (GroupClient) WorkspaceGroupCreateOrUpdate

WorkspaceGroupCreateOrUpdate ...

func (GroupClient) WorkspaceGroupDelete

WorkspaceGroupDelete ...

func (GroupClient) WorkspaceGroupGet

func (c GroupClient) WorkspaceGroupGet(ctx context.Context, id WorkspaceGroupId) (result WorkspaceGroupGetOperationResponse, err error)

WorkspaceGroupGet ...

func (GroupClient) WorkspaceGroupGetEntityTag

func (c GroupClient) WorkspaceGroupGetEntityTag(ctx context.Context, id WorkspaceGroupId) (result WorkspaceGroupGetEntityTagOperationResponse, err error)

WorkspaceGroupGetEntityTag ...

func (GroupClient) WorkspaceGroupListByService

WorkspaceGroupListByService ...

func (GroupClient) WorkspaceGroupListByServiceComplete

WorkspaceGroupListByServiceComplete retrieves all the results into a single object

func (GroupClient) WorkspaceGroupListByServiceCompleteMatchingPredicate

func (c GroupClient) WorkspaceGroupListByServiceCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, options WorkspaceGroupListByServiceOperationOptions, predicate GroupContractOperationPredicate) (result WorkspaceGroupListByServiceCompleteResult, err error)

WorkspaceGroupListByServiceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (GroupClient) WorkspaceGroupUpdate

WorkspaceGroupUpdate ...

type GroupContract

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

type GroupContractOperationPredicate

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

func (GroupContractOperationPredicate) Matches

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 GroupCreateParameters

type GroupCreateParameters struct {
	Properties *GroupCreateParametersProperties `json:"properties,omitempty"`
}

type GroupCreateParametersProperties

type GroupCreateParametersProperties struct {
	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 GroupUpdateParameters

type GroupUpdateParameters struct {
	Properties *GroupUpdateParametersProperties `json:"properties,omitempty"`
}

type GroupUpdateParametersProperties

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

type ListByServiceCompleteResult

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

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 {
	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        *[]GroupContract
}

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        *GroupContract
}

type WorkspaceGroupCreateOrUpdateOperationOptions

type WorkspaceGroupCreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultWorkspaceGroupCreateOrUpdateOperationOptions

func DefaultWorkspaceGroupCreateOrUpdateOperationOptions() WorkspaceGroupCreateOrUpdateOperationOptions

func (WorkspaceGroupCreateOrUpdateOperationOptions) ToHeaders

func (WorkspaceGroupCreateOrUpdateOperationOptions) ToOData

func (WorkspaceGroupCreateOrUpdateOperationOptions) ToQuery

type WorkspaceGroupCreateOrUpdateOperationResponse

type WorkspaceGroupCreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *GroupContract
}

type WorkspaceGroupDeleteOperationOptions

type WorkspaceGroupDeleteOperationOptions struct {
	IfMatch *string
}

func DefaultWorkspaceGroupDeleteOperationOptions

func DefaultWorkspaceGroupDeleteOperationOptions() WorkspaceGroupDeleteOperationOptions

func (WorkspaceGroupDeleteOperationOptions) ToHeaders

func (WorkspaceGroupDeleteOperationOptions) ToOData

func (WorkspaceGroupDeleteOperationOptions) ToQuery

type WorkspaceGroupDeleteOperationResponse

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

type WorkspaceGroupGetEntityTagOperationResponse

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

type WorkspaceGroupGetOperationResponse

type WorkspaceGroupGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *GroupContract
}

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 WorkspaceGroupListByServiceCompleteResult

type WorkspaceGroupListByServiceCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []GroupContract
}

type WorkspaceGroupListByServiceCustomPager added in v0.20240628.1153531

type WorkspaceGroupListByServiceCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}

type WorkspaceGroupListByServiceOperationOptions

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

func DefaultWorkspaceGroupListByServiceOperationOptions

func DefaultWorkspaceGroupListByServiceOperationOptions() WorkspaceGroupListByServiceOperationOptions

func (WorkspaceGroupListByServiceOperationOptions) ToHeaders

func (WorkspaceGroupListByServiceOperationOptions) ToOData

func (WorkspaceGroupListByServiceOperationOptions) ToQuery

type WorkspaceGroupListByServiceOperationResponse

type WorkspaceGroupListByServiceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]GroupContract
}

type WorkspaceGroupUpdateOperationOptions

type WorkspaceGroupUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultWorkspaceGroupUpdateOperationOptions

func DefaultWorkspaceGroupUpdateOperationOptions() WorkspaceGroupUpdateOperationOptions

func (WorkspaceGroupUpdateOperationOptions) ToHeaders

func (WorkspaceGroupUpdateOperationOptions) ToOData

func (WorkspaceGroupUpdateOperationOptions) ToQuery

type WorkspaceGroupUpdateOperationResponse

type WorkspaceGroupUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *GroupContract
}

type WorkspaceId

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

WorkspaceId is a struct representing the Resource ID for a Workspace

func NewWorkspaceID

func NewWorkspaceID(subscriptionId string, resourceGroupName string, serviceName string, workspaceId string) WorkspaceId

NewWorkspaceID returns a new WorkspaceId struct

func ParseWorkspaceID

func ParseWorkspaceID(input string) (*WorkspaceId, error)

ParseWorkspaceID parses 'input' into a WorkspaceId

func ParseWorkspaceIDInsensitively

func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error)

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

func (*WorkspaceId) FromParseResult

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

func (WorkspaceId) ID

func (id WorkspaceId) ID() string

ID returns the formatted Workspace ID

func (WorkspaceId) Segments

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

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

func (WorkspaceId) String

func (id WorkspaceId) String() string

String returns a human-readable description of this Workspace ID

Jump to

Keyboard shortcuts

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