privatelink

package
v0.40.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PrivateLinkStatusInitializing when PrivateLink is initialising
	PrivateLinkStatusInitializing = "initializing"
	// PrivateLinkStatusDeleted when PrivateLink has been deleted
	PrivateLinkStatusDeleted = "deleting"
	// PrivateLinkStatusActive when PrivateLink is ready
	PrivateLinkStatusActive = "active"

	// PrivateLinkPrincipalStatusInitializing when PrivateLinkPrincipal is initializing
	PrivateLinkPrincipalStatusInitializing = "initializing"

	// PrivateLinkPrincipalStatusDisassociating when PrivateLinkPrincipal is disassociating
	PrivateLinkPrincipalStatusDisassociating = "disassociating"
	// PrivateLinkPrincipalStatusDisassociated when PrivateLinkPrincipal has disassociated
	PrivateLinkPrincipalStatusDisassociated = "disassociated"

	// PrivateLinkPrincipalStatusAssociating when PrivateLinkPrincipal is associating
	PrivateLinkPrincipalStatusAssociating = "associating"
	// PrivateLinkPrincipalStatusAssociated when PrivateLinkPrincipal has associated
	PrivateLinkPrincipalStatusAssociated = "associated"

	// PrivateLinkPrincipalStatusFailed when PrivateLinkPrincipal has failed
	PrivateLinkPrincipalStatusFailed = "failed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI(client HttpClient, taskWaiter TaskWaiter, logger Log) *API

func (*API) CreateActiveActivePrincipal

func (a *API) CreateActiveActivePrincipal(ctx context.Context, subscriptionId int, regionId int, principal CreatePrivateLinkPrincipal) error

CreateActiveActivePrincipal will add a principal to an active active PrivateLink.

func (a *API) CreateActiveActivePrivateLink(ctx context.Context, subscriptionId int, regionId int, privateLink CreatePrivateLink) error

CreateActiveActivePrivateLink will create a new active active PrivateLink.

func (*API) CreatePrincipal

func (a *API) CreatePrincipal(ctx context.Context, subscriptionId int, principal CreatePrivateLinkPrincipal) error

CreatePrincipal will add a principal to a PrivateLink.

func (a *API) CreatePrivateLink(ctx context.Context, subscriptionId int, privateLink CreatePrivateLink) error

CreatePrivateLink will create a new PrivateLink.

func (*API) DeleteActiveActivePrincipal

func (a *API) DeleteActiveActivePrincipal(ctx context.Context, subscriptionId int, regionId int, principal string) error

DeleteActiveActivePrincipal will remove a principal from an active active PrivateLink.

func (*API) DeletePrincipal

func (a *API) DeletePrincipal(ctx context.Context, subscriptionId int, principal string) error

DeletePrincipal will remove a principal from a PrivateLink.

func (a *API) GetActiveActivePrivateLink(ctx context.Context, subscription int, regionId int) (*PrivateLink, error)

GetActiveActivePrivateLink will get a new active active PrivateLink.

func (*API) GetActiveActivePrivateLinkEndpointScript

func (a *API) GetActiveActivePrivateLinkEndpointScript(ctx context.Context, subscription int, regionId int) (*PrivateLinkEndpointScript, error)

GetPrivateLinkEndpointScript will get the script for an endpoint.

func (a *API) GetPrivateLink(ctx context.Context, subscription int) (*PrivateLink, error)

GetPrivateLink will get a new PrivateLink.

func (*API) GetPrivateLinkEndpointScript

func (a *API) GetPrivateLinkEndpointScript(ctx context.Context, subscriptionId int) (*PrivateLinkEndpointScript, error)

GetPrivateLinkEndpointScript will get the script for an endpoint.

type CreatePrivateLink struct {
	ShareName      *string `json:"shareName,omitempty"`
	Principal      *string `json:"principal,omitempty"`
	PrincipalType  *string `json:"type,omitempty"`
	PrincipalAlias *string `json:"alias,omitempty"`
}

type CreatePrivateLinkActiveActive

type CreatePrivateLinkActiveActive struct {
	SubscriptionId *int    `json:"subscriptionId"`
	PrincipalId    *int    `json:"principal,omitempty"`
	PrincipalType  *string `json:"type,omitempty"`
	PrincipalAlias *string `json:"alias,omitempty"`
}

type CreatePrivateLinkPrincipal

type CreatePrivateLinkPrincipal struct {
	Principal      *string `json:"principal,omitempty"`
	PrincipalType  *string `json:"type,omitempty"`
	PrincipalAlias *string `json:"alias,omitempty"`
}

type HttpClient

type HttpClient interface {
	Get(ctx context.Context, name, path string, responseBody interface{}) error
	GetWithQuery(ctx context.Context, name, path string, query url.Values, responseBody interface{}) error
	Post(ctx context.Context, name, path string, requestBody interface{}, responseBody interface{}) error
	Put(ctx context.Context, name, path string, requestBody interface{}, responseBody interface{}) error
	Delete(ctx context.Context, name, path string, requestBody interface{}, responseBody interface{}) error
}

type Log

type Log interface {
	Printf(format string, args ...interface{})
}

type NotFound

type NotFound struct {
	// contains filtered or unexported fields
}

func (*NotFound) Error

func (f *NotFound) Error() string

type NotFoundActiveActive

type NotFoundActiveActive struct {
	// contains filtered or unexported fields
}

func (*NotFoundActiveActive) Error

func (f *NotFoundActiveActive) Error() string
type PrivateLink struct {
	Status                   *string                  `json:"status,omitempty"`
	Principals               []*PrivateLinkPrincipal  `json:"principals,omitempty"`
	ResourceConfigurationId  *string                  `json:"resourceConfigurationId,omitempty"`
	ResourceConfigurationArn *string                  `json:"resourceConfigurationArn,omitempty"`
	ShareArn                 *string                  `json:"shareArn,omitempty"`
	ShareName                *string                  `json:"shareName,omitempty"`
	Connections              []*PrivateLinkConnection `json:"connections,omitempty"`
	Databases                []*PrivateLinkDatabase   `json:"databases,omitempty"`
	SubscriptionId           *int                     `json:"subscriptionId,omitempty"`
	RegionId                 *int                     `json:"regionId,omitempty"`
	ErrorMessage             *string                  `json:"errorMessage,omitempty"`
}

type PrivateLinkActiveActive

type PrivateLinkActiveActive struct {
	SubscriptionId *int `json:"subscriptionId"`
	RegionId       *int `json:"region_id"`
}

type PrivateLinkConnection

type PrivateLinkConnection struct {
	AssociationId   *string `json:"associationId,omitempty"`
	ConnectionId    *string `json:"connectionId,omitempty"`
	Type            *string `json:"type,omitempty"`
	OwnerId         *string `json:"ownerId,omitempty"`
	AssociationDate *string `json:"associationDate,omitempty"`
}

type PrivateLinkDatabase

type PrivateLinkDatabase struct {
	DatabaseId           *int    `json:"databaseId,omitempty"`
	Port                 *int    `json:"port,omitempty"`
	ResourceLinkEndpoint *string `json:"rlEndpoint,omitempty"`
}

type PrivateLinkEndpointScript

type PrivateLinkEndpointScript struct {
	ResourceEndpointScript *string `json:"resourceEndpointScript,omitempty"`
	TerraformAwsScript     *string `json:"terraformAwsScript,omitempty"`
}

type PrivateLinkPrincipal

type PrivateLinkPrincipal struct {
	Principal *string `json:"principal,omitempty"`
	Type      *string `json:"type,omitempty"`
	Alias     *string `json:"alias,omitempty"`
	Status    *string `json:"status,omitempty"`
}

type TaskWaiter

type TaskWaiter interface {
	WaitForResourceId(ctx context.Context, id string) (int, error)
	Wait(ctx context.Context, id string) error
	WaitForResource(ctx context.Context, id string, resource interface{}) error
}

Jump to

Keyboard shortcuts

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