Help us shape the future of Go! Take the 2026 Go Developer Survey

members

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(client *golangsdk.ServiceClient, opts MemberOpts) (*members.Member, error)

func Delete

func Delete(client *golangsdk.ServiceClient, opts MemberOpts) (err error)

Delete membership for given image. Callee should be image owner.

func Get

func Get(client *golangsdk.ServiceClient, opts MemberOpts) (*members.Member, error)

Get image member details.

func Update

func Update(client *golangsdk.ServiceClient, opts UpdateOpts) (*members.Member, error)

Update function updates member.

Types

type ListResponse

type ListResponse struct {
	Members []members.Member `json:"members"`
	// Specifies the sharing schema.
	Schema string `json:"schema"`
}

func List

func List(client *golangsdk.ServiceClient, imageId string) (*ListResponse, error)

List members returns list of members for specified image id.

type MemberOpts

type MemberOpts struct {
	ImageId string `json:"-" required:"true"`
	// Specifies the image member.
	// The value is the project ID of a tenant.
	MemberId string `json:"member" required:"true"`
}

type UpdateOpts

type UpdateOpts struct {
	ImageId  string `json:"-" required:"true"`
	MemberId string `json:"-" required:"true"`
	// Specifies whether a shared image will be accepted or declined.
	//
	// Available values include:
	//
	// accepted: indicates that a shared image is accepted. After an image is accepted, the image is displayed in the image list. You can use the image to create ECSs.
	//
	// rejected: indicates that a shared image is declined. After an image is rejected, the image is not displayed in the image list. However, you can still use the image to create ECSs.
	Status string `json:"status" required:"true"`
	// Specifies the ID of a vault.
	//
	// This parameter is mandatory if you want to accept a shared full-ECS image created from a CBR backup.
	//
	// You can obtain the vault ID from the CBR console or section "Querying the Vault List" in Cloud Backup and Recovery API Reference.
	VaultID string `json:"vault_id,omitempty"`
}

UpdateOpts represents options to an Update request.

Jump to

Keyboard shortcuts

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