project

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyTypeChoices added in v0.3.0

func AnyTypeChoices() []string

func BillingCurrencyTypeChoices

func BillingCurrencyTypeChoices() []string

func MemberTypeChoices

func MemberTypeChoices() []string

func VpcPeeringConnectionTypeChoices added in v0.3.0

func VpcPeeringConnectionTypeChoices() []string

Types

type AlertOut

type AlertOut struct {
	CreateTime  time.Time `json:"create_time"`            // Event creation timestamp (ISO 8601)
	Event       string    `json:"event"`                  // Name of the alerting event
	NodeName    *string   `json:"node_name,omitempty"`    // Name of the service node
	ProjectName string    `json:"project_name"`           // Project name
	ServiceName *string   `json:"service_name,omitempty"` // Service name
	ServiceType *string   `json:"service_type,omitempty"` // Service type code
	Severity    string    `json:"severity"`               // Severity of the event
}

type AnyType added in v0.3.0

type AnyType string
const (
	AnyTypeAdmin     AnyType = "admin"
	AnyTypeDeveloper AnyType = "developer"
	AnyTypeOperator  AnyType = "operator"
	AnyTypeReadOnly  AnyType = "read_only"
)

type BillingCurrencyType

type BillingCurrencyType string
const (
	BillingCurrencyTypeAud BillingCurrencyType = "AUD"
	BillingCurrencyTypeCad BillingCurrencyType = "CAD"
	BillingCurrencyTypeChf BillingCurrencyType = "CHF"
	BillingCurrencyTypeDkk BillingCurrencyType = "DKK"
	BillingCurrencyTypeEur BillingCurrencyType = "EUR"
	BillingCurrencyTypeGbp BillingCurrencyType = "GBP"
	BillingCurrencyTypeJpy BillingCurrencyType = "JPY"
	BillingCurrencyTypeNok BillingCurrencyType = "NOK"
	BillingCurrencyTypeNzd BillingCurrencyType = "NZD"
	BillingCurrencyTypeSek BillingCurrencyType = "SEK"
	BillingCurrencyTypeSgd BillingCurrencyType = "SGD"
	BillingCurrencyTypeUsd BillingCurrencyType = "USD"
)

type BillingEmailIn

type BillingEmailIn struct {
	Email string `json:"email"` // User email address
}

type BillingEmailOut

type BillingEmailOut struct {
	Email string `json:"email"` // User email address
}

type CardInfoOut

type CardInfoOut struct {
	Brand       string `json:"brand"`
	CardId      string `json:"card_id"` // Credit card ID
	Country     string `json:"country"`
	CountryCode string `json:"country_code"` // Two letter ISO country code
	ExpMonth    int    `json:"exp_month"`    // Expiration month
	ExpYear     int    `json:"exp_year"`     // Expiration year
	Last4       string `json:"last4"`        // Credit card last four digits
	Name        string `json:"name"`         // Name on the credit card
	UserEmail   string `json:"user_email"`   // User email address
}

CardInfoOut Credit card assigned to the project

type ElasticsearchOut

type ElasticsearchOut struct {
	EolDate string `json:"eol_date"` // Extended EOL date
	Version string `json:"version"`  // Service version
}

ElasticsearchOut Service EOL extension

type EndOfLifeExtensionOut

type EndOfLifeExtensionOut struct {
	Elasticsearch *ElasticsearchOut `json:"elasticsearch,omitempty"` // Service EOL extension
}

EndOfLifeExtensionOut End of life extension information

type EventOut

type EventOut struct {
	Actor       string `json:"actor"`        // Initiator of the event
	EventDesc   string `json:"event_desc"`   // Event description
	EventType   string `json:"event_type"`   // Event type identifier
	Id          string `json:"id"`           // Event identifier (unique across all projects)
	ServiceName string `json:"service_name"` // Service name
	Time        string `json:"time"`         // Timestamp in ISO 8601 format, always in UTC
}

type GroupUserOut

type GroupUserOut struct {
	MemberType  MemberType `json:"member_type"`   // Project member type
	RealName    string     `json:"real_name"`     // User real name
	UserEmail   string     `json:"user_email"`    // User email address
	UserGroupId string     `json:"user_group_id"` // User group ID
}

type Handler

type Handler interface {
	// ListProjectVpcPeeringConnectionTypes list VPC peering connection types for a project
	// GET /v1/project/{project}/vpc-peering-connection-types
	// https://api.aiven.io/doc/#tag/Project/operation/ListProjectVpcPeeringConnectionTypes
	ListProjectVpcPeeringConnectionTypes(ctx context.Context, project string) ([]VpcPeeringConnectionTypeOut, error)

	// ProjectAlertsList list active alerts for a project
	// GET /v1/project/{project}/alerts
	// https://api.aiven.io/doc/#tag/Project/operation/ProjectAlertsList
	ProjectAlertsList(ctx context.Context, project string) ([]AlertOut, error)

	// ProjectCreate create a project
	// POST /v1/project
	// https://api.aiven.io/doc/#tag/Project/operation/ProjectCreate
	ProjectCreate(ctx context.Context, in *ProjectCreateIn) (*ProjectCreateOut, error)

	// ProjectDelete delete project
	// DELETE /v1/project/{project}
	// https://api.aiven.io/doc/#tag/Project/operation/ProjectDelete
	ProjectDelete(ctx context.Context, project string) error

	// ProjectGenerateSbomDownloadUrl generate SBOM for project
	// GET /v1/project/{project}/generate-sbom-download-url/{file_format}
	// https://api.aiven.io/doc/#tag/Project/operation/ProjectGenerateSbomDownloadUrl
	ProjectGenerateSbomDownloadUrl(ctx context.Context, project string, fileFormat string) (string, error)

	// ProjectGet get project details
	// GET /v1/project/{project}
	// https://api.aiven.io/doc/#tag/Project/operation/ProjectGet
	ProjectGet(ctx context.Context, project string) (*ProjectGetOut, error)

	// ProjectGetEventLogs get project event log entries
	// GET /v1/project/{project}/events
	// https://api.aiven.io/doc/#tag/Project/operation/ProjectGetEventLogs
	ProjectGetEventLogs(ctx context.Context, project string) ([]EventOut, error)

	// ProjectInvite send project membership invitation
	// POST /v1/project/{project}/invite
	// https://api.aiven.io/doc/#tag/Project/operation/ProjectInvite
	ProjectInvite(ctx context.Context, project string, in *ProjectInviteIn) error

	// ProjectInviteAccept confirm project invite
	// POST /v1/project/{project}/invite/{invite_verification_code}
	// https://api.aiven.io/doc/#tag/Project/operation/ProjectInviteAccept
	ProjectInviteAccept(ctx context.Context, project string, inviteVerificationCode string) (*ProjectInviteAcceptOut, error)

	// ProjectInviteDelete delete an invitation to a project
	// DELETE /v1/project/{project}/invite/{invited_email}
	// https://api.aiven.io/doc/#tag/Project/operation/ProjectInviteDelete
	ProjectInviteDelete(ctx context.Context, project string, invitedEmail string) error

	// ProjectKmsGetCA retrieve project CA certificate
	// GET /v1/project/{project}/kms/ca
	// https://api.aiven.io/doc/#tag/Project_Key_Management/operation/ProjectKmsGetCA
	ProjectKmsGetCA(ctx context.Context, project string) (string, error)

	// ProjectList list projects
	// GET /v1/project
	// https://api.aiven.io/doc/#tag/Project/operation/ProjectList
	ProjectList(ctx context.Context) (*ProjectListOut, error)

	// ProjectPrivatelinkAvailabilityList list Privatelink cloud availability and prices for a project
	// GET /v1/project/{project}/privatelink-availability
	// https://api.aiven.io/doc/#tag/Project/operation/ProjectPrivatelinkAvailabilityList
	ProjectPrivatelinkAvailabilityList(ctx context.Context, project string) ([]PrivatelinkAvailabilityOut, error)

	// ProjectTagsList list all tags attached to this project
	// GET /v1/project/{project}/tags
	// https://api.aiven.io/doc/#tag/Project/operation/ProjectTagsList
	ProjectTagsList(ctx context.Context, project string) (map[string]string, error)

	// ProjectTagsReplace replace all project tags with a new set of tags, deleting old ones
	// PUT /v1/project/{project}/tags
	// https://api.aiven.io/doc/#tag/Project/operation/ProjectTagsReplace
	ProjectTagsReplace(ctx context.Context, project string, in *ProjectTagsReplaceIn) error

	// ProjectTagsUpdate update one or more tags, creating ones that don't exist, and deleting ones given NULL value
	// PATCH /v1/project/{project}/tags
	// https://api.aiven.io/doc/#tag/Project/operation/ProjectTagsUpdate
	ProjectTagsUpdate(ctx context.Context, project string, in *ProjectTagsUpdateIn) error

	// ProjectUpdate update project
	// PUT /v1/project/{project}
	// https://api.aiven.io/doc/#tag/Project/operation/ProjectUpdate
	ProjectUpdate(ctx context.Context, project string, in *ProjectUpdateIn) (*ProjectUpdateOut, error)

	// ProjectUserList list users with access to the project. May contain same user multiple times if they belong to multiple teams associated to the project
	// GET /v1/project/{project}/users
	// https://api.aiven.io/doc/#tag/Project/operation/ProjectUserList
	ProjectUserList(ctx context.Context, project string) (*ProjectUserListOut, error)

	// ProjectUserRemove remove user from the project
	// DELETE /v1/project/{project}/user/{user_email}
	// https://api.aiven.io/doc/#tag/Project/operation/ProjectUserRemove
	ProjectUserRemove(ctx context.Context, project string, userEmail string) error

	// ProjectUserUpdate update a project user
	// PUT /v1/project/{project}/user/{user_email}
	// https://api.aiven.io/doc/#tag/Project/operation/ProjectUserUpdate
	ProjectUserUpdate(ctx context.Context, project string, userEmail string, in *ProjectUserUpdateIn) error
}

type InvitationOut

type InvitationOut struct {
	InviteTime        time.Time  `json:"invite_time"`         // Timestamp in ISO 8601 format, always in UTC
	InvitedUserEmail  string     `json:"invited_user_email"`  // User email address
	InvitingUserEmail string     `json:"inviting_user_email"` // User email address
	MemberType        MemberType `json:"member_type"`         // Project member type
}

type MemberType

type MemberType string
const (
	MemberTypeAdmin     MemberType = "admin"
	MemberTypeDeveloper MemberType = "developer"
	MemberTypeOperator  MemberType = "operator"
	MemberTypeReadOnly  MemberType = "read_only"
)

type PrivatelinkAvailabilityOut

type PrivatelinkAvailabilityOut struct {
	CloudName string `json:"cloud_name"` // Target cloud
	PriceUsd  string `json:"price_usd"`  // Hourly privatelink price in this cloud region
}

type ProjectCreateIn

type ProjectCreateIn struct {
	AccountId                    *string             `json:"account_id,omitempty"`                       // Account ID
	AddAccountOwnersAdminAccess  *bool               `json:"add_account_owners_admin_access,omitempty"`  // [DEPRECATED] If account_id is set, grant account owner team admin access to the new project. This flag is ignored, and assumed true.
	AddressLines                 *[]string           `json:"address_lines,omitempty"`                    // [DEPRECATED] Address lines
	BasePort                     *int                `json:"base_port,omitempty"`                        // Base value that new services in this project will use to derive their port numbers.
	BillingAddress               *string             `json:"billing_address,omitempty"`                  // DEPRECATED: use split address fields like company, address_lines, zip_code, city and state instead
	BillingCurrency              BillingCurrencyType `json:"billing_currency,omitempty"`                 // [DEPRECATED] Billing currency
	BillingEmails                *[]BillingEmailIn   `json:"billing_emails,omitempty"`                   // [DEPRECATED] Billing emails
	BillingExtraText             *string             `json:"billing_extra_text,omitempty"`               // [DEPRECATED] Extra text to be included in all project invoices
	BillingGroupId               *string             `json:"billing_group_id,omitempty"`                 // Billing group ID
	CardId                       *string             `json:"card_id,omitempty"`                          // [DEPRECATED] Credit card ID
	City                         *string             `json:"city,omitempty"`                             // [DEPRECATED] Address city
	Cloud                        *string             `json:"cloud,omitempty"`                            // Target cloud
	Company                      *string             `json:"company,omitempty"`                          // Name of a company
	CopyFromProject              *string             `json:"copy_from_project,omitempty"`                // Project name from which to copy settings to the new project
	CopyTags                     *bool               `json:"copy_tags,omitempty"`                        // Copy tags from the source project. If request contains additional tags, the tags copied from source are updated with them.
	CountryCode                  *string             `json:"country_code,omitempty"`                     // [DEPRECATED] Two letter country code for billing country
	Project                      string              `json:"project"`                                    // Project name
	State                        *string             `json:"state,omitempty"`                            // [DEPRECATED] Address state
	Tags                         *map[string]string  `json:"tags,omitempty"`                             // Set of resource tags
	TechEmails                   *[]TechEmailIn      `json:"tech_emails,omitempty"`                      // List of project tech email addresses
	UseSourceProjectBillingGroup *bool               `json:"use_source_project_billing_group,omitempty"` // Use the same billing group that is used in source project.
	VatId                        *string             `json:"vat_id,omitempty"`                           // [DEPRECATED] EU VAT identification
	ZipCode                      *string             `json:"zip_code,omitempty"`                         // [DEPRECATED] Address zip code
}

ProjectCreateIn ProjectCreateRequestBody

type ProjectCreateOut

type ProjectCreateOut struct {
	AccountId             string                 `json:"account_id"`                        // Account ID
	AccountName           *string                `json:"account_name,omitempty"`            // Account name
	AddressLines          []string               `json:"address_lines,omitempty"`           // Address lines
	AvailableCredits      *string                `json:"available_credits,omitempty"`       // Available credits, in USD
	BillingAddress        string                 `json:"billing_address"`                   // DEPRECATED: use split address fields like company, address_lines, zip_code, city and state instead
	BillingCurrency       BillingCurrencyType    `json:"billing_currency,omitempty"`        // Billing currency
	BillingEmails         []BillingEmailOut      `json:"billing_emails"`                    // List of project billing email addresses
	BillingExtraText      *string                `json:"billing_extra_text,omitempty"`      // Extra text to be included in all project invoices, e.g. purchase order or cost center number
	BillingGroupId        string                 `json:"billing_group_id"`                  // Billing group ID
	BillingGroupName      string                 `json:"billing_group_name"`                // Billing group name
	CardInfo              *CardInfoOut           `json:"card_info,omitempty"`               // Credit card assigned to the project
	City                  *string                `json:"city,omitempty"`                    // Address city
	Company               *string                `json:"company,omitempty"`                 // Name of a company
	Country               string                 `json:"country"`                           // Billing country
	CountryCode           string                 `json:"country_code"`                      // Two letter ISO country code
	DefaultCloud          string                 `json:"default_cloud"`                     // Default cloud to use when launching services
	EndOfLifeExtension    *EndOfLifeExtensionOut `json:"end_of_life_extension,omitempty"`   // End of life extension information
	EstimatedBalance      string                 `json:"estimated_balance"`                 // Estimated balance, in USD
	EstimatedBalanceLocal *string                `json:"estimated_balance_local,omitempty"` // Estimated balance, in billing currency
	Features              map[string]any         `json:"features,omitempty"`                // Feature flags
	OrganizationId        string                 `json:"organization_id"`                   // Organization ID
	PaymentMethod         string                 `json:"payment_method"`                    // Payment method
	ProjectName           string                 `json:"project_name"`                      // Project name
	State                 *string                `json:"state,omitempty"`                   // Address state
	Tags                  map[string]string      `json:"tags,omitempty"`                    // Set of resource tags
	TechEmails            []TechEmailOut         `json:"tech_emails,omitempty"`             // List of project tech email addresses
	TenantId              *string                `json:"tenant_id,omitempty"`               // Tenant ID
	TrialExpirationTime   *time.Time             `json:"trial_expiration_time,omitempty"`   // Trial expiration time (ISO 8601)
	VatId                 string                 `json:"vat_id"`                            // EU VAT Identification Number
	ZipCode               *string                `json:"zip_code,omitempty"`                // Address zip code
}

ProjectCreateOut Project information

type ProjectGetOut

type ProjectGetOut struct {
	AccountId             string                 `json:"account_id"`                        // Account ID
	AccountName           *string                `json:"account_name,omitempty"`            // Account name
	AddressLines          []string               `json:"address_lines,omitempty"`           // Address lines
	AvailableCredits      *string                `json:"available_credits,omitempty"`       // Available credits, in USD
	BillingAddress        string                 `json:"billing_address"`                   // DEPRECATED: use split address fields like company, address_lines, zip_code, city and state instead
	BillingCurrency       BillingCurrencyType    `json:"billing_currency,omitempty"`        // Billing currency
	BillingEmails         []BillingEmailOut      `json:"billing_emails"`                    // List of project billing email addresses
	BillingExtraText      *string                `json:"billing_extra_text,omitempty"`      // Extra text to be included in all project invoices, e.g. purchase order or cost center number
	BillingGroupId        string                 `json:"billing_group_id"`                  // Billing group ID
	BillingGroupName      string                 `json:"billing_group_name"`                // Billing group name
	CardInfo              *CardInfoOut           `json:"card_info,omitempty"`               // Credit card assigned to the project
	City                  *string                `json:"city,omitempty"`                    // Address city
	Company               *string                `json:"company,omitempty"`                 // Name of a company
	Country               string                 `json:"country"`                           // Billing country
	CountryCode           string                 `json:"country_code"`                      // Two letter ISO country code
	DefaultCloud          string                 `json:"default_cloud"`                     // Default cloud to use when launching services
	EndOfLifeExtension    *EndOfLifeExtensionOut `json:"end_of_life_extension,omitempty"`   // End of life extension information
	EstimatedBalance      string                 `json:"estimated_balance"`                 // Estimated balance, in USD
	EstimatedBalanceLocal *string                `json:"estimated_balance_local,omitempty"` // Estimated balance, in billing currency
	Features              map[string]any         `json:"features,omitempty"`                // Feature flags
	OrganizationId        string                 `json:"organization_id"`                   // Organization ID
	PaymentMethod         string                 `json:"payment_method"`                    // Payment method
	ProjectName           string                 `json:"project_name"`                      // Project name
	State                 *string                `json:"state,omitempty"`                   // Address state
	Tags                  map[string]string      `json:"tags,omitempty"`                    // Set of resource tags
	TechEmails            []TechEmailOut         `json:"tech_emails,omitempty"`             // List of project tech email addresses
	TenantId              *string                `json:"tenant_id,omitempty"`               // Tenant ID
	TrialExpirationTime   *time.Time             `json:"trial_expiration_time,omitempty"`   // Trial expiration time (ISO 8601)
	VatId                 string                 `json:"vat_id"`                            // EU VAT Identification Number
	ZipCode               *string                `json:"zip_code,omitempty"`                // Address zip code
}

ProjectGetOut Project information

type ProjectHandler

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

func NewHandler

func NewHandler(doer doer) ProjectHandler

func (*ProjectHandler) ListProjectVpcPeeringConnectionTypes

func (h *ProjectHandler) ListProjectVpcPeeringConnectionTypes(ctx context.Context, project string) ([]VpcPeeringConnectionTypeOut, error)

func (*ProjectHandler) ProjectAlertsList

func (h *ProjectHandler) ProjectAlertsList(ctx context.Context, project string) ([]AlertOut, error)

func (*ProjectHandler) ProjectCreate

func (h *ProjectHandler) ProjectCreate(ctx context.Context, in *ProjectCreateIn) (*ProjectCreateOut, error)

func (*ProjectHandler) ProjectDelete

func (h *ProjectHandler) ProjectDelete(ctx context.Context, project string) error

func (*ProjectHandler) ProjectGenerateSbomDownloadUrl

func (h *ProjectHandler) ProjectGenerateSbomDownloadUrl(ctx context.Context, project string, fileFormat string) (string, error)

func (*ProjectHandler) ProjectGet

func (h *ProjectHandler) ProjectGet(ctx context.Context, project string) (*ProjectGetOut, error)

func (*ProjectHandler) ProjectGetEventLogs

func (h *ProjectHandler) ProjectGetEventLogs(ctx context.Context, project string) ([]EventOut, error)

func (*ProjectHandler) ProjectInvite

func (h *ProjectHandler) ProjectInvite(ctx context.Context, project string, in *ProjectInviteIn) error

func (*ProjectHandler) ProjectInviteAccept

func (h *ProjectHandler) ProjectInviteAccept(ctx context.Context, project string, inviteVerificationCode string) (*ProjectInviteAcceptOut, error)

func (*ProjectHandler) ProjectInviteDelete

func (h *ProjectHandler) ProjectInviteDelete(ctx context.Context, project string, invitedEmail string) error

func (*ProjectHandler) ProjectKmsGetCA

func (h *ProjectHandler) ProjectKmsGetCA(ctx context.Context, project string) (string, error)

func (*ProjectHandler) ProjectList

func (h *ProjectHandler) ProjectList(ctx context.Context) (*ProjectListOut, error)

func (*ProjectHandler) ProjectPrivatelinkAvailabilityList

func (h *ProjectHandler) ProjectPrivatelinkAvailabilityList(ctx context.Context, project string) ([]PrivatelinkAvailabilityOut, error)

func (*ProjectHandler) ProjectTagsList

func (h *ProjectHandler) ProjectTagsList(ctx context.Context, project string) (map[string]string, error)

func (*ProjectHandler) ProjectTagsReplace

func (h *ProjectHandler) ProjectTagsReplace(ctx context.Context, project string, in *ProjectTagsReplaceIn) error

func (*ProjectHandler) ProjectTagsUpdate

func (h *ProjectHandler) ProjectTagsUpdate(ctx context.Context, project string, in *ProjectTagsUpdateIn) error

func (*ProjectHandler) ProjectUpdate

func (h *ProjectHandler) ProjectUpdate(ctx context.Context, project string, in *ProjectUpdateIn) (*ProjectUpdateOut, error)

func (*ProjectHandler) ProjectUserList

func (h *ProjectHandler) ProjectUserList(ctx context.Context, project string) (*ProjectUserListOut, error)

func (*ProjectHandler) ProjectUserRemove

func (h *ProjectHandler) ProjectUserRemove(ctx context.Context, project string, userEmail string) error

func (*ProjectHandler) ProjectUserUpdate

func (h *ProjectHandler) ProjectUserUpdate(ctx context.Context, project string, userEmail string, in *ProjectUserUpdateIn) error

type ProjectInviteAcceptOut

type ProjectInviteAcceptOut struct {
	UserEmail string `json:"user_email"` // User email address
}

ProjectInviteAcceptOut Details of verified invite

type ProjectInviteIn

type ProjectInviteIn struct {
	MemberType MemberType `json:"member_type,omitempty"` // Project member type
	UserEmail  string     `json:"user_email"`            // User email address
}

ProjectInviteIn ProjectInviteRequestBody

type ProjectListOut

type ProjectListOut struct {
	ProjectMembership  ProjectMembershipOut   `json:"project_membership"`            // Project membership and type of membership
	ProjectMemberships *ProjectMembershipsOut `json:"project_memberships,omitempty"` // List of project membership and type of membership
	Projects           []ProjectOut           `json:"projects"`                      // List of projects
}

ProjectListOut ProjectListResponse

type ProjectMembershipOut

type ProjectMembershipOut struct {
	Any AnyType `json:"ANY,omitempty"` // Project member type
}

ProjectMembershipOut Project membership and type of membership

type ProjectMembershipsOut

type ProjectMembershipsOut struct {
	Any []string `json:"ANY,omitempty"` // List of project member type
}

ProjectMembershipsOut List of project membership and type of membership

type ProjectOut

type ProjectOut struct {
	AccountId             string                 `json:"account_id"`                        // Account ID
	AccountName           *string                `json:"account_name,omitempty"`            // Account name
	AddressLines          []string               `json:"address_lines,omitempty"`           // Address lines
	AvailableCredits      *string                `json:"available_credits,omitempty"`       // Available credits, in USD
	BillingAddress        string                 `json:"billing_address"`                   // DEPRECATED: use split address fields like company, address_lines, zip_code, city and state instead
	BillingCurrency       BillingCurrencyType    `json:"billing_currency,omitempty"`        // Billing currency
	BillingEmails         []BillingEmailOut      `json:"billing_emails"`                    // List of project billing email addresses
	BillingExtraText      *string                `json:"billing_extra_text,omitempty"`      // Extra text to be included in all project invoices, e.g. purchase order or cost center number
	BillingGroupId        string                 `json:"billing_group_id"`                  // Billing group ID
	BillingGroupName      string                 `json:"billing_group_name"`                // Billing group name
	CardInfo              *CardInfoOut           `json:"card_info,omitempty"`               // Credit card assigned to the project
	City                  *string                `json:"city,omitempty"`                    // Address city
	Company               *string                `json:"company,omitempty"`                 // Name of a company
	Country               string                 `json:"country"`                           // Billing country
	CountryCode           string                 `json:"country_code"`                      // Two letter ISO country code
	DefaultCloud          string                 `json:"default_cloud"`                     // Default cloud to use when launching services
	EndOfLifeExtension    *EndOfLifeExtensionOut `json:"end_of_life_extension,omitempty"`   // End of life extension information
	EstimatedBalance      string                 `json:"estimated_balance"`                 // Estimated balance, in USD
	EstimatedBalanceLocal *string                `json:"estimated_balance_local,omitempty"` // Estimated balance, in billing currency
	Features              map[string]any         `json:"features,omitempty"`                // Feature flags
	OrganizationId        string                 `json:"organization_id"`                   // Organization ID
	PaymentMethod         string                 `json:"payment_method"`                    // Payment method
	ProjectName           string                 `json:"project_name"`                      // Project name
	State                 *string                `json:"state,omitempty"`                   // Address state
	Tags                  map[string]string      `json:"tags,omitempty"`                    // Set of resource tags
	TechEmails            []TechEmailOut         `json:"tech_emails,omitempty"`             // List of project tech email addresses
	TenantId              *string                `json:"tenant_id,omitempty"`               // Tenant ID
	TrialExpirationTime   *time.Time             `json:"trial_expiration_time,omitempty"`   // Trial expiration time (ISO 8601)
	VatId                 string                 `json:"vat_id"`                            // EU VAT Identification Number
	ZipCode               *string                `json:"zip_code,omitempty"`                // Address zip code
}

type ProjectTagsReplaceIn

type ProjectTagsReplaceIn struct {
	Tags map[string]string `json:"tags"` // Set of resource tags
}

ProjectTagsReplaceIn ProjectTagsReplaceRequestBody

type ProjectTagsUpdateIn

type ProjectTagsUpdateIn struct {
	Tags map[string]string `json:"tags"` // Set of resource tags
}

ProjectTagsUpdateIn ProjectTagsUpdateRequestBody

type ProjectUpdateIn

type ProjectUpdateIn struct {
	AccountId                   *string             `json:"account_id,omitempty"`                      // Account ID
	AddAccountOwnersAdminAccess *bool               `json:"add_account_owners_admin_access,omitempty"` // [DEPRECATED] If account_id is set, grant account owner team admin access to this project. This flag is ignored and assumed true.
	AddressLines                *[]string           `json:"address_lines,omitempty"`                   // [DEPRECATED] Address lines
	BillingAddress              *string             `json:"billing_address,omitempty"`                 // DEPRECATED: use split address fields like company, address_lines, zip_code, city and state instead
	BillingCurrency             BillingCurrencyType `json:"billing_currency,omitempty"`                // [DEPRECATED] Billing currency
	BillingEmails               *[]BillingEmailIn   `json:"billing_emails,omitempty"`                  // [DEPRECATED] List of project billing email addresses
	BillingExtraText            *string             `json:"billing_extra_text,omitempty"`              // [DEPRECATED] Extra text to be included in all project invoices, e.g. purchase order or cost center number
	BillingGroupId              *string             `json:"billing_group_id,omitempty"`                // Billing group ID
	CardId                      *string             `json:"card_id,omitempty"`                         // [DEPRECATED] Credit card ID
	City                        *string             `json:"city,omitempty"`                            // [DEPRECATED] Address city
	Cloud                       *string             `json:"cloud,omitempty"`                           // Target cloud
	Company                     *string             `json:"company,omitempty"`                         // Name of a company
	CountryCode                 *string             `json:"country_code,omitempty"`                    // [DEPRECATED] Two letter country code for billing country
	ProjectName                 *string             `json:"project_name,omitempty"`                    // Project name
	State                       *string             `json:"state,omitempty"`                           // [DEPRECATED] Address state
	Tags                        *map[string]string  `json:"tags,omitempty"`                            // Set of resource tags
	TechEmails                  *[]TechEmailIn      `json:"tech_emails,omitempty"`                     // List of project tech email addresses
	VatId                       *string             `json:"vat_id,omitempty"`                          // [DEPRECATED] EU VAT Identification Number
	ZipCode                     *string             `json:"zip_code,omitempty"`                        // [DEPRECATED] Address zip code
}

ProjectUpdateIn ProjectUpdateRequestBody

type ProjectUpdateOut

type ProjectUpdateOut struct {
	AccountId             string                 `json:"account_id"`                        // Account ID
	AccountName           *string                `json:"account_name,omitempty"`            // Account name
	AddressLines          []string               `json:"address_lines,omitempty"`           // Address lines
	AvailableCredits      *string                `json:"available_credits,omitempty"`       // Available credits, in USD
	BillingAddress        string                 `json:"billing_address"`                   // DEPRECATED: use split address fields like company, address_lines, zip_code, city and state instead
	BillingCurrency       BillingCurrencyType    `json:"billing_currency,omitempty"`        // Billing currency
	BillingEmails         []BillingEmailOut      `json:"billing_emails"`                    // List of project billing email addresses
	BillingExtraText      *string                `json:"billing_extra_text,omitempty"`      // Extra text to be included in all project invoices, e.g. purchase order or cost center number
	BillingGroupId        string                 `json:"billing_group_id"`                  // Billing group ID
	BillingGroupName      string                 `json:"billing_group_name"`                // Billing group name
	CardInfo              *CardInfoOut           `json:"card_info,omitempty"`               // Credit card assigned to the project
	City                  *string                `json:"city,omitempty"`                    // Address city
	Company               *string                `json:"company,omitempty"`                 // Name of a company
	Country               string                 `json:"country"`                           // Billing country
	CountryCode           string                 `json:"country_code"`                      // Two letter ISO country code
	DefaultCloud          string                 `json:"default_cloud"`                     // Default cloud to use when launching services
	EndOfLifeExtension    *EndOfLifeExtensionOut `json:"end_of_life_extension,omitempty"`   // End of life extension information
	EstimatedBalance      string                 `json:"estimated_balance"`                 // Estimated balance, in USD
	EstimatedBalanceLocal *string                `json:"estimated_balance_local,omitempty"` // Estimated balance, in billing currency
	Features              map[string]any         `json:"features,omitempty"`                // Feature flags
	OrganizationId        string                 `json:"organization_id"`                   // Organization ID
	PaymentMethod         string                 `json:"payment_method"`                    // Payment method
	ProjectName           string                 `json:"project_name"`                      // Project name
	State                 *string                `json:"state,omitempty"`                   // Address state
	Tags                  map[string]string      `json:"tags,omitempty"`                    // Set of resource tags
	TechEmails            []TechEmailOut         `json:"tech_emails,omitempty"`             // List of project tech email addresses
	TenantId              *string                `json:"tenant_id,omitempty"`               // Tenant ID
	TrialExpirationTime   *time.Time             `json:"trial_expiration_time,omitempty"`   // Trial expiration time (ISO 8601)
	VatId                 string                 `json:"vat_id"`                            // EU VAT Identification Number
	ZipCode               *string                `json:"zip_code,omitempty"`                // Address zip code
}

ProjectUpdateOut Project information

type ProjectUserListOut

type ProjectUserListOut struct {
	GroupUsers  []GroupUserOut  `json:"group_users"` // List of users in groups that have access to the project
	Invitations []InvitationOut `json:"invitations"` // List of pending invitations
	Users       []UserOut       `json:"users"`       // List of project's users
}

ProjectUserListOut ProjectUserListResponse

type ProjectUserUpdateIn

type ProjectUserUpdateIn struct {
	MemberType MemberType `json:"member_type"` // Project member type
}

ProjectUserUpdateIn ProjectUserUpdateRequestBody

type TechEmailIn

type TechEmailIn struct {
	Email string `json:"email"` // User email address
}

type TechEmailOut

type TechEmailOut struct {
	Email string `json:"email"` // User email address
}

type UserOut

type UserOut struct {
	Auth           []string   `json:"auth"`                // List of user's required authentication methods
	BillingContact bool       `json:"billing_contact"`     // Set for project's billing contacts
	CreateTime     time.Time  `json:"create_time"`         // Timestamp in ISO 8601 format, always in UTC
	MemberType     MemberType `json:"member_type"`         // Project member type
	RealName       *string    `json:"real_name,omitempty"` // User real name
	TeamId         string     `json:"team_id"`             // Team ID
	TeamName       string     `json:"team_name"`           // Team name
	UserEmail      string     `json:"user_email"`          // User email address
}

type VpcPeeringConnectionType added in v0.3.0

type VpcPeeringConnectionType string
const (
	VpcPeeringConnectionTypeAwsTgwVpcAttachment     VpcPeeringConnectionType = "aws-tgw-vpc-attachment"
	VpcPeeringConnectionTypeAwsVpcPeeringConnection VpcPeeringConnectionType = "aws-vpc-peering-connection"
	VpcPeeringConnectionTypeAzureVnetPeering        VpcPeeringConnectionType = "azure-vnet-peering"
	VpcPeeringConnectionTypeGoogleVpcPeering        VpcPeeringConnectionType = "google-vpc-peering"
	VpcPeeringConnectionTypeUpcloudVpcPeering       VpcPeeringConnectionType = "upcloud-vpc-peering"
)

type VpcPeeringConnectionTypeOut

type VpcPeeringConnectionTypeOut struct {
	CloudName                string                   `json:"cloud_name"`                  // Target cloud
	PriceUsd                 string                   `json:"price_usd"`                   // Hourly peering connection price in this cloud region
	VpcPeeringConnectionType VpcPeeringConnectionType `json:"vpc_peering_connection_type"` // Type of network connection from the VPC
}

Jump to

Keyboard shortcuts

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