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

vpc

package
v1.13.3 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DefaultMetadataServiceVersion = "2025-08-26"
	DefaultServerEndpoint         = "http://api.metadata.cloud.ibm.com"
	DefaultPowerServerEndpoint    = "https://api.metadata.power-iaas.cloud.ibm.com"

	DefaultMetadataFlavor = "ibm"

	// headers
	MetadataFlavor = "Metadata-Flavor"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	VPCAuthEndpoint              string
	PVSAuthEndpoint              string
	InstanceIdentiyTokenEndpoint string
	IAMTokenEndpoint             string
	Version                      string
}

func DefaultConfig

func DefaultConfig(vpcAuthEndpoint string, apiVersion string) Config

func PVSConfig added in v1.12.0

func PVSConfig(pvsAuthEndpoint string, apiVersion string) Config

type IAMAccessTokenRequest

type IAMAccessTokenRequest struct {
	AccessToken string `json:"access_token"`
	Body        *TrustedProfileByIdOrCRN
}

IAMAccessTokenRequest represents the request object for the `GetIAMAccessToken` operation. AccessToken - The instance identity token Body - The trusted profile ID/CRN represented as the `TrustedProfileByIdOrCRN` object

func NewIAMAccessTokenRequest

func NewIAMAccessTokenRequest(profileID string, profileCRN string, token string) (*IAMAccessTokenRequest, error)

NewIAMAccessTokenRequest builds the request body for the GetIAMAccessToken operation. The request body for this operation consists of either a trusted profile ID or CRN. If both a trusted profile ID and a trusted profile CRN are provided, then an error is returned.

type InstanceIdentityToken

type InstanceIdentityToken struct {
	// The access token
	AccessToken string `json:"access_token"`
	// The date and time that the access token was created
	CreatedAt string `json:"created_at"`
	// The date and time that the access token will expire
	ExpiresAt string `json:"expires_at"`
	// Time in seconds before the access token expires
	ExpiresIn int `json:"expires_in"`
}

InstanceIdentityToken describes the response body for the 'GetInstanceIdentityToken' operation.

type Interface

type Interface interface {
	GetInstanceIdentityToken() (*InstanceIdentityToken, error)
	GetIAMAccessToken(req *IAMAccessTokenRequest) (*iam.Token, error)
}

func NewClient

func NewClient(config Config, restClient *rest.Client) Interface

type TrustedProfileByIdOrCRN

type TrustedProfileByIdOrCRN struct {
	ID  string `json:"id"`
	CRN string `json:"crn"`
}

Jump to

Keyboard shortcuts

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