Documentation
¶
Index ¶
- type AccessRule
- type AccessRuleAccessLevel
- type AccessRuleList
- type AccessRuleState
- type AllowedAddressPairs
- type BaremetalFixedAddress
- type BaremetalFlavor
- type BaremetalFlavorList
- type BaremetalFlavorListParams
- type BaremetalFlavorPriceStatus
- type BaremetalFlavorService
- type BaremetalFloatingAddress
- type BaremetalImageListParams
- type BaremetalImageListParamsVisibility
- type BaremetalImageService
- type BaremetalServer
- type BaremetalServerAddressUnion
- type BaremetalServerFixedIPAssignment
- type BaremetalServerFlavor
- type BaremetalServerFlavorHardwareDescription
- type BaremetalServerListParams
- type BaremetalServerListParamsOrderBy
- type BaremetalServerListParamsProtectionStatus
- type BaremetalServerListParamsStatus
- type BaremetalServerListParamsTypeDDOSProfile
- type BaremetalServerNewParams
- type BaremetalServerNewParamsDDOSProfile
- type BaremetalServerNewParamsDDOSProfileField
- type BaremetalServerNewParamsDDOSProfileFieldFieldValueUnion
- type BaremetalServerNewParamsInterfaceAnySubnet
- type BaremetalServerNewParamsInterfaceAnySubnetFloatingIPExisting
- type BaremetalServerNewParamsInterfaceAnySubnetFloatingIPNew
- type BaremetalServerNewParamsInterfaceAnySubnetFloatingIPUnion
- func (u BaremetalServerNewParamsInterfaceAnySubnetFloatingIPUnion) GetExistingFloatingID() *string
- func (u BaremetalServerNewParamsInterfaceAnySubnetFloatingIPUnion) GetSource() *string
- func (u BaremetalServerNewParamsInterfaceAnySubnetFloatingIPUnion) MarshalJSON() ([]byte, error)
- func (u *BaremetalServerNewParamsInterfaceAnySubnetFloatingIPUnion) UnmarshalJSON(data []byte) error
- type BaremetalServerNewParamsInterfaceExternal
- type BaremetalServerNewParamsInterfaceReservedFixedIP
- type BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPExisting
- type BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPNew
- type BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPUnion
- func (u BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPUnion) GetExistingFloatingID() *string
- func (u BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPUnion) GetSource() *string
- func (u BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPUnion) MarshalJSON() ([]byte, error)
- func (u *BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPUnion) UnmarshalJSON(data []byte) error
- type BaremetalServerNewParamsInterfaceSubnet
- type BaremetalServerNewParamsInterfaceSubnetFloatingIPExisting
- type BaremetalServerNewParamsInterfaceSubnetFloatingIPNew
- type BaremetalServerNewParamsInterfaceSubnetFloatingIPUnion
- func (u BaremetalServerNewParamsInterfaceSubnetFloatingIPUnion) GetExistingFloatingID() *string
- func (u BaremetalServerNewParamsInterfaceSubnetFloatingIPUnion) GetSource() *string
- func (u BaremetalServerNewParamsInterfaceSubnetFloatingIPUnion) MarshalJSON() ([]byte, error)
- func (u *BaremetalServerNewParamsInterfaceSubnetFloatingIPUnion) UnmarshalJSON(data []byte) error
- type BaremetalServerNewParamsInterfaceUnion
- func (u BaremetalServerNewParamsInterfaceUnion) GetFloatingIP() (res baremetalServerNewParamsInterfaceUnionFloatingIP)
- func (u BaremetalServerNewParamsInterfaceUnion) GetIPAddress() *string
- func (u BaremetalServerNewParamsInterfaceUnion) GetIPFamily() *string
- func (u BaremetalServerNewParamsInterfaceUnion) GetInterfaceName() *string
- func (u BaremetalServerNewParamsInterfaceUnion) GetNetworkID() *string
- func (u BaremetalServerNewParamsInterfaceUnion) GetPortGroup() *int64
- func (u BaremetalServerNewParamsInterfaceUnion) GetPortID() *string
- func (u BaremetalServerNewParamsInterfaceUnion) GetSubnetID() *string
- func (u BaremetalServerNewParamsInterfaceUnion) GetType() *string
- func (u BaremetalServerNewParamsInterfaceUnion) MarshalJSON() ([]byte, error)
- func (u *BaremetalServerNewParamsInterfaceUnion) UnmarshalJSON(data []byte) error
- type BaremetalServerRebuildParams
- type BaremetalServerService
- func (r *BaremetalServerService) List(ctx context.Context, params BaremetalServerListParams, ...) (res *pagination.OffsetPage[BaremetalServer], err error)
- func (r *BaremetalServerService) ListAutoPaging(ctx context.Context, params BaremetalServerListParams, ...) *pagination.OffsetPageAutoPager[BaremetalServer]
- func (r *BaremetalServerService) New(ctx context.Context, params BaremetalServerNewParams, ...) (res *TaskIDList, err error)
- func (r *BaremetalServerService) NewAndPoll(ctx context.Context, params BaremetalServerNewParams, ...) (v *BaremetalServer, err error)
- func (r *BaremetalServerService) Rebuild(ctx context.Context, serverID string, params BaremetalServerRebuildParams, ...) (res *TaskIDList, err error)
- func (r *BaremetalServerService) RebuildAndPoll(ctx context.Context, serverID string, params BaremetalServerRebuildParams, ...) (v *BaremetalServer, err error)
- type BaremetalServerStatus
- type BaremetalServerVmState
- type BaremetalService
- type BillingReservation
- type BillingReservationAmountPrices
- type BillingReservationListParams
- type BillingReservationListParamsOrderBy
- type BillingReservationResource
- type BillingReservationService
- func (r *BillingReservationService) Get(ctx context.Context, reservationID int64, opts ...option.RequestOption) (res *BillingReservation, err error)
- func (r *BillingReservationService) List(ctx context.Context, query BillingReservationListParams, ...) (res *pagination.OffsetPage[BillingReservation], err error)
- func (r *BillingReservationService) ListAutoPaging(ctx context.Context, query BillingReservationListParams, ...) *pagination.OffsetPageAutoPager[BillingReservation]
- type BlackholePort
- type BlackholePortAlarmState
- type CandidatePort
- type CandidatePortList
- type CloudService
- type ConnectedPort
- type ConnectedPortList
- type Console
- type ConsoleRemoteConsole
- type DDOSProfile
- type DDOSProfileField
- type DDOSProfileOptionList
- type DDOSProfileProtocol
- type DDOSProfileStatus
- type DDOSProfileTemplate
- type DDOSProfileTemplateField
- type Error
- type FileShare
- type FileShareAccessRuleDeleteParams
- type FileShareAccessRuleListParams
- type FileShareAccessRuleNewParams
- type FileShareAccessRuleNewParamsAccessMode
- type FileShareAccessRuleService
- func (r *FileShareAccessRuleService) Delete(ctx context.Context, accessRuleID string, body FileShareAccessRuleDeleteParams, ...) (err error)
- func (r *FileShareAccessRuleService) List(ctx context.Context, fileShareID string, query FileShareAccessRuleListParams, ...) (res *AccessRuleList, err error)
- func (r *FileShareAccessRuleService) New(ctx context.Context, fileShareID string, params FileShareAccessRuleNewParams, ...) (res *AccessRule, err error)
- type FileShareDeleteParams
- type FileShareGetParams
- type FileShareListParams
- type FileShareListParamsTypeName
- type FileShareNewParams
- type FileShareNewParamsBodyCreateStandardFileShareSerializer
- type FileShareNewParamsBodyCreateStandardFileShareSerializerAccess
- type FileShareNewParamsBodyCreateStandardFileShareSerializerNetwork
- type FileShareNewParamsBodyCreateVastFileShareSerializer
- type FileShareResizeParams
- type FileShareService
- func (r *FileShareService) Delete(ctx context.Context, fileShareID string, body FileShareDeleteParams, ...) (res *TaskIDList, err error)
- func (r *FileShareService) Get(ctx context.Context, fileShareID string, query FileShareGetParams, ...) (res *FileShare, err error)
- func (r *FileShareService) List(ctx context.Context, params FileShareListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[FileShare], err error)
- func (r *FileShareService) ListAutoPaging(ctx context.Context, params FileShareListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[FileShare]
- func (r *FileShareService) New(ctx context.Context, params FileShareNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)
- func (r *FileShareService) Resize(ctx context.Context, fileShareID string, params FileShareResizeParams, ...) (res *TaskIDList, err error)
- func (r *FileShareService) Update(ctx context.Context, fileShareID string, params FileShareUpdateParams, ...) (res *FileShare, err error)
- type FileShareStatus
- type FileShareTypeName
- type FileShareUpdateParams
- type FileShareVolumeType
- type FixedAddress
- type FixedAddressShort
- type FlavorHardwareDescription
- type FloatingAddress
- type FloatingIP
- type FloatingIPAssignParams
- type FloatingIPDeleteParams
- type FloatingIPDetailed
- type FloatingIPDetailedInstance
- type FloatingIPDetailedInstanceAddressUnion
- func (u FloatingIPDetailedInstanceAddressUnion) AsFixedIPAddress() (v FixedAddress)
- func (u FloatingIPDetailedInstanceAddressUnion) AsFixedIPAddressShort() (v FixedAddressShort)
- func (u FloatingIPDetailedInstanceAddressUnion) AsFloatingIPAddress() (v FloatingAddress)
- func (u FloatingIPDetailedInstanceAddressUnion) RawJSON() string
- func (r *FloatingIPDetailedInstanceAddressUnion) UnmarshalJSON(data []byte) error
- type FloatingIPDetailedInstanceFlavor
- type FloatingIPDetailedInstanceSecurityGroup
- type FloatingIPDetailedInstanceVolume
- type FloatingIPGetParams
- type FloatingIPListParams
- type FloatingIPNewParams
- type FloatingIPService
- func (r *FloatingIPService) Assign(ctx context.Context, floatingIPID string, params FloatingIPAssignParams, ...) (res *FloatingIP, err error)
- func (r *FloatingIPService) Delete(ctx context.Context, floatingIPID string, body FloatingIPDeleteParams, ...) (res *TaskIDList, err error)
- func (r *FloatingIPService) Get(ctx context.Context, floatingIPID string, query FloatingIPGetParams, ...) (res *FloatingIP, err error)
- func (r *FloatingIPService) List(ctx context.Context, params FloatingIPListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[FloatingIPDetailed], err error)
- func (r *FloatingIPService) ListAutoPaging(ctx context.Context, params FloatingIPListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[FloatingIPDetailed]
- func (r *FloatingIPService) New(ctx context.Context, params FloatingIPNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)
- func (r *FloatingIPService) Unassign(ctx context.Context, floatingIPID string, body FloatingIPUnassignParams, ...) (res *FloatingIP, err error)
- type FloatingIPStatus
- type FloatingIPUnassignParams
- type GPUBaremetalCluster
- type GPUBaremetalClusterClusterStatus
- type GPUBaremetalClusterDeleteParams
- type GPUBaremetalClusterFlavorListParams
- type GPUBaremetalClusterFlavorService
- type GPUBaremetalClusterGetParams
- type GPUBaremetalClusterImageDeleteParams
- type GPUBaremetalClusterImageGetParams
- type GPUBaremetalClusterImageListParams
- type GPUBaremetalClusterImageService
- func (r *GPUBaremetalClusterImageService) Delete(ctx context.Context, imageID string, body GPUBaremetalClusterImageDeleteParams, ...) (res *TaskIDList, err error)
- func (r *GPUBaremetalClusterImageService) DeleteAndPoll(ctx context.Context, imageID string, ...) error
- func (r *GPUBaremetalClusterImageService) Get(ctx context.Context, imageID string, query GPUBaremetalClusterImageGetParams, ...) (res *GPUImage, err error)
- func (r *GPUBaremetalClusterImageService) List(ctx context.Context, query GPUBaremetalClusterImageListParams, ...) (res *GPUImageList, err error)
- func (r *GPUBaremetalClusterImageService) Upload(ctx context.Context, params GPUBaremetalClusterImageUploadParams, ...) (res *TaskIDList, err error)
- func (r *GPUBaremetalClusterImageService) UploadAndPoll(ctx context.Context, params GPUBaremetalClusterImageUploadParams, ...) (v *GPUImage, err error)
- type GPUBaremetalClusterImageUploadParams
- type GPUBaremetalClusterImageUploadParamsArchitecture
- type GPUBaremetalClusterImageUploadParamsHwFirmwareType
- type GPUBaremetalClusterImageUploadParamsOsType
- type GPUBaremetalClusterImageUploadParamsSSHKey
- type GPUBaremetalClusterInterface
- type GPUBaremetalClusterInterfaceListParams
- type GPUBaremetalClusterInterfaceService
- type GPUBaremetalClusterListParams
- type GPUBaremetalClusterNewParams
- type GPUBaremetalClusterNewParamsInterfaceAnySubnet
- type GPUBaremetalClusterNewParamsInterfaceAnySubnetFloatingIP
- type GPUBaremetalClusterNewParamsInterfaceExternal
- type GPUBaremetalClusterNewParamsInterfaceSubnet
- type GPUBaremetalClusterNewParamsInterfaceSubnetFloatingIP
- type GPUBaremetalClusterNewParamsInterfaceUnion
- func (u GPUBaremetalClusterNewParamsInterfaceUnion) GetFloatingIP() (res gpuBaremetalClusterNewParamsInterfaceUnionFloatingIP)
- func (u GPUBaremetalClusterNewParamsInterfaceUnion) GetIPAddress() *string
- func (u GPUBaremetalClusterNewParamsInterfaceUnion) GetIPFamily() *string
- func (u GPUBaremetalClusterNewParamsInterfaceUnion) GetInterfaceName() *string
- func (u GPUBaremetalClusterNewParamsInterfaceUnion) GetNetworkID() *string
- func (u GPUBaremetalClusterNewParamsInterfaceUnion) GetSubnetID() *string
- func (u GPUBaremetalClusterNewParamsInterfaceUnion) GetType() *string
- func (u GPUBaremetalClusterNewParamsInterfaceUnion) MarshalJSON() ([]byte, error)
- func (u *GPUBaremetalClusterNewParamsInterfaceUnion) UnmarshalJSON(data []byte) error
- type GPUBaremetalClusterPowercycleAllServersParams
- type GPUBaremetalClusterRebootAllServersParams
- type GPUBaremetalClusterRebuildParams
- type GPUBaremetalClusterResizeParams
- type GPUBaremetalClusterServer
- type GPUBaremetalClusterServerAddressUnion
- func (u GPUBaremetalClusterServerAddressUnion) AsFixedIPAddress() (v FixedAddress)
- func (u GPUBaremetalClusterServerAddressUnion) AsFixedIPAddressShort() (v FixedAddressShort)
- func (u GPUBaremetalClusterServerAddressUnion) AsFloatingIPAddress() (v FloatingAddress)
- func (u GPUBaremetalClusterServerAddressUnion) RawJSON() string
- func (r *GPUBaremetalClusterServerAddressUnion) UnmarshalJSON(data []byte) error
- type GPUBaremetalClusterServerAttachInterfaceParams
- type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchema
- type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaDDOSProfile
- type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaDDOSProfileField
- type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaSecurityGroup
- type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOS
- type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfile
- type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField
- func (r GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField) MarshalJSON() (data []byte, err error)
- func (r *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField) UnmarshalJSON(data []byte) error
- type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSSecurityGroup
- type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchema
- type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfile
- type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfileField
- type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaSecurityGroup
- type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchema
- type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfile
- type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfileField
- type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaSecurityGroup
- type GPUBaremetalClusterServerDeleteParams
- type GPUBaremetalClusterServerDetachInterfaceParams
- type GPUBaremetalClusterServerFixedIPAssignment
- type GPUBaremetalClusterServerFlavor
- type GPUBaremetalClusterServerFlavorHardwareDescription
- type GPUBaremetalClusterServerGetConsoleParams
- type GPUBaremetalClusterServerList
- type GPUBaremetalClusterServerPowercycleParams
- type GPUBaremetalClusterServerRebootParams
- type GPUBaremetalClusterServerSecurityGroup
- type GPUBaremetalClusterServerService
- func (r *GPUBaremetalClusterServerService) AttachInterface(ctx context.Context, instanceID string, ...) (res *TaskIDList, err error)
- func (r *GPUBaremetalClusterServerService) Delete(ctx context.Context, instanceID string, ...) (res *TaskIDList, err error)
- func (r *GPUBaremetalClusterServerService) DeleteAndPoll(ctx context.Context, instanceID string, ...) error
- func (r *GPUBaremetalClusterServerService) DetachInterface(ctx context.Context, instanceID string, ...) (res *TaskIDList, err error)
- func (r *GPUBaremetalClusterServerService) GetConsole(ctx context.Context, instanceID string, ...) (res *Console, err error)
- func (r *GPUBaremetalClusterServerService) Powercycle(ctx context.Context, instanceID string, ...) (res *GPUBaremetalClusterServer, err error)
- func (r *GPUBaremetalClusterServerService) Reboot(ctx context.Context, instanceID string, ...) (res *GPUBaremetalClusterServer, err error)
- type GPUBaremetalClusterServerStatus
- type GPUBaremetalClusterServerVmState
- type GPUBaremetalClusterService
- func (r *GPUBaremetalClusterService) Delete(ctx context.Context, clusterID string, params GPUBaremetalClusterDeleteParams, ...) (res *TaskIDList, err error)
- func (r *GPUBaremetalClusterService) Get(ctx context.Context, clusterID string, query GPUBaremetalClusterGetParams, ...) (res *GPUBaremetalCluster, err error)
- func (r *GPUBaremetalClusterService) List(ctx context.Context, params GPUBaremetalClusterListParams, ...) (res *pagination.OffsetPage[GPUBaremetalCluster], err error)
- func (r *GPUBaremetalClusterService) ListAutoPaging(ctx context.Context, params GPUBaremetalClusterListParams, ...) *pagination.OffsetPageAutoPager[GPUBaremetalCluster]
- func (r *GPUBaremetalClusterService) New(ctx context.Context, params GPUBaremetalClusterNewParams, ...) (res *TaskIDList, err error)
- func (r *GPUBaremetalClusterService) NewAndPoll(ctx context.Context, params GPUBaremetalClusterNewParams, ...) (v *GPUBaremetalCluster, err error)
- func (r *GPUBaremetalClusterService) PowercycleAllServers(ctx context.Context, clusterID string, ...) (res *GPUBaremetalClusterServerList, err error)
- func (r *GPUBaremetalClusterService) RebootAllServers(ctx context.Context, clusterID string, ...) (res *GPUBaremetalClusterServerList, err error)
- func (r *GPUBaremetalClusterService) Rebuild(ctx context.Context, clusterID string, params GPUBaremetalClusterRebuildParams, ...) (res *TaskIDList, err error)
- func (r *GPUBaremetalClusterService) RebuildAndPoll(ctx context.Context, clusterID string, params GPUBaremetalClusterRebuildParams, ...) (v *GPUBaremetalCluster, err error)
- func (r *GPUBaremetalClusterService) Resize(ctx context.Context, clusterID string, params GPUBaremetalClusterResizeParams, ...) (res *TaskIDList, err error)
- func (r *GPUBaremetalClusterService) ResizeAndPoll(ctx context.Context, clusterID string, params GPUBaremetalClusterResizeParams, ...) (v *GPUBaremetalCluster, err error)
- type GPUBaremetalClusterTaskStatus
- type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPrice
- type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareDescription
- type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareProperties
- type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPricePrice
- type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPrice
- type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareDescription
- type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareProperties
- type GPUBaremetalFlavorList
- type GPUBaremetalFlavorUnion
- func (u GPUBaremetalFlavorUnion) AsBareMetalGPUFlavorsChemaWithPrice() (v GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPrice)
- func (u GPUBaremetalFlavorUnion) AsBareMetalGPUFlavorsChemaWithoutPrice() (v GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPrice)
- func (u GPUBaremetalFlavorUnion) RawJSON() string
- func (r *GPUBaremetalFlavorUnion) UnmarshalJSON(data []byte) error
- type GPUBaremetalFlavorUnionHardwareDescription
- type GPUBaremetalFlavorUnionHardwareProperties
- type GPUImage
- type GPUImageList
- type HTTPMethod
- type HealthMonitor
- type HealthMonitorStatus
- type IPAssignment
- type IPRangeService
- type IPRanges
- type IPVersion
- type IPWithSubnet
- type Image
- type ImageArchitecture
- type ImageHwFirmwareType
- type ImageHwMachineType
- type ImageList
- type ImageOsType
- type ImageSSHKey
- type InferenceDeployment
- type InferenceDeploymentAPIKey
- type InferenceDeploymentAPIKeyStatus
- type InferenceDeploymentContainer
- type InferenceDeploymentContainerDeployStatus
- type InferenceDeploymentContainerScale
- type InferenceDeploymentContainerScaleTriggers
- type InferenceDeploymentContainerScaleTriggersCPU
- type InferenceDeploymentContainerScaleTriggersGPUMemory
- type InferenceDeploymentContainerScaleTriggersGPUUtilization
- type InferenceDeploymentContainerScaleTriggersHTTP
- type InferenceDeploymentContainerScaleTriggersMemory
- type InferenceDeploymentContainerScaleTriggersSqs
- type InferenceDeploymentDeleteParams
- type InferenceDeploymentGetAPIKeyParams
- type InferenceDeploymentGetParams
- type InferenceDeploymentIngressOpts
- type InferenceDeploymentListParams
- type InferenceDeploymentLog
- type InferenceDeploymentLogListParams
- type InferenceDeploymentLogListParamsOrderBy
- type InferenceDeploymentLogService
- func (r *InferenceDeploymentLogService) List(ctx context.Context, deploymentName string, ...) (res *pagination.OffsetPage[InferenceDeploymentLog], err error)
- func (r *InferenceDeploymentLogService) ListAutoPaging(ctx context.Context, deploymentName string, ...) *pagination.OffsetPageAutoPager[InferenceDeploymentLog]
- type InferenceDeploymentNewParams
- type InferenceDeploymentNewParamsContainer
- type InferenceDeploymentNewParamsContainerScale
- type InferenceDeploymentNewParamsContainerScaleTriggers
- type InferenceDeploymentNewParamsContainerScaleTriggersCPU
- type InferenceDeploymentNewParamsContainerScaleTriggersGPUMemory
- type InferenceDeploymentNewParamsContainerScaleTriggersGPUUtilization
- type InferenceDeploymentNewParamsContainerScaleTriggersHTTP
- type InferenceDeploymentNewParamsContainerScaleTriggersMemory
- type InferenceDeploymentNewParamsContainerScaleTriggersSqs
- type InferenceDeploymentNewParamsIngressOpts
- type InferenceDeploymentNewParamsLogging
- type InferenceDeploymentNewParamsProbes
- type InferenceDeploymentNewParamsProbesLivenessProbe
- type InferenceDeploymentNewParamsProbesLivenessProbeProbe
- type InferenceDeploymentNewParamsProbesLivenessProbeProbeExec
- type InferenceDeploymentNewParamsProbesLivenessProbeProbeHTTPGet
- type InferenceDeploymentNewParamsProbesLivenessProbeProbeTcpSocket
- type InferenceDeploymentNewParamsProbesReadinessProbe
- type InferenceDeploymentNewParamsProbesReadinessProbeProbe
- type InferenceDeploymentNewParamsProbesReadinessProbeProbeExec
- type InferenceDeploymentNewParamsProbesReadinessProbeProbeHTTPGet
- type InferenceDeploymentNewParamsProbesReadinessProbeProbeTcpSocket
- type InferenceDeploymentNewParamsProbesStartupProbe
- type InferenceDeploymentNewParamsProbesStartupProbeProbe
- type InferenceDeploymentNewParamsProbesStartupProbeProbeExec
- type InferenceDeploymentNewParamsProbesStartupProbeProbeHTTPGet
- type InferenceDeploymentNewParamsProbesStartupProbeProbeTcpSocket
- type InferenceDeploymentObjectReference
- type InferenceDeploymentProbes
- type InferenceDeploymentService
- func (r *InferenceDeploymentService) Delete(ctx context.Context, deploymentName string, ...) (res *TaskIDList, err error)
- func (r *InferenceDeploymentService) DeleteAndPoll(ctx context.Context, deploymentName string, ...) error
- func (r *InferenceDeploymentService) Get(ctx context.Context, deploymentName string, query InferenceDeploymentGetParams, ...) (res *InferenceDeployment, err error)
- func (r *InferenceDeploymentService) GetAPIKey(ctx context.Context, deploymentName string, ...) (res *InferenceDeploymentAPIKey, err error)
- func (r *InferenceDeploymentService) List(ctx context.Context, params InferenceDeploymentListParams, ...) (res *pagination.OffsetPage[InferenceDeployment], err error)
- func (r *InferenceDeploymentService) ListAutoPaging(ctx context.Context, params InferenceDeploymentListParams, ...) *pagination.OffsetPageAutoPager[InferenceDeployment]
- func (r *InferenceDeploymentService) New(ctx context.Context, params InferenceDeploymentNewParams, ...) (res *TaskIDList, err error)
- func (r *InferenceDeploymentService) NewAndPoll(ctx context.Context, params InferenceDeploymentNewParams, ...) (v *InferenceDeployment, err error)
- func (r *InferenceDeploymentService) Start(ctx context.Context, deploymentName string, ...) (err error)
- func (r *InferenceDeploymentService) Stop(ctx context.Context, deploymentName string, body InferenceDeploymentStopParams, ...) (err error)
- func (r *InferenceDeploymentService) Update(ctx context.Context, deploymentName string, ...) (res *TaskIDList, err error)
- func (r *InferenceDeploymentService) UpdateAndPoll(ctx context.Context, deploymentName string, ...) (v *InferenceDeployment, err error)
- type InferenceDeploymentStartParams
- type InferenceDeploymentStatus
- type InferenceDeploymentStopParams
- type InferenceDeploymentUpdateParams
- type InferenceDeploymentUpdateParamsContainer
- type InferenceDeploymentUpdateParamsContainerScale
- type InferenceDeploymentUpdateParamsContainerScaleTriggers
- type InferenceDeploymentUpdateParamsContainerScaleTriggersCPU
- type InferenceDeploymentUpdateParamsContainerScaleTriggersGPUMemory
- type InferenceDeploymentUpdateParamsContainerScaleTriggersGPUUtilization
- type InferenceDeploymentUpdateParamsContainerScaleTriggersHTTP
- type InferenceDeploymentUpdateParamsContainerScaleTriggersMemory
- type InferenceDeploymentUpdateParamsContainerScaleTriggersSqs
- type InferenceDeploymentUpdateParamsIngressOpts
- type InferenceDeploymentUpdateParamsLogging
- type InferenceDeploymentUpdateParamsProbes
- type InferenceDeploymentUpdateParamsProbesLivenessProbe
- type InferenceDeploymentUpdateParamsProbesLivenessProbeProbe
- type InferenceDeploymentUpdateParamsProbesLivenessProbeProbeExec
- type InferenceDeploymentUpdateParamsProbesLivenessProbeProbeHTTPGet
- type InferenceDeploymentUpdateParamsProbesLivenessProbeProbeTcpSocket
- type InferenceDeploymentUpdateParamsProbesReadinessProbe
- type InferenceDeploymentUpdateParamsProbesReadinessProbeProbe
- type InferenceDeploymentUpdateParamsProbesReadinessProbeProbeExec
- type InferenceDeploymentUpdateParamsProbesReadinessProbeProbeHTTPGet
- type InferenceDeploymentUpdateParamsProbesReadinessProbeProbeTcpSocket
- type InferenceDeploymentUpdateParamsProbesStartupProbe
- type InferenceDeploymentUpdateParamsProbesStartupProbeProbe
- type InferenceDeploymentUpdateParamsProbesStartupProbeProbeExec
- type InferenceDeploymentUpdateParamsProbesStartupProbeProbeHTTPGet
- type InferenceDeploymentUpdateParamsProbesStartupProbeProbeTcpSocket
- type InferenceFlavor
- type InferenceFlavorListParams
- type InferenceFlavorService
- func (r *InferenceFlavorService) Get(ctx context.Context, flavorName string, opts ...option.RequestOption) (res *InferenceFlavor, err error)
- func (r *InferenceFlavorService) List(ctx context.Context, query InferenceFlavorListParams, ...) (res *pagination.OffsetPage[InferenceFlavor], err error)
- func (r *InferenceFlavorService) ListAutoPaging(ctx context.Context, query InferenceFlavorListParams, ...) *pagination.OffsetPageAutoPager[InferenceFlavor]
- type InferenceModel
- type InferenceModelListParams
- type InferenceModelListParamsOrderBy
- type InferenceModelService
- func (r *InferenceModelService) Get(ctx context.Context, modelID string, opts ...option.RequestOption) (res *InferenceModel, err error)
- func (r *InferenceModelService) List(ctx context.Context, query InferenceModelListParams, ...) (res *pagination.OffsetPage[InferenceModel], err error)
- func (r *InferenceModelService) ListAutoPaging(ctx context.Context, query InferenceModelListParams, ...) *pagination.OffsetPageAutoPager[InferenceModel]
- type InferenceRegionCapacity
- type InferenceRegionCapacityCapacity
- type InferenceRegionCapacityList
- type InferenceRegistryCredentialDeleteParams
- type InferenceRegistryCredentialGetParams
- type InferenceRegistryCredentialListParams
- type InferenceRegistryCredentialNewParams
- type InferenceRegistryCredentialReplaceParams
- type InferenceRegistryCredentialService
- func (r *InferenceRegistryCredentialService) Delete(ctx context.Context, credentialName string, ...) (err error)
- func (r *InferenceRegistryCredentialService) Get(ctx context.Context, credentialName string, ...) (res *InferenceRegistryCredentials, err error)
- func (r *InferenceRegistryCredentialService) List(ctx context.Context, params InferenceRegistryCredentialListParams, ...) (res *pagination.OffsetPage[InferenceRegistryCredentials], err error)
- func (r *InferenceRegistryCredentialService) ListAutoPaging(ctx context.Context, params InferenceRegistryCredentialListParams, ...) *pagination.OffsetPageAutoPager[InferenceRegistryCredentials]
- func (r *InferenceRegistryCredentialService) New(ctx context.Context, params InferenceRegistryCredentialNewParams, ...) (res *InferenceRegistryCredentialsCreate, err error)
- func (r *InferenceRegistryCredentialService) Replace(ctx context.Context, credentialName string, ...) (err error)
- type InferenceRegistryCredentials
- type InferenceRegistryCredentialsCreate
- type InferenceSecret
- type InferenceSecretData
- type InferenceSecretDeleteParams
- type InferenceSecretGetParams
- type InferenceSecretListParams
- type InferenceSecretNewParams
- type InferenceSecretNewParamsData
- type InferenceSecretReplaceParams
- type InferenceSecretReplaceParamsData
- type InferenceSecretService
- func (r *InferenceSecretService) Delete(ctx context.Context, secretName string, body InferenceSecretDeleteParams, ...) (err error)
- func (r *InferenceSecretService) Get(ctx context.Context, secretName string, query InferenceSecretGetParams, ...) (res *InferenceSecret, err error)
- func (r *InferenceSecretService) List(ctx context.Context, params InferenceSecretListParams, ...) (res *pagination.OffsetPage[InferenceSecret], err error)
- func (r *InferenceSecretService) ListAutoPaging(ctx context.Context, params InferenceSecretListParams, ...) *pagination.OffsetPageAutoPager[InferenceSecret]
- func (r *InferenceSecretService) New(ctx context.Context, params InferenceSecretNewParams, ...) (res *InferenceSecret, err error)
- func (r *InferenceSecretService) Replace(ctx context.Context, secretName string, params InferenceSecretReplaceParams, ...) (res *InferenceSecret, err error)
- type InferenceService
- type Instance
- type InstanceActionParams
- type InstanceActionParamsBodyBasicActionInstanceSerializer
- type InstanceActionParamsBodyStartActionInstanceSerializer
- type InstanceAddToPlacementGroupParams
- type InstanceAddressUnion
- func (u InstanceAddressUnion) AsFixedIPAddress() (v FixedAddress)
- func (u InstanceAddressUnion) AsFixedIPAddressShort() (v FixedAddressShort)
- func (u InstanceAddressUnion) AsFloatingIPAddress() (v FloatingAddress)
- func (u InstanceAddressUnion) RawJSON() string
- func (r *InstanceAddressUnion) UnmarshalJSON(data []byte) error
- type InstanceAssignSecurityGroupParams
- type InstanceAssignSecurityGroupParamsPortsSecurityGroupName
- type InstanceDeleteParams
- type InstanceDisablePortSecurityParams
- type InstanceEnablePortSecurityParams
- type InstanceFixedIPAssignment
- type InstanceFlavor
- type InstanceFlavorBareMetalFlavor
- type InstanceFlavorBareMetalFlavorHardwareDescription
- type InstanceFlavorGPUClusterFlavor
- type InstanceFlavorGPUClusterFlavorHardwareDescription
- type InstanceFlavorInstanceFlavor
- type InstanceFlavorInstanceFlavorHardwareDescription
- type InstanceFlavorList
- type InstanceFlavorListParams
- type InstanceFlavorPriceStatus
- type InstanceFlavorService
- type InstanceFlavorUnion
- func (u InstanceFlavorUnion) AsBareMetalFlavor() (v InstanceFlavorBareMetalFlavor)
- func (u InstanceFlavorUnion) AsGPUClusterFlavor() (v InstanceFlavorGPUClusterFlavor)
- func (u InstanceFlavorUnion) AsInstanceFlavor() (v InstanceFlavorInstanceFlavor)
- func (u InstanceFlavorUnion) RawJSON() string
- func (r *InstanceFlavorUnion) UnmarshalJSON(data []byte) error
- type InstanceFlavorUnionHardwareDescription
- type InstanceGetConsoleParams
- type InstanceGetParams
- type InstanceImageDeleteParams
- type InstanceImageGetParams
- type InstanceImageListParams
- type InstanceImageListParamsVisibility
- type InstanceImageNewFromVolumeParams
- type InstanceImageNewFromVolumeParamsArchitecture
- type InstanceImageNewFromVolumeParamsHwFirmwareType
- type InstanceImageNewFromVolumeParamsHwMachineType
- type InstanceImageNewFromVolumeParamsOsType
- type InstanceImageNewFromVolumeParamsSSHKey
- type InstanceImageNewFromVolumeParamsSource
- type InstanceImageService
- func (r *InstanceImageService) Delete(ctx context.Context, imageID string, body InstanceImageDeleteParams, ...) (res *TaskIDList, err error)
- func (r *InstanceImageService) DeleteAndPoll(ctx context.Context, imageID string, body InstanceImageDeleteParams, ...) error
- func (r *InstanceImageService) Get(ctx context.Context, imageID string, params InstanceImageGetParams, ...) (res *Image, err error)
- func (r *InstanceImageService) List(ctx context.Context, params InstanceImageListParams, ...) (res *ImageList, err error)
- func (r *InstanceImageService) NewFromVolume(ctx context.Context, params InstanceImageNewFromVolumeParams, ...) (res *TaskIDList, err error)
- func (r *InstanceImageService) NewFromVolumeAndPoll(ctx context.Context, params InstanceImageNewFromVolumeParams, ...) (v *Image, err error)
- func (r *InstanceImageService) Update(ctx context.Context, imageID string, params InstanceImageUpdateParams, ...) (res *Image, err error)
- func (r *InstanceImageService) Upload(ctx context.Context, params InstanceImageUploadParams, ...) (res *TaskIDList, err error)
- func (r *InstanceImageService) UploadAndPoll(ctx context.Context, params InstanceImageUploadParams, ...) (v *Image, err error)
- type InstanceImageUpdateParams
- type InstanceImageUpdateParamsHwFirmwareType
- type InstanceImageUpdateParamsHwMachineType
- type InstanceImageUpdateParamsOsType
- type InstanceImageUpdateParamsSSHKey
- type InstanceImageUploadParams
- type InstanceImageUploadParamsArchitecture
- type InstanceImageUploadParamsHwFirmwareType
- type InstanceImageUploadParamsHwMachineType
- type InstanceImageUploadParamsOsType
- type InstanceImageUploadParamsSSHKey
- type InstanceInterface
- type InstanceInterfaceAttachParams
- type InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchema
- type InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaDDOSProfile
- type InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaDDOSProfileField
- type InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaSecurityGroup
- type InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOS
- type InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfile
- type InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField
- type InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSSecurityGroup
- type InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchema
- type InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfile
- type InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfileField
- type InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaSecurityGroup
- type InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchema
- type InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfile
- type InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfileField
- type InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaSecurityGroup
- type InstanceInterfaceDetachParams
- type InstanceInterfaceListParams
- type InstanceInterfaceService
- func (r *InstanceInterfaceService) Attach(ctx context.Context, instanceID string, params InstanceInterfaceAttachParams, ...) (res *TaskIDList, err error)
- func (r *InstanceInterfaceService) AttachAndPoll(ctx context.Context, instanceID string, params InstanceInterfaceAttachParams, ...) (v *NetworkInterfaceList, err error)
- func (r *InstanceInterfaceService) Detach(ctx context.Context, instanceID string, params InstanceInterfaceDetachParams, ...) (res *TaskIDList, err error)
- func (r *InstanceInterfaceService) DetachAndPoll(ctx context.Context, instanceID string, params InstanceInterfaceDetachParams, ...) (v *NetworkInterfaceList, err error)
- func (r *InstanceInterfaceService) List(ctx context.Context, instanceID string, query InstanceInterfaceListParams, ...) (res *NetworkInterfaceList, err error)
- type InstanceIsolation
- type InstanceList
- type InstanceListParams
- type InstanceListParamsOrderBy
- type InstanceListParamsProtectionStatus
- type InstanceListParamsStatus
- type InstanceListParamsTypeDDOSProfile
- type InstanceMetricListParams
- type InstanceMetricService
- type InstanceMetricsTimeUnit
- type InstanceNewParams
- type InstanceNewParamsInterfaceAnySubnet
- type InstanceNewParamsInterfaceAnySubnetFloatingIPExisting
- type InstanceNewParamsInterfaceAnySubnetFloatingIPNew
- type InstanceNewParamsInterfaceAnySubnetFloatingIPUnion
- func (u InstanceNewParamsInterfaceAnySubnetFloatingIPUnion) GetExistingFloatingID() *string
- func (u InstanceNewParamsInterfaceAnySubnetFloatingIPUnion) GetSource() *string
- func (u InstanceNewParamsInterfaceAnySubnetFloatingIPUnion) MarshalJSON() ([]byte, error)
- func (u *InstanceNewParamsInterfaceAnySubnetFloatingIPUnion) UnmarshalJSON(data []byte) error
- type InstanceNewParamsInterfaceAnySubnetSecurityGroup
- type InstanceNewParamsInterfaceExternal
- type InstanceNewParamsInterfaceExternalSecurityGroup
- type InstanceNewParamsInterfaceReservedFixedIP
- type InstanceNewParamsInterfaceReservedFixedIPFloatingIPExisting
- type InstanceNewParamsInterfaceReservedFixedIPFloatingIPNew
- type InstanceNewParamsInterfaceReservedFixedIPFloatingIPUnion
- func (u InstanceNewParamsInterfaceReservedFixedIPFloatingIPUnion) GetExistingFloatingID() *string
- func (u InstanceNewParamsInterfaceReservedFixedIPFloatingIPUnion) GetSource() *string
- func (u InstanceNewParamsInterfaceReservedFixedIPFloatingIPUnion) MarshalJSON() ([]byte, error)
- func (u *InstanceNewParamsInterfaceReservedFixedIPFloatingIPUnion) UnmarshalJSON(data []byte) error
- type InstanceNewParamsInterfaceReservedFixedIPSecurityGroup
- type InstanceNewParamsInterfaceSubnet
- type InstanceNewParamsInterfaceSubnetFloatingIPExisting
- type InstanceNewParamsInterfaceSubnetFloatingIPNew
- type InstanceNewParamsInterfaceSubnetFloatingIPUnion
- func (u InstanceNewParamsInterfaceSubnetFloatingIPUnion) GetExistingFloatingID() *string
- func (u InstanceNewParamsInterfaceSubnetFloatingIPUnion) GetSource() *string
- func (u InstanceNewParamsInterfaceSubnetFloatingIPUnion) MarshalJSON() ([]byte, error)
- func (u *InstanceNewParamsInterfaceSubnetFloatingIPUnion) UnmarshalJSON(data []byte) error
- type InstanceNewParamsInterfaceSubnetSecurityGroup
- type InstanceNewParamsInterfaceUnion
- func (u InstanceNewParamsInterfaceUnion) GetFloatingIP() (res instanceNewParamsInterfaceUnionFloatingIP)
- func (u InstanceNewParamsInterfaceUnion) GetIPAddress() *string
- func (u InstanceNewParamsInterfaceUnion) GetIPFamily() *string
- func (u InstanceNewParamsInterfaceUnion) GetInterfaceName() *string
- func (u InstanceNewParamsInterfaceUnion) GetNetworkID() *string
- func (u InstanceNewParamsInterfaceUnion) GetPortID() *string
- func (u InstanceNewParamsInterfaceUnion) GetSecurityGroups() (res instanceNewParamsInterfaceUnionSecurityGroups)
- func (u InstanceNewParamsInterfaceUnion) GetSubnetID() *string
- func (u InstanceNewParamsInterfaceUnion) GetType() *string
- func (u InstanceNewParamsInterfaceUnion) MarshalJSON() ([]byte, error)
- func (u *InstanceNewParamsInterfaceUnion) UnmarshalJSON(data []byte) error
- type InstanceNewParamsSecurityGroup
- type InstanceNewParamsVolumeApptemplate
- type InstanceNewParamsVolumeExistingVolume
- type InstanceNewParamsVolumeImage
- type InstanceNewParamsVolumeNewVolume
- type InstanceNewParamsVolumeSnapshot
- type InstanceNewParamsVolumeUnion
- func (u InstanceNewParamsVolumeUnion) GetApptemplateID() *string
- func (u InstanceNewParamsVolumeUnion) GetAttachmentTag() *string
- func (u InstanceNewParamsVolumeUnion) GetBootIndex() *int64
- func (u InstanceNewParamsVolumeUnion) GetDeleteOnTermination() *bool
- func (u InstanceNewParamsVolumeUnion) GetImageID() *string
- func (u InstanceNewParamsVolumeUnion) GetName() *string
- func (u InstanceNewParamsVolumeUnion) GetSize() *int64
- func (u InstanceNewParamsVolumeUnion) GetSnapshotID() *string
- func (u InstanceNewParamsVolumeUnion) GetSource() *string
- func (u InstanceNewParamsVolumeUnion) GetTags() map[string]string
- func (u InstanceNewParamsVolumeUnion) GetTypeName() *string
- func (u InstanceNewParamsVolumeUnion) GetVolumeID() *string
- func (u InstanceNewParamsVolumeUnion) MarshalJSON() ([]byte, error)
- func (u *InstanceNewParamsVolumeUnion) UnmarshalJSON(data []byte) error
- type InstanceRemoveFromPlacementGroupParams
- type InstanceResizeParams
- type InstanceSecurityGroup
- type InstanceService
- func (r *InstanceService) Action(ctx context.Context, instanceID string, params InstanceActionParams, ...) (res *TaskIDList, err error)
- func (r *InstanceService) ActionAndPoll(ctx context.Context, instanceID string, params InstanceActionParams, ...) (v *Instance, err error)
- func (r *InstanceService) AddToPlacementGroup(ctx context.Context, instanceID string, ...) (res *TaskIDList, err error)
- func (r *InstanceService) AddToPlacementGroupAndPoll(ctx context.Context, instanceID string, ...) (v *Instance, err error)
- func (r *InstanceService) AssignSecurityGroup(ctx context.Context, instanceID string, ...) (err error)
- func (r *InstanceService) Delete(ctx context.Context, instanceID string, params InstanceDeleteParams, ...) (res *TaskIDList, err error)
- func (r *InstanceService) DeleteAndPoll(ctx context.Context, instanceID string, params InstanceDeleteParams, ...) error
- func (r *InstanceService) DisablePortSecurity(ctx context.Context, portID string, body InstanceDisablePortSecurityParams, ...) (res *InstanceInterface, err error)
- func (r *InstanceService) EnablePortSecurity(ctx context.Context, portID string, body InstanceEnablePortSecurityParams, ...) (res *InstanceInterface, err error)
- func (r *InstanceService) Get(ctx context.Context, instanceID string, query InstanceGetParams, ...) (res *Instance, err error)
- func (r *InstanceService) GetConsole(ctx context.Context, instanceID string, params InstanceGetConsoleParams, ...) (res *Console, err error)
- func (r *InstanceService) List(ctx context.Context, params InstanceListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[Instance], err error)
- func (r *InstanceService) ListAutoPaging(ctx context.Context, params InstanceListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[Instance]
- func (r *InstanceService) New(ctx context.Context, params InstanceNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)
- func (r *InstanceService) NewAndPoll(ctx context.Context, params InstanceNewParams, opts ...option.RequestOption) (v *Instance, err error)
- func (r *InstanceService) RemoveFromPlacementGroup(ctx context.Context, instanceID string, ...) (res *TaskIDList, err error)
- func (r *InstanceService) RemoveFromPlacementGroupAndPoll(ctx context.Context, instanceID string, ...) (v *Instance, err error)
- func (r *InstanceService) Resize(ctx context.Context, instanceID string, params InstanceResizeParams, ...) (res *TaskIDList, err error)
- func (r *InstanceService) ResizeAndPoll(ctx context.Context, instanceID string, params InstanceResizeParams, ...) (v *Instance, err error)
- func (r *InstanceService) UnassignSecurityGroup(ctx context.Context, instanceID string, ...) (err error)
- func (r *InstanceService) Update(ctx context.Context, instanceID string, params InstanceUpdateParams, ...) (res *Instance, err error)
- type InstanceStatus
- type InstanceUnassignSecurityGroupParams
- type InstanceUnassignSecurityGroupParamsPortsSecurityGroupName
- type InstanceUpdateParams
- type InstanceVmState
- type InstanceVolume
- type InterfaceIPFamily
- type LaasIndexRetentionPolicy
- type LaasIndexRetentionPolicyParam
- type LbAlgorithm
- type LbHealthMonitorType
- type LbListenerProtocol
- type LbPoolProtocol
- type LbSessionPersistenceType
- type ListenerStatus
- type LoadBalancer
- type LoadBalancerAdditionalVip
- type LoadBalancerDeleteParams
- type LoadBalancerFailoverParams
- type LoadBalancerFlavor
- type LoadBalancerFlavorDetail
- type LoadBalancerFlavorDetailPriceStatus
- type LoadBalancerFlavorList
- type LoadBalancerFlavorListParams
- type LoadBalancerFlavorService
- type LoadBalancerGetParams
- type LoadBalancerInstanceRole
- type LoadBalancerL7Policy
- type LoadBalancerL7PolicyAction
- type LoadBalancerL7PolicyDeleteParams
- type LoadBalancerL7PolicyGetParams
- type LoadBalancerL7PolicyList
- type LoadBalancerL7PolicyListParams
- type LoadBalancerL7PolicyNewParams
- type LoadBalancerL7PolicyNewParamsAction
- type LoadBalancerL7PolicyOperatingStatus
- type LoadBalancerL7PolicyProvisioningStatus
- type LoadBalancerL7PolicyReplaceParams
- type LoadBalancerL7PolicyReplaceParamsAction
- type LoadBalancerL7PolicyRuleDeleteParams
- type LoadBalancerL7PolicyRuleGetParams
- type LoadBalancerL7PolicyRuleListParams
- type LoadBalancerL7PolicyRuleNewParams
- type LoadBalancerL7PolicyRuleNewParamsCompareType
- type LoadBalancerL7PolicyRuleNewParamsType
- type LoadBalancerL7PolicyRuleReplaceParams
- type LoadBalancerL7PolicyRuleReplaceParamsCompareType
- type LoadBalancerL7PolicyRuleReplaceParamsType
- type LoadBalancerL7PolicyRuleService
- func (r *LoadBalancerL7PolicyRuleService) Delete(ctx context.Context, l7ruleID string, ...) (res *TaskIDList, err error)
- func (r *LoadBalancerL7PolicyRuleService) DeleteAndPoll(ctx context.Context, l7ruleID string, ...) error
- func (r *LoadBalancerL7PolicyRuleService) Get(ctx context.Context, l7ruleID string, query LoadBalancerL7PolicyRuleGetParams, ...) (res *LoadBalancerL7Rule, err error)
- func (r *LoadBalancerL7PolicyRuleService) List(ctx context.Context, l7policyID string, ...) (res *LoadBalancerL7RuleList, err error)
- func (r *LoadBalancerL7PolicyRuleService) New(ctx context.Context, l7policyID string, ...) (res *TaskIDList, err error)
- func (r *LoadBalancerL7PolicyRuleService) NewAndPoll(ctx context.Context, l7policyID string, ...) (v *LoadBalancerL7Rule, err error)
- func (r *LoadBalancerL7PolicyRuleService) Replace(ctx context.Context, l7ruleID string, ...) (res *TaskIDList, err error)
- func (r *LoadBalancerL7PolicyRuleService) ReplaceAndPoll(ctx context.Context, l7ruleID string, ...) (v *LoadBalancerL7Rule, err error)
- type LoadBalancerL7PolicyService
- func (r *LoadBalancerL7PolicyService) Delete(ctx context.Context, l7policyID string, body LoadBalancerL7PolicyDeleteParams, ...) (res *TaskIDList, err error)
- func (r *LoadBalancerL7PolicyService) DeleteAndPoll(ctx context.Context, l7policyID string, body LoadBalancerL7PolicyDeleteParams, ...) error
- func (r *LoadBalancerL7PolicyService) Get(ctx context.Context, l7policyID string, query LoadBalancerL7PolicyGetParams, ...) (res *LoadBalancerL7Policy, err error)
- func (r *LoadBalancerL7PolicyService) List(ctx context.Context, query LoadBalancerL7PolicyListParams, ...) (res *LoadBalancerL7PolicyList, err error)
- func (r *LoadBalancerL7PolicyService) New(ctx context.Context, params LoadBalancerL7PolicyNewParams, ...) (res *TaskIDList, err error)
- func (r *LoadBalancerL7PolicyService) NewAndPoll(ctx context.Context, params LoadBalancerL7PolicyNewParams, ...) (v *LoadBalancerL7Policy, err error)
- func (r *LoadBalancerL7PolicyService) Replace(ctx context.Context, l7policyID string, ...) (res *TaskIDList, err error)
- func (r *LoadBalancerL7PolicyService) ReplaceAndPoll(ctx context.Context, l7policyID string, ...) (v *LoadBalancerL7Policy, err error)
- type LoadBalancerL7Rule
- type LoadBalancerL7RuleCompareType
- type LoadBalancerL7RuleList
- type LoadBalancerL7RuleOperatingStatus
- type LoadBalancerL7RuleProvisioningStatus
- type LoadBalancerL7RuleType
- type LoadBalancerListParams
- type LoadBalancerListener
- type LoadBalancerListenerDeleteParams
- type LoadBalancerListenerDetail
- type LoadBalancerListenerDetailUserList
- type LoadBalancerListenerGetParams
- type LoadBalancerListenerList
- type LoadBalancerListenerListParams
- type LoadBalancerListenerListResponse
- type LoadBalancerListenerNewParams
- type LoadBalancerListenerNewParamsUserList
- type LoadBalancerListenerService
- func (r *LoadBalancerListenerService) Delete(ctx context.Context, listenerID string, body LoadBalancerListenerDeleteParams, ...) (res *TaskIDList, err error)
- func (r *LoadBalancerListenerService) DeleteAndPoll(ctx context.Context, listenerID string, ...) error
- func (r *LoadBalancerListenerService) Get(ctx context.Context, listenerID string, params LoadBalancerListenerGetParams, ...) (res *LoadBalancerListenerDetail, err error)
- func (r *LoadBalancerListenerService) List(ctx context.Context, params LoadBalancerListenerListParams, ...) (res *LoadBalancerListenerList, err error)
- func (r *LoadBalancerListenerService) New(ctx context.Context, params LoadBalancerListenerNewParams, ...) (res *TaskIDList, err error)
- func (r *LoadBalancerListenerService) NewAndPoll(ctx context.Context, params LoadBalancerListenerNewParams, ...) (v *LoadBalancerListenerDetail, err error)
- func (r *LoadBalancerListenerService) Update(ctx context.Context, listenerID string, ...) (res *TaskIDList, err error)
- func (r *LoadBalancerListenerService) UpdateAndPoll(ctx context.Context, listenerID string, ...) (v *LoadBalancerListenerDetail, err error)
- type LoadBalancerListenerUpdateParams
- type LoadBalancerListenerUpdateParamsUserList
- type LoadBalancerMemberConnectivity
- type LoadBalancerMetricListParams
- type LoadBalancerMetricService
- type LoadBalancerMetrics
- type LoadBalancerMetricsList
- type LoadBalancerNewParams
- type LoadBalancerNewParamsFloatingIPExisting
- type LoadBalancerNewParamsFloatingIPNew
- type LoadBalancerNewParamsFloatingIPUnion
- type LoadBalancerNewParamsListener
- type LoadBalancerNewParamsListenerPool
- type LoadBalancerNewParamsListenerPoolHealthmonitor
- type LoadBalancerNewParamsListenerPoolMember
- type LoadBalancerNewParamsListenerPoolSessionPersistence
- type LoadBalancerNewParamsListenerUserList
- type LoadBalancerNewParamsLogging
- type LoadBalancerOperatingStatus
- type LoadBalancerPool
- type LoadBalancerPoolDeleteParams
- type LoadBalancerPoolGetParams
- type LoadBalancerPoolHealthMonitorDeleteParams
- type LoadBalancerPoolHealthMonitorNewParams
- type LoadBalancerPoolHealthMonitorService
- type LoadBalancerPoolList
- type LoadBalancerPoolListParams
- type LoadBalancerPoolListResult
- type LoadBalancerPoolListResultListener
- type LoadBalancerPoolListResultLoadbalancer
- type LoadBalancerPoolListResultMemberLbPoolMemberSerializer
- type LoadBalancerPoolListResultMemberUnion
- func (u LoadBalancerPoolListResultMemberUnion) AsDetailedLbPoolMemberSerializer() (v Member)
- func (u LoadBalancerPoolListResultMemberUnion) AsLbPoolMemberSerializer() (v LoadBalancerPoolListResultMemberLbPoolMemberSerializer)
- func (u LoadBalancerPoolListResultMemberUnion) RawJSON() string
- func (r *LoadBalancerPoolListResultMemberUnion) UnmarshalJSON(data []byte) error
- type LoadBalancerPoolListener
- type LoadBalancerPoolLoadbalancer
- type LoadBalancerPoolMemberAddParams
- type LoadBalancerPoolMemberRemoveParams
- type LoadBalancerPoolMemberService
- func (r *LoadBalancerPoolMemberService) Add(ctx context.Context, poolID string, params LoadBalancerPoolMemberAddParams, ...) (res *TaskIDList, err error)
- func (r *LoadBalancerPoolMemberService) Remove(ctx context.Context, memberID string, body LoadBalancerPoolMemberRemoveParams, ...) (res *TaskIDList, err error)
- type LoadBalancerPoolNewParams
- type LoadBalancerPoolNewParamsHealthmonitor
- type LoadBalancerPoolNewParamsMember
- type LoadBalancerPoolNewParamsSessionPersistence
- type LoadBalancerPoolService
- func (r *LoadBalancerPoolService) Delete(ctx context.Context, poolID string, body LoadBalancerPoolDeleteParams, ...) (res *TaskIDList, err error)
- func (r *LoadBalancerPoolService) DeleteAndPoll(ctx context.Context, poolID string, params LoadBalancerPoolDeleteParams, ...) error
- func (r *LoadBalancerPoolService) Get(ctx context.Context, poolID string, query LoadBalancerPoolGetParams, ...) (res *LoadBalancerPool, err error)
- func (r *LoadBalancerPoolService) List(ctx context.Context, params LoadBalancerPoolListParams, ...) (res *LoadBalancerPoolList, err error)
- func (r *LoadBalancerPoolService) New(ctx context.Context, params LoadBalancerPoolNewParams, ...) (res *TaskIDList, err error)
- func (r *LoadBalancerPoolService) NewAndPoll(ctx context.Context, params LoadBalancerPoolNewParams, ...) (v *LoadBalancerPool, err error)
- func (r *LoadBalancerPoolService) Update(ctx context.Context, poolID string, params LoadBalancerPoolUpdateParams, ...) (res *TaskIDList, err error)
- func (r *LoadBalancerPoolService) UpdateAndPoll(ctx context.Context, poolID string, params LoadBalancerPoolUpdateParams, ...) (v *LoadBalancerPool, err error)
- type LoadBalancerPoolUpdateParams
- type LoadBalancerPoolUpdateParamsHealthmonitor
- type LoadBalancerPoolUpdateParamsMember
- type LoadBalancerPoolUpdateParamsSessionPersistence
- type LoadBalancerResizeParams
- type LoadBalancerService
- func (r *LoadBalancerService) Delete(ctx context.Context, loadbalancerID string, body LoadBalancerDeleteParams, ...) (res *TaskIDList, err error)
- func (r *LoadBalancerService) DeleteAndPoll(ctx context.Context, loadbalancerID string, params LoadBalancerDeleteParams, ...) error
- func (r *LoadBalancerService) Failover(ctx context.Context, loadbalancerID string, params LoadBalancerFailoverParams, ...) (res *TaskIDList, err error)
- func (r *LoadBalancerService) FailoverAndPoll(ctx context.Context, loadbalancerID string, params LoadBalancerFailoverParams, ...) (v *LoadBalancer, err error)
- func (r *LoadBalancerService) Get(ctx context.Context, loadbalancerID string, params LoadBalancerGetParams, ...) (res *LoadBalancer, err error)
- func (r *LoadBalancerService) List(ctx context.Context, params LoadBalancerListParams, ...) (res *pagination.OffsetPage[LoadBalancer], err error)
- func (r *LoadBalancerService) ListAutoPaging(ctx context.Context, params LoadBalancerListParams, ...) *pagination.OffsetPageAutoPager[LoadBalancer]
- func (r *LoadBalancerService) New(ctx context.Context, params LoadBalancerNewParams, ...) (res *TaskIDList, err error)
- func (r *LoadBalancerService) NewAndPoll(ctx context.Context, params LoadBalancerNewParams, ...) (v *LoadBalancer, err error)
- func (r *LoadBalancerService) Resize(ctx context.Context, loadbalancerID string, params LoadBalancerResizeParams, ...) (res *TaskIDList, err error)
- func (r *LoadBalancerService) ResizeAndPoll(ctx context.Context, loadbalancerID string, params LoadBalancerResizeParams, ...) (v *LoadBalancer, err error)
- func (r *LoadBalancerService) Update(ctx context.Context, loadbalancerID string, params LoadBalancerUpdateParams, ...) (res *LoadBalancer, err error)
- type LoadBalancerStatistics
- type LoadBalancerStatus
- type LoadBalancerStatusGetParams
- type LoadBalancerStatusList
- type LoadBalancerStatusListParams
- type LoadBalancerStatusService
- func (r *LoadBalancerStatusService) Get(ctx context.Context, loadbalancerID string, query LoadBalancerStatusGetParams, ...) (res *LoadBalancerStatus, err error)
- func (r *LoadBalancerStatusService) List(ctx context.Context, query LoadBalancerStatusListParams, ...) (res *LoadBalancerStatusList, err error)
- type LoadBalancerUpdateParams
- type LoadBalancerUpdateParamsLogging
- type LoadBalancerVrrpIP
- type Logging
- type Member
- type MemberStatus
- type Metrics
- type MetricsDisk
- type MetricsList
- type Network
- type NetworkDeleteParams
- type NetworkDetails
- type NetworkGetParams
- type NetworkInterface
- type NetworkInterfaceList
- type NetworkInterfaceSubPort
- type NetworkListParams
- type NetworkListParamsOrderBy
- type NetworkNewParams
- type NetworkNewParamsType
- type NetworkRouterAttachSubnetParams
- type NetworkRouterDeleteParams
- type NetworkRouterDetachSubnetParams
- type NetworkRouterGetParams
- type NetworkRouterListParams
- type NetworkRouterNewParams
- type NetworkRouterNewParamsExternalGatewayInfoRouterExternalDefaultGwSerializer
- type NetworkRouterNewParamsExternalGatewayInfoRouterExternalManualGwSerializer
- type NetworkRouterNewParamsExternalGatewayInfoUnion
- func (u NetworkRouterNewParamsExternalGatewayInfoUnion) GetEnableSnat() *bool
- func (u NetworkRouterNewParamsExternalGatewayInfoUnion) GetNetworkID() *string
- func (u NetworkRouterNewParamsExternalGatewayInfoUnion) GetType() *string
- func (u NetworkRouterNewParamsExternalGatewayInfoUnion) MarshalJSON() ([]byte, error)
- func (u *NetworkRouterNewParamsExternalGatewayInfoUnion) UnmarshalJSON(data []byte) error
- type NetworkRouterNewParamsInterface
- type NetworkRouterNewParamsRoute
- type NetworkRouterService
- func (r *NetworkRouterService) AttachSubnet(ctx context.Context, routerID string, params NetworkRouterAttachSubnetParams, ...) (res *Router, err error)
- func (r *NetworkRouterService) Delete(ctx context.Context, routerID string, body NetworkRouterDeleteParams, ...) (res *TaskIDList, err error)
- func (r *NetworkRouterService) DetachSubnet(ctx context.Context, routerID string, params NetworkRouterDetachSubnetParams, ...) (res *Router, err error)
- func (r *NetworkRouterService) Get(ctx context.Context, routerID string, query NetworkRouterGetParams, ...) (res *Router, err error)
- func (r *NetworkRouterService) List(ctx context.Context, params NetworkRouterListParams, ...) (res *pagination.OffsetPage[Router], err error)
- func (r *NetworkRouterService) ListAutoPaging(ctx context.Context, params NetworkRouterListParams, ...) *pagination.OffsetPageAutoPager[Router]
- func (r *NetworkRouterService) New(ctx context.Context, params NetworkRouterNewParams, ...) (res *TaskIDList, err error)
- func (r *NetworkRouterService) Update(ctx context.Context, routerID string, params NetworkRouterUpdateParams, ...) (res *Router, err error)
- type NetworkRouterUpdateParams
- type NetworkRouterUpdateParamsExternalGatewayInfo
- type NetworkRouterUpdateParamsRoute
- type NetworkService
- func (r *NetworkService) Delete(ctx context.Context, networkID string, body NetworkDeleteParams, ...) (res *TaskIDList, err error)
- func (r *NetworkService) Get(ctx context.Context, networkID string, query NetworkGetParams, ...) (res *Network, err error)
- func (r *NetworkService) List(ctx context.Context, params NetworkListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[Network], err error)
- func (r *NetworkService) ListAutoPaging(ctx context.Context, params NetworkListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[Network]
- func (r *NetworkService) New(ctx context.Context, params NetworkNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)
- func (r *NetworkService) Update(ctx context.Context, networkID string, params NetworkUpdateParams, ...) (res *Network, err error)
- type NetworkSubnetDeleteParams
- type NetworkSubnetGetParams
- type NetworkSubnetListParams
- type NetworkSubnetListParamsOrderBy
- type NetworkSubnetNewParams
- type NetworkSubnetNewParamsHostRoute
- type NetworkSubnetService
- func (r *NetworkSubnetService) Delete(ctx context.Context, subnetID string, body NetworkSubnetDeleteParams, ...) (err error)
- func (r *NetworkSubnetService) Get(ctx context.Context, subnetID string, query NetworkSubnetGetParams, ...) (res *Subnet, err error)
- func (r *NetworkSubnetService) List(ctx context.Context, params NetworkSubnetListParams, ...) (res *pagination.OffsetPage[Subnet], err error)
- func (r *NetworkSubnetService) ListAutoPaging(ctx context.Context, params NetworkSubnetListParams, ...) *pagination.OffsetPageAutoPager[Subnet]
- func (r *NetworkSubnetService) New(ctx context.Context, params NetworkSubnetNewParams, ...) (res *TaskIDList, err error)
- func (r *NetworkSubnetService) Update(ctx context.Context, subnetID string, params NetworkSubnetUpdateParams, ...) (res *Subnet, err error)
- type NetworkSubnetUpdateParams
- type NetworkSubnetUpdateParamsHostRoute
- type NetworkUpdateParams
- type PlacementGroup
- type PlacementGroupDeleteParams
- type PlacementGroupGetParams
- type PlacementGroupInstance
- type PlacementGroupList
- type PlacementGroupListParams
- type PlacementGroupNewParams
- type PlacementGroupNewParamsPolicy
- type PlacementGroupService
- func (r *PlacementGroupService) Delete(ctx context.Context, groupID string, body PlacementGroupDeleteParams, ...) (res *TaskIDList, err error)
- func (r *PlacementGroupService) Get(ctx context.Context, groupID string, query PlacementGroupGetParams, ...) (res *PlacementGroup, err error)
- func (r *PlacementGroupService) List(ctx context.Context, query PlacementGroupListParams, ...) (res *PlacementGroupList, err error)
- func (r *PlacementGroupService) New(ctx context.Context, params PlacementGroupNewParams, ...) (res *PlacementGroup, err error)
- type PoolStatus
- type Probe
- type ProbeConfig
- type ProbeExec
- type ProbeHTTPGet
- type ProbeTcpSocket
- type Project
- type ProjectDeleteParams
- type ProjectGetParams
- type ProjectListParams
- type ProjectListParamsOrderBy
- type ProjectNewParams
- type ProjectReplaceParams
- type ProjectService
- func (r *ProjectService) Delete(ctx context.Context, body ProjectDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)
- func (r *ProjectService) Get(ctx context.Context, query ProjectGetParams, opts ...option.RequestOption) (res *Project, err error)
- func (r *ProjectService) List(ctx context.Context, query ProjectListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[Project], err error)
- func (r *ProjectService) ListAutoPaging(ctx context.Context, query ProjectListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[Project]
- func (r *ProjectService) New(ctx context.Context, body ProjectNewParams, opts ...option.RequestOption) (res *Project, err error)
- func (r *ProjectService) Replace(ctx context.Context, params ProjectReplaceParams, opts ...option.RequestOption) (res *Project, err error)
- type ProvisioningStatus
- type QuotaGetAllResponse
- type QuotaGetAllResponseGlobalQuotas
- type QuotaGetAllResponseRegionalQuota
- type QuotaGetByRegionParams
- type QuotaGetByRegionResponse
- type QuotaGetGlobalResponse
- type QuotaRequestGetResponse
- type QuotaRequestGetResponseRequestedLimits
- type QuotaRequestGetResponseRequestedLimitsGlobalLimits
- type QuotaRequestGetResponseRequestedLimitsRegionalLimit
- type QuotaRequestListParams
- type QuotaRequestListResponse
- type QuotaRequestListResponseRequestedLimits
- type QuotaRequestListResponseRequestedLimitsGlobalLimits
- type QuotaRequestListResponseRequestedLimitsRegionalLimit
- type QuotaRequestNewParams
- type QuotaRequestNewParamsRequestedLimits
- type QuotaRequestNewParamsRequestedLimitsGlobalLimits
- type QuotaRequestNewParamsRequestedLimitsRegionalLimit
- type QuotaRequestService
- func (r *QuotaRequestService) Delete(ctx context.Context, requestID string, opts ...option.RequestOption) (err error)
- func (r *QuotaRequestService) Get(ctx context.Context, requestID string, opts ...option.RequestOption) (res *QuotaRequestGetResponse, err error)
- func (r *QuotaRequestService) List(ctx context.Context, query QuotaRequestListParams, ...) (res *pagination.OffsetPage[QuotaRequestListResponse], err error)
- func (r *QuotaRequestService) ListAutoPaging(ctx context.Context, query QuotaRequestListParams, ...) *pagination.OffsetPageAutoPager[QuotaRequestListResponse]
- func (r *QuotaRequestService) New(ctx context.Context, body QuotaRequestNewParams, opts ...option.RequestOption) (err error)
- type QuotaService
- func (r *QuotaService) GetAll(ctx context.Context, opts ...option.RequestOption) (res *QuotaGetAllResponse, err error)
- func (r *QuotaService) GetByRegion(ctx context.Context, query QuotaGetByRegionParams, ...) (res *QuotaGetByRegionResponse, err error)
- func (r *QuotaService) GetGlobal(ctx context.Context, clientID int64, opts ...option.RequestOption) (res *QuotaGetGlobalResponse, err error)
- type Region
- type RegionAccessLevel
- type RegionCoordinates
- type RegionEndpointType
- type RegionGetParams
- type RegionListParams
- type RegionListParamsOrderBy
- type RegionListParamsProduct
- type RegionService
- func (r *RegionService) Get(ctx context.Context, params RegionGetParams, opts ...option.RequestOption) (res *Region, err error)
- func (r *RegionService) List(ctx context.Context, query RegionListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[Region], err error)
- func (r *RegionService) ListAutoPaging(ctx context.Context, query RegionListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[Region]
- type RegionState
- type RegionZone
- type Registry
- type RegistryArtifact
- type RegistryArtifactDeleteParams
- type RegistryArtifactList
- type RegistryArtifactListParams
- type RegistryArtifactService
- type RegistryDeleteParams
- type RegistryGetParams
- type RegistryList
- type RegistryListParams
- type RegistryNewParams
- type RegistryRepository
- type RegistryRepositoryDeleteParams
- type RegistryRepositoryList
- type RegistryRepositoryListParams
- type RegistryRepositoryService
- type RegistryResizeParams
- type RegistryService
- func (r *RegistryService) Delete(ctx context.Context, registryID int64, body RegistryDeleteParams, ...) (err error)
- func (r *RegistryService) Get(ctx context.Context, registryID int64, query RegistryGetParams, ...) (res *Registry, err error)
- func (r *RegistryService) List(ctx context.Context, query RegistryListParams, opts ...option.RequestOption) (res *RegistryList, err error)
- func (r *RegistryService) New(ctx context.Context, params RegistryNewParams, opts ...option.RequestOption) (res *Registry, err error)
- func (r *RegistryService) Resize(ctx context.Context, registryID int64, params RegistryResizeParams, ...) (res *Registry, err error)
- type RegistryTag
- type RegistryTagDeleteParams
- type RegistryTagService
- type RegistryUser
- type RegistryUserCreated
- type RegistryUserDeleteParams
- type RegistryUserList
- type RegistryUserListParams
- type RegistryUserNewMultipleParams
- type RegistryUserNewMultipleParamsUser
- type RegistryUserNewParams
- type RegistryUserRefreshSecretParams
- type RegistryUserRefreshSecretResponse
- type RegistryUserService
- func (r *RegistryUserService) Delete(ctx context.Context, userID int64, body RegistryUserDeleteParams, ...) (err error)
- func (r *RegistryUserService) List(ctx context.Context, registryID int64, query RegistryUserListParams, ...) (res *RegistryUserList, err error)
- func (r *RegistryUserService) New(ctx context.Context, registryID int64, params RegistryUserNewParams, ...) (res *RegistryUserCreated, err error)
- func (r *RegistryUserService) NewMultiple(ctx context.Context, registryID int64, params RegistryUserNewMultipleParams, ...) (res *RegistryUserCreated, err error)
- func (r *RegistryUserService) RefreshSecret(ctx context.Context, userID int64, body RegistryUserRefreshSecretParams, ...) (res *RegistryUserRefreshSecretResponse, err error)
- func (r *RegistryUserService) Update(ctx context.Context, userID int64, params RegistryUserUpdateParams, ...) (res *RegistryUser, err error)
- type RegistryUserUpdateParams
- type ReservedFixedIP
- type ReservedFixedIPAttachment
- type ReservedFixedIPDeleteParams
- type ReservedFixedIPGetParams
- type ReservedFixedIPListParams
- type ReservedFixedIPNewParams
- type ReservedFixedIPNewParamsBodyAnySubnet
- type ReservedFixedIPNewParamsBodyExternal
- type ReservedFixedIPNewParamsBodyIPAddress
- type ReservedFixedIPNewParamsBodyPort
- type ReservedFixedIPNewParamsBodySubnet
- type ReservedFixedIPReservation
- type ReservedFixedIPService
- func (r *ReservedFixedIPService) Delete(ctx context.Context, portID string, body ReservedFixedIPDeleteParams, ...) (res *TaskIDList, err error)
- func (r *ReservedFixedIPService) Get(ctx context.Context, portID string, query ReservedFixedIPGetParams, ...) (res *ReservedFixedIP, err error)
- func (r *ReservedFixedIPService) List(ctx context.Context, params ReservedFixedIPListParams, ...) (res *pagination.OffsetPage[ReservedFixedIP], err error)
- func (r *ReservedFixedIPService) ListAutoPaging(ctx context.Context, params ReservedFixedIPListParams, ...) *pagination.OffsetPageAutoPager[ReservedFixedIP]
- func (r *ReservedFixedIPService) New(ctx context.Context, params ReservedFixedIPNewParams, ...) (res *TaskIDList, err error)
- func (r *ReservedFixedIPService) NewAndPoll(ctx context.Context, params ReservedFixedIPNewParams, ...) (v *ReservedFixedIP, err error)
- type ReservedFixedIPVipListCandidatePortsParams
- type ReservedFixedIPVipListConnectedPortsParams
- type ReservedFixedIPVipReplaceConnectedPortsParams
- type ReservedFixedIPVipService
- func (r *ReservedFixedIPVipService) ListCandidatePorts(ctx context.Context, portID string, ...) (res *CandidatePortList, err error)
- func (r *ReservedFixedIPVipService) ListConnectedPorts(ctx context.Context, portID string, ...) (res *ConnectedPortList, err error)
- func (r *ReservedFixedIPVipService) ReplaceConnectedPorts(ctx context.Context, portID string, ...) (res *ConnectedPortList, err error)
- func (r *ReservedFixedIPVipService) Toggle(ctx context.Context, portID string, params ReservedFixedIPVipToggleParams, ...) (res *ReservedFixedIP, err error)
- func (r *ReservedFixedIPVipService) UpdateConnectedPorts(ctx context.Context, portID string, ...) (res *ConnectedPortList, err error)
- type ReservedFixedIPVipToggleParams
- type ReservedFixedIPVipUpdateConnectedPortsParams
- type RoleAssignment
- type RoleAssignmentUpdateDelete
- type Route
- type Router
- type RouterExternalGatewayInfo
- type RouterInterface
- type RouterList
- type SSHKey
- type SSHKeyCreated
- type SSHKeyCreatedState
- type SSHKeyDeleteParams
- type SSHKeyGetParams
- type SSHKeyListParams
- type SSHKeyListParamsOrderBy
- type SSHKeyNewParams
- type SSHKeyService
- func (r *SSHKeyService) Delete(ctx context.Context, sshKeyID string, body SSHKeyDeleteParams, ...) (err error)
- func (r *SSHKeyService) Get(ctx context.Context, sshKeyID string, query SSHKeyGetParams, ...) (res *SSHKey, err error)
- func (r *SSHKeyService) List(ctx context.Context, params SSHKeyListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[SSHKey], err error)
- func (r *SSHKeyService) ListAutoPaging(ctx context.Context, params SSHKeyListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[SSHKey]
- func (r *SSHKeyService) New(ctx context.Context, params SSHKeyNewParams, opts ...option.RequestOption) (res *SSHKeyCreated, err error)
- func (r *SSHKeyService) Update(ctx context.Context, sshKeyID string, params SSHKeyUpdateParams, ...) (res *SSHKey, err error)
- type SSHKeyState
- type SSHKeyUpdateParams
- type Secret
- type SecretDeleteParams
- type SecretGetParams
- type SecretListParams
- type SecretSecretType
- type SecretService
- func (r *SecretService) Delete(ctx context.Context, secretID string, body SecretDeleteParams, ...) (res *TaskIDList, err error)
- func (r *SecretService) Get(ctx context.Context, secretID string, query SecretGetParams, ...) (res *Secret, err error)
- func (r *SecretService) List(ctx context.Context, params SecretListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[Secret], err error)
- func (r *SecretService) ListAutoPaging(ctx context.Context, params SecretListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[Secret]
- func (r *SecretService) UploadTlsCertificate(ctx context.Context, params SecretUploadTlsCertificateParams, ...) (res *TaskIDList, err error)
- func (r *SecretService) UploadTlsCertificateAndPoll(ctx context.Context, params SecretUploadTlsCertificateParams, ...) (v *Secret, err error)
- type SecretUploadTlsCertificateParams
- type SecretUploadTlsCertificateParamsPayload
- type SecurityGroup
- type SecurityGroupCopyParams
- type SecurityGroupDeleteParams
- type SecurityGroupGetParams
- type SecurityGroupListParams
- type SecurityGroupNewParams
- type SecurityGroupNewParamsSecurityGroup
- type SecurityGroupNewParamsSecurityGroupSecurityGroupRule
- type SecurityGroupRevertToDefaultParams
- type SecurityGroupRule
- type SecurityGroupRuleDeleteParams
- type SecurityGroupRuleDirection
- type SecurityGroupRuleEthertype
- type SecurityGroupRuleNewParams
- type SecurityGroupRuleNewParamsDirection
- type SecurityGroupRuleNewParamsEthertype
- type SecurityGroupRuleNewParamsProtocol
- type SecurityGroupRuleProtocol
- type SecurityGroupRuleReplaceParams
- type SecurityGroupRuleReplaceParamsDirection
- type SecurityGroupRuleReplaceParamsEthertype
- type SecurityGroupRuleReplaceParamsProtocol
- type SecurityGroupRuleService
- func (r *SecurityGroupRuleService) Delete(ctx context.Context, ruleID string, body SecurityGroupRuleDeleteParams, ...) (err error)
- func (r *SecurityGroupRuleService) New(ctx context.Context, groupID string, params SecurityGroupRuleNewParams, ...) (res *SecurityGroupRule, err error)
- func (r *SecurityGroupRuleService) Replace(ctx context.Context, ruleID string, params SecurityGroupRuleReplaceParams, ...) (res *SecurityGroupRule, err error)
- type SecurityGroupService
- func (r *SecurityGroupService) Copy(ctx context.Context, groupID string, params SecurityGroupCopyParams, ...) (res *SecurityGroup, err error)
- func (r *SecurityGroupService) Delete(ctx context.Context, groupID string, body SecurityGroupDeleteParams, ...) (err error)
- func (r *SecurityGroupService) Get(ctx context.Context, groupID string, query SecurityGroupGetParams, ...) (res *SecurityGroup, err error)
- func (r *SecurityGroupService) List(ctx context.Context, params SecurityGroupListParams, ...) (res *pagination.OffsetPage[SecurityGroup], err error)
- func (r *SecurityGroupService) ListAutoPaging(ctx context.Context, params SecurityGroupListParams, ...) *pagination.OffsetPageAutoPager[SecurityGroup]
- func (r *SecurityGroupService) New(ctx context.Context, params SecurityGroupNewParams, ...) (res *SecurityGroup, err error)
- func (r *SecurityGroupService) RevertToDefault(ctx context.Context, groupID string, body SecurityGroupRevertToDefaultParams, ...) (res *SecurityGroup, err error)
- func (r *SecurityGroupService) Update(ctx context.Context, groupID string, params SecurityGroupUpdateParams, ...) (res *SecurityGroup, err error)
- type SecurityGroupUpdateParams
- type SecurityGroupUpdateParamsChangedRule
- type SessionPersistence
- type Subnet
- type SubnetIDParam
- type Tag
- type TagUpdateMap
- type Task
- type TaskAcknowledgeAllParams
- type TaskCreatedResources
- type TaskDetailedState
- type TaskIDList
- type TaskListParams
- type TaskListParamsOrderBy
- type TaskListParamsSorting
- type TaskService
- func (r *TaskService) AcknowledgeAll(ctx context.Context, body TaskAcknowledgeAllParams, ...) (err error)
- func (r *TaskService) AcknowledgeOne(ctx context.Context, taskID string, opts ...option.RequestOption) (res *Task, err error)
- func (r *TaskService) Get(ctx context.Context, taskID string, opts ...option.RequestOption) (res *Task, err error)
- func (r *TaskService) List(ctx context.Context, query TaskListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[Task], err error)
- func (r *TaskService) ListAutoPaging(ctx context.Context, query TaskListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[Task]
- func (r *TaskService) Poll(ctx context.Context, taskID string, opts ...requestconfig.RequestOption) (*Task, error)
- type TaskState
- type UserRoleAssignmentListParams
- type UserRoleAssignmentNewParams
- type UserRoleAssignmentService
- func (r *UserRoleAssignmentService) Delete(ctx context.Context, assignmentID int64, opts ...option.RequestOption) (res *RoleAssignmentUpdateDelete, err error)
- func (r *UserRoleAssignmentService) List(ctx context.Context, query UserRoleAssignmentListParams, ...) (res *pagination.OffsetPage[RoleAssignment], err error)
- func (r *UserRoleAssignmentService) ListAutoPaging(ctx context.Context, query UserRoleAssignmentListParams, ...) *pagination.OffsetPageAutoPager[RoleAssignment]
- func (r *UserRoleAssignmentService) New(ctx context.Context, body UserRoleAssignmentNewParams, ...) (res *RoleAssignment, err error)
- func (r *UserRoleAssignmentService) Update(ctx context.Context, assignmentID int64, body UserRoleAssignmentUpdateParams, ...) (res *RoleAssignmentUpdateDelete, err error)
- type UserRoleAssignmentUpdateParams
- type UserService
- type Volume
- type VolumeAttachToInstanceParams
- type VolumeAttachment
- type VolumeChangeTypeParams
- type VolumeChangeTypeParamsVolumeType
- type VolumeDeleteParams
- type VolumeDetachFromInstanceParams
- type VolumeGetParams
- type VolumeLimiterStats
- type VolumeListParams
- type VolumeNewParams
- type VolumeNewParamsBodyImage
- type VolumeNewParamsBodyNewVolume
- type VolumeNewParamsBodySnapshot
- type VolumeResizeParams
- type VolumeRevertToLastSnapshotParams
- type VolumeService
- func (r *VolumeService) AttachToInstance(ctx context.Context, volumeID string, params VolumeAttachToInstanceParams, ...) (res *TaskIDList, err error)
- func (r *VolumeService) ChangeType(ctx context.Context, volumeID string, params VolumeChangeTypeParams, ...) (res *Volume, err error)
- func (r *VolumeService) Delete(ctx context.Context, volumeID string, params VolumeDeleteParams, ...) (res *TaskIDList, err error)
- func (r *VolumeService) DetachFromInstance(ctx context.Context, volumeID string, params VolumeDetachFromInstanceParams, ...) (res *TaskIDList, err error)
- func (r *VolumeService) Get(ctx context.Context, volumeID string, query VolumeGetParams, ...) (res *Volume, err error)
- func (r *VolumeService) List(ctx context.Context, params VolumeListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[Volume], err error)
- func (r *VolumeService) ListAutoPaging(ctx context.Context, params VolumeListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[Volume]
- func (r *VolumeService) New(ctx context.Context, params VolumeNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)
- func (r *VolumeService) Resize(ctx context.Context, volumeID string, params VolumeResizeParams, ...) (res *TaskIDList, err error)
- func (r *VolumeService) RevertToLastSnapshot(ctx context.Context, volumeID string, body VolumeRevertToLastSnapshotParams, ...) (err error)
- func (r *VolumeService) Update(ctx context.Context, volumeID string, params VolumeUpdateParams, ...) (res *Volume, err error)
- type VolumeStatus
- type VolumeUpdateParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessRule ¶
type AccessRule struct {
// Access Rule ID
ID string `json:"id,required" format:"uuid4"`
// Access mode
//
// Any of "ro", "rw".
AccessLevel AccessRuleAccessLevel `json:"access_level,required"`
// Source IP or network
AccessTo string `json:"access_to,required" format:"ipvanyaddress"`
// Access Rule state
//
// Any of "active", "applying", "denying", "error", "new", "queued_to_apply",
// "queued_to_deny".
State AccessRuleState `json:"state,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AccessLevel respjson.Field
AccessTo respjson.Field
State respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccessRule) RawJSON ¶
func (r AccessRule) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccessRule) UnmarshalJSON ¶
func (r *AccessRule) UnmarshalJSON(data []byte) error
type AccessRuleAccessLevel ¶
type AccessRuleAccessLevel string
Access mode
const ( AccessRuleAccessLevelRo AccessRuleAccessLevel = "ro" AccessRuleAccessLevelRw AccessRuleAccessLevel = "rw" )
type AccessRuleList ¶
type AccessRuleList struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []AccessRule `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccessRuleList) RawJSON ¶
func (r AccessRuleList) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccessRuleList) UnmarshalJSON ¶
func (r *AccessRuleList) UnmarshalJSON(data []byte) error
type AccessRuleState ¶
type AccessRuleState string
Access Rule state
const ( AccessRuleStateActive AccessRuleState = "active" AccessRuleStateApplying AccessRuleState = "applying" AccessRuleStateDenying AccessRuleState = "denying" AccessRuleStateError AccessRuleState = "error" AccessRuleStateNew AccessRuleState = "new" AccessRuleStateQueuedToApply AccessRuleState = "queued_to_apply" AccessRuleStateQueuedToDeny AccessRuleState = "queued_to_deny" )
type AllowedAddressPairs ¶
type AllowedAddressPairs struct {
// Subnet mask or IP address of the port specified in `allowed_address_pairs`
IPAddress string `json:"ip_address,required" format:"ipvanyaddress"`
// MAC address of the port specified in `allowed_address_pairs`
MacAddress string `json:"mac_address,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
IPAddress respjson.Field
MacAddress respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AllowedAddressPairs) RawJSON ¶
func (r AllowedAddressPairs) RawJSON() string
Returns the unmodified JSON received from the API
func (*AllowedAddressPairs) UnmarshalJSON ¶
func (r *AllowedAddressPairs) UnmarshalJSON(data []byte) error
type BaremetalFixedAddress ¶
type BaremetalFixedAddress struct {
// Address
Addr string `json:"addr,required"`
// Interface name. This field will be `null` if `with_interfaces_name=true` is not
// set in the request when listing servers. It will also be `null` if the
// `interface_name` was not specified during server creation or when attaching the
// interface.
InterfaceName string `json:"interface_name,required"`
// The unique identifier of the subnet associated with this address.
SubnetID string `json:"subnet_id,required"`
// The name of the subnet associated with this address.
SubnetName string `json:"subnet_name,required"`
// Type of the address
Type constant.Fixed `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Addr respjson.Field
InterfaceName respjson.Field
SubnetID respjson.Field
SubnetName respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
IP addresses of the trunk port and its subports.
func (BaremetalFixedAddress) RawJSON ¶
func (r BaremetalFixedAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*BaremetalFixedAddress) UnmarshalJSON ¶
func (r *BaremetalFixedAddress) UnmarshalJSON(data []byte) error
type BaremetalFlavor ¶
type BaremetalFlavor struct {
// Flavor architecture type
Architecture string `json:"architecture,required"`
// Disabled flavor flag
Disabled bool `json:"disabled,required"`
// Flavor ID is the same as name
FlavorID string `json:"flavor_id,required"`
// Flavor name
FlavorName string `json:"flavor_name,required"`
// Flavor operating system
OsType string `json:"os_type,required"`
// RAM size in MiB
Ram int64 `json:"ram,required"`
// Flavor resource class for mapping to hardware capacity
ResourceClass string `json:"resource_class,required"`
// Virtual CPU count. For bare metal flavors, it's a physical CPU count
Vcpus int64 `json:"vcpus,required"`
// Number of available instances of given configuration
Capacity int64 `json:"capacity,nullable"`
// Currency code. Shown if the `include_prices` query parameter if set to true
CurrencyCode string `json:"currency_code,nullable"`
// Additional hardware description
HardwareDescription map[string]string `json:"hardware_description"`
// Price per hour. Shown if the `include_prices` query parameter if set to true
PricePerHour float64 `json:"price_per_hour,nullable"`
// Price per month. Shown if the `include_prices` query parameter if set to true
PricePerMonth float64 `json:"price_per_month,nullable"`
// Price status for the UI
//
// Any of "error", "hide", "show".
PriceStatus BaremetalFlavorPriceStatus `json:"price_status,nullable"`
// Count of reserved but not used nodes. If a client don't have reservations for
// the flavor, it's None.
ReservedInStock int64 `json:"reserved_in_stock,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Architecture respjson.Field
Disabled respjson.Field
FlavorID respjson.Field
FlavorName respjson.Field
OsType respjson.Field
Ram respjson.Field
ResourceClass respjson.Field
Vcpus respjson.Field
Capacity respjson.Field
CurrencyCode respjson.Field
HardwareDescription respjson.Field
PricePerHour respjson.Field
PricePerMonth respjson.Field
PriceStatus respjson.Field
ReservedInStock respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Bare metal flavor schema
func (BaremetalFlavor) RawJSON ¶
func (r BaremetalFlavor) RawJSON() string
Returns the unmodified JSON received from the API
func (*BaremetalFlavor) UnmarshalJSON ¶
func (r *BaremetalFlavor) UnmarshalJSON(data []byte) error
type BaremetalFlavorList ¶
type BaremetalFlavorList struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []BaremetalFlavor `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BaremetalFlavorList) RawJSON ¶
func (r BaremetalFlavorList) RawJSON() string
Returns the unmodified JSON received from the API
func (*BaremetalFlavorList) UnmarshalJSON ¶
func (r *BaremetalFlavorList) UnmarshalJSON(data []byte) error
type BaremetalFlavorListParams ¶
type BaremetalFlavorListParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Flag for filtering disabled flavors in the region. Defaults to true
Disabled param.Opt[bool] `query:"disabled,omitzero" json:"-"`
// Set to true to exclude flavors dedicated to linux images. Default False
ExcludeLinux param.Opt[bool] `query:"exclude_linux,omitzero" json:"-"`
// Set to true to exclude flavors dedicated to windows images. Default False
ExcludeWindows param.Opt[bool] `query:"exclude_windows,omitzero" json:"-"`
// Set to true if the response should include flavor capacity
IncludeCapacity param.Opt[bool] `query:"include_capacity,omitzero" json:"-"`
// Set to true if the response should include flavor prices
IncludePrices param.Opt[bool] `query:"include_prices,omitzero" json:"-"`
// Optional. Set to true if flavor listing should include count of reserved
// resources in stock.
IncludeReservationStock param.Opt[bool] `query:"include_reservation_stock,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (BaremetalFlavorListParams) URLQuery ¶
func (r BaremetalFlavorListParams) URLQuery() (v url.Values, err error)
URLQuery serializes BaremetalFlavorListParams's query parameters as `url.Values`.
type BaremetalFlavorPriceStatus ¶
type BaremetalFlavorPriceStatus string
Price status for the UI
const ( BaremetalFlavorPriceStatusError BaremetalFlavorPriceStatus = "error" BaremetalFlavorPriceStatusHide BaremetalFlavorPriceStatus = "hide" BaremetalFlavorPriceStatusShow BaremetalFlavorPriceStatus = "show" )
type BaremetalFlavorService ¶
type BaremetalFlavorService struct {
Options []option.RequestOption
}
BaremetalFlavorService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBaremetalFlavorService method instead.
func NewBaremetalFlavorService ¶
func NewBaremetalFlavorService(opts ...option.RequestOption) (r BaremetalFlavorService)
NewBaremetalFlavorService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BaremetalFlavorService) List ¶
func (r *BaremetalFlavorService) List(ctx context.Context, params BaremetalFlavorListParams, opts ...option.RequestOption) (res *BaremetalFlavorList, err error)
List all available bare metal flavors in the specified project and region. When `include_prices` is specified, the list includes pricing information. A client in trial mode gets all price values as 0. If you get Pricing Error contact the support.
type BaremetalFloatingAddress ¶
type BaremetalFloatingAddress struct {
// Address
Addr string `json:"addr,required"`
// Type of the address
Type constant.Floating `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Addr respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BaremetalFloatingAddress) RawJSON ¶
func (r BaremetalFloatingAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*BaremetalFloatingAddress) UnmarshalJSON ¶
func (r *BaremetalFloatingAddress) UnmarshalJSON(data []byte) error
type BaremetalImageListParams ¶
type BaremetalImageListParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Show price
IncludePrices param.Opt[bool] `query:"include_prices,omitzero" json:"-"`
// Any value to show private images
Private param.Opt[string] `query:"private,omitzero" json:"-"`
// Filter by tag key-value pairs. Must be a valid JSON string.
TagKeyValue param.Opt[string] `query:"tag_key_value,omitzero" json:"-"`
// Filter by tag keys.
TagKey []string `query:"tag_key,omitzero" json:"-"`
// Image visibility. Globally visible images are public
//
// Any of "private", "public", "shared".
Visibility BaremetalImageListParamsVisibility `query:"visibility,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (BaremetalImageListParams) URLQuery ¶
func (r BaremetalImageListParams) URLQuery() (v url.Values, err error)
URLQuery serializes BaremetalImageListParams's query parameters as `url.Values`.
type BaremetalImageListParamsVisibility ¶
type BaremetalImageListParamsVisibility string
Image visibility. Globally visible images are public
const ( BaremetalImageListParamsVisibilityPrivate BaremetalImageListParamsVisibility = "private" BaremetalImageListParamsVisibilityPublic BaremetalImageListParamsVisibility = "public" )
type BaremetalImageService ¶
type BaremetalImageService struct {
Options []option.RequestOption
}
BaremetalImageService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBaremetalImageService method instead.
func NewBaremetalImageService ¶
func NewBaremetalImageService(opts ...option.RequestOption) (r BaremetalImageService)
NewBaremetalImageService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BaremetalImageService) List ¶
func (r *BaremetalImageService) List(ctx context.Context, params BaremetalImageListParams, opts ...option.RequestOption) (res *ImageList, err error)
Retrieve a list of available images for bare metal servers. The list can be filtered by visibility, tags, and other parameters. Returned entities may or may not be owned by the project.
type BaremetalServer ¶
type BaremetalServer struct {
// Bare metal server ID
ID string `json:"id,required" format:"uuid4"`
// Map of `network_name` to list of addresses in that network
Addresses map[string][]BaremetalServerAddressUnion `json:"addresses,required"`
// IP addresses of the instances that are blackholed by DDoS mitigation system
BlackholePorts []BlackholePort `json:"blackhole_ports,required"`
// Datetime when bare metal server was created
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Task that created this entity
CreatorTaskID string `json:"creator_task_id,required"`
// Bare metal advanced DDoS protection profile. It is always `null` if query
// parameter `with_ddos=true` is not set.
DDOSProfile DDOSProfile `json:"ddos_profile,required"`
// Fixed IP assigned to instance
FixedIPAssignments []BaremetalServerFixedIPAssignment `json:"fixed_ip_assignments,required"`
// Flavor details
Flavor BaremetalServerFlavor `json:"flavor,required"`
// Instance isolation information
InstanceIsolation InstanceIsolation `json:"instance_isolation,required"`
// Bare metal server name
Name string `json:"name,required"`
// Project ID
ProjectID int64 `json:"project_id,required"`
// Region name
Region string `json:"region,required"`
// Region ID
RegionID int64 `json:"region_id,required"`
// SSH key assigned to bare metal server
SSHKeyName string `json:"ssh_key_name,required"`
// Bare metal server status
//
// Any of "ACTIVE", "BUILD", "DELETED", "ERROR", "HARD_REBOOT", "MIGRATING",
// "PASSWORD", "PAUSED", "REBOOT", "REBUILD", "RESCUE", "RESIZE", "REVERT_RESIZE",
// "SHELVED", "SHELVED_OFFLOADED", "SHUTOFF", "SOFT_DELETED", "SUSPENDED",
// "UNKNOWN", "VERIFY_RESIZE".
Status BaremetalServerStatus `json:"status,required"`
// List of key-value tags associated with the resource. A tag is a key-value pair
// that can be associated with a resource, enabling efficient filtering and
// grouping for better organization and management. Some tags are read-only and
// cannot be modified by the user. Tags are also integrated with cost reports,
// allowing cost data to be filtered based on tag keys or values.
Tags []Tag `json:"tags,required"`
// The UUID of the active task that currently holds a lock on the resource. This
// lock prevents concurrent modifications to ensure consistency. If `null`, the
// resource is not locked.
TaskID string `json:"task_id,required"`
// Task state
TaskState string `json:"task_state,required"`
// Bare metal server state
//
// Any of "active", "building", "deleted", "error", "paused", "rescued", "resized",
// "shelved", "shelved_offloaded", "soft-deleted", "stopped", "suspended".
VmState BaremetalServerVmState `json:"vm_state,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Addresses respjson.Field
BlackholePorts respjson.Field
CreatedAt respjson.Field
CreatorTaskID respjson.Field
DDOSProfile respjson.Field
FixedIPAssignments respjson.Field
Flavor respjson.Field
InstanceIsolation respjson.Field
Name respjson.Field
ProjectID respjson.Field
Region respjson.Field
RegionID respjson.Field
SSHKeyName respjson.Field
Status respjson.Field
Tags respjson.Field
TaskID respjson.Field
TaskState respjson.Field
VmState respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BaremetalServer) RawJSON ¶
func (r BaremetalServer) RawJSON() string
Returns the unmodified JSON received from the API
func (*BaremetalServer) UnmarshalJSON ¶
func (r *BaremetalServer) UnmarshalJSON(data []byte) error
type BaremetalServerAddressUnion ¶
type BaremetalServerAddressUnion struct {
Addr string `json:"addr"`
Type string `json:"type"`
// This field is from variant [BaremetalFixedAddress].
InterfaceName string `json:"interface_name"`
// This field is from variant [BaremetalFixedAddress].
SubnetID string `json:"subnet_id"`
// This field is from variant [BaremetalFixedAddress].
SubnetName string `json:"subnet_name"`
JSON struct {
Addr respjson.Field
Type respjson.Field
InterfaceName respjson.Field
SubnetID respjson.Field
SubnetName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
BaremetalServerAddressUnion contains all possible properties and values from BaremetalFloatingAddress, BaremetalFixedAddress.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (BaremetalServerAddressUnion) AsFixedIPAddress ¶
func (u BaremetalServerAddressUnion) AsFixedIPAddress() (v BaremetalFixedAddress)
func (BaremetalServerAddressUnion) AsFloatingIPAddress ¶
func (u BaremetalServerAddressUnion) AsFloatingIPAddress() (v BaremetalFloatingAddress)
func (BaremetalServerAddressUnion) RawJSON ¶
func (u BaremetalServerAddressUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*BaremetalServerAddressUnion) UnmarshalJSON ¶
func (r *BaremetalServerAddressUnion) UnmarshalJSON(data []byte) error
type BaremetalServerFixedIPAssignment ¶
type BaremetalServerFixedIPAssignment struct {
// Is network external
External bool `json:"external,required"`
// Ip address
IPAddress string `json:"ip_address,required"`
// Interface subnet id
SubnetID string `json:"subnet_id,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
External respjson.Field
IPAddress respjson.Field
SubnetID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BaremetalServerFixedIPAssignment) RawJSON ¶
func (r BaremetalServerFixedIPAssignment) RawJSON() string
Returns the unmodified JSON received from the API
func (*BaremetalServerFixedIPAssignment) UnmarshalJSON ¶
func (r *BaremetalServerFixedIPAssignment) UnmarshalJSON(data []byte) error
type BaremetalServerFlavor ¶
type BaremetalServerFlavor struct {
// CPU architecture
Architecture string `json:"architecture,required"`
// Flavor ID is the same as name
FlavorID string `json:"flavor_id,required"`
// Flavor name
FlavorName string `json:"flavor_name,required"`
// Additional hardware description
HardwareDescription BaremetalServerFlavorHardwareDescription `json:"hardware_description,required"`
// Operating system
OsType string `json:"os_type,required"`
// RAM size in MiB
Ram int64 `json:"ram,required"`
// Flavor resource class for mapping to hardware capacity
ResourceClass string `json:"resource_class,required"`
// Virtual CPU count. For bare metal flavors, it's a physical CPU count
Vcpus int64 `json:"vcpus,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Architecture respjson.Field
FlavorID respjson.Field
FlavorName respjson.Field
HardwareDescription respjson.Field
OsType respjson.Field
Ram respjson.Field
ResourceClass respjson.Field
Vcpus respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Flavor details
func (BaremetalServerFlavor) RawJSON ¶
func (r BaremetalServerFlavor) RawJSON() string
Returns the unmodified JSON received from the API
func (*BaremetalServerFlavor) UnmarshalJSON ¶
func (r *BaremetalServerFlavor) UnmarshalJSON(data []byte) error
type BaremetalServerFlavorHardwareDescription ¶
type BaremetalServerFlavorHardwareDescription struct {
// Human-readable CPU description
CPU string `json:"cpu,required"`
// Human-readable disk description
Disk string `json:"disk,required"`
// If the flavor is licensed, this field contains the license type
License string `json:"license,required"`
// Human-readable NIC description
Network string `json:"network,required"`
// Human-readable RAM description
Ram string `json:"ram,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CPU respjson.Field
Disk respjson.Field
License respjson.Field
Network respjson.Field
Ram respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Additional hardware description
func (BaremetalServerFlavorHardwareDescription) RawJSON ¶
func (r BaremetalServerFlavorHardwareDescription) RawJSON() string
Returns the unmodified JSON received from the API
func (*BaremetalServerFlavorHardwareDescription) UnmarshalJSON ¶
func (r *BaremetalServerFlavorHardwareDescription) UnmarshalJSON(data []byte) error
type BaremetalServerListParams ¶
type BaremetalServerListParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Filters the instances by a date and time stamp when the instances last changed.
ChangesBefore param.Opt[time.Time] `query:"changes-before,omitzero" format:"date-time" json:"-"`
// Filters the instances by a date and time stamp when the instances last changed
// status.
ChangesSince param.Opt[time.Time] `query:"changes-since,omitzero" format:"date-time" json:"-"`
// Filter out instances by `flavor_id`. Flavor id must match exactly.
FlavorID param.Opt[string] `query:"flavor_id,omitzero" json:"-"`
// Filter out instances by `flavor_prefix`.
FlavorPrefix param.Opt[string] `query:"flavor_prefix,omitzero" json:"-"`
// Include managed k8s worker nodes
IncludeK8s param.Opt[bool] `query:"include_k8s,omitzero" json:"-"`
// An IPv4 address to filter results by. Note: partial matches are allowed. For
// example, searching for 192.168.0.1 will return 192.168.0.1, 192.168.0.10,
// 192.168.0.110, and so on.
IP param.Opt[string] `query:"ip,omitzero" json:"-"`
// Optional. Limit the number of returned items
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Filter instances by name. You can provide a full or partial name, instances with
// matching names will be returned. For example, entering 'test' will return all
// instances that contain 'test' in their name.
Name param.Opt[string] `query:"name,omitzero" json:"-"`
// Optional. Offset value is used to exclude the first set of records from the
// result
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Include only isolated instances
OnlyIsolated param.Opt[bool] `query:"only_isolated,omitzero" json:"-"`
// Return bare metals only with external fixed IP addresses.
OnlyWithFixedExternalIP param.Opt[bool] `query:"only_with_fixed_external_ip,omitzero" json:"-"`
// Filter result by ddos protection profile name. Effective only with `with_ddos`
// set to true.
ProfileName param.Opt[string] `query:"profile_name,omitzero" json:"-"`
// Optional. Filter by tag key-value pairs.
TagKeyValue param.Opt[string] `query:"tag_key_value,omitzero" json:"-"`
// Filter the server list result by the UUID of the server. Allowed UUID part
Uuid param.Opt[string] `query:"uuid,omitzero" json:"-"`
// Include DDoS profile information for bare-metal servers in the response when set
// to `true`. Otherwise, the `ddos_profile` field in the response is `null` by
// default.
WithDDOS param.Opt[bool] `query:"with_ddos,omitzero" json:"-"`
// Include `interface_name` in the addresses
WithInterfacesName param.Opt[bool] `query:"with_interfaces_name,omitzero" json:"-"`
// Order by field and direction.
//
// Any of "created.asc", "created.desc", "name.asc", "name.desc", "status.asc",
// "status.desc".
OrderBy BaremetalServerListParamsOrderBy `query:"order_by,omitzero" json:"-"`
// Filter result by DDoS `protection_status`. Effective only with `with_ddos` set
// to true. (Active, Queued or Error)
//
// Any of "Active", "Queued", "Error".
ProtectionStatus BaremetalServerListParamsProtectionStatus `query:"protection_status,omitzero" json:"-"`
// Filters instances by a server status, as a string.
//
// Any of "ACTIVE", "BUILD", "ERROR", "HARD_REBOOT", "REBOOT", "REBUILD", "RESCUE",
// "SHUTOFF", "SUSPENDED".
Status BaremetalServerListParamsStatus `query:"status,omitzero" json:"-"`
// Optional. Filter by tag values. ?`tag_value`=value1&`tag_value`=value2
TagValue []string `query:"tag_value,omitzero" json:"-"`
// Return bare metals either only with advanced or only basic DDoS protection.
// Effective only with `with_ddos` set to true. (advanced or basic)
//
// Any of "basic", "advanced".
TypeDDOSProfile BaremetalServerListParamsTypeDDOSProfile `query:"type_ddos_profile,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (BaremetalServerListParams) URLQuery ¶
func (r BaremetalServerListParams) URLQuery() (v url.Values, err error)
URLQuery serializes BaremetalServerListParams's query parameters as `url.Values`.
type BaremetalServerListParamsOrderBy ¶
type BaremetalServerListParamsOrderBy string
Order by field and direction.
const ( BaremetalServerListParamsOrderByCreatedAsc BaremetalServerListParamsOrderBy = "created.asc" BaremetalServerListParamsOrderByCreatedDesc BaremetalServerListParamsOrderBy = "created.desc" BaremetalServerListParamsOrderByNameAsc BaremetalServerListParamsOrderBy = "name.asc" BaremetalServerListParamsOrderByNameDesc BaremetalServerListParamsOrderBy = "name.desc" BaremetalServerListParamsOrderByStatusAsc BaremetalServerListParamsOrderBy = "status.asc" BaremetalServerListParamsOrderByStatusDesc BaremetalServerListParamsOrderBy = "status.desc" )
type BaremetalServerListParamsProtectionStatus ¶
type BaremetalServerListParamsProtectionStatus string
Filter result by DDoS `protection_status`. Effective only with `with_ddos` set to true. (Active, Queued or Error)
const ( BaremetalServerListParamsProtectionStatusActive BaremetalServerListParamsProtectionStatus = "Active" BaremetalServerListParamsProtectionStatusQueued BaremetalServerListParamsProtectionStatus = "Queued" BaremetalServerListParamsProtectionStatusError BaremetalServerListParamsProtectionStatus = "Error" )
type BaremetalServerListParamsStatus ¶
type BaremetalServerListParamsStatus string
Filters instances by a server status, as a string.
const ( BaremetalServerListParamsStatusActive BaremetalServerListParamsStatus = "ACTIVE" BaremetalServerListParamsStatusBuild BaremetalServerListParamsStatus = "BUILD" BaremetalServerListParamsStatusError BaremetalServerListParamsStatus = "ERROR" BaremetalServerListParamsStatusHardReboot BaremetalServerListParamsStatus = "HARD_REBOOT" BaremetalServerListParamsStatusReboot BaremetalServerListParamsStatus = "REBOOT" BaremetalServerListParamsStatusRebuild BaremetalServerListParamsStatus = "REBUILD" BaremetalServerListParamsStatusRescue BaremetalServerListParamsStatus = "RESCUE" BaremetalServerListParamsStatusShutoff BaremetalServerListParamsStatus = "SHUTOFF" BaremetalServerListParamsStatusSuspended BaremetalServerListParamsStatus = "SUSPENDED" )
type BaremetalServerListParamsTypeDDOSProfile ¶
type BaremetalServerListParamsTypeDDOSProfile string
Return bare metals either only with advanced or only basic DDoS protection. Effective only with `with_ddos` set to true. (advanced or basic)
const ( BaremetalServerListParamsTypeDDOSProfileBasic BaremetalServerListParamsTypeDDOSProfile = "basic" BaremetalServerListParamsTypeDDOSProfileAdvanced BaremetalServerListParamsTypeDDOSProfile = "advanced" )
type BaremetalServerNewParams ¶
type BaremetalServerNewParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// The flavor of the instance.
Flavor string `json:"flavor,required"`
// A list of network interfaces for the server. You can create one or more
// interfaces - private, public, or both.
Interfaces []BaremetalServerNewParamsInterfaceUnion `json:"interfaces,omitzero,required"`
// Specifies the name of the SSH keypair, created via the
// [/v1/`ssh_keys` endpoint](/docs/api-reference/cloud/ssh-keys/add-or-generate-ssh-key).
SSHKeyName param.Opt[string] `json:"ssh_key_name,omitzero"`
// Apptemplate ID. Either `image_id` or `apptemplate_id` is required.
ApptemplateID param.Opt[string] `json:"apptemplate_id,omitzero"`
// Image ID. Either `image_id` or `apptemplate_id` is required.
ImageID param.Opt[string] `json:"image_id,omitzero" format:"uuid4"`
// Server name.
Name param.Opt[string] `json:"name,omitzero"`
// If you want server names to be automatically generated based on IP addresses,
// you can provide a name template instead of specifying the name manually. The
// template should include a placeholder that will be replaced during provisioning.
// Supported placeholders are: `{`ip_octets`}` (last 3 octets of the IP),
// `{`two_ip_octets`}`, and `{`one_ip_octet`}`.
NameTemplate param.Opt[string] `json:"name_template,omitzero"`
// For Linux instances, 'username' and 'password' are used to create a new user.
// When only 'password' is provided, it is set as the password for the default user
// of the image. For Windows instances, 'username' cannot be specified. Use the
// 'password' field to set the password for the 'Admin' user on Windows. Use the
// '`user_data`' field to provide a script to create new users on Windows. The
// password of the Admin user cannot be updated via '`user_data`'.
Password param.Opt[string] `json:"password,omitzero"`
// String in base64 format. For Linux instances, '`user_data`' is ignored when
// 'password' field is provided. For Windows instances, Admin user password is set
// by 'password' field and cannot be updated via '`user_data`'. Examples of the
// `user_data`: https://cloudinit.readthedocs.io/en/latest/topics/examples.html
UserData param.Opt[string] `json:"user_data,omitzero"`
// For Linux instances, 'username' and 'password' are used to create a new user.
// For Windows instances, 'username' cannot be specified. Use 'password' field to
// set the password for the 'Admin' user on Windows.
Username param.Opt[string] `json:"username,omitzero"`
// Parameters for the application template if creating the instance from an
// `apptemplate`.
AppConfig any `json:"app_config,omitzero"`
// Enable advanced DDoS protection for the server
DDOSProfile BaremetalServerNewParamsDDOSProfile `json:"ddos_profile,omitzero"`
// Key-value tags to associate with the resource. A tag is a key-value pair that
// can be associated with a resource, enabling efficient filtering and grouping for
// better organization and management. Some tags are read-only and cannot be
// modified by the user. Tags are also integrated with cost reports, allowing cost
// data to be filtered based on tag keys or values.
Tags map[string]string `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (BaremetalServerNewParams) MarshalJSON ¶
func (r BaremetalServerNewParams) MarshalJSON() (data []byte, err error)
func (*BaremetalServerNewParams) UnmarshalJSON ¶
func (r *BaremetalServerNewParams) UnmarshalJSON(data []byte) error
type BaremetalServerNewParamsDDOSProfile ¶
type BaremetalServerNewParamsDDOSProfile struct {
// Advanced DDoS template ID
ProfileTemplate int64 `json:"profile_template,required"`
// DDoS profile parameters
Fields []BaremetalServerNewParamsDDOSProfileField `json:"fields,omitzero"`
// contains filtered or unexported fields
}
Enable advanced DDoS protection for the server
The property ProfileTemplate is required.
func (BaremetalServerNewParamsDDOSProfile) MarshalJSON ¶
func (r BaremetalServerNewParamsDDOSProfile) MarshalJSON() (data []byte, err error)
func (*BaremetalServerNewParamsDDOSProfile) UnmarshalJSON ¶
func (r *BaremetalServerNewParamsDDOSProfile) UnmarshalJSON(data []byte) error
type BaremetalServerNewParamsDDOSProfileField ¶
type BaremetalServerNewParamsDDOSProfileField struct {
// ID of DDoS profile field
BaseField param.Opt[int64] `json:"base_field,omitzero"`
// Name of DDoS profile field
FieldName param.Opt[string] `json:"field_name,omitzero"`
// Basic type value. Only one of 'value' or '`field_value`' must be specified.
//
// Deprecated: deprecated
Value param.Opt[string] `json:"value,omitzero"`
// Complex value. Only one of 'value' or '`field_value`' must be specified.
FieldValue BaremetalServerNewParamsDDOSProfileFieldFieldValueUnion `json:"field_value,omitzero"`
// contains filtered or unexported fields
}
func (BaremetalServerNewParamsDDOSProfileField) MarshalJSON ¶
func (r BaremetalServerNewParamsDDOSProfileField) MarshalJSON() (data []byte, err error)
func (*BaremetalServerNewParamsDDOSProfileField) UnmarshalJSON ¶
func (r *BaremetalServerNewParamsDDOSProfileField) UnmarshalJSON(data []byte) error
type BaremetalServerNewParamsDDOSProfileFieldFieldValueUnion ¶
type BaremetalServerNewParamsDDOSProfileFieldFieldValueUnion struct {
OfAnyArray []any `json:",omitzero,inline"`
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BaremetalServerNewParamsDDOSProfileFieldFieldValueUnion) MarshalJSON ¶
func (u BaremetalServerNewParamsDDOSProfileFieldFieldValueUnion) MarshalJSON() ([]byte, error)
func (*BaremetalServerNewParamsDDOSProfileFieldFieldValueUnion) UnmarshalJSON ¶
func (u *BaremetalServerNewParamsDDOSProfileFieldFieldValueUnion) UnmarshalJSON(data []byte) error
type BaremetalServerNewParamsInterfaceAnySubnet ¶
type BaremetalServerNewParamsInterfaceAnySubnet struct {
// The network where the instance will be connected.
NetworkID string `json:"network_id,required" format:"uuid4"`
// Interface name. Defaults to `null` and is returned as `null` in the API response
// if not set.
InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
// You can specify a specific IP address from your subnet.
IPAddress param.Opt[string] `json:"ip_address,omitzero" format:"ipvanyaddress"`
// Specifies the trunk group to which this interface belongs. Applicable only for
// bare metal servers. Each unique port group is mapped to a separate trunk port.
// Use this to control how interfaces are grouped across trunks.
PortGroup param.Opt[int64] `json:"port_group,omitzero"`
// Allows the instance to have a public IP that can be reached from the internet.
FloatingIP BaremetalServerNewParamsInterfaceAnySubnetFloatingIPUnion `json:"floating_ip,omitzero"`
// Specify `ipv4`, `ipv6`, or `dual` to enable both.
//
// Any of "dual", "ipv4", "ipv6".
IPFamily InterfaceIPFamily `json:"ip_family,omitzero"`
// Instance will be attached to a subnet with the largest count of free IPs.
//
// This field can be elided, and will marshal its zero value as "any_subnet".
Type constant.AnySubnet `json:"type,required"`
// contains filtered or unexported fields
}
The properties NetworkID, Type are required.
func (BaremetalServerNewParamsInterfaceAnySubnet) MarshalJSON ¶
func (r BaremetalServerNewParamsInterfaceAnySubnet) MarshalJSON() (data []byte, err error)
func (*BaremetalServerNewParamsInterfaceAnySubnet) UnmarshalJSON ¶
func (r *BaremetalServerNewParamsInterfaceAnySubnet) UnmarshalJSON(data []byte) error
type BaremetalServerNewParamsInterfaceAnySubnetFloatingIPExisting ¶
type BaremetalServerNewParamsInterfaceAnySubnetFloatingIPExisting struct {
// An existing available floating IP id must be specified if the source is set to
// `existing`
ExistingFloatingID string `json:"existing_floating_id,required" format:"uuid4"`
// An existing available floating IP will be attached to the instance. A floating
// IP is a public IP that makes the instance accessible from the internet, even if
// it only has a private IP. It works like SNAT, allowing outgoing and incoming
// traffic.
//
// This field can be elided, and will marshal its zero value as "existing".
Source constant.Existing `json:"source,required"`
// contains filtered or unexported fields
}
The properties ExistingFloatingID, Source are required.
func (BaremetalServerNewParamsInterfaceAnySubnetFloatingIPExisting) MarshalJSON ¶
func (r BaremetalServerNewParamsInterfaceAnySubnetFloatingIPExisting) MarshalJSON() (data []byte, err error)
func (*BaremetalServerNewParamsInterfaceAnySubnetFloatingIPExisting) UnmarshalJSON ¶
func (r *BaremetalServerNewParamsInterfaceAnySubnetFloatingIPExisting) UnmarshalJSON(data []byte) error
type BaremetalServerNewParamsInterfaceAnySubnetFloatingIPNew ¶
type BaremetalServerNewParamsInterfaceAnySubnetFloatingIPNew struct {
// A new floating IP will be created and attached to the instance. A floating IP is
// a public IP that makes the instance accessible from the internet, even if it
// only has a private IP. It works like SNAT, allowing outgoing and incoming
// traffic.
Source constant.New `json:"source,required"`
// contains filtered or unexported fields
}
This struct has a constant value, construct it with NewBaremetalServerNewParamsInterfaceAnySubnetFloatingIPNew.
func NewBaremetalServerNewParamsInterfaceAnySubnetFloatingIPNew ¶
func NewBaremetalServerNewParamsInterfaceAnySubnetFloatingIPNew() BaremetalServerNewParamsInterfaceAnySubnetFloatingIPNew
func (BaremetalServerNewParamsInterfaceAnySubnetFloatingIPNew) MarshalJSON ¶
func (r BaremetalServerNewParamsInterfaceAnySubnetFloatingIPNew) MarshalJSON() (data []byte, err error)
func (*BaremetalServerNewParamsInterfaceAnySubnetFloatingIPNew) UnmarshalJSON ¶
func (r *BaremetalServerNewParamsInterfaceAnySubnetFloatingIPNew) UnmarshalJSON(data []byte) error
type BaremetalServerNewParamsInterfaceAnySubnetFloatingIPUnion ¶
type BaremetalServerNewParamsInterfaceAnySubnetFloatingIPUnion struct {
OfNew *BaremetalServerNewParamsInterfaceAnySubnetFloatingIPNew `json:",omitzero,inline"`
OfExisting *BaremetalServerNewParamsInterfaceAnySubnetFloatingIPExisting `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BaremetalServerNewParamsInterfaceAnySubnetFloatingIPUnion) GetExistingFloatingID ¶
func (u BaremetalServerNewParamsInterfaceAnySubnetFloatingIPUnion) GetExistingFloatingID() *string
Returns a pointer to the underlying variant's property, if present.
func (BaremetalServerNewParamsInterfaceAnySubnetFloatingIPUnion) GetSource ¶
func (u BaremetalServerNewParamsInterfaceAnySubnetFloatingIPUnion) GetSource() *string
Returns a pointer to the underlying variant's property, if present.
func (BaremetalServerNewParamsInterfaceAnySubnetFloatingIPUnion) MarshalJSON ¶
func (u BaremetalServerNewParamsInterfaceAnySubnetFloatingIPUnion) MarshalJSON() ([]byte, error)
func (*BaremetalServerNewParamsInterfaceAnySubnetFloatingIPUnion) UnmarshalJSON ¶
func (u *BaremetalServerNewParamsInterfaceAnySubnetFloatingIPUnion) UnmarshalJSON(data []byte) error
type BaremetalServerNewParamsInterfaceExternal ¶
type BaremetalServerNewParamsInterfaceExternal struct {
// Interface name. Defaults to `null` and is returned as `null` in the API response
// if not set.
InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
// Specifies the trunk group to which this interface belongs. Applicable only for
// bare metal servers. Each unique port group is mapped to a separate trunk port.
// Use this to control how interfaces are grouped across trunks.
PortGroup param.Opt[int64] `json:"port_group,omitzero"`
// Specify `ipv4`, `ipv6`, or `dual` to enable both.
//
// Any of "dual", "ipv4", "ipv6".
IPFamily InterfaceIPFamily `json:"ip_family,omitzero"`
// A public IP address will be assigned to the instance.
//
// This field can be elided, and will marshal its zero value as "external".
Type constant.External `json:"type,required"`
// contains filtered or unexported fields
}
Instance will be attached to default external network
The property Type is required.
func (BaremetalServerNewParamsInterfaceExternal) MarshalJSON ¶
func (r BaremetalServerNewParamsInterfaceExternal) MarshalJSON() (data []byte, err error)
func (*BaremetalServerNewParamsInterfaceExternal) UnmarshalJSON ¶
func (r *BaremetalServerNewParamsInterfaceExternal) UnmarshalJSON(data []byte) error
type BaremetalServerNewParamsInterfaceReservedFixedIP ¶
type BaremetalServerNewParamsInterfaceReservedFixedIP struct {
// Network ID the subnet belongs to. Port will be plugged in this network.
PortID string `json:"port_id,required"`
// Interface name. Defaults to `null` and is returned as `null` in the API response
// if not set.
InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
// Specifies the trunk group to which this interface belongs. Applicable only for
// bare metal servers. Each unique port group is mapped to a separate trunk port.
// Use this to control how interfaces are grouped across trunks.
PortGroup param.Opt[int64] `json:"port_group,omitzero"`
// Allows the instance to have a public IP that can be reached from the internet.
FloatingIP BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPUnion `json:"floating_ip,omitzero"`
// An existing available reserved fixed IP will be attached to the instance. If the
// reserved IP is not public and you choose to add a floating IP, the instance will
// be accessible from the internet.
//
// This field can be elided, and will marshal its zero value as
// "reserved_fixed_ip".
Type constant.ReservedFixedIP `json:"type,required"`
// contains filtered or unexported fields
}
The properties PortID, Type are required.
func (BaremetalServerNewParamsInterfaceReservedFixedIP) MarshalJSON ¶
func (r BaremetalServerNewParamsInterfaceReservedFixedIP) MarshalJSON() (data []byte, err error)
func (*BaremetalServerNewParamsInterfaceReservedFixedIP) UnmarshalJSON ¶
func (r *BaremetalServerNewParamsInterfaceReservedFixedIP) UnmarshalJSON(data []byte) error
type BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPExisting ¶
type BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPExisting struct {
// An existing available floating IP id must be specified if the source is set to
// `existing`
ExistingFloatingID string `json:"existing_floating_id,required" format:"uuid4"`
// An existing available floating IP will be attached to the instance. A floating
// IP is a public IP that makes the instance accessible from the internet, even if
// it only has a private IP. It works like SNAT, allowing outgoing and incoming
// traffic.
//
// This field can be elided, and will marshal its zero value as "existing".
Source constant.Existing `json:"source,required"`
// contains filtered or unexported fields
}
The properties ExistingFloatingID, Source are required.
func (BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPExisting) MarshalJSON ¶
func (r BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPExisting) MarshalJSON() (data []byte, err error)
func (*BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPExisting) UnmarshalJSON ¶
func (r *BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPExisting) UnmarshalJSON(data []byte) error
type BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPNew ¶
type BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPNew struct {
// A new floating IP will be created and attached to the instance. A floating IP is
// a public IP that makes the instance accessible from the internet, even if it
// only has a private IP. It works like SNAT, allowing outgoing and incoming
// traffic.
Source constant.New `json:"source,required"`
// contains filtered or unexported fields
}
This struct has a constant value, construct it with NewBaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPNew.
func NewBaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPNew ¶
func NewBaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPNew() BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPNew
func (BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPNew) MarshalJSON ¶
func (r BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPNew) MarshalJSON() (data []byte, err error)
func (*BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPNew) UnmarshalJSON ¶
func (r *BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPNew) UnmarshalJSON(data []byte) error
type BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPUnion ¶
type BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPUnion struct {
OfNew *BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPNew `json:",omitzero,inline"`
OfExisting *BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPExisting `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPUnion) GetExistingFloatingID ¶
func (u BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPUnion) GetExistingFloatingID() *string
Returns a pointer to the underlying variant's property, if present.
func (BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPUnion) GetSource ¶
func (u BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPUnion) GetSource() *string
Returns a pointer to the underlying variant's property, if present.
func (BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPUnion) MarshalJSON ¶
func (u BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPUnion) MarshalJSON() ([]byte, error)
func (*BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPUnion) UnmarshalJSON ¶
func (u *BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPUnion) UnmarshalJSON(data []byte) error
type BaremetalServerNewParamsInterfaceSubnet ¶
type BaremetalServerNewParamsInterfaceSubnet struct {
// The network where the instance will be connected.
NetworkID string `json:"network_id,required" format:"uuid4"`
// The instance will get an IP address from this subnet.
SubnetID string `json:"subnet_id,required" format:"uuid4"`
// Interface name. Defaults to `null` and is returned as `null` in the API response
// if not set.
InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
// Specifies the trunk group to which this interface belongs. Applicable only for
// bare metal servers. Each unique port group is mapped to a separate trunk port.
// Use this to control how interfaces are grouped across trunks.
PortGroup param.Opt[int64] `json:"port_group,omitzero"`
// Allows the instance to have a public IP that can be reached from the internet.
FloatingIP BaremetalServerNewParamsInterfaceSubnetFloatingIPUnion `json:"floating_ip,omitzero"`
// The instance will get an IP address from the selected network. If you choose to
// add a floating IP, the instance will be reachable from the internet. Otherwise,
// it will only have a private IP within the network.
//
// This field can be elided, and will marshal its zero value as "subnet".
Type constant.Subnet `json:"type,required"`
// contains filtered or unexported fields
}
The instance will get an IP address from the selected network. If you choose to add a floating IP, the instance will be reachable from the internet. Otherwise, it will only have a private IP within the network.
The properties NetworkID, SubnetID, Type are required.
func (BaremetalServerNewParamsInterfaceSubnet) MarshalJSON ¶
func (r BaremetalServerNewParamsInterfaceSubnet) MarshalJSON() (data []byte, err error)
func (*BaremetalServerNewParamsInterfaceSubnet) UnmarshalJSON ¶
func (r *BaremetalServerNewParamsInterfaceSubnet) UnmarshalJSON(data []byte) error
type BaremetalServerNewParamsInterfaceSubnetFloatingIPExisting ¶
type BaremetalServerNewParamsInterfaceSubnetFloatingIPExisting struct {
// An existing available floating IP id must be specified if the source is set to
// `existing`
ExistingFloatingID string `json:"existing_floating_id,required" format:"uuid4"`
// An existing available floating IP will be attached to the instance. A floating
// IP is a public IP that makes the instance accessible from the internet, even if
// it only has a private IP. It works like SNAT, allowing outgoing and incoming
// traffic.
//
// This field can be elided, and will marshal its zero value as "existing".
Source constant.Existing `json:"source,required"`
// contains filtered or unexported fields
}
The properties ExistingFloatingID, Source are required.
func (BaremetalServerNewParamsInterfaceSubnetFloatingIPExisting) MarshalJSON ¶
func (r BaremetalServerNewParamsInterfaceSubnetFloatingIPExisting) MarshalJSON() (data []byte, err error)
func (*BaremetalServerNewParamsInterfaceSubnetFloatingIPExisting) UnmarshalJSON ¶
func (r *BaremetalServerNewParamsInterfaceSubnetFloatingIPExisting) UnmarshalJSON(data []byte) error
type BaremetalServerNewParamsInterfaceSubnetFloatingIPNew ¶
type BaremetalServerNewParamsInterfaceSubnetFloatingIPNew struct {
// A new floating IP will be created and attached to the instance. A floating IP is
// a public IP that makes the instance accessible from the internet, even if it
// only has a private IP. It works like SNAT, allowing outgoing and incoming
// traffic.
Source constant.New `json:"source,required"`
// contains filtered or unexported fields
}
This struct has a constant value, construct it with NewBaremetalServerNewParamsInterfaceSubnetFloatingIPNew.
func NewBaremetalServerNewParamsInterfaceSubnetFloatingIPNew ¶
func NewBaremetalServerNewParamsInterfaceSubnetFloatingIPNew() BaremetalServerNewParamsInterfaceSubnetFloatingIPNew
func (BaremetalServerNewParamsInterfaceSubnetFloatingIPNew) MarshalJSON ¶
func (r BaremetalServerNewParamsInterfaceSubnetFloatingIPNew) MarshalJSON() (data []byte, err error)
func (*BaremetalServerNewParamsInterfaceSubnetFloatingIPNew) UnmarshalJSON ¶
func (r *BaremetalServerNewParamsInterfaceSubnetFloatingIPNew) UnmarshalJSON(data []byte) error
type BaremetalServerNewParamsInterfaceSubnetFloatingIPUnion ¶
type BaremetalServerNewParamsInterfaceSubnetFloatingIPUnion struct {
OfNew *BaremetalServerNewParamsInterfaceSubnetFloatingIPNew `json:",omitzero,inline"`
OfExisting *BaremetalServerNewParamsInterfaceSubnetFloatingIPExisting `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BaremetalServerNewParamsInterfaceSubnetFloatingIPUnion) GetExistingFloatingID ¶
func (u BaremetalServerNewParamsInterfaceSubnetFloatingIPUnion) GetExistingFloatingID() *string
Returns a pointer to the underlying variant's property, if present.
func (BaremetalServerNewParamsInterfaceSubnetFloatingIPUnion) GetSource ¶
func (u BaremetalServerNewParamsInterfaceSubnetFloatingIPUnion) GetSource() *string
Returns a pointer to the underlying variant's property, if present.
func (BaremetalServerNewParamsInterfaceSubnetFloatingIPUnion) MarshalJSON ¶
func (u BaremetalServerNewParamsInterfaceSubnetFloatingIPUnion) MarshalJSON() ([]byte, error)
func (*BaremetalServerNewParamsInterfaceSubnetFloatingIPUnion) UnmarshalJSON ¶
func (u *BaremetalServerNewParamsInterfaceSubnetFloatingIPUnion) UnmarshalJSON(data []byte) error
type BaremetalServerNewParamsInterfaceUnion ¶
type BaremetalServerNewParamsInterfaceUnion struct {
OfExternal *BaremetalServerNewParamsInterfaceExternal `json:",omitzero,inline"`
OfSubnet *BaremetalServerNewParamsInterfaceSubnet `json:",omitzero,inline"`
OfAnySubnet *BaremetalServerNewParamsInterfaceAnySubnet `json:",omitzero,inline"`
OfReservedFixedIP *BaremetalServerNewParamsInterfaceReservedFixedIP `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BaremetalServerNewParamsInterfaceUnion) GetFloatingIP ¶
func (u BaremetalServerNewParamsInterfaceUnion) GetFloatingIP() (res baremetalServerNewParamsInterfaceUnionFloatingIP)
Returns a subunion which exports methods to access subproperties
Or use AsAny() to get the underlying value
func (BaremetalServerNewParamsInterfaceUnion) GetIPAddress ¶
func (u BaremetalServerNewParamsInterfaceUnion) GetIPAddress() *string
Returns a pointer to the underlying variant's property, if present.
func (BaremetalServerNewParamsInterfaceUnion) GetIPFamily ¶
func (u BaremetalServerNewParamsInterfaceUnion) GetIPFamily() *string
Returns a pointer to the underlying variant's property, if present.
func (BaremetalServerNewParamsInterfaceUnion) GetInterfaceName ¶
func (u BaremetalServerNewParamsInterfaceUnion) GetInterfaceName() *string
Returns a pointer to the underlying variant's property, if present.
func (BaremetalServerNewParamsInterfaceUnion) GetNetworkID ¶
func (u BaremetalServerNewParamsInterfaceUnion) GetNetworkID() *string
Returns a pointer to the underlying variant's property, if present.
func (BaremetalServerNewParamsInterfaceUnion) GetPortGroup ¶
func (u BaremetalServerNewParamsInterfaceUnion) GetPortGroup() *int64
Returns a pointer to the underlying variant's property, if present.
func (BaremetalServerNewParamsInterfaceUnion) GetPortID ¶
func (u BaremetalServerNewParamsInterfaceUnion) GetPortID() *string
Returns a pointer to the underlying variant's property, if present.
func (BaremetalServerNewParamsInterfaceUnion) GetSubnetID ¶
func (u BaremetalServerNewParamsInterfaceUnion) GetSubnetID() *string
Returns a pointer to the underlying variant's property, if present.
func (BaremetalServerNewParamsInterfaceUnion) GetType ¶
func (u BaremetalServerNewParamsInterfaceUnion) GetType() *string
Returns a pointer to the underlying variant's property, if present.
func (BaremetalServerNewParamsInterfaceUnion) MarshalJSON ¶
func (u BaremetalServerNewParamsInterfaceUnion) MarshalJSON() ([]byte, error)
func (*BaremetalServerNewParamsInterfaceUnion) UnmarshalJSON ¶
func (u *BaremetalServerNewParamsInterfaceUnion) UnmarshalJSON(data []byte) error
type BaremetalServerRebuildParams ¶
type BaremetalServerRebuildParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Image ID
ImageID param.Opt[string] `json:"image_id,omitzero"`
// String in base64 format. Must not be passed together with 'username' or
// 'password'. Examples of the `user_data`:
// https://cloudinit.readthedocs.io/en/latest/topics/examples.html
UserData param.Opt[string] `json:"user_data,omitzero"`
// contains filtered or unexported fields
}
func (BaremetalServerRebuildParams) MarshalJSON ¶
func (r BaremetalServerRebuildParams) MarshalJSON() (data []byte, err error)
func (*BaremetalServerRebuildParams) UnmarshalJSON ¶
func (r *BaremetalServerRebuildParams) UnmarshalJSON(data []byte) error
type BaremetalServerService ¶
type BaremetalServerService struct {
Options []option.RequestOption
// contains filtered or unexported fields
}
BaremetalServerService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBaremetalServerService method instead.
func NewBaremetalServerService ¶
func NewBaremetalServerService(opts ...option.RequestOption) (r BaremetalServerService)
NewBaremetalServerService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BaremetalServerService) List ¶
func (r *BaremetalServerService) List(ctx context.Context, params BaremetalServerListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[BaremetalServer], err error)
List all bare metal servers in the specified project and region. Results can be filtered by various parameters like name, status, and IP address.
func (*BaremetalServerService) ListAutoPaging ¶
func (r *BaremetalServerService) ListAutoPaging(ctx context.Context, params BaremetalServerListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[BaremetalServer]
List all bare metal servers in the specified project and region. Results can be filtered by various parameters like name, status, and IP address.
func (*BaremetalServerService) New ¶
func (r *BaremetalServerService) New(ctx context.Context, params BaremetalServerNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Create a new bare metal server with the specified configuration. How to get access: For Linux,
- Use the `user_data` field to provide a [cloud-init script](https://cloudinit.readthedocs.io/en/latest/reference/examples.html) in base64 to apply configurations to the instance.
- Specify the `username` and `password` to create a new user.
- When only `password` is provided, it is set as the password for the default user of the image.
- The `user_data` is ignored when the `password` is specified. For Windows,
- Use the `user_data` field to provide a [cloudbase-init script](https://cloudbase-init.readthedocs.io/en/latest/userdata.html#cloud-config) in base64 to create new users on Windows.
- Use the `password` field to set the password for the 'Admin' user on Windows.
- The password of the Admin user cannot be updated via `user_data`.
- The `username` cannot be specified in the request.
func (*BaremetalServerService) NewAndPoll ¶ added in v0.2.0
func (r *BaremetalServerService) NewAndPoll(ctx context.Context, params BaremetalServerNewParams, opts ...option.RequestOption) (v *BaremetalServer, err error)
NewAndPoll create bare metal server and poll for the result
func (*BaremetalServerService) Rebuild ¶
func (r *BaremetalServerService) Rebuild(ctx context.Context, serverID string, params BaremetalServerRebuildParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Rebuild a bare metal server with a new image while preserving its configuration.
func (*BaremetalServerService) RebuildAndPoll ¶ added in v0.2.0
func (r *BaremetalServerService) RebuildAndPoll(ctx context.Context, serverID string, params BaremetalServerRebuildParams, opts ...option.RequestOption) (v *BaremetalServer, err error)
RebuildAndPoll rebuild bare metal server and poll for the completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
type BaremetalServerStatus ¶
type BaremetalServerStatus string
Bare metal server status
const ( BaremetalServerStatusActive BaremetalServerStatus = "ACTIVE" BaremetalServerStatusBuild BaremetalServerStatus = "BUILD" BaremetalServerStatusDeleted BaremetalServerStatus = "DELETED" BaremetalServerStatusError BaremetalServerStatus = "ERROR" BaremetalServerStatusHardReboot BaremetalServerStatus = "HARD_REBOOT" BaremetalServerStatusMigrating BaremetalServerStatus = "MIGRATING" BaremetalServerStatusPassword BaremetalServerStatus = "PASSWORD" BaremetalServerStatusPaused BaremetalServerStatus = "PAUSED" BaremetalServerStatusReboot BaremetalServerStatus = "REBOOT" BaremetalServerStatusRebuild BaremetalServerStatus = "REBUILD" BaremetalServerStatusRescue BaremetalServerStatus = "RESCUE" BaremetalServerStatusResize BaremetalServerStatus = "RESIZE" BaremetalServerStatusRevertResize BaremetalServerStatus = "REVERT_RESIZE" BaremetalServerStatusShelved BaremetalServerStatus = "SHELVED" BaremetalServerStatusShelvedOffloaded BaremetalServerStatus = "SHELVED_OFFLOADED" BaremetalServerStatusShutoff BaremetalServerStatus = "SHUTOFF" BaremetalServerStatusSoftDeleted BaremetalServerStatus = "SOFT_DELETED" BaremetalServerStatusSuspended BaremetalServerStatus = "SUSPENDED" BaremetalServerStatusUnknown BaremetalServerStatus = "UNKNOWN" BaremetalServerStatusVerifyResize BaremetalServerStatus = "VERIFY_RESIZE" )
type BaremetalServerVmState ¶
type BaremetalServerVmState string
Bare metal server state
const ( BaremetalServerVmStateActive BaremetalServerVmState = "active" BaremetalServerVmStateBuilding BaremetalServerVmState = "building" BaremetalServerVmStateDeleted BaremetalServerVmState = "deleted" BaremetalServerVmStateError BaremetalServerVmState = "error" BaremetalServerVmStatePaused BaremetalServerVmState = "paused" BaremetalServerVmStateRescued BaremetalServerVmState = "rescued" BaremetalServerVmStateResized BaremetalServerVmState = "resized" BaremetalServerVmStateShelved BaremetalServerVmState = "shelved" BaremetalServerVmStateShelvedOffloaded BaremetalServerVmState = "shelved_offloaded" BaremetalServerVmStateSoftDeleted BaremetalServerVmState = "soft-deleted" BaremetalServerVmStateStopped BaremetalServerVmState = "stopped" BaremetalServerVmStateSuspended BaremetalServerVmState = "suspended" )
type BaremetalService ¶
type BaremetalService struct {
Options []option.RequestOption
Images BaremetalImageService
Flavors BaremetalFlavorService
Servers BaremetalServerService
}
BaremetalService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBaremetalService method instead.
func NewBaremetalService ¶
func NewBaremetalService(opts ...option.RequestOption) (r BaremetalService)
NewBaremetalService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type BillingReservation ¶
type BillingReservation struct {
// Reservation id
ID int64 `json:"id,required"`
// Reservation active from date
ActiveFrom time.Time `json:"active_from,required" format:"date"`
// Reservation active to date
ActiveTo time.Time `json:"active_to,required" format:"date"`
// Name of the billing period, e.g month
ActivityPeriod string `json:"activity_period,required"`
// Length of the full reservation period by `activity_period`
ActivityPeriodLength int64 `json:"activity_period_length,required"`
// Reservation amount prices
AmountPrices BillingReservationAmountPrices `json:"amount_prices,required"`
// Billing plan id
BillingPlanID int64 `json:"billing_plan_id,required"`
// Reservation creation date
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Error message if any occured during reservation
Error string `json:"error,required"`
// ETA delivery if bare metal out of stock. Value None means that bare metal in
// stock.
Eta time.Time `json:"eta,required" format:"date"`
// Hide or show expiration message to customer.
IsExpirationMessageVisible bool `json:"is_expiration_message_visible,required"`
// Reservation name
Name string `json:"name,required"`
// List of possible next reservation statuses
NextStatuses []string `json:"next_statuses,required"`
// Region id
RegionID int64 `json:"region_id,required"`
// Region name
RegionName string `json:"region_name,required"`
// The date when show expiration date to customer
RemindExpirationMessage time.Time `json:"remind_expiration_message,required" format:"date"`
// List of reservation resources
Resources []BillingReservationResource `json:"resources,required"`
// Reservation status
Status string `json:"status,required"`
// User status
UserStatus string `json:"user_status,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ActiveFrom respjson.Field
ActiveTo respjson.Field
ActivityPeriod respjson.Field
ActivityPeriodLength respjson.Field
AmountPrices respjson.Field
BillingPlanID respjson.Field
CreatedAt respjson.Field
Error respjson.Field
Eta respjson.Field
IsExpirationMessageVisible respjson.Field
Name respjson.Field
NextStatuses respjson.Field
RegionID respjson.Field
RegionName respjson.Field
RemindExpirationMessage respjson.Field
Resources respjson.Field
Status respjson.Field
UserStatus respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BillingReservation) RawJSON ¶
func (r BillingReservation) RawJSON() string
Returns the unmodified JSON received from the API
func (*BillingReservation) UnmarshalJSON ¶
func (r *BillingReservation) UnmarshalJSON(data []byte) error
type BillingReservationAmountPrices ¶
type BillingReservationAmountPrices struct {
// Commit price of the item charged per month
CommitPricePerMonth string `json:"commit_price_per_month,required"`
// Commit price of the item charged per hour
CommitPricePerUnit string `json:"commit_price_per_unit,required"`
// Commit price of the item charged for all period reservation
CommitPriceTotal string `json:"commit_price_total,required"`
// Currency code (3 letter code per ISO 4217)
CurrencyCode string `json:"currency_code,required"`
// Overcommit price of the item charged per month
OvercommitPricePerMonth string `json:"overcommit_price_per_month,required"`
// Overcommit price of the item charged per hour
OvercommitPricePerUnit string `json:"overcommit_price_per_unit,required"`
// Overcommit price of the item charged for all period reservation
OvercommitPriceTotal string `json:"overcommit_price_total,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CommitPricePerMonth respjson.Field
CommitPricePerUnit respjson.Field
CommitPriceTotal respjson.Field
CurrencyCode respjson.Field
OvercommitPricePerMonth respjson.Field
OvercommitPricePerUnit respjson.Field
OvercommitPriceTotal respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Reservation amount prices
func (BillingReservationAmountPrices) RawJSON ¶
func (r BillingReservationAmountPrices) RawJSON() string
Returns the unmodified JSON received from the API
func (*BillingReservationAmountPrices) UnmarshalJSON ¶
func (r *BillingReservationAmountPrices) UnmarshalJSON(data []byte) error
type BillingReservationListParams ¶
type BillingReservationListParams struct {
// Lower bound, starting from what date the reservation was/will be activated
ActivatedFrom param.Opt[time.Time] `query:"activated_from,omitzero" format:"date" json:"-"`
// High bound, before what date the reservation was/will be activated
ActivatedTo param.Opt[time.Time] `query:"activated_to,omitzero" format:"date" json:"-"`
// Lower bound the filter, showing result(s) equal to or greater than date the
// reservation was created
CreatedFrom param.Opt[time.Time] `query:"created_from,omitzero" format:"date-time" json:"-"`
// High bound the filter, showing result(s) equal to or less date the reservation
// was created
CreatedTo param.Opt[time.Time] `query:"created_to,omitzero" format:"date-time" json:"-"`
// Lower bound, starting from what date the reservation was/will be deactivated
DeactivatedFrom param.Opt[time.Time] `query:"deactivated_from,omitzero" format:"date" json:"-"`
// High bound, before what date the reservation was/will be deactivated
DeactivatedTo param.Opt[time.Time] `query:"deactivated_to,omitzero" format:"date" json:"-"`
// Limit of reservation list page
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Name from billing features for specific resource
MetricName param.Opt[string] `query:"metric_name,omitzero" json:"-"`
// Offset in reservation list
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Region for reservation
RegionID param.Opt[int64] `query:"region_id,omitzero" json:"-"`
// Order by field and direction.
//
// Any of "active_from.asc", "active_from.desc", "active_to.asc", "active_to.desc",
// "created_at.asc", "created_at.desc".
OrderBy BillingReservationListParamsOrderBy `query:"order_by,omitzero" json:"-"`
// Field for fixed a status by reservation workflow
//
// Any of "ACTIVATED", "APPROVED", "COPIED", "CREATED", "EXPIRED", "REJECTED",
// "RESERVED", "WAITING_FOR_PAYMENT".
Status []string `query:"status,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (BillingReservationListParams) URLQuery ¶
func (r BillingReservationListParams) URLQuery() (v url.Values, err error)
URLQuery serializes BillingReservationListParams's query parameters as `url.Values`.
type BillingReservationListParamsOrderBy ¶ added in v0.2.0
type BillingReservationListParamsOrderBy string
Order by field and direction.
const ( BillingReservationListParamsOrderByActiveFromAsc BillingReservationListParamsOrderBy = "active_from.asc" BillingReservationListParamsOrderByActiveFromDesc BillingReservationListParamsOrderBy = "active_from.desc" BillingReservationListParamsOrderByActiveToAsc BillingReservationListParamsOrderBy = "active_to.asc" BillingReservationListParamsOrderByActiveToDesc BillingReservationListParamsOrderBy = "active_to.desc" BillingReservationListParamsOrderByCreatedAtAsc BillingReservationListParamsOrderBy = "created_at.asc" BillingReservationListParamsOrderByCreatedAtDesc BillingReservationListParamsOrderBy = "created_at.desc" )
type BillingReservationResource ¶
type BillingReservationResource struct {
// Name of the billing period, e.g month
ActivityPeriod string `json:"activity_period,required"`
// Length of the full reservation period by `activity_period`
ActivityPeriodLength int64 `json:"activity_period_length,required"`
// Billing plan item id
BillingPlanItemID int64 `json:"billing_plan_item_id,required"`
// Commit price of the item charged per month
CommitPricePerMonth string `json:"commit_price_per_month,required"`
// Commit price of the item charged per hour
CommitPricePerUnit string `json:"commit_price_per_unit,required"`
// Commit price of the item charged for all period reservation
CommitPriceTotal string `json:"commit_price_total,required"`
// Overcommit billing plan item id
OvercommitBillingPlanItemID int64 `json:"overcommit_billing_plan_item_id,required"`
// Overcommit price of the item charged per month
OvercommitPricePerMonth string `json:"overcommit_price_per_month,required"`
// Overcommit price of the item charged per hour
OvercommitPricePerUnit string `json:"overcommit_price_per_unit,required"`
// Overcommit price of the item charged for all period reservation
OvercommitPriceTotal string `json:"overcommit_price_total,required"`
// Number of reserved resource items
ResourceCount int64 `json:"resource_count,required"`
// Resource name
ResourceName string `json:"resource_name,required"`
// Resource type
//
// Any of "flavor".
ResourceType string `json:"resource_type,required"`
// Billing unit name
UnitName string `json:"unit_name,required"`
// Minimal billing size, for example it is 744 hours per 1 month.
UnitSizeMonth string `json:"unit_size_month,required"`
// Unit size month multiplied by count of resources in the reservation
UnitSizeTotal string `json:"unit_size_total,required"`
// Baremetal CPU description
CPU string `json:"cpu,nullable"`
// Baremetal disk description
Disk string `json:"disk,nullable"`
// Baremetal RAM description
Ram string `json:"ram,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActivityPeriod respjson.Field
ActivityPeriodLength respjson.Field
BillingPlanItemID respjson.Field
CommitPricePerMonth respjson.Field
CommitPricePerUnit respjson.Field
CommitPriceTotal respjson.Field
OvercommitBillingPlanItemID respjson.Field
OvercommitPricePerMonth respjson.Field
OvercommitPricePerUnit respjson.Field
OvercommitPriceTotal respjson.Field
ResourceCount respjson.Field
ResourceName respjson.Field
ResourceType respjson.Field
UnitName respjson.Field
UnitSizeMonth respjson.Field
UnitSizeTotal respjson.Field
CPU respjson.Field
Disk respjson.Field
Ram respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BillingReservationResource) RawJSON ¶
func (r BillingReservationResource) RawJSON() string
Returns the unmodified JSON received from the API
func (*BillingReservationResource) UnmarshalJSON ¶
func (r *BillingReservationResource) UnmarshalJSON(data []byte) error
type BillingReservationService ¶
type BillingReservationService struct {
Options []option.RequestOption
}
BillingReservationService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBillingReservationService method instead.
func NewBillingReservationService ¶
func NewBillingReservationService(opts ...option.RequestOption) (r BillingReservationService)
NewBillingReservationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BillingReservationService) Get ¶
func (r *BillingReservationService) Get(ctx context.Context, reservationID int64, opts ...option.RequestOption) (res *BillingReservation, err error)
Get reservation
func (*BillingReservationService) List ¶
func (r *BillingReservationService) List(ctx context.Context, query BillingReservationListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[BillingReservation], err error)
List reservations
func (*BillingReservationService) ListAutoPaging ¶
func (r *BillingReservationService) ListAutoPaging(ctx context.Context, query BillingReservationListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[BillingReservation]
List reservations
type BlackholePort ¶
type BlackholePort struct {
// A date-time string giving the time that the alarm ended
AlarmEnd time.Time `json:"AlarmEnd,required" format:"date-time"`
// A date-time string giving the time that the alarm started
AlarmStart time.Time `json:"AlarmStart,required" format:"date-time"`
// Current state of alarm
//
// Any of "ACK_REQ", "ALARM", "ARCHIVED", "CLEAR", "CLEARING", "CLEARING_FAIL",
// "END_GRACE", "END_WAIT", "MANUAL_CLEAR", "MANUAL_CLEARING",
// "MANUAL_CLEARING_FAIL", "MANUAL_MITIGATING", "MANUAL_STARTING",
// "MANUAL_STARTING_FAIL", "MITIGATING", "STARTING", "STARTING_FAIL", "START_WAIT",
// "ack_req", "alarm", "archived", "clear", "clearing", "clearing_fail",
// "end_grace", "end_wait", "manual_clear", "manual_clearing",
// "manual_clearing_fail", "manual_mitigating", "manual_starting",
// "manual_starting_fail", "mitigating", "start_wait", "starting", "starting_fail".
AlarmState BlackholePortAlarmState `json:"AlarmState,required"`
// Total alert duration
AlertDuration string `json:"AlertDuration,required"`
// Notification destination IP address
DestinationIP string `json:"DestinationIP,required"`
ID int64 `json:"ID,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AlarmEnd respjson.Field
AlarmStart respjson.Field
AlarmState respjson.Field
AlertDuration respjson.Field
DestinationIP respjson.Field
ID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BlackholePort) RawJSON ¶
func (r BlackholePort) RawJSON() string
Returns the unmodified JSON received from the API
func (*BlackholePort) UnmarshalJSON ¶
func (r *BlackholePort) UnmarshalJSON(data []byte) error
type BlackholePortAlarmState ¶
type BlackholePortAlarmState string
Current state of alarm
const ( BlackholePortAlarmStateAckReqUppercase BlackholePortAlarmState = "ACK_REQ" BlackholePortAlarmStateAlarmUppercase BlackholePortAlarmState = "ALARM" BlackholePortAlarmStateArchivedUppercase BlackholePortAlarmState = "ARCHIVED" BlackholePortAlarmStateClearUppercase BlackholePortAlarmState = "CLEAR" BlackholePortAlarmStateClearingUppercase BlackholePortAlarmState = "CLEARING" BlackholePortAlarmStateClearingFailUppercase BlackholePortAlarmState = "CLEARING_FAIL" BlackholePortAlarmStateEndGraceUppercase BlackholePortAlarmState = "END_GRACE" BlackholePortAlarmStateEndWaitUppercase BlackholePortAlarmState = "END_WAIT" BlackholePortAlarmStateManualClearUppercase BlackholePortAlarmState = "MANUAL_CLEAR" BlackholePortAlarmStateManualClearingUppercase BlackholePortAlarmState = "MANUAL_CLEARING" BlackholePortAlarmStateManualClearingFailUppercase BlackholePortAlarmState = "MANUAL_CLEARING_FAIL" BlackholePortAlarmStateManualMitigatingUppercase BlackholePortAlarmState = "MANUAL_MITIGATING" BlackholePortAlarmStateManualStartingUppercase BlackholePortAlarmState = "MANUAL_STARTING" BlackholePortAlarmStateManualStartingFailUppercase BlackholePortAlarmState = "MANUAL_STARTING_FAIL" BlackholePortAlarmStateMitigatingUppercase BlackholePortAlarmState = "MITIGATING" BlackholePortAlarmStateStartingUppercase BlackholePortAlarmState = "STARTING" BlackholePortAlarmStateStartingFailUppercase BlackholePortAlarmState = "STARTING_FAIL" BlackholePortAlarmStateStartWaitUppercase BlackholePortAlarmState = "START_WAIT" BlackholePortAlarmStateAckReq BlackholePortAlarmState = "ack_req" BlackholePortAlarmStateAlarm BlackholePortAlarmState = "alarm" BlackholePortAlarmStateArchived BlackholePortAlarmState = "archived" BlackholePortAlarmStateClear BlackholePortAlarmState = "clear" BlackholePortAlarmStateClearing BlackholePortAlarmState = "clearing" BlackholePortAlarmStateClearingFail BlackholePortAlarmState = "clearing_fail" BlackholePortAlarmStateEndGrace BlackholePortAlarmState = "end_grace" BlackholePortAlarmStateEndWait BlackholePortAlarmState = "end_wait" BlackholePortAlarmStateManualClear BlackholePortAlarmState = "manual_clear" BlackholePortAlarmStateManualClearing BlackholePortAlarmState = "manual_clearing" BlackholePortAlarmStateManualClearingFail BlackholePortAlarmState = "manual_clearing_fail" BlackholePortAlarmStateManualMitigating BlackholePortAlarmState = "manual_mitigating" BlackholePortAlarmStateManualStarting BlackholePortAlarmState = "manual_starting" BlackholePortAlarmStateManualStartingFail BlackholePortAlarmState = "manual_starting_fail" BlackholePortAlarmStateMitigating BlackholePortAlarmState = "mitigating" BlackholePortAlarmStateStartWait BlackholePortAlarmState = "start_wait" BlackholePortAlarmStateStarting BlackholePortAlarmState = "starting" BlackholePortAlarmStateStartingFail BlackholePortAlarmState = "starting_fail" )
type CandidatePort ¶
type CandidatePort struct {
// ID of the instance that owns the port
InstanceID string `json:"instance_id,required" format:"uuid4"`
// Name of the instance that owns the port
InstanceName string `json:"instance_name,required"`
// IP addresses assigned to this port
IPAssignments []IPWithSubnet `json:"ip_assignments,required"`
// Network details
Network Network `json:"network,required"`
// Port ID that shares VIP
PortID string `json:"port_id,required" format:"uuid4"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
InstanceID respjson.Field
InstanceName respjson.Field
IPAssignments respjson.Field
Network respjson.Field
PortID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CandidatePort) RawJSON ¶
func (r CandidatePort) RawJSON() string
Returns the unmodified JSON received from the API
func (*CandidatePort) UnmarshalJSON ¶
func (r *CandidatePort) UnmarshalJSON(data []byte) error
type CandidatePortList ¶
type CandidatePortList struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []CandidatePort `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CandidatePortList) RawJSON ¶
func (r CandidatePortList) RawJSON() string
Returns the unmodified JSON received from the API
func (*CandidatePortList) UnmarshalJSON ¶
func (r *CandidatePortList) UnmarshalJSON(data []byte) error
type CloudService ¶
type CloudService struct {
Options []option.RequestOption
Projects ProjectService
Tasks TaskService
Regions RegionService
Quotas QuotaService
Secrets SecretService
SSHKeys SSHKeyService
IPRanges IPRangeService
LoadBalancers LoadBalancerService
ReservedFixedIPs ReservedFixedIPService
Networks NetworkService
Volumes VolumeService
FloatingIPs FloatingIPService
SecurityGroups SecurityGroupService
Users UserService
Inference InferenceService
PlacementGroups PlacementGroupService
Baremetal BaremetalService
Registries RegistryService
BillingReservations BillingReservationService
GPUBaremetalClusters GPUBaremetalClusterService
Instances InstanceService
}
CloudService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCloudService method instead.
func NewCloudService ¶
func NewCloudService(opts ...option.RequestOption) (r CloudService)
NewCloudService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type ConnectedPort ¶
type ConnectedPort struct {
// ID of the instance that owns the port
InstanceID string `json:"instance_id,required" format:"uuid4"`
// Name of the instance that owns the port
InstanceName string `json:"instance_name,required"`
// IP addresses assigned to this port
IPAssignments []IPWithSubnet `json:"ip_assignments,required"`
// Network details
Network Network `json:"network,required"`
// Port ID that shares VIP
PortID string `json:"port_id,required" format:"uuid4"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
InstanceID respjson.Field
InstanceName respjson.Field
IPAssignments respjson.Field
Network respjson.Field
PortID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ConnectedPort) RawJSON ¶
func (r ConnectedPort) RawJSON() string
Returns the unmodified JSON received from the API
func (*ConnectedPort) UnmarshalJSON ¶
func (r *ConnectedPort) UnmarshalJSON(data []byte) error
type ConnectedPortList ¶
type ConnectedPortList struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []ConnectedPort `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ConnectedPortList) RawJSON ¶
func (r ConnectedPortList) RawJSON() string
Returns the unmodified JSON received from the API
func (*ConnectedPortList) UnmarshalJSON ¶
func (r *ConnectedPortList) UnmarshalJSON(data []byte) error
type Console ¶
type Console struct {
// Remote console information
RemoteConsole ConsoleRemoteConsole `json:"remote_console,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
RemoteConsole respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Console) UnmarshalJSON ¶
type ConsoleRemoteConsole ¶
type ConsoleRemoteConsole struct {
Protocol string `json:"protocol,required"`
Type string `json:"type,required"`
URL string `json:"url,required" format:"uri"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Protocol respjson.Field
Type respjson.Field
URL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Remote console information
func (ConsoleRemoteConsole) RawJSON ¶
func (r ConsoleRemoteConsole) RawJSON() string
Returns the unmodified JSON received from the API
func (*ConsoleRemoteConsole) UnmarshalJSON ¶
func (r *ConsoleRemoteConsole) UnmarshalJSON(data []byte) error
type DDOSProfile ¶
type DDOSProfile struct {
// DDoS protection profile ID
ID int64 `json:"id,required"`
// Template data
ProfileTemplate DDOSProfileTemplate `json:"profile_template,required"`
Fields []DDOSProfileField `json:"fields"`
Options DDOSProfileOptionList `json:"options,nullable"`
// DDoS profile template description
ProfileTemplateDescription string `json:"profile_template_description,nullable"`
// List of protocols
Protocols []DDOSProfileProtocol `json:"protocols,nullable"`
Site string `json:"site,nullable"`
Status DDOSProfileStatus `json:"status,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ProfileTemplate respjson.Field
Fields respjson.Field
Options respjson.Field
ProfileTemplateDescription respjson.Field
Protocols respjson.Field
Site respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DDOSProfile) RawJSON ¶
func (r DDOSProfile) RawJSON() string
Returns the unmodified JSON received from the API
func (*DDOSProfile) UnmarshalJSON ¶
func (r *DDOSProfile) UnmarshalJSON(data []byte) error
type DDOSProfileField ¶
type DDOSProfileField struct {
ID int64 `json:"id,required"`
Default any `json:"default,required"`
Description string `json:"description,required"`
FieldValue any `json:"field_value,required"`
Name string `json:"name,required"`
BaseField int64 `json:"base_field,nullable"`
FieldName string `json:"field_name,nullable"`
FieldType string `json:"field_type,nullable"`
Required bool `json:"required,nullable"`
ValidationSchema any `json:"validation_schema"`
Value string `json:"value,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Default respjson.Field
Description respjson.Field
FieldValue respjson.Field
Name respjson.Field
BaseField respjson.Field
FieldName respjson.Field
FieldType respjson.Field
Required respjson.Field
ValidationSchema respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DDOSProfileField) RawJSON ¶
func (r DDOSProfileField) RawJSON() string
Returns the unmodified JSON received from the API
func (*DDOSProfileField) UnmarshalJSON ¶
func (r *DDOSProfileField) UnmarshalJSON(data []byte) error
type DDOSProfileOptionList ¶
type DDOSProfileOptionList struct {
// Activate profile.
Active bool `json:"active,nullable"`
// Activate BGP protocol.
Bgp bool `json:"bgp,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Active respjson.Field
Bgp respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DDOSProfileOptionList) RawJSON ¶
func (r DDOSProfileOptionList) RawJSON() string
Returns the unmodified JSON received from the API
func (*DDOSProfileOptionList) UnmarshalJSON ¶
func (r *DDOSProfileOptionList) UnmarshalJSON(data []byte) error
type DDOSProfileProtocol ¶ added in v0.4.0
type DDOSProfileProtocol struct {
Port string `json:"port,required"`
Protocols []string `json:"protocols,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Port respjson.Field
Protocols respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DDOSProfileProtocol) RawJSON ¶ added in v0.4.0
func (r DDOSProfileProtocol) RawJSON() string
Returns the unmodified JSON received from the API
func (*DDOSProfileProtocol) UnmarshalJSON ¶ added in v0.4.0
func (r *DDOSProfileProtocol) UnmarshalJSON(data []byte) error
type DDOSProfileStatus ¶
type DDOSProfileStatus struct {
// Description of the error, if it exists
ErrorDescription string `json:"error_description,required"`
// Profile status
Status string `json:"status,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ErrorDescription respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DDOSProfileStatus) RawJSON ¶
func (r DDOSProfileStatus) RawJSON() string
Returns the unmodified JSON received from the API
func (*DDOSProfileStatus) UnmarshalJSON ¶
func (r *DDOSProfileStatus) UnmarshalJSON(data []byte) error
type DDOSProfileTemplate ¶
type DDOSProfileTemplate struct {
ID int64 `json:"id,required"`
Name string `json:"name,required"`
Description string `json:"description,nullable"`
Fields []DDOSProfileTemplateField `json:"fields"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
Description respjson.Field
Fields respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DDOSProfileTemplate) RawJSON ¶
func (r DDOSProfileTemplate) RawJSON() string
Returns the unmodified JSON received from the API
func (*DDOSProfileTemplate) UnmarshalJSON ¶
func (r *DDOSProfileTemplate) UnmarshalJSON(data []byte) error
type DDOSProfileTemplateField ¶
type DDOSProfileTemplateField struct {
ID int64 `json:"id,required"`
Name string `json:"name,required"`
Default string `json:"default,nullable"`
Description string `json:"description,nullable"`
FieldType string `json:"field_type,nullable"`
Required bool `json:"required,nullable"`
ValidationSchema any `json:"validation_schema"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
Default respjson.Field
Description respjson.Field
FieldType respjson.Field
Required respjson.Field
ValidationSchema respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DDOSProfileTemplateField) RawJSON ¶
func (r DDOSProfileTemplateField) RawJSON() string
Returns the unmodified JSON received from the API
func (*DDOSProfileTemplateField) UnmarshalJSON ¶
func (r *DDOSProfileTemplateField) UnmarshalJSON(data []byte) error
type FileShare ¶
type FileShare struct {
ID string `json:"id,required" format:"uuid4"`
ConnectionPoint string `json:"connection_point,required"`
CreatedAt string `json:"created_at,required"`
CreatorTaskID string `json:"creator_task_id,required" format:"uuid4"`
Name string `json:"name,required"`
NetworkID string `json:"network_id,required" format:"uuid4"`
NetworkName string `json:"network_name,required"`
ProjectID int64 `json:"project_id,required"`
Protocol string `json:"protocol,required"`
Region string `json:"region,required"`
RegionID int64 `json:"region_id,required"`
// VAST
ShareNetworkName string `json:"share_network_name,required"`
Size int64 `json:"size,required"`
//
// Any of "available", "awaiting_transfer", "backup_creating", "backup_restoring",
// "backup_restoring_error", "creating", "creating_from_snapshot", "deleted",
// "deleting", "ensuring", "error", "error_deleting", "extending",
// "extending_error", "inactive", "manage_error", "manage_starting", "migrating",
// "migrating_to", "replication_change", "reverting", "reverting_error",
// "shrinking", "shrinking_error", "shrinking_possible_data_loss_error",
// "unmanage_error", "unmanage_starting", "unmanaged".
Status FileShareStatus `json:"status,required"`
SubnetID string `json:"subnet_id,required" format:"uuid4"`
SubnetName string `json:"subnet_name,required"`
// that can be associated with a resource, enabling efficient filtering and
// grouping for better organization and management. Some tags are read-only and
// cannot be modified by the user. Tags are also integrated with cost reports,
// allowing cost data to be filtered based on tag keys or values.
Tags []Tag `json:"tags,required"`
// lock prevents concurrent modifications to ensure consistency. If `null`, the
// resource is not locked.
TaskID string `json:"task_id,required" format:"uuid4"`
//
// Any of "standard", "vast".
TypeName FileShareTypeName `json:"type_name,required"`
//
// Any of "default_share_type", "vast_share_type".
VolumeType FileShareVolumeType `json:"volume_type,required"`
JSON struct {
ID respjson.Field
ConnectionPoint respjson.Field
CreatedAt respjson.Field
CreatorTaskID respjson.Field
Name respjson.Field
NetworkID respjson.Field
NetworkName respjson.Field
ProjectID respjson.Field
Protocol respjson.Field
Region respjson.Field
RegionID respjson.Field
ShareNetworkName respjson.Field
Size respjson.Field
Status respjson.Field
SubnetID respjson.Field
SubnetName respjson.Field
Tags respjson.Field
TaskID respjson.Field
TypeName respjson.Field
VolumeType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*FileShare) UnmarshalJSON ¶
type FileShareAccessRuleDeleteParams ¶
type FileShareAccessRuleDeleteParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
FileShareID string `path:"file_share_id,required" format:"uuid4" json:"-"`
// contains filtered or unexported fields
}
type FileShareAccessRuleNewParams ¶
type FileShareAccessRuleNewParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
//
// Any of "ro", "rw".
AccessMode FileShareAccessRuleNewParamsAccessMode `json:"access_mode,omitzero,required"`
IPAddress string `json:"ip_address,required" format:"ipvanyaddress"`
// contains filtered or unexported fields
}
func (FileShareAccessRuleNewParams) MarshalJSON ¶
func (r FileShareAccessRuleNewParams) MarshalJSON() (data []byte, err error)
func (*FileShareAccessRuleNewParams) UnmarshalJSON ¶
func (r *FileShareAccessRuleNewParams) UnmarshalJSON(data []byte) error
type FileShareAccessRuleNewParamsAccessMode ¶
type FileShareAccessRuleNewParamsAccessMode string
Access mode
const ( )
type FileShareAccessRuleService ¶
type FileShareAccessRuleService struct {
}
FileShareAccessRuleService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFileShareAccessRuleService method instead.
func NewFileShareAccessRuleService ¶
func NewFileShareAccessRuleService(opts ...option.RequestOption) (r FileShareAccessRuleService)
NewFileShareAccessRuleService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*FileShareAccessRuleService) Delete ¶
func (r *FileShareAccessRuleService) Delete(ctx context.Context, accessRuleID string, body FileShareAccessRuleDeleteParams, opts ...option.RequestOption) (err error)
Delete file share access rule
func (*FileShareAccessRuleService) List ¶
func (r *FileShareAccessRuleService) List(ctx context.Context, fileShareID string, query FileShareAccessRuleListParams, opts ...option.RequestOption) (res *AccessRuleList, err error)
Get file share access rules
func (*FileShareAccessRuleService) New ¶
func (r *FileShareAccessRuleService) New(ctx context.Context, fileShareID string, params FileShareAccessRuleNewParams, opts ...option.RequestOption) (res *AccessRule, err error)
Create file share access rule
type FileShareDeleteParams ¶
type FileShareGetParams ¶
type FileShareListParams ¶
type FileShareListParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
Name param.Opt[string] `query:"name,omitzero" json:"-"`
// result
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
//
// Any of "standard", "vast".
TypeName FileShareListParamsTypeName `query:"type_name,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (FileShareListParams) URLQuery ¶
func (r FileShareListParams) URLQuery() (v url.Values, err error)
URLQuery serializes FileShareListParams's query parameters as `url.Values`.
type FileShareListParamsTypeName ¶ added in v0.2.0
type FileShareListParamsTypeName string
File share type name
const ( )
type FileShareNewParams ¶
type FileShareNewParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
OfCreateStandardFileShareSerializer *FileShareNewParamsBodyCreateStandardFileShareSerializer `json:",inline"`
OfCreateVastFileShareSerializer *FileShareNewParamsBodyCreateVastFileShareSerializer `json:",inline"`
// contains filtered or unexported fields
}
func (FileShareNewParams) MarshalJSON ¶
func (u FileShareNewParams) MarshalJSON() ([]byte, error)
func (*FileShareNewParams) UnmarshalJSON ¶
func (r *FileShareNewParams) UnmarshalJSON(data []byte) error
type FileShareNewParamsBodyCreateStandardFileShareSerializer ¶
type FileShareNewParamsBodyCreateStandardFileShareSerializer struct {
Name string `json:"name,required"`
Network FileShareNewParamsBodyCreateStandardFileShareSerializerNetwork `json:"network,omitzero,required"`
Size int64 `json:"size,required"`
Access []FileShareNewParamsBodyCreateStandardFileShareSerializerAccess `json:"access,omitzero"`
// can be associated with a resource, enabling efficient filtering and grouping for
// better organization and management. Some tags are read-only and cannot be
// modified by the user. Tags are also integrated with cost reports, allowing cost
// data to be filtered based on tag keys or values.
Tags map[string]string `json:"tags,omitzero"`
//
// Any of "default_share_type".
VolumeType string `json:"volume_type,omitzero"`
//
// This field can be elided, and will marshal its zero value as "NFS".
Protocol constant.Nfs `json:"protocol,required"`
// contains filtered or unexported fields
}
The properties Name, Network, Protocol, Size are required.
func (FileShareNewParamsBodyCreateStandardFileShareSerializer) MarshalJSON ¶
func (r FileShareNewParamsBodyCreateStandardFileShareSerializer) MarshalJSON() (data []byte, err error)
func (*FileShareNewParamsBodyCreateStandardFileShareSerializer) UnmarshalJSON ¶
func (r *FileShareNewParamsBodyCreateStandardFileShareSerializer) UnmarshalJSON(data []byte) error
type FileShareNewParamsBodyCreateStandardFileShareSerializerAccess ¶
type FileShareNewParamsBodyCreateStandardFileShareSerializerAccess struct {
//
// Any of "ro", "rw".
AccessMode string `json:"access_mode,omitzero,required"`
IPAddress string `json:"ip_address,required" format:"ipvanyaddress"`
// contains filtered or unexported fields
}
The properties AccessMode, IPAddress are required.
func (FileShareNewParamsBodyCreateStandardFileShareSerializerAccess) MarshalJSON ¶
func (r FileShareNewParamsBodyCreateStandardFileShareSerializerAccess) MarshalJSON() (data []byte, err error)
func (*FileShareNewParamsBodyCreateStandardFileShareSerializerAccess) UnmarshalJSON ¶
func (r *FileShareNewParamsBodyCreateStandardFileShareSerializerAccess) UnmarshalJSON(data []byte) error
type FileShareNewParamsBodyCreateStandardFileShareSerializerNetwork ¶
type FileShareNewParamsBodyCreateStandardFileShareSerializerNetwork struct {
NetworkID string `json:"network_id,required" format:"uuid4"`
SubnetID param.Opt[string] `json:"subnet_id,omitzero" format:"uuid4"`
// contains filtered or unexported fields
}
File share network configuration
The property NetworkID is required.
func (FileShareNewParamsBodyCreateStandardFileShareSerializerNetwork) MarshalJSON ¶
func (r FileShareNewParamsBodyCreateStandardFileShareSerializerNetwork) MarshalJSON() (data []byte, err error)
func (*FileShareNewParamsBodyCreateStandardFileShareSerializerNetwork) UnmarshalJSON ¶
func (r *FileShareNewParamsBodyCreateStandardFileShareSerializerNetwork) UnmarshalJSON(data []byte) error
type FileShareNewParamsBodyCreateVastFileShareSerializer ¶
type FileShareNewParamsBodyCreateVastFileShareSerializer struct {
Name string `json:"name,required"`
Size int64 `json:"size,required"`
// can be associated with a resource, enabling efficient filtering and grouping for
// better organization and management. Some tags are read-only and cannot be
// modified by the user. Tags are also integrated with cost reports, allowing cost
// data to be filtered based on tag keys or values.
Tags map[string]string `json:"tags,omitzero"`
//
// This field can be elided, and will marshal its zero value as "NFS".
Protocol constant.Nfs `json:"protocol,required"`
//
// This field can be elided, and will marshal its zero value as "vast_share_type".
VolumeType constant.VastShareType `json:"volume_type,required"`
// contains filtered or unexported fields
}
The properties Name, Protocol, Size, VolumeType are required.
func (FileShareNewParamsBodyCreateVastFileShareSerializer) MarshalJSON ¶
func (r FileShareNewParamsBodyCreateVastFileShareSerializer) MarshalJSON() (data []byte, err error)
func (*FileShareNewParamsBodyCreateVastFileShareSerializer) UnmarshalJSON ¶
func (r *FileShareNewParamsBodyCreateVastFileShareSerializer) UnmarshalJSON(data []byte) error
type FileShareResizeParams ¶
type FileShareResizeParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
Size int64 `json:"size,required"`
// contains filtered or unexported fields
}
func (FileShareResizeParams) MarshalJSON ¶
func (r FileShareResizeParams) MarshalJSON() (data []byte, err error)
func (*FileShareResizeParams) UnmarshalJSON ¶
func (r *FileShareResizeParams) UnmarshalJSON(data []byte) error
type FileShareService ¶
type FileShareService struct {
}
FileShareService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFileShareService method instead.
func NewFileShareService ¶
func NewFileShareService(opts ...option.RequestOption) (r FileShareService)
NewFileShareService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*FileShareService) Delete ¶
func (r *FileShareService) Delete(ctx context.Context, fileShareID string, body FileShareDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Delete file share
func (*FileShareService) Get ¶
func (r *FileShareService) Get(ctx context.Context, fileShareID string, query FileShareGetParams, opts ...option.RequestOption) (res *FileShare, err error)
Get file share
func (*FileShareService) List ¶
func (r *FileShareService) List(ctx context.Context, params FileShareListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[FileShare], err error)
List file shares
func (*FileShareService) ListAutoPaging ¶
func (r *FileShareService) ListAutoPaging(ctx context.Context, params FileShareListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[FileShare]
List file shares
func (*FileShareService) New ¶
func (r *FileShareService) New(ctx context.Context, params FileShareNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Create file share
func (*FileShareService) Resize ¶
func (r *FileShareService) Resize(ctx context.Context, fileShareID string, params FileShareResizeParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Resize file share
func (*FileShareService) Update ¶
func (r *FileShareService) Update(ctx context.Context, fileShareID string, params FileShareUpdateParams, opts ...option.RequestOption) (res *FileShare, err error)
Rename file share
type FileShareTypeName ¶ added in v0.2.0
type FileShareTypeName string
File share type name
const ( )
type FileShareUpdateParams ¶
type FileShareUpdateParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
Name string `json:"name,required"`
// contains filtered or unexported fields
}
func (FileShareUpdateParams) MarshalJSON ¶
func (r FileShareUpdateParams) MarshalJSON() (data []byte, err error)
func (*FileShareUpdateParams) UnmarshalJSON ¶
func (r *FileShareUpdateParams) UnmarshalJSON(data []byte) error
type FixedAddress ¶
type FixedAddress struct {
// IP address
Addr string `json:"addr,required"`
// Interface name. This field will be `null` if `with_interfaces_name=true` is not
// set in the request when listing instances. It will also be `null` if the
// `interface_name` was not specified during instance creation or when attaching
// the interface.
InterfaceName string `json:"interface_name,required"`
// The unique identifier of the subnet associated with this address. Included only
// in the response for a single-resource lookup (GET by ID). For the trunk
// subports, this field is always set.
SubnetID string `json:"subnet_id,required"`
// The name of the subnet associated with this address. Included only in the
// response for a single-resource lookup (GET by ID). For the trunk subports, this
// field is always set.
SubnetName string `json:"subnet_name,required"`
// Type of the address
Type constant.Fixed `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Addr respjson.Field
InterfaceName respjson.Field
SubnetID respjson.Field
SubnetName respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Schema for `fixed` addresses. This schema is used when fetching a single instance.
func (FixedAddress) RawJSON ¶
func (r FixedAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*FixedAddress) UnmarshalJSON ¶
func (r *FixedAddress) UnmarshalJSON(data []byte) error
type FixedAddressShort ¶
type FixedAddressShort struct {
// IP address
Addr string `json:"addr,required"`
// Interface name. This field will be `null` if `with_interfaces_name=true` is not
// set in the request when listing instances. It will also be `null` if the
// `interface_name` was not specified during instance creation or when attaching
// the interface.
InterfaceName string `json:"interface_name,required"`
// Type of the address
Type constant.Fixed `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Addr respjson.Field
InterfaceName respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Schema for `fixed` addresses. This schema is used when listing instances. It omits the `subnet_name` and `subnet_id` fields.
func (FixedAddressShort) RawJSON ¶
func (r FixedAddressShort) RawJSON() string
Returns the unmodified JSON received from the API
func (*FixedAddressShort) UnmarshalJSON ¶
func (r *FixedAddressShort) UnmarshalJSON(data []byte) error
type FlavorHardwareDescription ¶
type FlavorHardwareDescription struct {
// Human-readable CPU description
CPU string `json:"cpu,nullable"`
// Human-readable disk description
Disk string `json:"disk,nullable"`
// Human-readable ephemeral disk description
Ephemeral string `json:"ephemeral,nullable"`
// Human-readable GPU description
GPU string `json:"gpu,nullable"`
// Human-readable NIC description
Network string `json:"network,nullable"`
// Human-readable RAM description
Ram string `json:"ram,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CPU respjson.Field
Disk respjson.Field
Ephemeral respjson.Field
GPU respjson.Field
Network respjson.Field
Ram respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (FlavorHardwareDescription) RawJSON ¶
func (r FlavorHardwareDescription) RawJSON() string
Returns the unmodified JSON received from the API
func (*FlavorHardwareDescription) UnmarshalJSON ¶
func (r *FlavorHardwareDescription) UnmarshalJSON(data []byte) error
type FloatingAddress ¶
type FloatingAddress struct {
// Address
Addr string `json:"addr,required"`
// Type of the address
Type constant.Floating `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Addr respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Schema for `floating` addresses.
func (FloatingAddress) RawJSON ¶
func (r FloatingAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*FloatingAddress) UnmarshalJSON ¶
func (r *FloatingAddress) UnmarshalJSON(data []byte) error
type FloatingIP ¶
type FloatingIP struct {
// Floating IP ID
ID string `json:"id,required" format:"uuid4"`
// Datetime when the floating IP was created
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Task that created this entity
CreatorTaskID string `json:"creator_task_id,required" format:"uuid4"`
// This field is deprecated and can be ignored
//
// Deprecated: deprecated
DNSDomain string `json:"dns_domain,required"`
// This field is deprecated and can be ignored
//
// Deprecated: deprecated
DNSName string `json:"dns_name,required"`
// IP address of the port the floating IP is attached to
FixedIPAddress string `json:"fixed_ip_address,required" format:"ipvanyaddress"`
// IP Address of the floating IP
FloatingIPAddress string `json:"floating_ip_address,required" format:"ipvanyaddress"`
// Port ID the floating IP is attached to. The `fixed_ip_address` is the IP address
// of the port.
PortID string `json:"port_id,required" format:"uuid4"`
// Project ID
ProjectID int64 `json:"project_id,required"`
// Region name
Region string `json:"region,required"`
// Region ID
RegionID int64 `json:"region_id,required"`
// Router ID
RouterID string `json:"router_id,required" format:"uuid4"`
// Floating IP status
//
// Any of "ACTIVE", "DOWN", "ERROR".
Status FloatingIPStatus `json:"status,required"`
// This field is deprecated and can be ignored
//
// Deprecated: deprecated
SubnetID string `json:"subnet_id,required" format:"uuid4"`
// List of key-value tags associated with the resource. A tag is a key-value pair
// that can be associated with a resource, enabling efficient filtering and
// grouping for better organization and management. Some tags are read-only and
// cannot be modified by the user. Tags are also integrated with cost reports,
// allowing cost data to be filtered based on tag keys or values.
Tags []Tag `json:"tags,required"`
// The UUID of the active task that currently holds a lock on the resource. This
// lock prevents concurrent modifications to ensure consistency. If `null`, the
// resource is not locked.
TaskID string `json:"task_id,required" format:"uuid4"`
// Datetime when the floating IP was last updated
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
CreatorTaskID respjson.Field
DNSDomain respjson.Field
DNSName respjson.Field
FixedIPAddress respjson.Field
FloatingIPAddress respjson.Field
PortID respjson.Field
ProjectID respjson.Field
Region respjson.Field
RegionID respjson.Field
RouterID respjson.Field
Status respjson.Field
SubnetID respjson.Field
Tags respjson.Field
TaskID respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (FloatingIP) RawJSON ¶
func (r FloatingIP) RawJSON() string
Returns the unmodified JSON received from the API
func (*FloatingIP) UnmarshalJSON ¶
func (r *FloatingIP) UnmarshalJSON(data []byte) error
type FloatingIPAssignParams ¶
type FloatingIPAssignParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Port ID
PortID string `json:"port_id,required" format:"uuid4"`
// Fixed IP address
FixedIPAddress param.Opt[string] `json:"fixed_ip_address,omitzero" format:"ipvanyaddress"`
// contains filtered or unexported fields
}
func (FloatingIPAssignParams) MarshalJSON ¶
func (r FloatingIPAssignParams) MarshalJSON() (data []byte, err error)
func (*FloatingIPAssignParams) UnmarshalJSON ¶
func (r *FloatingIPAssignParams) UnmarshalJSON(data []byte) error
type FloatingIPDeleteParams ¶
type FloatingIPDetailed ¶
type FloatingIPDetailed struct {
// Floating IP ID
ID string `json:"id,required" format:"uuid4"`
// Datetime when the floating IP was created
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Task that created this entity
CreatorTaskID string `json:"creator_task_id,required" format:"uuid4"`
// This field is deprecated and can be ignored
//
// Deprecated: deprecated
DNSDomain string `json:"dns_domain,required"`
// This field is deprecated and can be ignored
//
// Deprecated: deprecated
DNSName string `json:"dns_name,required"`
// IP address of the port the floating IP is attached to
FixedIPAddress string `json:"fixed_ip_address,required" format:"ipvanyaddress"`
// IP Address of the floating IP
FloatingIPAddress string `json:"floating_ip_address,required" format:"ipvanyaddress"`
// Instance the floating IP is attached to
Instance FloatingIPDetailedInstance `json:"instance,required"`
// Load balancer the floating IP is attached to
Loadbalancer LoadBalancer `json:"loadbalancer,required"`
// Port ID
PortID string `json:"port_id,required" format:"uuid4"`
// Project ID
ProjectID int64 `json:"project_id,required"`
// Region name
Region string `json:"region,required"`
// Region ID
RegionID int64 `json:"region_id,required"`
// Router ID
RouterID string `json:"router_id,required" format:"uuid4"`
// Floating IP status
//
// Any of "ACTIVE", "DOWN", "ERROR".
Status FloatingIPStatus `json:"status,required"`
// This field is deprecated and can be ignored
//
// Deprecated: deprecated
SubnetID string `json:"subnet_id,required" format:"uuid4"`
// List of key-value tags associated with the resource. A tag is a key-value pair
// that can be associated with a resource, enabling efficient filtering and
// grouping for better organization and management. Some tags are read-only and
// cannot be modified by the user. Tags are also integrated with cost reports,
// allowing cost data to be filtered based on tag keys or values.
Tags []Tag `json:"tags,required"`
// The UUID of the active task that currently holds a lock on the resource. This
// lock prevents concurrent modifications to ensure consistency. If `null`, the
// resource is not locked.
TaskID string `json:"task_id,required" format:"uuid4"`
// Datetime when the floating IP was last updated
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
CreatorTaskID respjson.Field
DNSDomain respjson.Field
DNSName respjson.Field
FixedIPAddress respjson.Field
FloatingIPAddress respjson.Field
Instance respjson.Field
Loadbalancer respjson.Field
PortID respjson.Field
ProjectID respjson.Field
Region respjson.Field
RegionID respjson.Field
RouterID respjson.Field
Status respjson.Field
SubnetID respjson.Field
Tags respjson.Field
TaskID respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (FloatingIPDetailed) RawJSON ¶
func (r FloatingIPDetailed) RawJSON() string
Returns the unmodified JSON received from the API
func (*FloatingIPDetailed) UnmarshalJSON ¶
func (r *FloatingIPDetailed) UnmarshalJSON(data []byte) error
type FloatingIPDetailedInstance ¶
type FloatingIPDetailedInstance struct {
// Instance ID
ID string `json:"id,required" format:"uuid4"`
// Map of `network_name` to list of addresses in that network
Addresses map[string][]FloatingIPDetailedInstanceAddressUnion `json:"addresses,required"`
// Datetime when instance was created
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Task that created this entity
CreatorTaskID string `json:"creator_task_id,required"`
// Flavor
Flavor FloatingIPDetailedInstanceFlavor `json:"flavor,required"`
// Instance description
InstanceDescription string `json:"instance_description,required"`
// Instance name
Name string `json:"name,required"`
// Project ID
ProjectID int64 `json:"project_id,required"`
// Region name
Region string `json:"region,required"`
// Region ID
RegionID int64 `json:"region_id,required"`
// Security groups
SecurityGroups []FloatingIPDetailedInstanceSecurityGroup `json:"security_groups,required"`
// SSH key name assigned to instance
SSHKeyName string `json:"ssh_key_name,required"`
// Instance status
//
// Any of "ACTIVE", "BUILD", "DELETED", "ERROR", "HARD_REBOOT", "MIGRATING",
// "PASSWORD", "PAUSED", "REBOOT", "REBUILD", "RESCUE", "RESIZE", "REVERT_RESIZE",
// "SHELVED", "SHELVED_OFFLOADED", "SHUTOFF", "SOFT_DELETED", "SUSPENDED",
// "UNKNOWN", "VERIFY_RESIZE".
Status string `json:"status,required"`
// List of key-value tags associated with the resource. A tag is a key-value pair
// that can be associated with a resource, enabling efficient filtering and
// grouping for better organization and management. Some tags are read-only and
// cannot be modified by the user. Tags are also integrated with cost reports,
// allowing cost data to be filtered based on tag keys or values.
Tags []Tag `json:"tags,required"`
// The UUID of the active task that currently holds a lock on the resource. This
// lock prevents concurrent modifications to ensure consistency. If `null`, the
// resource is not locked.
TaskID string `json:"task_id,required"`
// Task state
TaskState string `json:"task_state,required"`
// Virtual machine state (active)
//
// Any of "active", "building", "deleted", "error", "paused", "rescued", "resized",
// "shelved", "shelved_offloaded", "soft-deleted", "stopped", "suspended".
VmState string `json:"vm_state,required"`
// List of volumes
Volumes []FloatingIPDetailedInstanceVolume `json:"volumes,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Addresses respjson.Field
CreatedAt respjson.Field
CreatorTaskID respjson.Field
Flavor respjson.Field
InstanceDescription respjson.Field
Name respjson.Field
ProjectID respjson.Field
Region respjson.Field
RegionID respjson.Field
SecurityGroups respjson.Field
SSHKeyName respjson.Field
Status respjson.Field
Tags respjson.Field
TaskID respjson.Field
TaskState respjson.Field
VmState respjson.Field
Volumes respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Instance the floating IP is attached to
func (FloatingIPDetailedInstance) RawJSON ¶
func (r FloatingIPDetailedInstance) RawJSON() string
Returns the unmodified JSON received from the API
func (*FloatingIPDetailedInstance) UnmarshalJSON ¶
func (r *FloatingIPDetailedInstance) UnmarshalJSON(data []byte) error
type FloatingIPDetailedInstanceAddressUnion ¶
type FloatingIPDetailedInstanceAddressUnion struct {
Addr string `json:"addr"`
Type string `json:"type"`
InterfaceName string `json:"interface_name"`
// This field is from variant [FixedAddress].
SubnetID string `json:"subnet_id"`
// This field is from variant [FixedAddress].
SubnetName string `json:"subnet_name"`
JSON struct {
Addr respjson.Field
Type respjson.Field
InterfaceName respjson.Field
SubnetID respjson.Field
SubnetName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
FloatingIPDetailedInstanceAddressUnion contains all possible properties and values from FloatingAddress, FixedAddressShort, FixedAddress.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (FloatingIPDetailedInstanceAddressUnion) AsFixedIPAddress ¶
func (u FloatingIPDetailedInstanceAddressUnion) AsFixedIPAddress() (v FixedAddress)
func (FloatingIPDetailedInstanceAddressUnion) AsFixedIPAddressShort ¶
func (u FloatingIPDetailedInstanceAddressUnion) AsFixedIPAddressShort() (v FixedAddressShort)
func (FloatingIPDetailedInstanceAddressUnion) AsFloatingIPAddress ¶
func (u FloatingIPDetailedInstanceAddressUnion) AsFloatingIPAddress() (v FloatingAddress)
func (FloatingIPDetailedInstanceAddressUnion) RawJSON ¶
func (u FloatingIPDetailedInstanceAddressUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*FloatingIPDetailedInstanceAddressUnion) UnmarshalJSON ¶
func (r *FloatingIPDetailedInstanceAddressUnion) UnmarshalJSON(data []byte) error
type FloatingIPDetailedInstanceFlavor ¶
type FloatingIPDetailedInstanceFlavor struct {
// Flavor ID is the same as name
FlavorID string `json:"flavor_id,required"`
// Flavor name
FlavorName string `json:"flavor_name,required"`
// RAM size in MiB
Ram int64 `json:"ram,required"`
// Virtual CPU count. For bare metal flavors, it's a physical CPU count
Vcpus int64 `json:"vcpus,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FlavorID respjson.Field
FlavorName respjson.Field
Ram respjson.Field
Vcpus respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Flavor
func (FloatingIPDetailedInstanceFlavor) RawJSON ¶
func (r FloatingIPDetailedInstanceFlavor) RawJSON() string
Returns the unmodified JSON received from the API
func (*FloatingIPDetailedInstanceFlavor) UnmarshalJSON ¶
func (r *FloatingIPDetailedInstanceFlavor) UnmarshalJSON(data []byte) error
type FloatingIPDetailedInstanceSecurityGroup ¶
type FloatingIPDetailedInstanceSecurityGroup struct {
// Name.
Name string `json:"name,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (FloatingIPDetailedInstanceSecurityGroup) RawJSON ¶
func (r FloatingIPDetailedInstanceSecurityGroup) RawJSON() string
Returns the unmodified JSON received from the API
func (*FloatingIPDetailedInstanceSecurityGroup) UnmarshalJSON ¶
func (r *FloatingIPDetailedInstanceSecurityGroup) UnmarshalJSON(data []byte) error
type FloatingIPDetailedInstanceVolume ¶
type FloatingIPDetailedInstanceVolume struct {
// Volume ID
ID string `json:"id,required"`
// Whether the volume is deleted together with the VM
DeleteOnTermination bool `json:"delete_on_termination,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
DeleteOnTermination respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (FloatingIPDetailedInstanceVolume) RawJSON ¶
func (r FloatingIPDetailedInstanceVolume) RawJSON() string
Returns the unmodified JSON received from the API
func (*FloatingIPDetailedInstanceVolume) UnmarshalJSON ¶
func (r *FloatingIPDetailedInstanceVolume) UnmarshalJSON(data []byte) error
type FloatingIPGetParams ¶
type FloatingIPListParams ¶
type FloatingIPListParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Optional. Limit the number of returned items
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Optional. Offset value is used to exclude the first set of records from the
// result
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Optional. Filter by tag key-value pairs.
TagKeyValue param.Opt[string] `query:"tag_key_value,omitzero" json:"-"`
// Optional. Filter by tag keys. ?`tag_key`=key1&`tag_key`=key2
TagKey []string `query:"tag_key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (FloatingIPListParams) URLQuery ¶
func (r FloatingIPListParams) URLQuery() (v url.Values, err error)
URLQuery serializes FloatingIPListParams's query parameters as `url.Values`.
type FloatingIPNewParams ¶
type FloatingIPNewParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// If the port has multiple IP addresses, a specific one can be selected using this
// field. If not specified, the first IP in the port's list will be used by
// default.
FixedIPAddress param.Opt[string] `json:"fixed_ip_address,omitzero" format:"ipv4"`
// If provided, the floating IP will be immediately attached to the specified port.
PortID param.Opt[string] `json:"port_id,omitzero" format:"uuid4"`
// Key-value tags to associate with the resource. A tag is a key-value pair that
// can be associated with a resource, enabling efficient filtering and grouping for
// better organization and management. Some tags are read-only and cannot be
// modified by the user. Tags are also integrated with cost reports, allowing cost
// data to be filtered based on tag keys or values.
Tags map[string]string `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (FloatingIPNewParams) MarshalJSON ¶
func (r FloatingIPNewParams) MarshalJSON() (data []byte, err error)
func (*FloatingIPNewParams) UnmarshalJSON ¶
func (r *FloatingIPNewParams) UnmarshalJSON(data []byte) error
type FloatingIPService ¶
type FloatingIPService struct {
Options []option.RequestOption
}
FloatingIPService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFloatingIPService method instead.
func NewFloatingIPService ¶
func NewFloatingIPService(opts ...option.RequestOption) (r FloatingIPService)
NewFloatingIPService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*FloatingIPService) Assign ¶
func (r *FloatingIPService) Assign(ctx context.Context, floatingIPID string, params FloatingIPAssignParams, opts ...option.RequestOption) (res *FloatingIP, err error)
Assign floating IP to instance or loadbalancer
func (*FloatingIPService) Delete ¶
func (r *FloatingIPService) Delete(ctx context.Context, floatingIPID string, body FloatingIPDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Delete floating IP
func (*FloatingIPService) Get ¶
func (r *FloatingIPService) Get(ctx context.Context, floatingIPID string, query FloatingIPGetParams, opts ...option.RequestOption) (res *FloatingIP, err error)
Get floating IP
func (*FloatingIPService) List ¶
func (r *FloatingIPService) List(ctx context.Context, params FloatingIPListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[FloatingIPDetailed], err error)
List floating IPs
func (*FloatingIPService) ListAutoPaging ¶
func (r *FloatingIPService) ListAutoPaging(ctx context.Context, params FloatingIPListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[FloatingIPDetailed]
List floating IPs
func (*FloatingIPService) New ¶
func (r *FloatingIPService) New(ctx context.Context, params FloatingIPNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Create floating IP
func (*FloatingIPService) Unassign ¶
func (r *FloatingIPService) Unassign(ctx context.Context, floatingIPID string, body FloatingIPUnassignParams, opts ...option.RequestOption) (res *FloatingIP, err error)
Unassign floating IP
type FloatingIPStatus ¶
type FloatingIPStatus string
const ( FloatingIPStatusActive FloatingIPStatus = "ACTIVE" FloatingIPStatusDown FloatingIPStatus = "DOWN" FloatingIPStatusError FloatingIPStatus = "ERROR" )
type GPUBaremetalCluster ¶
type GPUBaremetalCluster struct {
// GPU Cluster ID
ClusterID string `json:"cluster_id,required" format:"uuid4"`
// GPU Cluster Name
ClusterName string `json:"cluster_name,required"`
// GPU Cluster status
//
// Any of "ACTIVE", "ERROR", "PENDING", "SUSPENDED".
ClusterStatus GPUBaremetalClusterClusterStatus `json:"cluster_status,required"`
// Datetime when the cluster was created
CreatedAt string `json:"created_at,required"`
// Task that created this entity
CreatorTaskID string `json:"creator_task_id,required" format:"uuid4"`
// Flavor ID is the same as the name
Flavor string `json:"flavor,required"`
// Image ID
ImageID string `json:"image_id,required" format:"uuid4"`
// Image name
ImageName string `json:"image_name,required"`
// Networks managed by user and associated with the cluster
Interfaces []GPUBaremetalClusterInterface `json:"interfaces,required"`
// A password for a bare metal server. This parameter is used to set a password for
// the "Admin" user on a Windows instance, a default user or a new user on a Linux
// instance
Password string `json:"password,required"`
// Project ID
ProjectID int64 `json:"project_id,required"`
// Region name
Region string `json:"region,required"`
// Region ID
RegionID int64 `json:"region_id,required"`
// GPU cluster servers
Servers []GPUBaremetalClusterServer `json:"servers,required"`
// Keypair name to inject into new cluster(s)
SSHKeyName string `json:"ssh_key_name,required"`
// List of key-value tags associated with the resource. A tag is a key-value pair
// that can be associated with a resource, enabling efficient filtering and
// grouping for better organization and management. Some tags are read-only and
// cannot be modified by the user. Tags are also integrated with cost reports,
// allowing cost data to be filtered based on tag keys or values.
Tags []Tag `json:"tags,required"`
// Task ID associated with the cluster
TaskID string `json:"task_id,required" format:"uuid4"`
// Task status
//
// Any of "CLUSTER_CLEAN_UP", "CLUSTER_RESIZE", "CLUSTER_RESUME",
// "CLUSTER_SUSPEND", "ERROR", "FINISHED", "IPU_SERVERS", "NETWORK",
// "POPLAR_SERVERS", "POST_DEPLOY_SETUP", "VIPU_CONTROLLER".
TaskStatus GPUBaremetalClusterTaskStatus `json:"task_status,required"`
// String in base64 format. Must not be passed together with 'username' or
// 'password'. Examples of the `user_data`:
// https://cloudinit.readthedocs.io/en/latest/topics/examples.html
UserData string `json:"user_data,required"`
// A name of a new user in the Linux instance. It may be passed with a 'password'
// parameter
Username string `json:"username,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ClusterID respjson.Field
ClusterName respjson.Field
ClusterStatus respjson.Field
CreatedAt respjson.Field
CreatorTaskID respjson.Field
Flavor respjson.Field
ImageID respjson.Field
ImageName respjson.Field
Interfaces respjson.Field
Password respjson.Field
ProjectID respjson.Field
Region respjson.Field
RegionID respjson.Field
Servers respjson.Field
SSHKeyName respjson.Field
Tags respjson.Field
TaskID respjson.Field
TaskStatus respjson.Field
UserData respjson.Field
Username respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (GPUBaremetalCluster) RawJSON ¶
func (r GPUBaremetalCluster) RawJSON() string
Returns the unmodified JSON received from the API
func (*GPUBaremetalCluster) UnmarshalJSON ¶
func (r *GPUBaremetalCluster) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterClusterStatus ¶
type GPUBaremetalClusterClusterStatus string
GPU Cluster status
const ( GPUBaremetalClusterClusterStatusActive GPUBaremetalClusterClusterStatus = "ACTIVE" GPUBaremetalClusterClusterStatusError GPUBaremetalClusterClusterStatus = "ERROR" GPUBaremetalClusterClusterStatusPending GPUBaremetalClusterClusterStatus = "PENDING" GPUBaremetalClusterClusterStatusSuspended GPUBaremetalClusterClusterStatus = "SUSPENDED" )
type GPUBaremetalClusterDeleteParams ¶
type GPUBaremetalClusterDeleteParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// True if it is required to delete floating IPs assigned to the servers. Can't be
// used with floatings.
DeleteFloatings param.Opt[bool] `query:"delete_floatings,omitzero" json:"-"`
// Comma separated list of floating ids that should be deleted. Can't be used with
// `delete_floatings`.
Floatings param.Opt[string] `query:"floatings,omitzero" json:"-"`
// Comma separated list of port IDs to be deleted with the servers
ReservedFixedIPs param.Opt[string] `query:"reserved_fixed_ips,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (GPUBaremetalClusterDeleteParams) URLQuery ¶
func (r GPUBaremetalClusterDeleteParams) URLQuery() (v url.Values, err error)
URLQuery serializes GPUBaremetalClusterDeleteParams's query parameters as `url.Values`.
type GPUBaremetalClusterFlavorListParams ¶
type GPUBaremetalClusterFlavorListParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Set to `true` to remove the disabled flavors from the response.
HideDisabled param.Opt[bool] `query:"hide_disabled,omitzero" json:"-"`
// Set to `true` if the response should include flavor prices.
IncludePrices param.Opt[bool] `query:"include_prices,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (GPUBaremetalClusterFlavorListParams) URLQuery ¶
func (r GPUBaremetalClusterFlavorListParams) URLQuery() (v url.Values, err error)
URLQuery serializes GPUBaremetalClusterFlavorListParams's query parameters as `url.Values`.
type GPUBaremetalClusterFlavorService ¶
type GPUBaremetalClusterFlavorService struct {
Options []option.RequestOption
}
GPUBaremetalClusterFlavorService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGPUBaremetalClusterFlavorService method instead.
func NewGPUBaremetalClusterFlavorService ¶
func NewGPUBaremetalClusterFlavorService(opts ...option.RequestOption) (r GPUBaremetalClusterFlavorService)
NewGPUBaremetalClusterFlavorService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*GPUBaremetalClusterFlavorService) List ¶
func (r *GPUBaremetalClusterFlavorService) List(ctx context.Context, params GPUBaremetalClusterFlavorListParams, opts ...option.RequestOption) (res *GPUBaremetalFlavorList, err error)
List bare metal GPU flavors
type GPUBaremetalClusterImageService ¶
type GPUBaremetalClusterImageService struct {
Options []option.RequestOption
// contains filtered or unexported fields
}
GPUBaremetalClusterImageService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGPUBaremetalClusterImageService method instead.
func NewGPUBaremetalClusterImageService ¶
func NewGPUBaremetalClusterImageService(opts ...option.RequestOption) (r GPUBaremetalClusterImageService)
NewGPUBaremetalClusterImageService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*GPUBaremetalClusterImageService) Delete ¶
func (r *GPUBaremetalClusterImageService) Delete(ctx context.Context, imageID string, body GPUBaremetalClusterImageDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Delete bare metal GPU image
func (*GPUBaremetalClusterImageService) DeleteAndPoll ¶ added in v0.2.0
func (r *GPUBaremetalClusterImageService) DeleteAndPoll(ctx context.Context, imageID string, params GPUBaremetalClusterImageDeleteParams, opts ...option.RequestOption) error
DeleteAndPoll deletes a bare metal GPU image and polls for completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
func (*GPUBaremetalClusterImageService) Get ¶
func (r *GPUBaremetalClusterImageService) Get(ctx context.Context, imageID string, query GPUBaremetalClusterImageGetParams, opts ...option.RequestOption) (res *GPUImage, err error)
Get bare metal GPU image
func (*GPUBaremetalClusterImageService) List ¶
func (r *GPUBaremetalClusterImageService) List(ctx context.Context, query GPUBaremetalClusterImageListParams, opts ...option.RequestOption) (res *GPUImageList, err error)
List bare metal GPU images
func (*GPUBaremetalClusterImageService) Upload ¶
func (r *GPUBaremetalClusterImageService) Upload(ctx context.Context, params GPUBaremetalClusterImageUploadParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Upload new bare metal GPU image
func (*GPUBaremetalClusterImageService) UploadAndPoll ¶ added in v0.2.0
func (r *GPUBaremetalClusterImageService) UploadAndPoll(ctx context.Context, params GPUBaremetalClusterImageUploadParams, opts ...option.RequestOption) (v *GPUImage, err error)
UploadAndPoll uploads a new bare metal GPU image and polls for completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
type GPUBaremetalClusterImageUploadParams ¶
type GPUBaremetalClusterImageUploadParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Image name
Name string `json:"name,required"`
// Image URL
URL string `json:"url,required" format:"uri"`
// OS Distribution, i.e. Debian, CentOS, Ubuntu, CoreOS etc.
OsDistro param.Opt[string] `json:"os_distro,omitzero"`
// OS version, i.e. 19.04 (for Ubuntu) or 9.4 for Debian
OsVersion param.Opt[string] `json:"os_version,omitzero"`
// When True, image cannot be deleted unless all volumes, created from it, are
// deleted.
CowFormat param.Opt[bool] `json:"cow_format,omitzero"`
// Image architecture type: aarch64, `x86_64`
//
// Any of "aarch64", "x86_64".
Architecture GPUBaremetalClusterImageUploadParamsArchitecture `json:"architecture,omitzero"`
// Specifies the type of firmware with which to boot the guest.
//
// Any of "bios", "uefi".
HwFirmwareType GPUBaremetalClusterImageUploadParamsHwFirmwareType `json:"hw_firmware_type,omitzero"`
// The operating system installed on the image. Linux by default
//
// Any of "linux", "windows".
OsType GPUBaremetalClusterImageUploadParamsOsType `json:"os_type,omitzero"`
// Permission to use a ssh key in instances
//
// Any of "allow", "deny", "required".
SSHKey GPUBaremetalClusterImageUploadParamsSSHKey `json:"ssh_key,omitzero"`
// Key-value tags to associate with the resource. A tag is a key-value pair that
// can be associated with a resource, enabling efficient filtering and grouping for
// better organization and management. Some tags are read-only and cannot be
// modified by the user. Tags are also integrated with cost reports, allowing cost
// data to be filtered based on tag keys or values.
Tags map[string]string `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (GPUBaremetalClusterImageUploadParams) MarshalJSON ¶
func (r GPUBaremetalClusterImageUploadParams) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterImageUploadParams) UnmarshalJSON ¶
func (r *GPUBaremetalClusterImageUploadParams) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterImageUploadParamsArchitecture ¶
type GPUBaremetalClusterImageUploadParamsArchitecture string
Image architecture type: aarch64, `x86_64`
const ( GPUBaremetalClusterImageUploadParamsArchitectureAarch64 GPUBaremetalClusterImageUploadParamsArchitecture = "aarch64" GPUBaremetalClusterImageUploadParamsArchitectureX86_64 GPUBaremetalClusterImageUploadParamsArchitecture = "x86_64" )
type GPUBaremetalClusterImageUploadParamsHwFirmwareType ¶
type GPUBaremetalClusterImageUploadParamsHwFirmwareType string
Specifies the type of firmware with which to boot the guest.
const ( GPUBaremetalClusterImageUploadParamsHwFirmwareTypeBios GPUBaremetalClusterImageUploadParamsHwFirmwareType = "bios" GPUBaremetalClusterImageUploadParamsHwFirmwareTypeUefi GPUBaremetalClusterImageUploadParamsHwFirmwareType = "uefi" )
type GPUBaremetalClusterImageUploadParamsOsType ¶
type GPUBaremetalClusterImageUploadParamsOsType string
The operating system installed on the image. Linux by default
const ( GPUBaremetalClusterImageUploadParamsOsTypeLinux GPUBaremetalClusterImageUploadParamsOsType = "linux" GPUBaremetalClusterImageUploadParamsOsTypeWindows GPUBaremetalClusterImageUploadParamsOsType = "windows" )
type GPUBaremetalClusterImageUploadParamsSSHKey ¶
type GPUBaremetalClusterImageUploadParamsSSHKey string
Permission to use a ssh key in instances
const ( GPUBaremetalClusterImageUploadParamsSSHKeyAllow GPUBaremetalClusterImageUploadParamsSSHKey = "allow" GPUBaremetalClusterImageUploadParamsSSHKeyDeny GPUBaremetalClusterImageUploadParamsSSHKey = "deny" GPUBaremetalClusterImageUploadParamsSSHKeyRequired GPUBaremetalClusterImageUploadParamsSSHKey = "required" )
type GPUBaremetalClusterInterface ¶
type GPUBaremetalClusterInterface struct {
// Network ID
NetworkID string `json:"network_id,required" format:"uuid4"`
// Network ID the subnet belongs to. Port will be plugged in this network
PortID string `json:"port_id,required" format:"uuid4"`
// Port is assigned to IP address from the subnet
SubnetID string `json:"subnet_id,required" format:"uuid4"`
// Network type
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
NetworkID respjson.Field
PortID respjson.Field
SubnetID respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (GPUBaremetalClusterInterface) RawJSON ¶
func (r GPUBaremetalClusterInterface) RawJSON() string
Returns the unmodified JSON received from the API
func (*GPUBaremetalClusterInterface) UnmarshalJSON ¶
func (r *GPUBaremetalClusterInterface) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterInterfaceService ¶
type GPUBaremetalClusterInterfaceService struct {
Options []option.RequestOption
}
GPUBaremetalClusterInterfaceService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGPUBaremetalClusterInterfaceService method instead.
func NewGPUBaremetalClusterInterfaceService ¶
func NewGPUBaremetalClusterInterfaceService(opts ...option.RequestOption) (r GPUBaremetalClusterInterfaceService)
NewGPUBaremetalClusterInterfaceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*GPUBaremetalClusterInterfaceService) List ¶
func (r *GPUBaremetalClusterInterfaceService) List(ctx context.Context, clusterID string, query GPUBaremetalClusterInterfaceListParams, opts ...option.RequestOption) (res *NetworkInterfaceList, err error)
Retrieve a list of network interfaces attached to the GPU cluster servers.
type GPUBaremetalClusterListParams ¶
type GPUBaremetalClusterListParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Limit the number of returned clusters
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Offset value is used to exclude the first set of records from the result
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (GPUBaremetalClusterListParams) URLQuery ¶
func (r GPUBaremetalClusterListParams) URLQuery() (v url.Values, err error)
URLQuery serializes GPUBaremetalClusterListParams's query parameters as `url.Values`.
type GPUBaremetalClusterNewParams ¶
type GPUBaremetalClusterNewParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Flavor name
Flavor string `json:"flavor,required"`
// Image ID
ImageID string `json:"image_id,required" format:"uuid4"`
// A list of network interfaces for the server. You can create one or more
// interfaces - private, public, or both.
Interfaces []GPUBaremetalClusterNewParamsInterfaceUnion `json:"interfaces,omitzero,required"`
// GPU Cluster name
Name string `json:"name,required"`
// Number of servers to create
InstancesCount param.Opt[int64] `json:"instances_count,omitzero"`
// A password for a bare metal server. This parameter is used to set a password for
// the "Admin" user on a Windows instance, a default user or a new user on a Linux
// instance
Password param.Opt[string] `json:"password,omitzero"`
// Specifies the name of the SSH keypair, created via the
// [/v1/`ssh_keys` endpoint](/docs/api-reference/cloud/ssh-keys/add-or-generate-ssh-key).
SSHKeyName param.Opt[string] `json:"ssh_key_name,omitzero"`
// String in base64 format. Must not be passed together with 'username' or
// 'password'. Examples of the `user_data`:
// https://cloudinit.readthedocs.io/en/latest/topics/examples.html
UserData param.Opt[string] `json:"user_data,omitzero"`
// A name of a new user in the Linux instance. It may be passed with a 'password'
// parameter
Username param.Opt[string] `json:"username,omitzero"`
// Key-value tags to associate with the resource. A tag is a key-value pair that
// can be associated with a resource, enabling efficient filtering and grouping for
// better organization and management. Some tags are read-only and cannot be
// modified by the user. Tags are also integrated with cost reports, allowing cost
// data to be filtered based on tag keys or values.
Tags map[string]string `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (GPUBaremetalClusterNewParams) MarshalJSON ¶
func (r GPUBaremetalClusterNewParams) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterNewParams) UnmarshalJSON ¶
func (r *GPUBaremetalClusterNewParams) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterNewParamsInterfaceAnySubnet ¶
type GPUBaremetalClusterNewParamsInterfaceAnySubnet struct {
// The network where the server will be connected.
NetworkID string `json:"network_id,required" format:"uuid4"`
// Interface name. Defaults to `null` and is returned as `null` in the API response
// if not set.
InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
// You can specify a specific IP address from your subnet.
IPAddress param.Opt[string] `json:"ip_address,omitzero" format:"ipvanyaddress"`
// Allows the server to have a public IP that can be reached from the internet.
FloatingIP GPUBaremetalClusterNewParamsInterfaceAnySubnetFloatingIP `json:"floating_ip,omitzero"`
// Specify `ipv4`, `ipv6`, or `dual` to enable both.
//
// Any of "dual", "ipv4", "ipv6".
IPFamily InterfaceIPFamily `json:"ip_family,omitzero"`
// Server will be attached to a subnet with the largest count of free IPs.
//
// This field can be elided, and will marshal its zero value as "any_subnet".
Type constant.AnySubnet `json:"type,required"`
// contains filtered or unexported fields
}
The properties NetworkID, Type are required.
func (GPUBaremetalClusterNewParamsInterfaceAnySubnet) MarshalJSON ¶
func (r GPUBaremetalClusterNewParamsInterfaceAnySubnet) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterNewParamsInterfaceAnySubnet) UnmarshalJSON ¶
func (r *GPUBaremetalClusterNewParamsInterfaceAnySubnet) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterNewParamsInterfaceAnySubnetFloatingIP ¶
type GPUBaremetalClusterNewParamsInterfaceAnySubnetFloatingIP struct {
Source constant.New `json:"source,required"`
// contains filtered or unexported fields
}
Allows the server to have a public IP that can be reached from the internet.
This struct has a constant value, construct it with NewGPUBaremetalClusterNewParamsInterfaceAnySubnetFloatingIP.
func NewGPUBaremetalClusterNewParamsInterfaceAnySubnetFloatingIP ¶
func NewGPUBaremetalClusterNewParamsInterfaceAnySubnetFloatingIP() GPUBaremetalClusterNewParamsInterfaceAnySubnetFloatingIP
func (GPUBaremetalClusterNewParamsInterfaceAnySubnetFloatingIP) MarshalJSON ¶
func (r GPUBaremetalClusterNewParamsInterfaceAnySubnetFloatingIP) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterNewParamsInterfaceAnySubnetFloatingIP) UnmarshalJSON ¶
func (r *GPUBaremetalClusterNewParamsInterfaceAnySubnetFloatingIP) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterNewParamsInterfaceExternal ¶
type GPUBaremetalClusterNewParamsInterfaceExternal struct {
// Interface name. Defaults to `null` and is returned as `null` in the API response
// if not set.
InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
// Specify `ipv4`, `ipv6`, or `dual` to enable both.
//
// Any of "dual", "ipv4", "ipv6".
IPFamily InterfaceIPFamily `json:"ip_family,omitzero"`
// A public IP address will be assigned to the server.
//
// This field can be elided, and will marshal its zero value as "external".
Type constant.External `json:"type,required"`
// contains filtered or unexported fields
}
The property Type is required.
func (GPUBaremetalClusterNewParamsInterfaceExternal) MarshalJSON ¶
func (r GPUBaremetalClusterNewParamsInterfaceExternal) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterNewParamsInterfaceExternal) UnmarshalJSON ¶
func (r *GPUBaremetalClusterNewParamsInterfaceExternal) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterNewParamsInterfaceSubnet ¶
type GPUBaremetalClusterNewParamsInterfaceSubnet struct {
// The network where the server will be connected.
NetworkID string `json:"network_id,required" format:"uuid4"`
// The server will get an IP address from this subnet.
SubnetID string `json:"subnet_id,required" format:"uuid4"`
// Interface name. Defaults to `null` and is returned as `null` in the API response
// if not set.
InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
// Floating IP config for this subnet attachment
FloatingIP GPUBaremetalClusterNewParamsInterfaceSubnetFloatingIP `json:"floating_ip,omitzero"`
// The instance will get an IP address from the selected network. If you choose to
// add a floating IP, the instance will be reachable from the internet. Otherwise,
// it will only have a private IP within the network.
//
// This field can be elided, and will marshal its zero value as "subnet".
Type constant.Subnet `json:"type,required"`
// contains filtered or unexported fields
}
The properties NetworkID, SubnetID, Type are required.
func (GPUBaremetalClusterNewParamsInterfaceSubnet) MarshalJSON ¶
func (r GPUBaremetalClusterNewParamsInterfaceSubnet) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterNewParamsInterfaceSubnet) UnmarshalJSON ¶
func (r *GPUBaremetalClusterNewParamsInterfaceSubnet) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterNewParamsInterfaceSubnetFloatingIP ¶
type GPUBaremetalClusterNewParamsInterfaceSubnetFloatingIP struct {
Source constant.New `json:"source,required"`
// contains filtered or unexported fields
}
Floating IP config for this subnet attachment
This struct has a constant value, construct it with NewGPUBaremetalClusterNewParamsInterfaceSubnetFloatingIP.
func NewGPUBaremetalClusterNewParamsInterfaceSubnetFloatingIP ¶
func NewGPUBaremetalClusterNewParamsInterfaceSubnetFloatingIP() GPUBaremetalClusterNewParamsInterfaceSubnetFloatingIP
func (GPUBaremetalClusterNewParamsInterfaceSubnetFloatingIP) MarshalJSON ¶
func (r GPUBaremetalClusterNewParamsInterfaceSubnetFloatingIP) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterNewParamsInterfaceSubnetFloatingIP) UnmarshalJSON ¶
func (r *GPUBaremetalClusterNewParamsInterfaceSubnetFloatingIP) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterNewParamsInterfaceUnion ¶
type GPUBaremetalClusterNewParamsInterfaceUnion struct {
OfExternal *GPUBaremetalClusterNewParamsInterfaceExternal `json:",omitzero,inline"`
OfSubnet *GPUBaremetalClusterNewParamsInterfaceSubnet `json:",omitzero,inline"`
OfAnySubnet *GPUBaremetalClusterNewParamsInterfaceAnySubnet `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (GPUBaremetalClusterNewParamsInterfaceUnion) GetFloatingIP ¶
func (u GPUBaremetalClusterNewParamsInterfaceUnion) GetFloatingIP() (res gpuBaremetalClusterNewParamsInterfaceUnionFloatingIP)
Returns a subunion which exports methods to access subproperties
Or use AsAny() to get the underlying value
func (GPUBaremetalClusterNewParamsInterfaceUnion) GetIPAddress ¶
func (u GPUBaremetalClusterNewParamsInterfaceUnion) GetIPAddress() *string
Returns a pointer to the underlying variant's property, if present.
func (GPUBaremetalClusterNewParamsInterfaceUnion) GetIPFamily ¶
func (u GPUBaremetalClusterNewParamsInterfaceUnion) GetIPFamily() *string
Returns a pointer to the underlying variant's property, if present.
func (GPUBaremetalClusterNewParamsInterfaceUnion) GetInterfaceName ¶
func (u GPUBaremetalClusterNewParamsInterfaceUnion) GetInterfaceName() *string
Returns a pointer to the underlying variant's property, if present.
func (GPUBaremetalClusterNewParamsInterfaceUnion) GetNetworkID ¶
func (u GPUBaremetalClusterNewParamsInterfaceUnion) GetNetworkID() *string
Returns a pointer to the underlying variant's property, if present.
func (GPUBaremetalClusterNewParamsInterfaceUnion) GetSubnetID ¶
func (u GPUBaremetalClusterNewParamsInterfaceUnion) GetSubnetID() *string
Returns a pointer to the underlying variant's property, if present.
func (GPUBaremetalClusterNewParamsInterfaceUnion) GetType ¶
func (u GPUBaremetalClusterNewParamsInterfaceUnion) GetType() *string
Returns a pointer to the underlying variant's property, if present.
func (GPUBaremetalClusterNewParamsInterfaceUnion) MarshalJSON ¶
func (u GPUBaremetalClusterNewParamsInterfaceUnion) MarshalJSON() ([]byte, error)
func (*GPUBaremetalClusterNewParamsInterfaceUnion) UnmarshalJSON ¶
func (u *GPUBaremetalClusterNewParamsInterfaceUnion) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterRebuildParams ¶
type GPUBaremetalClusterRebuildParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// List of nodes uuids to be rebuild
Nodes []string `json:"nodes,omitzero,required"`
// AI GPU image ID
ImageID param.Opt[string] `json:"image_id,omitzero"`
// String in base64 format.Examples of the `user_data`:
// https://cloudinit.readthedocs.io/en/latest/topics/examples.html
UserData param.Opt[string] `json:"user_data,omitzero"`
// contains filtered or unexported fields
}
func (GPUBaremetalClusterRebuildParams) MarshalJSON ¶
func (r GPUBaremetalClusterRebuildParams) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterRebuildParams) UnmarshalJSON ¶
func (r *GPUBaremetalClusterRebuildParams) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterResizeParams ¶
type GPUBaremetalClusterResizeParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Resized (total) number of instances
InstancesCount int64 `json:"instances_count,required"`
// contains filtered or unexported fields
}
func (GPUBaremetalClusterResizeParams) MarshalJSON ¶
func (r GPUBaremetalClusterResizeParams) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterResizeParams) UnmarshalJSON ¶
func (r *GPUBaremetalClusterResizeParams) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServer ¶
type GPUBaremetalClusterServer struct {
// GPU server ID
ID string `json:"id,required" format:"uuid4"`
// Map of `network_name` to list of addresses in that network
Addresses map[string][]GPUBaremetalClusterServerAddressUnion `json:"addresses,required"`
// IP addresses of the instances that are blackholed by DDoS mitigation system
BlackholePorts []BlackholePort `json:"blackhole_ports,required"`
// Datetime when GPU server was created
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Task that created this entity
CreatorTaskID string `json:"creator_task_id,required"`
// Advanced DDoS protection profile. It is always `null` if query parameter
// `with_ddos=true` is not set.
DDOSProfile DDOSProfile `json:"ddos_profile,required"`
// Fixed IP assigned to instance
FixedIPAssignments []GPUBaremetalClusterServerFixedIPAssignment `json:"fixed_ip_assignments,required"`
// Flavor
Flavor GPUBaremetalClusterServerFlavor `json:"flavor,required"`
// Instance description
InstanceDescription string `json:"instance_description,required"`
// Instance isolation information
InstanceIsolation InstanceIsolation `json:"instance_isolation,required"`
// GPU server name
Name string `json:"name,required"`
// Project ID
ProjectID int64 `json:"project_id,required"`
// Region name
Region string `json:"region,required"`
// Region ID
RegionID int64 `json:"region_id,required"`
// Security groups
SecurityGroups []GPUBaremetalClusterServerSecurityGroup `json:"security_groups,required"`
// SSH key name assigned to instance
SSHKeyName string `json:"ssh_key_name,required"`
// Instance status
//
// Any of "ACTIVE", "BUILD", "DELETED", "ERROR", "HARD_REBOOT", "MIGRATING",
// "PASSWORD", "PAUSED", "REBOOT", "REBUILD", "RESCUE", "RESIZE", "REVERT_RESIZE",
// "SHELVED", "SHELVED_OFFLOADED", "SHUTOFF", "SOFT_DELETED", "SUSPENDED",
// "UNKNOWN", "VERIFY_RESIZE".
Status GPUBaremetalClusterServerStatus `json:"status,required"`
// List of key-value tags associated with the resource. A tag is a key-value pair
// that can be associated with a resource, enabling efficient filtering and
// grouping for better organization and management. Some tags are read-only and
// cannot be modified by the user. Tags are also integrated with cost reports,
// allowing cost data to be filtered based on tag keys or values.
Tags []Tag `json:"tags,required"`
// The UUID of the active task that currently holds a lock on the resource. This
// lock prevents concurrent modifications to ensure consistency. If `null`, the
// resource is not locked.
TaskID string `json:"task_id,required"`
// Task state
TaskState string `json:"task_state,required"`
// Virtual machine state (active)
//
// Any of "active", "building", "deleted", "error", "paused", "rescued", "resized",
// "shelved", "shelved_offloaded", "soft-deleted", "stopped", "suspended".
VmState GPUBaremetalClusterServerVmState `json:"vm_state,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Addresses respjson.Field
BlackholePorts respjson.Field
CreatedAt respjson.Field
CreatorTaskID respjson.Field
DDOSProfile respjson.Field
FixedIPAssignments respjson.Field
Flavor respjson.Field
InstanceDescription respjson.Field
InstanceIsolation respjson.Field
Name respjson.Field
ProjectID respjson.Field
Region respjson.Field
RegionID respjson.Field
SecurityGroups respjson.Field
SSHKeyName respjson.Field
Status respjson.Field
Tags respjson.Field
TaskID respjson.Field
TaskState respjson.Field
VmState respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (GPUBaremetalClusterServer) RawJSON ¶
func (r GPUBaremetalClusterServer) RawJSON() string
Returns the unmodified JSON received from the API
func (*GPUBaremetalClusterServer) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServer) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerAddressUnion ¶
type GPUBaremetalClusterServerAddressUnion struct {
Addr string `json:"addr"`
Type string `json:"type"`
InterfaceName string `json:"interface_name"`
// This field is from variant [FixedAddress].
SubnetID string `json:"subnet_id"`
// This field is from variant [FixedAddress].
SubnetName string `json:"subnet_name"`
JSON struct {
Addr respjson.Field
Type respjson.Field
InterfaceName respjson.Field
SubnetID respjson.Field
SubnetName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
GPUBaremetalClusterServerAddressUnion contains all possible properties and values from FloatingAddress, FixedAddressShort, FixedAddress.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (GPUBaremetalClusterServerAddressUnion) AsFixedIPAddress ¶
func (u GPUBaremetalClusterServerAddressUnion) AsFixedIPAddress() (v FixedAddress)
func (GPUBaremetalClusterServerAddressUnion) AsFixedIPAddressShort ¶
func (u GPUBaremetalClusterServerAddressUnion) AsFixedIPAddressShort() (v FixedAddressShort)
func (GPUBaremetalClusterServerAddressUnion) AsFloatingIPAddress ¶
func (u GPUBaremetalClusterServerAddressUnion) AsFloatingIPAddress() (v FloatingAddress)
func (GPUBaremetalClusterServerAddressUnion) RawJSON ¶
func (u GPUBaremetalClusterServerAddressUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*GPUBaremetalClusterServerAddressUnion) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServerAddressUnion) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerAttachInterfaceParams ¶
type GPUBaremetalClusterServerAttachInterfaceParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// This field is a request body variant, only one variant field can be set.
// Instance will be attached to default external network
OfNewInterfaceExternalExtendSchemaWithDDOS *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOS `json:",inline"`
// This field is a request body variant, only one variant field can be set.
// Instance will be attached to specified subnet
OfNewInterfaceSpecificSubnetSchema *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchema `json:",inline"`
// This field is a request body variant, only one variant field can be set.
// Instance will be attached to the network subnet with the largest count of
// available ips
OfNewInterfaceAnySubnetSchema *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchema `json:",inline"`
// This field is a request body variant, only one variant field can be set.
// Instance will be attached to the given port. Floating IP will be created and
// attached to that IP
OfNewInterfaceReservedFixedIPSchema *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchema `json:",inline"`
// contains filtered or unexported fields
}
func (GPUBaremetalClusterServerAttachInterfaceParams) MarshalJSON ¶
func (u GPUBaremetalClusterServerAttachInterfaceParams) MarshalJSON() ([]byte, error)
func (*GPUBaremetalClusterServerAttachInterfaceParams) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServerAttachInterfaceParams) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchema ¶
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchema struct {
// Port will get an IP address in this network subnet
NetworkID string `json:"network_id,required"`
// Interface name
InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
// Each group will be added to the separate trunk.
PortGroup param.Opt[int64] `json:"port_group,omitzero"`
// Must be '`any_subnet`'
Type param.Opt[string] `json:"type,omitzero"`
// Advanced DDoS protection.
DDOSProfile GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaDDOSProfile `json:"ddos_profile,omitzero"`
// Which subnets should be selected: IPv4, IPv6 or use dual stack.
//
// Any of "dual", "ipv4", "ipv6".
IPFamily string `json:"ip_family,omitzero"`
// List of security group IDs
SecurityGroups []GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaSecurityGroup `json:"security_groups,omitzero"`
// contains filtered or unexported fields
}
Instance will be attached to the network subnet with the largest count of available ips
The property NetworkID is required.
func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchema) MarshalJSON ¶
func (r GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchema) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchema) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchema) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaDDOSProfile ¶
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaDDOSProfile struct {
// DDoS profile template ID.
ProfileTemplate int64 `json:"profile_template,required"`
// DDoS profile template name.
ProfileTemplateName param.Opt[string] `json:"profile_template_name,omitzero"`
// Protection parameters.
Fields []GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaDDOSProfileField `json:"fields,omitzero"`
// contains filtered or unexported fields
}
Advanced DDoS protection.
The property ProfileTemplate is required.
func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaDDOSProfile) MarshalJSON ¶
func (r GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaDDOSProfile) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaDDOSProfile) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaDDOSProfile) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaDDOSProfileField ¶
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaDDOSProfileField struct {
// ID of DDoS profile field
BaseField param.Opt[int64] `json:"base_field,omitzero"`
// Name of DDoS profile field
FieldName param.Opt[string] `json:"field_name,omitzero"`
// Basic type value. Only one of 'value' or '`field_value`' must be specified.
Value param.Opt[string] `json:"value,omitzero"`
// Complex value. Only one of 'value' or '`field_value`' must be specified.
FieldValue any `json:"field_value,omitzero"`
// contains filtered or unexported fields
}
func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaDDOSProfileField) MarshalJSON ¶
func (r GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaDDOSProfileField) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaDDOSProfileField) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaDDOSProfileField) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaSecurityGroup ¶
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaSecurityGroup struct {
// Resource ID
ID string `json:"id,required"`
// contains filtered or unexported fields
}
MandatoryIdSchema schema
The property ID is required.
func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaSecurityGroup) MarshalJSON ¶
func (r GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaSecurityGroup) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaSecurityGroup) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaSecurityGroup) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOS ¶
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOS struct {
// Interface name
InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
// Each group will be added to the separate trunk.
PortGroup param.Opt[int64] `json:"port_group,omitzero"`
// Must be 'external'. Union tag
Type param.Opt[string] `json:"type,omitzero"`
// Advanced DDoS protection.
DDOSProfile GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfile `json:"ddos_profile,omitzero"`
// Which subnets should be selected: IPv4, IPv6 or use dual stack.
//
// Any of "dual", "ipv4", "ipv6".
IPFamily string `json:"ip_family,omitzero"`
// List of security group IDs
SecurityGroups []GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSSecurityGroup `json:"security_groups,omitzero"`
// contains filtered or unexported fields
}
Instance will be attached to default external network
func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOS) MarshalJSON ¶
func (r GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOS) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOS) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOS) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfile ¶
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfile struct {
// DDoS profile template ID.
ProfileTemplate int64 `json:"profile_template,required"`
// DDoS profile template name.
ProfileTemplateName param.Opt[string] `json:"profile_template_name,omitzero"`
// Protection parameters.
Fields []GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField `json:"fields,omitzero"`
// contains filtered or unexported fields
}
Advanced DDoS protection.
The property ProfileTemplate is required.
func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfile) MarshalJSON ¶
func (r GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfile) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfile) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfile) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField ¶
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField struct {
// ID of DDoS profile field
BaseField param.Opt[int64] `json:"base_field,omitzero"`
// Name of DDoS profile field
FieldName param.Opt[string] `json:"field_name,omitzero"`
// Basic type value. Only one of 'value' or '`field_value`' must be specified.
Value param.Opt[string] `json:"value,omitzero"`
// Complex value. Only one of 'value' or '`field_value`' must be specified.
FieldValue any `json:"field_value,omitzero"`
// contains filtered or unexported fields
}
func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField) MarshalJSON ¶
func (r GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSSecurityGroup ¶
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSSecurityGroup struct {
// Resource ID
ID string `json:"id,required"`
// contains filtered or unexported fields
}
MandatoryIdSchema schema
The property ID is required.
func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSSecurityGroup) MarshalJSON ¶
func (r GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSSecurityGroup) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSSecurityGroup) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSSecurityGroup) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchema ¶
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchema struct {
// Port ID
PortID string `json:"port_id,required"`
// Interface name
InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
// Each group will be added to the separate trunk.
PortGroup param.Opt[int64] `json:"port_group,omitzero"`
// Must be '`reserved_fixed_ip`'. Union tag
Type param.Opt[string] `json:"type,omitzero"`
// Advanced DDoS protection.
DDOSProfile GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfile `json:"ddos_profile,omitzero"`
// List of security group IDs
SecurityGroups []GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaSecurityGroup `json:"security_groups,omitzero"`
// contains filtered or unexported fields
}
Instance will be attached to the given port. Floating IP will be created and attached to that IP
The property PortID is required.
func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchema) MarshalJSON ¶
func (r GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchema) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchema) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchema) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfile ¶
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfile struct {
// DDoS profile template ID.
ProfileTemplate int64 `json:"profile_template,required"`
// DDoS profile template name.
ProfileTemplateName param.Opt[string] `json:"profile_template_name,omitzero"`
// Protection parameters.
Fields []GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfileField `json:"fields,omitzero"`
// contains filtered or unexported fields
}
Advanced DDoS protection.
The property ProfileTemplate is required.
func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfile) MarshalJSON ¶
func (r GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfile) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfile) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfile) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfileField ¶
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfileField struct {
// ID of DDoS profile field
BaseField param.Opt[int64] `json:"base_field,omitzero"`
// Name of DDoS profile field
FieldName param.Opt[string] `json:"field_name,omitzero"`
// Basic type value. Only one of 'value' or '`field_value`' must be specified.
Value param.Opt[string] `json:"value,omitzero"`
// Complex value. Only one of 'value' or '`field_value`' must be specified.
FieldValue any `json:"field_value,omitzero"`
// contains filtered or unexported fields
}
func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfileField) MarshalJSON ¶
func (r GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfileField) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfileField) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfileField) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaSecurityGroup ¶
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaSecurityGroup struct {
// Resource ID
ID string `json:"id,required"`
// contains filtered or unexported fields
}
MandatoryIdSchema schema
The property ID is required.
func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaSecurityGroup) MarshalJSON ¶
func (r GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaSecurityGroup) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaSecurityGroup) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaSecurityGroup) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchema ¶
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchema struct {
// Port will get an IP address from this subnet
SubnetID string `json:"subnet_id,required"`
// Interface name
InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
// Each group will be added to the separate trunk.
PortGroup param.Opt[int64] `json:"port_group,omitzero"`
// Must be 'subnet'
Type param.Opt[string] `json:"type,omitzero"`
// Advanced DDoS protection.
DDOSProfile GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfile `json:"ddos_profile,omitzero"`
// List of security group IDs
SecurityGroups []GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaSecurityGroup `json:"security_groups,omitzero"`
// contains filtered or unexported fields
}
Instance will be attached to specified subnet
The property SubnetID is required.
func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchema) MarshalJSON ¶
func (r GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchema) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchema) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchema) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfile ¶
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfile struct {
// DDoS profile template ID.
ProfileTemplate int64 `json:"profile_template,required"`
// DDoS profile template name.
ProfileTemplateName param.Opt[string] `json:"profile_template_name,omitzero"`
// Protection parameters.
Fields []GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfileField `json:"fields,omitzero"`
// contains filtered or unexported fields
}
Advanced DDoS protection.
The property ProfileTemplate is required.
func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfile) MarshalJSON ¶
func (r GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfile) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfile) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfile) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfileField ¶
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfileField struct {
// ID of DDoS profile field
BaseField param.Opt[int64] `json:"base_field,omitzero"`
// Name of DDoS profile field
FieldName param.Opt[string] `json:"field_name,omitzero"`
// Basic type value. Only one of 'value' or '`field_value`' must be specified.
Value param.Opt[string] `json:"value,omitzero"`
// Complex value. Only one of 'value' or '`field_value`' must be specified.
FieldValue any `json:"field_value,omitzero"`
// contains filtered or unexported fields
}
func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfileField) MarshalJSON ¶
func (r GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfileField) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfileField) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfileField) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaSecurityGroup ¶
type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaSecurityGroup struct {
// Resource ID
ID string `json:"id,required"`
// contains filtered or unexported fields
}
MandatoryIdSchema schema
The property ID is required.
func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaSecurityGroup) MarshalJSON ¶
func (r GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaSecurityGroup) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaSecurityGroup) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaSecurityGroup) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerDeleteParams ¶
type GPUBaremetalClusterServerDeleteParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
ClusterID string `path:"cluster_id,required" json:"-"`
// Set False if you do not want to delete assigned floating IPs. By default, it's
// True.
DeleteFloatings param.Opt[bool] `query:"delete_floatings,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (GPUBaremetalClusterServerDeleteParams) URLQuery ¶
func (r GPUBaremetalClusterServerDeleteParams) URLQuery() (v url.Values, err error)
URLQuery serializes GPUBaremetalClusterServerDeleteParams's query parameters as `url.Values`.
type GPUBaremetalClusterServerDetachInterfaceParams ¶
type GPUBaremetalClusterServerDetachInterfaceParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// IP address
IPAddress string `json:"ip_address,required"`
// ID of the port
PortID string `json:"port_id,required"`
// contains filtered or unexported fields
}
func (GPUBaremetalClusterServerDetachInterfaceParams) MarshalJSON ¶
func (r GPUBaremetalClusterServerDetachInterfaceParams) MarshalJSON() (data []byte, err error)
func (*GPUBaremetalClusterServerDetachInterfaceParams) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServerDetachInterfaceParams) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerFixedIPAssignment ¶
type GPUBaremetalClusterServerFixedIPAssignment struct {
// Is network external
External bool `json:"external,required"`
// Ip address
IPAddress string `json:"ip_address,required"`
// Interface subnet id
SubnetID string `json:"subnet_id,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
External respjson.Field
IPAddress respjson.Field
SubnetID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (GPUBaremetalClusterServerFixedIPAssignment) RawJSON ¶
func (r GPUBaremetalClusterServerFixedIPAssignment) RawJSON() string
Returns the unmodified JSON received from the API
func (*GPUBaremetalClusterServerFixedIPAssignment) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServerFixedIPAssignment) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerFlavor ¶
type GPUBaremetalClusterServerFlavor struct {
// CPU architecture
Architecture string `json:"architecture,required"`
// Flavor ID is the same as name
FlavorID string `json:"flavor_id,required"`
// Flavor name
FlavorName string `json:"flavor_name,required"`
// Additional hardware description
HardwareDescription GPUBaremetalClusterServerFlavorHardwareDescription `json:"hardware_description,required"`
// Operating system
OsType string `json:"os_type,required"`
// RAM size in MiB
Ram int64 `json:"ram,required"`
// Flavor resource class for mapping to hardware capacity
ResourceClass string `json:"resource_class,required"`
// Virtual CPU count. For bare metal flavors, it's a physical CPU count
Vcpus int64 `json:"vcpus,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Architecture respjson.Field
FlavorID respjson.Field
FlavorName respjson.Field
HardwareDescription respjson.Field
OsType respjson.Field
Ram respjson.Field
ResourceClass respjson.Field
Vcpus respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Flavor
func (GPUBaremetalClusterServerFlavor) RawJSON ¶
func (r GPUBaremetalClusterServerFlavor) RawJSON() string
Returns the unmodified JSON received from the API
func (*GPUBaremetalClusterServerFlavor) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServerFlavor) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerFlavorHardwareDescription ¶
type GPUBaremetalClusterServerFlavorHardwareDescription struct {
// Human-readable CPU description
CPU string `json:"cpu,required"`
// Human-readable disk description
Disk string `json:"disk,required"`
// Human-readable GPU description
GPU string `json:"gpu,required"`
// If the flavor is licensed, this field contains the license type
License string `json:"license,required"`
// Human-readable NIC description
Network string `json:"network,required"`
// Human-readable RAM description
Ram string `json:"ram,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CPU respjson.Field
Disk respjson.Field
GPU respjson.Field
License respjson.Field
Network respjson.Field
Ram respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Additional hardware description
func (GPUBaremetalClusterServerFlavorHardwareDescription) RawJSON ¶
func (r GPUBaremetalClusterServerFlavorHardwareDescription) RawJSON() string
Returns the unmodified JSON received from the API
func (*GPUBaremetalClusterServerFlavorHardwareDescription) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServerFlavorHardwareDescription) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerList ¶
type GPUBaremetalClusterServerList struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []GPUBaremetalClusterServer `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (GPUBaremetalClusterServerList) RawJSON ¶
func (r GPUBaremetalClusterServerList) RawJSON() string
Returns the unmodified JSON received from the API
func (*GPUBaremetalClusterServerList) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServerList) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerSecurityGroup ¶
type GPUBaremetalClusterServerSecurityGroup struct {
// Name.
Name string `json:"name,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (GPUBaremetalClusterServerSecurityGroup) RawJSON ¶
func (r GPUBaremetalClusterServerSecurityGroup) RawJSON() string
Returns the unmodified JSON received from the API
func (*GPUBaremetalClusterServerSecurityGroup) UnmarshalJSON ¶
func (r *GPUBaremetalClusterServerSecurityGroup) UnmarshalJSON(data []byte) error
type GPUBaremetalClusterServerService ¶
type GPUBaremetalClusterServerService struct {
Options []option.RequestOption
// contains filtered or unexported fields
}
GPUBaremetalClusterServerService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGPUBaremetalClusterServerService method instead.
func NewGPUBaremetalClusterServerService ¶
func NewGPUBaremetalClusterServerService(opts ...option.RequestOption) (r GPUBaremetalClusterServerService)
NewGPUBaremetalClusterServerService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*GPUBaremetalClusterServerService) AttachInterface ¶
func (r *GPUBaremetalClusterServerService) AttachInterface(ctx context.Context, instanceID string, params GPUBaremetalClusterServerAttachInterfaceParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Attach interface to bare metal GPU cluster server
func (*GPUBaremetalClusterServerService) Delete ¶
func (r *GPUBaremetalClusterServerService) Delete(ctx context.Context, instanceID string, params GPUBaremetalClusterServerDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Delete a specific node from a GPU cluster. The node must be in a state that allows deletion.
func (*GPUBaremetalClusterServerService) DeleteAndPoll ¶ added in v0.2.0
func (r *GPUBaremetalClusterServerService) DeleteAndPoll(ctx context.Context, instanceID string, params GPUBaremetalClusterServerDeleteParams, opts ...option.RequestOption) error
DeleteAndPoll deletes a bare metal GPU server from cluster and polls for completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
func (*GPUBaremetalClusterServerService) DetachInterface ¶
func (r *GPUBaremetalClusterServerService) DetachInterface(ctx context.Context, instanceID string, params GPUBaremetalClusterServerDetachInterfaceParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Detach interface from bare metal GPU cluster server
func (*GPUBaremetalClusterServerService) GetConsole ¶
func (r *GPUBaremetalClusterServerService) GetConsole(ctx context.Context, instanceID string, query GPUBaremetalClusterServerGetConsoleParams, opts ...option.RequestOption) (res *Console, err error)
Get bare metal GPU cluster server console URL
func (*GPUBaremetalClusterServerService) Powercycle ¶
func (r *GPUBaremetalClusterServerService) Powercycle(ctx context.Context, instanceID string, body GPUBaremetalClusterServerPowercycleParams, opts ...option.RequestOption) (res *GPUBaremetalClusterServer, err error)
Stops and then starts the server, effectively performing a hard reboot.
func (*GPUBaremetalClusterServerService) Reboot ¶
func (r *GPUBaremetalClusterServerService) Reboot(ctx context.Context, instanceID string, body GPUBaremetalClusterServerRebootParams, opts ...option.RequestOption) (res *GPUBaremetalClusterServer, err error)
Reboot one bare metal GPU cluster server
type GPUBaremetalClusterServerStatus ¶
type GPUBaremetalClusterServerStatus string
Instance status
const ( GPUBaremetalClusterServerStatusActive GPUBaremetalClusterServerStatus = "ACTIVE" GPUBaremetalClusterServerStatusBuild GPUBaremetalClusterServerStatus = "BUILD" GPUBaremetalClusterServerStatusDeleted GPUBaremetalClusterServerStatus = "DELETED" GPUBaremetalClusterServerStatusError GPUBaremetalClusterServerStatus = "ERROR" GPUBaremetalClusterServerStatusHardReboot GPUBaremetalClusterServerStatus = "HARD_REBOOT" GPUBaremetalClusterServerStatusMigrating GPUBaremetalClusterServerStatus = "MIGRATING" GPUBaremetalClusterServerStatusPassword GPUBaremetalClusterServerStatus = "PASSWORD" GPUBaremetalClusterServerStatusPaused GPUBaremetalClusterServerStatus = "PAUSED" GPUBaremetalClusterServerStatusReboot GPUBaremetalClusterServerStatus = "REBOOT" GPUBaremetalClusterServerStatusRebuild GPUBaremetalClusterServerStatus = "REBUILD" GPUBaremetalClusterServerStatusRescue GPUBaremetalClusterServerStatus = "RESCUE" GPUBaremetalClusterServerStatusResize GPUBaremetalClusterServerStatus = "RESIZE" GPUBaremetalClusterServerStatusRevertResize GPUBaremetalClusterServerStatus = "REVERT_RESIZE" GPUBaremetalClusterServerStatusShelved GPUBaremetalClusterServerStatus = "SHELVED" GPUBaremetalClusterServerStatusShelvedOffloaded GPUBaremetalClusterServerStatus = "SHELVED_OFFLOADED" GPUBaremetalClusterServerStatusShutoff GPUBaremetalClusterServerStatus = "SHUTOFF" GPUBaremetalClusterServerStatusSoftDeleted GPUBaremetalClusterServerStatus = "SOFT_DELETED" GPUBaremetalClusterServerStatusSuspended GPUBaremetalClusterServerStatus = "SUSPENDED" GPUBaremetalClusterServerStatusUnknown GPUBaremetalClusterServerStatus = "UNKNOWN" GPUBaremetalClusterServerStatusVerifyResize GPUBaremetalClusterServerStatus = "VERIFY_RESIZE" )
type GPUBaremetalClusterServerVmState ¶
type GPUBaremetalClusterServerVmState string
Virtual machine state (active)
const ( GPUBaremetalClusterServerVmStateActive GPUBaremetalClusterServerVmState = "active" GPUBaremetalClusterServerVmStateBuilding GPUBaremetalClusterServerVmState = "building" GPUBaremetalClusterServerVmStateDeleted GPUBaremetalClusterServerVmState = "deleted" GPUBaremetalClusterServerVmStateError GPUBaremetalClusterServerVmState = "error" GPUBaremetalClusterServerVmStatePaused GPUBaremetalClusterServerVmState = "paused" GPUBaremetalClusterServerVmStateRescued GPUBaremetalClusterServerVmState = "rescued" GPUBaremetalClusterServerVmStateResized GPUBaremetalClusterServerVmState = "resized" GPUBaremetalClusterServerVmStateShelved GPUBaremetalClusterServerVmState = "shelved" GPUBaremetalClusterServerVmStateShelvedOffloaded GPUBaremetalClusterServerVmState = "shelved_offloaded" GPUBaremetalClusterServerVmStateSoftDeleted GPUBaremetalClusterServerVmState = "soft-deleted" GPUBaremetalClusterServerVmStateStopped GPUBaremetalClusterServerVmState = "stopped" GPUBaremetalClusterServerVmStateSuspended GPUBaremetalClusterServerVmState = "suspended" )
type GPUBaremetalClusterService ¶
type GPUBaremetalClusterService struct {
Options []option.RequestOption
Interfaces GPUBaremetalClusterInterfaceService
Servers GPUBaremetalClusterServerService
Flavors GPUBaremetalClusterFlavorService
Images GPUBaremetalClusterImageService
// contains filtered or unexported fields
}
GPUBaremetalClusterService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGPUBaremetalClusterService method instead.
func NewGPUBaremetalClusterService ¶
func NewGPUBaremetalClusterService(opts ...option.RequestOption) (r GPUBaremetalClusterService)
NewGPUBaremetalClusterService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*GPUBaremetalClusterService) Delete ¶
func (r *GPUBaremetalClusterService) Delete(ctx context.Context, clusterID string, params GPUBaremetalClusterDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Delete bare metal GPU cluster
func (*GPUBaremetalClusterService) Get ¶
func (r *GPUBaremetalClusterService) Get(ctx context.Context, clusterID string, query GPUBaremetalClusterGetParams, opts ...option.RequestOption) (res *GPUBaremetalCluster, err error)
Get bare metal GPU cluster
func (*GPUBaremetalClusterService) List ¶
func (r *GPUBaremetalClusterService) List(ctx context.Context, params GPUBaremetalClusterListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[GPUBaremetalCluster], err error)
List bare metal GPU clusters
func (*GPUBaremetalClusterService) ListAutoPaging ¶
func (r *GPUBaremetalClusterService) ListAutoPaging(ctx context.Context, params GPUBaremetalClusterListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[GPUBaremetalCluster]
List bare metal GPU clusters
func (*GPUBaremetalClusterService) New ¶
func (r *GPUBaremetalClusterService) New(ctx context.Context, params GPUBaremetalClusterNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Create a new GPU cluster with specified configuration. The cluster can be created with one or more nodes.
func (*GPUBaremetalClusterService) NewAndPoll ¶ added in v0.2.0
func (r *GPUBaremetalClusterService) NewAndPoll(ctx context.Context, params GPUBaremetalClusterNewParams, opts ...option.RequestOption) (v *GPUBaremetalCluster, err error)
NewAndPoll creates a new GPU bare metal cluster and polls for completion
func (*GPUBaremetalClusterService) PowercycleAllServers ¶
func (r *GPUBaremetalClusterService) PowercycleAllServers(ctx context.Context, clusterID string, body GPUBaremetalClusterPowercycleAllServersParams, opts ...option.RequestOption) (res *GPUBaremetalClusterServerList, err error)
Stops and then starts all cluster servers, effectively performing a hard reboot.
func (*GPUBaremetalClusterService) RebootAllServers ¶
func (r *GPUBaremetalClusterService) RebootAllServers(ctx context.Context, clusterID string, body GPUBaremetalClusterRebootAllServersParams, opts ...option.RequestOption) (res *GPUBaremetalClusterServerList, err error)
Reboot all bare metal GPU cluster servers
func (*GPUBaremetalClusterService) Rebuild ¶
func (r *GPUBaremetalClusterService) Rebuild(ctx context.Context, clusterID string, params GPUBaremetalClusterRebuildParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Rebuild one or more nodes in a GPU cluster. All cluster nodes must be specified to update the cluster image.
func (*GPUBaremetalClusterService) RebuildAndPoll ¶ added in v0.2.0
func (r *GPUBaremetalClusterService) RebuildAndPoll(ctx context.Context, clusterID string, params GPUBaremetalClusterRebuildParams, opts ...option.RequestOption) (v *GPUBaremetalCluster, err error)
RebuildAndPoll rebuilds a GPU bare metal cluster and polls for completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
func (*GPUBaremetalClusterService) Resize ¶
func (r *GPUBaremetalClusterService) Resize(ctx context.Context, clusterID string, params GPUBaremetalClusterResizeParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Change the number of nodes in a GPU cluster. The cluster can be scaled up or down.
func (*GPUBaremetalClusterService) ResizeAndPoll ¶ added in v0.2.0
func (r *GPUBaremetalClusterService) ResizeAndPoll(ctx context.Context, clusterID string, params GPUBaremetalClusterResizeParams, opts ...option.RequestOption) (v *GPUBaremetalCluster, err error)
ResizeAndPoll resizes a GPU bare metal cluster and polls for completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
type GPUBaremetalClusterTaskStatus ¶
type GPUBaremetalClusterTaskStatus string
Task status
const ( GPUBaremetalClusterTaskStatusClusterCleanUp GPUBaremetalClusterTaskStatus = "CLUSTER_CLEAN_UP" GPUBaremetalClusterTaskStatusClusterResize GPUBaremetalClusterTaskStatus = "CLUSTER_RESIZE" GPUBaremetalClusterTaskStatusClusterResume GPUBaremetalClusterTaskStatus = "CLUSTER_RESUME" GPUBaremetalClusterTaskStatusClusterSuspend GPUBaremetalClusterTaskStatus = "CLUSTER_SUSPEND" GPUBaremetalClusterTaskStatusError GPUBaremetalClusterTaskStatus = "ERROR" GPUBaremetalClusterTaskStatusFinished GPUBaremetalClusterTaskStatus = "FINISHED" GPUBaremetalClusterTaskStatusIpuServers GPUBaremetalClusterTaskStatus = "IPU_SERVERS" GPUBaremetalClusterTaskStatusNetwork GPUBaremetalClusterTaskStatus = "NETWORK" GPUBaremetalClusterTaskStatusPoplarServers GPUBaremetalClusterTaskStatus = "POPLAR_SERVERS" GPUBaremetalClusterTaskStatusPostDeploySetup GPUBaremetalClusterTaskStatus = "POST_DEPLOY_SETUP" GPUBaremetalClusterTaskStatusVipuController GPUBaremetalClusterTaskStatus = "VIPU_CONTROLLER" )
type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPrice ¶
type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPrice struct {
// Flavor architecture type
Architecture string `json:"architecture,required"`
// Number of available instances of given flavor
Capacity int64 `json:"capacity,required"`
// If the flavor is disabled, new resources cannot be created using this flavor.
Disabled bool `json:"disabled,required"`
// Additional virtual hardware description
HardwareDescription GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareDescription `json:"hardware_description,required"`
// Additional bare metal hardware properties
HardwareProperties GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareProperties `json:"hardware_properties,required"`
// Flavor name
Name string `json:"name,required"`
// Flavor price
Price GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPricePrice `json:"price,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Architecture respjson.Field
Capacity respjson.Field
Disabled respjson.Field
HardwareDescription respjson.Field
HardwareProperties respjson.Field
Name respjson.Field
Price respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPrice) RawJSON ¶
func (r GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPrice) RawJSON() string
Returns the unmodified JSON received from the API
func (*GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPrice) UnmarshalJSON ¶
func (r *GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPrice) UnmarshalJSON(data []byte) error
type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareDescription ¶
type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareDescription struct {
// Human-readable CPU description
CPU string `json:"cpu,required"`
// Human-readable disk description
Disk string `json:"disk,required"`
// Human-readable GPU description
GPU string `json:"gpu,required"`
// Human-readable NIC description
Network string `json:"network,required"`
// Human-readable RAM description
Ram string `json:"ram,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CPU respjson.Field
Disk respjson.Field
GPU respjson.Field
Network respjson.Field
Ram respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Additional virtual hardware description
func (GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareDescription) RawJSON ¶
func (r GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareDescription) RawJSON() string
Returns the unmodified JSON received from the API
func (*GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareDescription) UnmarshalJSON ¶
func (r *GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareDescription) UnmarshalJSON(data []byte) error
type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareProperties ¶
type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareProperties struct {
// The total count of available GPUs.
GPUCount int64 `json:"gpu_count,required"`
// The manufacturer of the graphics processing GPU
GPUManufacturer string `json:"gpu_manufacturer,required"`
// GPU model
GPUModel string `json:"gpu_model,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
GPUCount respjson.Field
GPUManufacturer respjson.Field
GPUModel respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Additional bare metal hardware properties
func (GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareProperties) RawJSON ¶
func (r GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareProperties) RawJSON() string
Returns the unmodified JSON received from the API
func (*GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareProperties) UnmarshalJSON ¶
func (r *GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareProperties) UnmarshalJSON(data []byte) error
type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPricePrice ¶
type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPricePrice struct {
// Currency code. Shown if the `include_prices` query parameter if set to true
CurrencyCode string `json:"currency_code,required"`
// Price per hour. Shown if the `include_prices` query parameter if set to true
PricePerHour float64 `json:"price_per_hour,required"`
// Price per month. Shown if the `include_prices` query parameter if set to true
PricePerMonth float64 `json:"price_per_month,required"`
// Price status for the UI
//
// Any of "error", "hide", "show".
PriceStatus string `json:"price_status,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CurrencyCode respjson.Field
PricePerHour respjson.Field
PricePerMonth respjson.Field
PriceStatus respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Flavor price
func (GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPricePrice) RawJSON ¶
func (r GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPricePrice) RawJSON() string
Returns the unmodified JSON received from the API
func (*GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPricePrice) UnmarshalJSON ¶
func (r *GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPricePrice) UnmarshalJSON(data []byte) error
type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPrice ¶
type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPrice struct {
// Flavor architecture type
Architecture string `json:"architecture,required"`
// Number of available instances of given flavor
Capacity int64 `json:"capacity,required"`
// If the flavor is disabled, new resources cannot be created using this flavor.
Disabled bool `json:"disabled,required"`
// Additional bare metal hardware description
HardwareDescription GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareDescription `json:"hardware_description,required"`
// Additional bare metal hardware properties
HardwareProperties GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareProperties `json:"hardware_properties,required"`
// Flavor name
Name string `json:"name,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Architecture respjson.Field
Capacity respjson.Field
Disabled respjson.Field
HardwareDescription respjson.Field
HardwareProperties respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPrice) RawJSON ¶
func (r GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPrice) RawJSON() string
Returns the unmodified JSON received from the API
func (*GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPrice) UnmarshalJSON ¶
func (r *GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPrice) UnmarshalJSON(data []byte) error
type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareDescription ¶
type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareDescription struct {
// Human-readable CPU description
CPU string `json:"cpu,required"`
// Human-readable disk description
Disk string `json:"disk,required"`
// Human-readable GPU description
GPU string `json:"gpu,required"`
// Human-readable NIC description
Network string `json:"network,required"`
// Human-readable RAM description
Ram string `json:"ram,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CPU respjson.Field
Disk respjson.Field
GPU respjson.Field
Network respjson.Field
Ram respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Additional bare metal hardware description
func (GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareDescription) RawJSON ¶
func (r GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareDescription) RawJSON() string
Returns the unmodified JSON received from the API
func (*GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareDescription) UnmarshalJSON ¶
func (r *GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareDescription) UnmarshalJSON(data []byte) error
type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareProperties ¶
type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareProperties struct {
// The total count of available GPUs.
GPUCount int64 `json:"gpu_count,required"`
// The manufacturer of the graphics processing GPU
GPUManufacturer string `json:"gpu_manufacturer,required"`
// GPU model
GPUModel string `json:"gpu_model,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
GPUCount respjson.Field
GPUManufacturer respjson.Field
GPUModel respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Additional bare metal hardware properties
func (GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareProperties) RawJSON ¶
func (r GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareProperties) RawJSON() string
Returns the unmodified JSON received from the API
func (*GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareProperties) UnmarshalJSON ¶
func (r *GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareProperties) UnmarshalJSON(data []byte) error
type GPUBaremetalFlavorList ¶
type GPUBaremetalFlavorList struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []GPUBaremetalFlavorUnion `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (GPUBaremetalFlavorList) RawJSON ¶
func (r GPUBaremetalFlavorList) RawJSON() string
Returns the unmodified JSON received from the API
func (*GPUBaremetalFlavorList) UnmarshalJSON ¶
func (r *GPUBaremetalFlavorList) UnmarshalJSON(data []byte) error
type GPUBaremetalFlavorUnion ¶
type GPUBaremetalFlavorUnion struct {
Architecture string `json:"architecture"`
Capacity int64 `json:"capacity"`
Disabled bool `json:"disabled"`
// This field is a union of
// [GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareDescription],
// [GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareDescription]
HardwareDescription GPUBaremetalFlavorUnionHardwareDescription `json:"hardware_description"`
// This field is a union of
// [GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareProperties],
// [GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareProperties]
HardwareProperties GPUBaremetalFlavorUnionHardwareProperties `json:"hardware_properties"`
Name string `json:"name"`
// This field is from variant
// [GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPrice].
Price GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPricePrice `json:"price"`
JSON struct {
Architecture respjson.Field
Capacity respjson.Field
Disabled respjson.Field
HardwareDescription respjson.Field
HardwareProperties respjson.Field
Name respjson.Field
Price respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
GPUBaremetalFlavorUnion contains all possible properties and values from GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPrice, GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPrice.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (GPUBaremetalFlavorUnion) AsBareMetalGPUFlavorsChemaWithPrice ¶
func (u GPUBaremetalFlavorUnion) AsBareMetalGPUFlavorsChemaWithPrice() (v GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPrice)
func (GPUBaremetalFlavorUnion) AsBareMetalGPUFlavorsChemaWithoutPrice ¶
func (u GPUBaremetalFlavorUnion) AsBareMetalGPUFlavorsChemaWithoutPrice() (v GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPrice)
func (GPUBaremetalFlavorUnion) RawJSON ¶
func (u GPUBaremetalFlavorUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*GPUBaremetalFlavorUnion) UnmarshalJSON ¶
func (r *GPUBaremetalFlavorUnion) UnmarshalJSON(data []byte) error
type GPUBaremetalFlavorUnionHardwareDescription ¶
type GPUBaremetalFlavorUnionHardwareDescription struct {
CPU string `json:"cpu"`
Disk string `json:"disk"`
GPU string `json:"gpu"`
Network string `json:"network"`
Ram string `json:"ram"`
JSON struct {
CPU respjson.Field
Disk respjson.Field
GPU respjson.Field
Network respjson.Field
Ram respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
GPUBaremetalFlavorUnionHardwareDescription is an implicit subunion of GPUBaremetalFlavorUnion. GPUBaremetalFlavorUnionHardwareDescription provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the GPUBaremetalFlavorUnion.
func (*GPUBaremetalFlavorUnionHardwareDescription) UnmarshalJSON ¶
func (r *GPUBaremetalFlavorUnionHardwareDescription) UnmarshalJSON(data []byte) error
type GPUBaremetalFlavorUnionHardwareProperties ¶
type GPUBaremetalFlavorUnionHardwareProperties struct {
GPUCount int64 `json:"gpu_count"`
GPUManufacturer string `json:"gpu_manufacturer"`
GPUModel string `json:"gpu_model"`
JSON struct {
GPUCount respjson.Field
GPUManufacturer respjson.Field
GPUModel respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
GPUBaremetalFlavorUnionHardwareProperties is an implicit subunion of GPUBaremetalFlavorUnion. GPUBaremetalFlavorUnionHardwareProperties provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the GPUBaremetalFlavorUnion.
func (*GPUBaremetalFlavorUnionHardwareProperties) UnmarshalJSON ¶
func (r *GPUBaremetalFlavorUnionHardwareProperties) UnmarshalJSON(data []byte) error
type GPUImage ¶
type GPUImage struct {
// Image ID
ID string `json:"id,required" format:"uuid4"`
// Datetime when the image was created
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Minimal boot volume required
MinDisk int64 `json:"min_disk,required"`
// Minimal VM RAM required
MinRam int64 `json:"min_ram,required"`
// Image name
Name string `json:"name,required"`
// Image status
Status string `json:"status,required"`
// List of key-value tags associated with the resource. A tag is a key-value pair
// that can be associated with a resource, enabling efficient filtering and
// grouping for better organization and management. Some tags are read-only and
// cannot be modified by the user. Tags are also integrated with cost reports,
// allowing cost data to be filtered based on tag keys or values.
Tags []Tag `json:"tags,required"`
// Datetime when the image was updated
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
// Image visibility. Globally visible images are public
Visibility string `json:"visibility,required"`
// Image architecture type
Architecture string `json:"architecture,nullable"`
// OS Distribution
OsDistro string `json:"os_distro,nullable"`
// The operating system installed on the image
OsType string `json:"os_type,nullable"`
// OS version, i.e. 19.04 (for Ubuntu) or 9.4 for Debian
OsVersion string `json:"os_version,nullable"`
// Image size in bytes.
Size int64 `json:"size"`
// Whether the image supports SSH key or not
SSHKey string `json:"ssh_key,nullable"`
// The UUID of the active task that currently holds a lock on the resource. This
// lock prevents concurrent modifications to ensure consistency. If `null`, the
// resource is not locked.
TaskID string `json:"task_id,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
MinDisk respjson.Field
MinRam respjson.Field
Name respjson.Field
Status respjson.Field
Tags respjson.Field
UpdatedAt respjson.Field
Visibility respjson.Field
Architecture respjson.Field
OsDistro respjson.Field
OsType respjson.Field
OsVersion respjson.Field
Size respjson.Field
SSHKey respjson.Field
TaskID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*GPUImage) UnmarshalJSON ¶
type GPUImageList ¶
type GPUImageList struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []GPUImage `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (GPUImageList) RawJSON ¶
func (r GPUImageList) RawJSON() string
Returns the unmodified JSON received from the API
func (*GPUImageList) UnmarshalJSON ¶
func (r *GPUImageList) UnmarshalJSON(data []byte) error
type HTTPMethod ¶
type HTTPMethod string
const ( HTTPMethodConnect HTTPMethod = "CONNECT" HTTPMethodDelete HTTPMethod = "DELETE" HTTPMethodGet HTTPMethod = "GET" HTTPMethodHead HTTPMethod = "HEAD" HTTPMethodOptions HTTPMethod = "OPTIONS" HTTPMethodPatch HTTPMethod = "PATCH" HTTPMethodPost HTTPMethod = "POST" HTTPMethodPut HTTPMethod = "PUT" HTTPMethodTrace HTTPMethod = "TRACE" )
type HealthMonitor ¶
type HealthMonitor struct {
// Health monitor ID
ID string `json:"id,required" format:"uuid4"`
// Administrative state of the resource. When set to true, the resource is enabled
// and operational. When set to false, the resource is disabled and will not
// process traffic. When null is passed, the value is skipped and defaults to true.
AdminStateUp bool `json:"admin_state_up,required"`
// The time, in seconds, between sending probes to members
Delay int64 `json:"delay,required"`
// Number of successes before the member is switched to ONLINE state
MaxRetries int64 `json:"max_retries,required"`
// Number of failures before the member is switched to ERROR state
MaxRetriesDown int64 `json:"max_retries_down,required"`
// Health Monitor operating status
//
// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
OperatingStatus LoadBalancerOperatingStatus `json:"operating_status,required"`
// Health monitor lifecycle status
//
// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
// "PENDING_UPDATE".
ProvisioningStatus ProvisioningStatus `json:"provisioning_status,required"`
// The maximum time to connect. Must be less than the delay value
Timeout int64 `json:"timeout,required"`
// Health monitor type. Once health monitor is created, cannot be changed.
//
// Any of "HTTP", "HTTPS", "K8S", "PING", "TCP", "TLS-HELLO", "UDP-CONNECT".
Type LbHealthMonitorType `json:"type,required"`
ExpectedCodes string `json:"expected_codes,nullable"`
// HTTP method
//
// Any of "CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT",
// "TRACE".
HTTPMethod HTTPMethod `json:"http_method,nullable"`
// URL Path. Defaults to '/'
URLPath string `json:"url_path,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AdminStateUp respjson.Field
Delay respjson.Field
MaxRetries respjson.Field
MaxRetriesDown respjson.Field
OperatingStatus respjson.Field
ProvisioningStatus respjson.Field
Timeout respjson.Field
Type respjson.Field
ExpectedCodes respjson.Field
HTTPMethod respjson.Field
URLPath respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (HealthMonitor) RawJSON ¶
func (r HealthMonitor) RawJSON() string
Returns the unmodified JSON received from the API
func (*HealthMonitor) UnmarshalJSON ¶
func (r *HealthMonitor) UnmarshalJSON(data []byte) error
type HealthMonitorStatus ¶
type HealthMonitorStatus struct {
// UUID of the entity
ID string `json:"id,required" format:"uuid"`
// Operating status of the entity
//
// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
OperatingStatus LoadBalancerOperatingStatus `json:"operating_status,required"`
// Provisioning status of the entity
//
// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
// "PENDING_UPDATE".
ProvisioningStatus ProvisioningStatus `json:"provisioning_status,required"`
// Type of the Health Monitor
//
// Any of "HTTP", "HTTPS", "K8S", "PING", "TCP", "TLS-HELLO", "UDP-CONNECT".
Type LbHealthMonitorType `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
OperatingStatus respjson.Field
ProvisioningStatus respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (HealthMonitorStatus) RawJSON ¶
func (r HealthMonitorStatus) RawJSON() string
Returns the unmodified JSON received from the API
func (*HealthMonitorStatus) UnmarshalJSON ¶
func (r *HealthMonitorStatus) UnmarshalJSON(data []byte) error
type IPAssignment ¶
type IPAssignment struct {
// IP address
IPAddress string `json:"ip_address,required" format:"ipvanyaddress"`
// ID of the subnet that allocated the IP
SubnetID string `json:"subnet_id,required" format:"uuid4"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
IPAddress respjson.Field
SubnetID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (IPAssignment) RawJSON ¶
func (r IPAssignment) RawJSON() string
Returns the unmodified JSON received from the API
func (*IPAssignment) UnmarshalJSON ¶
func (r *IPAssignment) UnmarshalJSON(data []byte) error
type IPRangeService ¶
type IPRangeService struct {
Options []option.RequestOption
}
IPRangeService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewIPRangeService method instead.
func NewIPRangeService ¶
func NewIPRangeService(opts ...option.RequestOption) (r IPRangeService)
NewIPRangeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*IPRangeService) List ¶
func (r *IPRangeService) List(ctx context.Context, opts ...option.RequestOption) (res *IPRanges, err error)
Returns the complete list of IPv4 and IPv6 address ranges that Cloud uses for outbound (egress) traffic. Typical reasons to call this endpoint:
- Host-file delivery workflows – You upload images or other assets to the Cloud and share a download link that points to your own infrastructure. Add these egress prefixes to your firewall or object-storage allow-list so our clients can fetch the files without being blocked.
- Push integrations / webhooks – You subscribe to the user-actions event log and Cloud pushes events to your listener endpoint. Whitelisting the egress IP ranges lets you accept only traffic that originates from us.
- General security controls, audit tooling, or SIEM rules that need to verify that traffic truly comes from the Cloud. The list is global (covers all regions) and refreshed automatically whenever Gcore allocates new egress IP space. The response is an array of CIDR blocks; duplicate prefixes are not returned.
type IPRanges ¶
type IPRanges struct {
// IP ranges list
Ranges []string `json:"ranges,required" format:"ipv4interface"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Ranges respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*IPRanges) UnmarshalJSON ¶
type IPWithSubnet ¶
type IPWithSubnet struct {
// IP address
IPAddress string `json:"ip_address,required" format:"ipvanyaddress"`
// Subnet details
Subnet Subnet `json:"subnet,required"`
// ID of the subnet that allocated the IP
SubnetID string `json:"subnet_id,required" format:"uuid4"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
IPAddress respjson.Field
Subnet respjson.Field
SubnetID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (IPWithSubnet) RawJSON ¶
func (r IPWithSubnet) RawJSON() string
Returns the unmodified JSON received from the API
func (*IPWithSubnet) UnmarshalJSON ¶
func (r *IPWithSubnet) UnmarshalJSON(data []byte) error
type Image ¶
type Image struct {
// Image ID
ID string `json:"id,required"`
// Datetime when the image was created
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Disk format
DiskFormat string `json:"disk_format,required"`
// Minimal boot volume required
MinDisk int64 `json:"min_disk,required"`
// Minimal VM RAM required
MinRam int64 `json:"min_ram,required"`
// Image display name
Name string `json:"name,required"`
// OS Distribution, i.e. Debian, CentOS, Ubuntu, CoreOS etc.
OsDistro string `json:"os_distro,required"`
// The operating system installed on the image.
//
// Any of "linux", "windows".
OsType ImageOsType `json:"os_type,required"`
// OS version, i.e. 19.04 (for Ubuntu) or 9.4 for Debian
OsVersion string `json:"os_version,required"`
// Project ID
ProjectID int64 `json:"project_id,required"`
// Region name
Region string `json:"region,required"`
// Region ID
RegionID int64 `json:"region_id,required"`
// Image size in bytes
Size int64 `json:"size,required"`
// Image status, i.e. active
Status string `json:"status,required"`
// List of key-value tags associated with the resource. A tag is a key-value pair
// that can be associated with a resource, enabling efficient filtering and
// grouping for better organization and management. Some tags are read-only and
// cannot be modified by the user. Tags are also integrated with cost reports,
// allowing cost data to be filtered based on tag keys or values.
Tags []Tag `json:"tags,required"`
// Datetime when the image was updated
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
// Image visibility. Globally visible images are public
Visibility string `json:"visibility,required"`
// An image architecture type: aarch64, `x86_64`
//
// Any of "aarch64", "x86_64".
Architecture ImageArchitecture `json:"architecture"`
// Task that created this entity
CreatorTaskID string `json:"creator_task_id,nullable"`
// Image description
Description string `json:"description,nullable"`
DisplayOrder int64 `json:"display_order,nullable"`
// Specifies the type of firmware with which to boot the guest.
//
// Any of "bios", "uefi".
HwFirmwareType ImageHwFirmwareType `json:"hw_firmware_type,nullable"`
// A virtual chipset type.
//
// Any of "pc", "q35".
HwMachineType ImageHwMachineType `json:"hw_machine_type,nullable"`
// Set to true if the image will be used by bare metal servers. Defaults to false.
IsBaremetal bool `json:"is_baremetal,nullable"`
// Whether the image supports SSH key or not
//
// Any of "allow", "deny", "required".
SSHKey ImageSSHKey `json:"ssh_key,nullable"`
// The UUID of the active task that currently holds a lock on the resource. This
// lock prevents concurrent modifications to ensure consistency. If `null`, the
// resource is not locked.
TaskID string `json:"task_id,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
DiskFormat respjson.Field
MinDisk respjson.Field
MinRam respjson.Field
Name respjson.Field
OsDistro respjson.Field
OsType respjson.Field
OsVersion respjson.Field
ProjectID respjson.Field
Region respjson.Field
RegionID respjson.Field
Size respjson.Field
Status respjson.Field
Tags respjson.Field
UpdatedAt respjson.Field
Visibility respjson.Field
Architecture respjson.Field
CreatorTaskID respjson.Field
Description respjson.Field
DisplayOrder respjson.Field
HwFirmwareType respjson.Field
HwMachineType respjson.Field
IsBaremetal respjson.Field
SSHKey respjson.Field
TaskID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Image) UnmarshalJSON ¶
type ImageArchitecture ¶
type ImageArchitecture string
An image architecture type: aarch64, `x86_64`
const ( ImageArchitectureAarch64 ImageArchitecture = "aarch64" ImageArchitectureX86_64 ImageArchitecture = "x86_64" )
type ImageHwFirmwareType ¶
type ImageHwFirmwareType string
Specifies the type of firmware with which to boot the guest.
const ( ImageHwFirmwareTypeBios ImageHwFirmwareType = "bios" ImageHwFirmwareTypeUefi ImageHwFirmwareType = "uefi" )
type ImageHwMachineType ¶
type ImageHwMachineType string
A virtual chipset type.
const ( ImageHwMachineTypePc ImageHwMachineType = "pc" ImageHwMachineTypeQ35 ImageHwMachineType = "q35" )
type ImageList ¶
type ImageList struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []Image `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*ImageList) UnmarshalJSON ¶
type ImageOsType ¶
type ImageOsType string
The operating system installed on the image.
const ( ImageOsTypeLinux ImageOsType = "linux" ImageOsTypeWindows ImageOsType = "windows" )
type ImageSSHKey ¶
type ImageSSHKey string
Whether the image supports SSH key or not
const ( ImageSSHKeyAllow ImageSSHKey = "allow" ImageSSHKeyDeny ImageSSHKey = "deny" ImageSSHKeyRequired ImageSSHKey = "required" )
type InferenceDeployment ¶ added in v0.5.0
type InferenceDeployment struct {
// Address of the inference instance
Address string `json:"address,required" format:"uri"`
// `true` if instance uses API key authentication.
// `"Authorization": "Bearer ****\*"` or `"X-Api-Key": "****\*"` header is required
// for the requests to the instance if enabled.
//
// Deprecated: deprecated
AuthEnabled bool `json:"auth_enabled,required"`
// Command to be executed when running a container from an image.
Command string `json:"command,required"`
// List of containers for the inference instance
Containers []InferenceDeploymentContainer `json:"containers,required"`
// Inference instance creation date in ISO 8601 format.
CreatedAt string `json:"created_at,required"`
// Registry credentials name
CredentialsName string `json:"credentials_name,required"`
// Inference instance description.
Description string `json:"description,required"`
// Environment variables for the inference instance
Envs map[string]string `json:"envs,required"`
// Flavor name for the inference instance
FlavorName string `json:"flavor_name,required"`
// Docker image for the inference instance. This field should contain the image
// name and tag in the format 'name:tag', e.g., 'nginx:latest'. It defaults to
// Docker Hub as the image registry, but any accessible Docker image URL can be
// specified.
Image string `json:"image,required"`
// Ingress options for the inference instance
IngressOpts InferenceDeploymentIngressOpts `json:"ingress_opts,required"`
// Listening port for the inference instance.
ListeningPort int64 `json:"listening_port,required"`
// Logging configuration for the inference instance
Logging Logging `json:"logging,required"`
// Inference instance name.
Name string `json:"name,required"`
// Indicates to which parent object this inference belongs to.
ObjectReferences []InferenceDeploymentObjectReference `json:"object_references,required"`
// Probes configured for all containers of the inference instance.
Probes InferenceDeploymentProbes `json:"probes,required"`
// Project ID. If not provided, your default project ID will be used.
ProjectID int64 `json:"project_id,required"`
// Inference instance status. Value can be one of the following:
//
// - `DEPLOYING` - The instance is being deployed. Containers are not yet created.
// - `PARTIALLYDEPLOYED` - All containers have been created, but some may not be
// ready yet. Instances stuck in this state typically indicate either image being
// pulled, or a failure of some kind. In the latter case, the `error_message`
// field of the respective container object in the `containers` collection
// explains the failure reason.
// - `ACTIVE` - The instance is running and ready to accept requests.
// - `DISABLED` - The instance is disabled and not accepting any requests.
// - `PENDING` - The instance is running but scaled to zero. It will be
// automatically scaled up when a request is made.
// - `DELETING` - The instance is being deleted.
//
// Any of "ACTIVE", "DELETING", "DEPLOYING", "DISABLED", "PARTIALLYDEPLOYED",
// "PENDING".
Status InferenceDeploymentStatus `json:"status,required"`
// Specifies the duration in seconds without any requests after which the
// containers will be downscaled to their minimum scale value as defined by
// `scale.min`. If set, this helps in optimizing resource usage by reducing the
// number of container instances during periods of inactivity.
Timeout int64 `json:"timeout,required"`
// List of API keys for the inference instance
APIKeys []string `json:"api_keys,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Address respjson.Field
AuthEnabled respjson.Field
Command respjson.Field
Containers respjson.Field
CreatedAt respjson.Field
CredentialsName respjson.Field
Description respjson.Field
Envs respjson.Field
FlavorName respjson.Field
Image respjson.Field
IngressOpts respjson.Field
ListeningPort respjson.Field
Logging respjson.Field
Name respjson.Field
ObjectReferences respjson.Field
Probes respjson.Field
ProjectID respjson.Field
Status respjson.Field
Timeout respjson.Field
APIKeys respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InferenceDeployment) RawJSON ¶ added in v0.5.0
func (r InferenceDeployment) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceDeployment) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeployment) UnmarshalJSON(data []byte) error
type InferenceDeploymentAPIKey ¶ added in v0.5.0
type InferenceDeploymentAPIKey struct {
// API key secret
Secret string `json:"secret,required"`
// API key status
//
// Any of "PENDING", "READY".
Status InferenceDeploymentAPIKeyStatus `json:"status,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Secret respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InferenceDeploymentAPIKey) RawJSON ¶ added in v0.5.0
func (r InferenceDeploymentAPIKey) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceDeploymentAPIKey) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentAPIKey) UnmarshalJSON(data []byte) error
type InferenceDeploymentAPIKeyStatus ¶ added in v0.5.0
type InferenceDeploymentAPIKeyStatus string
API key status
const ( InferenceDeploymentAPIKeyStatusPending InferenceDeploymentAPIKeyStatus = "PENDING" InferenceDeploymentAPIKeyStatusReady InferenceDeploymentAPIKeyStatus = "READY" )
type InferenceDeploymentContainer ¶ added in v0.5.0
type InferenceDeploymentContainer struct {
// Address of the inference instance
Address string `json:"address,required" format:"uri"`
// Status of the containers deployment
DeployStatus InferenceDeploymentContainerDeployStatus `json:"deploy_status,required"`
// Error message if the container deployment failed
ErrorMessage string `json:"error_message,required"`
// Region name for the container
RegionID int64 `json:"region_id,required"`
// Scale for the container
Scale InferenceDeploymentContainerScale `json:"scale,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Address respjson.Field
DeployStatus respjson.Field
ErrorMessage respjson.Field
RegionID respjson.Field
Scale respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InferenceDeploymentContainer) RawJSON ¶ added in v0.5.0
func (r InferenceDeploymentContainer) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceDeploymentContainer) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentContainer) UnmarshalJSON(data []byte) error
type InferenceDeploymentContainerDeployStatus ¶ added in v0.5.0
type InferenceDeploymentContainerDeployStatus struct {
// Number of ready instances
Ready int64 `json:"ready,required"`
// Total number of instances
Total int64 `json:"total,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Ready respjson.Field
Total respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Status of the containers deployment
func (InferenceDeploymentContainerDeployStatus) RawJSON ¶ added in v0.5.0
func (r InferenceDeploymentContainerDeployStatus) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceDeploymentContainerDeployStatus) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentContainerDeployStatus) UnmarshalJSON(data []byte) error
type InferenceDeploymentContainerScale ¶ added in v0.5.0
type InferenceDeploymentContainerScale struct {
// Cooldown period between scaling actions in seconds
CooldownPeriod int64 `json:"cooldown_period,required"`
// Maximum scale for the container
Max int64 `json:"max,required"`
// Minimum scale for the container
Min int64 `json:"min,required"`
// Polling interval for scaling triggers in seconds
PollingInterval int64 `json:"polling_interval,required"`
// Triggers for scaling actions
Triggers InferenceDeploymentContainerScaleTriggers `json:"triggers,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CooldownPeriod respjson.Field
Max respjson.Field
Min respjson.Field
PollingInterval respjson.Field
Triggers respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Scale for the container
func (InferenceDeploymentContainerScale) RawJSON ¶ added in v0.5.0
func (r InferenceDeploymentContainerScale) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceDeploymentContainerScale) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentContainerScale) UnmarshalJSON(data []byte) error
type InferenceDeploymentContainerScaleTriggers ¶ added in v0.5.0
type InferenceDeploymentContainerScaleTriggers struct {
// CPU trigger configuration
CPU InferenceDeploymentContainerScaleTriggersCPU `json:"cpu,required"`
// GPU memory trigger configuration. Calculated by `DCGM_FI_DEV_MEM_COPY_UTIL`
// metric
GPUMemory InferenceDeploymentContainerScaleTriggersGPUMemory `json:"gpu_memory,required"`
// GPU utilization trigger configuration. Calculated by `DCGM_FI_DEV_GPU_UTIL`
// metric
GPUUtilization InferenceDeploymentContainerScaleTriggersGPUUtilization `json:"gpu_utilization,required"`
// HTTP trigger configuration
HTTP InferenceDeploymentContainerScaleTriggersHTTP `json:"http,required"`
// Memory trigger configuration
Memory InferenceDeploymentContainerScaleTriggersMemory `json:"memory,required"`
// SQS trigger configuration
Sqs InferenceDeploymentContainerScaleTriggersSqs `json:"sqs,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CPU respjson.Field
GPUMemory respjson.Field
GPUUtilization respjson.Field
HTTP respjson.Field
Memory respjson.Field
Sqs respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Triggers for scaling actions
func (InferenceDeploymentContainerScaleTriggers) RawJSON ¶ added in v0.5.0
func (r InferenceDeploymentContainerScaleTriggers) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceDeploymentContainerScaleTriggers) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentContainerScaleTriggers) UnmarshalJSON(data []byte) error
type InferenceDeploymentContainerScaleTriggersCPU ¶ added in v0.5.0
type InferenceDeploymentContainerScaleTriggersCPU struct {
// Threshold value for the trigger in percentage
Threshold int64 `json:"threshold,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Threshold respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
CPU trigger configuration
func (InferenceDeploymentContainerScaleTriggersCPU) RawJSON ¶ added in v0.5.0
func (r InferenceDeploymentContainerScaleTriggersCPU) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceDeploymentContainerScaleTriggersCPU) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentContainerScaleTriggersCPU) UnmarshalJSON(data []byte) error
type InferenceDeploymentContainerScaleTriggersGPUMemory ¶ added in v0.5.0
type InferenceDeploymentContainerScaleTriggersGPUMemory struct {
// Threshold value for the trigger in percentage
Threshold int64 `json:"threshold,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Threshold respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
GPU memory trigger configuration. Calculated by `DCGM_FI_DEV_MEM_COPY_UTIL` metric
func (InferenceDeploymentContainerScaleTriggersGPUMemory) RawJSON ¶ added in v0.5.0
func (r InferenceDeploymentContainerScaleTriggersGPUMemory) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceDeploymentContainerScaleTriggersGPUMemory) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentContainerScaleTriggersGPUMemory) UnmarshalJSON(data []byte) error
type InferenceDeploymentContainerScaleTriggersGPUUtilization ¶ added in v0.5.0
type InferenceDeploymentContainerScaleTriggersGPUUtilization struct {
// Threshold value for the trigger in percentage
Threshold int64 `json:"threshold,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Threshold respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
GPU utilization trigger configuration. Calculated by `DCGM_FI_DEV_GPU_UTIL` metric
func (InferenceDeploymentContainerScaleTriggersGPUUtilization) RawJSON ¶ added in v0.5.0
func (r InferenceDeploymentContainerScaleTriggersGPUUtilization) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceDeploymentContainerScaleTriggersGPUUtilization) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentContainerScaleTriggersGPUUtilization) UnmarshalJSON(data []byte) error
type InferenceDeploymentContainerScaleTriggersHTTP ¶ added in v0.5.0
type InferenceDeploymentContainerScaleTriggersHTTP struct {
// Request count per 'window' seconds for the http trigger
Rate int64 `json:"rate,required"`
// Time window for rate calculation in seconds
Window int64 `json:"window,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Rate respjson.Field
Window respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
HTTP trigger configuration
func (InferenceDeploymentContainerScaleTriggersHTTP) RawJSON ¶ added in v0.5.0
func (r InferenceDeploymentContainerScaleTriggersHTTP) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceDeploymentContainerScaleTriggersHTTP) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentContainerScaleTriggersHTTP) UnmarshalJSON(data []byte) error
type InferenceDeploymentContainerScaleTriggersMemory ¶ added in v0.5.0
type InferenceDeploymentContainerScaleTriggersMemory struct {
// Threshold value for the trigger in percentage
Threshold int64 `json:"threshold,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Threshold respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Memory trigger configuration
func (InferenceDeploymentContainerScaleTriggersMemory) RawJSON ¶ added in v0.5.0
func (r InferenceDeploymentContainerScaleTriggersMemory) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceDeploymentContainerScaleTriggersMemory) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentContainerScaleTriggersMemory) UnmarshalJSON(data []byte) error
type InferenceDeploymentContainerScaleTriggersSqs ¶ added in v0.5.0
type InferenceDeploymentContainerScaleTriggersSqs struct {
// Number of messages for activation
ActivationQueueLength int64 `json:"activation_queue_length,required"`
// Custom AWS endpoint
AwsEndpoint string `json:"aws_endpoint,required"`
// AWS region
AwsRegion string `json:"aws_region,required"`
// Number of messages for one replica
QueueLength int64 `json:"queue_length,required"`
// SQS queue URL
QueueURL string `json:"queue_url,required"`
// Scale on delayed messages
ScaleOnDelayed bool `json:"scale_on_delayed,required"`
// Scale on in-flight messages
ScaleOnFlight bool `json:"scale_on_flight,required"`
// Auth secret name
SecretName string `json:"secret_name,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActivationQueueLength respjson.Field
AwsEndpoint respjson.Field
AwsRegion respjson.Field
QueueLength respjson.Field
QueueURL respjson.Field
ScaleOnDelayed respjson.Field
ScaleOnFlight respjson.Field
SecretName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
SQS trigger configuration
func (InferenceDeploymentContainerScaleTriggersSqs) RawJSON ¶ added in v0.5.0
func (r InferenceDeploymentContainerScaleTriggersSqs) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceDeploymentContainerScaleTriggersSqs) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentContainerScaleTriggersSqs) UnmarshalJSON(data []byte) error
type InferenceDeploymentIngressOpts ¶ added in v0.5.0
type InferenceDeploymentIngressOpts struct {
// Disable response buffering if true. A client usually has a much slower
// connection and can not consume the response data as fast as it is produced by an
// upstream application. Ingress tries to buffer the whole response in order to
// release the upstream application as soon as possible.By default, the response
// buffering is enabled.
DisableResponseBuffering bool `json:"disable_response_buffering,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DisableResponseBuffering respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Ingress options for the inference instance
func (InferenceDeploymentIngressOpts) RawJSON ¶ added in v0.5.0
func (r InferenceDeploymentIngressOpts) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceDeploymentIngressOpts) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentIngressOpts) UnmarshalJSON(data []byte) error
type InferenceDeploymentListParams ¶
type InferenceDeploymentListParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Optional. Limit the number of returned items
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Optional. Offset value is used to exclude the first set of records from the
// result
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (InferenceDeploymentListParams) URLQuery ¶
func (r InferenceDeploymentListParams) URLQuery() (v url.Values, err error)
URLQuery serializes InferenceDeploymentListParams's query parameters as `url.Values`.
type InferenceDeploymentLog ¶ added in v0.5.0
type InferenceDeploymentLog struct {
// Log message.
Message string `json:"message,required"`
// Pod name.
Pod string `json:"pod,required"`
// Region ID where the container is deployed.
RegionID int64 `json:"region_id,required"`
// Log message timestamp in ISO 8601 format.
Time time.Time `json:"time,required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Pod respjson.Field
RegionID respjson.Field
Time respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InferenceDeploymentLog) RawJSON ¶ added in v0.5.0
func (r InferenceDeploymentLog) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceDeploymentLog) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentLog) UnmarshalJSON(data []byte) error
type InferenceDeploymentLogListParams ¶
type InferenceDeploymentLogListParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `query:"region_id,omitzero" json:"-"`
// Optional. Limit the number of returned items
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Optional. Offset value is used to exclude the first set of records from the
// result
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Order by field
//
// Any of "time.asc", "time.desc".
OrderBy InferenceDeploymentLogListParamsOrderBy `query:"order_by,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (InferenceDeploymentLogListParams) URLQuery ¶
func (r InferenceDeploymentLogListParams) URLQuery() (v url.Values, err error)
URLQuery serializes InferenceDeploymentLogListParams's query parameters as `url.Values`.
type InferenceDeploymentLogListParamsOrderBy ¶
type InferenceDeploymentLogListParamsOrderBy string
Order by field
const ( InferenceDeploymentLogListParamsOrderByTimeAsc InferenceDeploymentLogListParamsOrderBy = "time.asc" InferenceDeploymentLogListParamsOrderByTimeDesc InferenceDeploymentLogListParamsOrderBy = "time.desc" )
type InferenceDeploymentLogService ¶
type InferenceDeploymentLogService struct {
Options []option.RequestOption
}
InferenceDeploymentLogService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInferenceDeploymentLogService method instead.
func NewInferenceDeploymentLogService ¶
func NewInferenceDeploymentLogService(opts ...option.RequestOption) (r InferenceDeploymentLogService)
NewInferenceDeploymentLogService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*InferenceDeploymentLogService) List ¶
func (r *InferenceDeploymentLogService) List(ctx context.Context, deploymentName string, params InferenceDeploymentLogListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[InferenceDeploymentLog], err error)
Get inference deployment logs
func (*InferenceDeploymentLogService) ListAutoPaging ¶
func (r *InferenceDeploymentLogService) ListAutoPaging(ctx context.Context, deploymentName string, params InferenceDeploymentLogListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[InferenceDeploymentLog]
Get inference deployment logs
type InferenceDeploymentNewParams ¶
type InferenceDeploymentNewParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// List of containers for the inference instance.
Containers []InferenceDeploymentNewParamsContainer `json:"containers,omitzero,required"`
// Flavor name for the inference instance.
FlavorName string `json:"flavor_name,required"`
// Docker image for the inference instance. This field should contain the image
// name and tag in the format 'name:tag', e.g., 'nginx:latest'. It defaults to
// Docker Hub as the image registry, but any accessible Docker image URL can be
// specified.
Image string `json:"image,required"`
// Listening port for the inference instance.
ListeningPort int64 `json:"listening_port,required"`
// Inference instance name.
Name string `json:"name,required"`
// Registry credentials name
CredentialsName param.Opt[string] `json:"credentials_name,omitzero"`
// Inference instance description.
Description param.Opt[string] `json:"description,omitzero"`
// Specifies the duration in seconds without any requests after which the
// containers will be downscaled to their minimum scale value as defined by
// `scale.min`. If set, this helps in optimizing resource usage by reducing the
// number of container instances during periods of inactivity. The default value
// when the parameter is not set is 120.
Timeout param.Opt[int64] `json:"timeout,omitzero"`
// Set to `true` to enable API key authentication for the inference instance.
// `"Authorization": "Bearer ****\*"` or `"X-Api-Key": "****\*"` header is required
// for the requests to the instance if enabled. This field is deprecated and will
// be removed in the future. Use `api_keys` field instead.If `auth_enabled` and
// `api_keys` are both specified, a ValidationError will be raised.
AuthEnabled param.Opt[bool] `json:"auth_enabled,omitzero"`
// Command to be executed when running a container from an image.
Command []string `json:"command,omitzero"`
// Ingress options for the inference instance
IngressOpts InferenceDeploymentNewParamsIngressOpts `json:"ingress_opts,omitzero"`
// Logging configuration for the inference instance
Logging InferenceDeploymentNewParamsLogging `json:"logging,omitzero"`
// Probes configured for all containers of the inference instance. If probes are
// not provided, and the `image_name` is from a the Model Catalog registry, the
// default probes will be used.
Probes InferenceDeploymentNewParamsProbes `json:"probes,omitzero"`
// List of API keys for the inference instance. Multiple keys can be attached to
// one deployment.If `auth_enabled` and `api_keys` are both specified, a
// ValidationError will be raised.
APIKeys []string `json:"api_keys,omitzero"`
// Environment variables for the inference instance.
Envs map[string]string `json:"envs,omitzero"`
// contains filtered or unexported fields
}
func (InferenceDeploymentNewParams) MarshalJSON ¶
func (r InferenceDeploymentNewParams) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParams) UnmarshalJSON ¶
func (r *InferenceDeploymentNewParams) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsContainer ¶
type InferenceDeploymentNewParamsContainer struct {
// Region id for the container
RegionID int64 `json:"region_id,required"`
// Scale for the container
Scale InferenceDeploymentNewParamsContainerScale `json:"scale,omitzero,required"`
// contains filtered or unexported fields
}
The properties RegionID, Scale are required.
func (InferenceDeploymentNewParamsContainer) MarshalJSON ¶
func (r InferenceDeploymentNewParamsContainer) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsContainer) UnmarshalJSON ¶
func (r *InferenceDeploymentNewParamsContainer) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsContainerScale ¶
type InferenceDeploymentNewParamsContainerScale struct {
// Maximum scale for the container
Max int64 `json:"max,required"`
// Minimum scale for the container
Min int64 `json:"min,required"`
// Cooldown period between scaling actions in seconds
CooldownPeriod param.Opt[int64] `json:"cooldown_period,omitzero"`
// Polling interval for scaling triggers in seconds
PollingInterval param.Opt[int64] `json:"polling_interval,omitzero"`
// Triggers for scaling actions
Triggers InferenceDeploymentNewParamsContainerScaleTriggers `json:"triggers,omitzero"`
// contains filtered or unexported fields
}
Scale for the container
The properties Max, Min are required.
func (InferenceDeploymentNewParamsContainerScale) MarshalJSON ¶
func (r InferenceDeploymentNewParamsContainerScale) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsContainerScale) UnmarshalJSON ¶
func (r *InferenceDeploymentNewParamsContainerScale) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsContainerScaleTriggers ¶
type InferenceDeploymentNewParamsContainerScaleTriggers struct {
// CPU trigger configuration
CPU InferenceDeploymentNewParamsContainerScaleTriggersCPU `json:"cpu,omitzero"`
// GPU memory trigger configuration. Calculated by `DCGM_FI_DEV_MEM_COPY_UTIL`
// metric
GPUMemory InferenceDeploymentNewParamsContainerScaleTriggersGPUMemory `json:"gpu_memory,omitzero"`
// GPU utilization trigger configuration. Calculated by `DCGM_FI_DEV_GPU_UTIL`
// metric
GPUUtilization InferenceDeploymentNewParamsContainerScaleTriggersGPUUtilization `json:"gpu_utilization,omitzero"`
// HTTP trigger configuration
HTTP InferenceDeploymentNewParamsContainerScaleTriggersHTTP `json:"http,omitzero"`
// Memory trigger configuration
Memory InferenceDeploymentNewParamsContainerScaleTriggersMemory `json:"memory,omitzero"`
// SQS trigger configuration
Sqs InferenceDeploymentNewParamsContainerScaleTriggersSqs `json:"sqs,omitzero"`
// contains filtered or unexported fields
}
Triggers for scaling actions
func (InferenceDeploymentNewParamsContainerScaleTriggers) MarshalJSON ¶
func (r InferenceDeploymentNewParamsContainerScaleTriggers) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsContainerScaleTriggers) UnmarshalJSON ¶
func (r *InferenceDeploymentNewParamsContainerScaleTriggers) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsContainerScaleTriggersCPU ¶
type InferenceDeploymentNewParamsContainerScaleTriggersCPU struct {
// Threshold value for the trigger in percentage
Threshold int64 `json:"threshold,required"`
// contains filtered or unexported fields
}
CPU trigger configuration
The property Threshold is required.
func (InferenceDeploymentNewParamsContainerScaleTriggersCPU) MarshalJSON ¶
func (r InferenceDeploymentNewParamsContainerScaleTriggersCPU) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsContainerScaleTriggersCPU) UnmarshalJSON ¶
func (r *InferenceDeploymentNewParamsContainerScaleTriggersCPU) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsContainerScaleTriggersGPUMemory ¶
type InferenceDeploymentNewParamsContainerScaleTriggersGPUMemory struct {
// Threshold value for the trigger in percentage
Threshold int64 `json:"threshold,required"`
// contains filtered or unexported fields
}
GPU memory trigger configuration. Calculated by `DCGM_FI_DEV_MEM_COPY_UTIL` metric
The property Threshold is required.
func (InferenceDeploymentNewParamsContainerScaleTriggersGPUMemory) MarshalJSON ¶
func (r InferenceDeploymentNewParamsContainerScaleTriggersGPUMemory) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsContainerScaleTriggersGPUMemory) UnmarshalJSON ¶
func (r *InferenceDeploymentNewParamsContainerScaleTriggersGPUMemory) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsContainerScaleTriggersGPUUtilization ¶
type InferenceDeploymentNewParamsContainerScaleTriggersGPUUtilization struct {
// Threshold value for the trigger in percentage
Threshold int64 `json:"threshold,required"`
// contains filtered or unexported fields
}
GPU utilization trigger configuration. Calculated by `DCGM_FI_DEV_GPU_UTIL` metric
The property Threshold is required.
func (InferenceDeploymentNewParamsContainerScaleTriggersGPUUtilization) MarshalJSON ¶
func (r InferenceDeploymentNewParamsContainerScaleTriggersGPUUtilization) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsContainerScaleTriggersGPUUtilization) UnmarshalJSON ¶
func (r *InferenceDeploymentNewParamsContainerScaleTriggersGPUUtilization) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsContainerScaleTriggersHTTP ¶
type InferenceDeploymentNewParamsContainerScaleTriggersHTTP struct {
// Request count per 'window' seconds for the http trigger
Rate int64 `json:"rate,required"`
// Time window for rate calculation in seconds
Window int64 `json:"window,required"`
// contains filtered or unexported fields
}
HTTP trigger configuration
The properties Rate, Window are required.
func (InferenceDeploymentNewParamsContainerScaleTriggersHTTP) MarshalJSON ¶
func (r InferenceDeploymentNewParamsContainerScaleTriggersHTTP) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsContainerScaleTriggersHTTP) UnmarshalJSON ¶
func (r *InferenceDeploymentNewParamsContainerScaleTriggersHTTP) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsContainerScaleTriggersMemory ¶
type InferenceDeploymentNewParamsContainerScaleTriggersMemory struct {
// Threshold value for the trigger in percentage
Threshold int64 `json:"threshold,required"`
// contains filtered or unexported fields
}
Memory trigger configuration
The property Threshold is required.
func (InferenceDeploymentNewParamsContainerScaleTriggersMemory) MarshalJSON ¶
func (r InferenceDeploymentNewParamsContainerScaleTriggersMemory) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsContainerScaleTriggersMemory) UnmarshalJSON ¶
func (r *InferenceDeploymentNewParamsContainerScaleTriggersMemory) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsContainerScaleTriggersSqs ¶
type InferenceDeploymentNewParamsContainerScaleTriggersSqs struct {
// Number of messages for activation
ActivationQueueLength int64 `json:"activation_queue_length,required"`
// AWS region
AwsRegion string `json:"aws_region,required"`
// Number of messages for one replica
QueueLength int64 `json:"queue_length,required"`
// SQS queue URL
QueueURL string `json:"queue_url,required"`
// Auth secret name
SecretName string `json:"secret_name,required"`
// Custom AWS endpoint
AwsEndpoint param.Opt[string] `json:"aws_endpoint,omitzero"`
// Scale on delayed messages
ScaleOnDelayed param.Opt[bool] `json:"scale_on_delayed,omitzero"`
// Scale on in-flight messages
ScaleOnFlight param.Opt[bool] `json:"scale_on_flight,omitzero"`
// contains filtered or unexported fields
}
SQS trigger configuration
The properties ActivationQueueLength, AwsRegion, QueueLength, QueueURL, SecretName are required.
func (InferenceDeploymentNewParamsContainerScaleTriggersSqs) MarshalJSON ¶
func (r InferenceDeploymentNewParamsContainerScaleTriggersSqs) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsContainerScaleTriggersSqs) UnmarshalJSON ¶
func (r *InferenceDeploymentNewParamsContainerScaleTriggersSqs) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsIngressOpts ¶ added in v0.5.0
type InferenceDeploymentNewParamsIngressOpts struct {
// Disable response buffering if true. A client usually has a much slower
// connection and can not consume the response data as fast as it is produced by an
// upstream application. Ingress tries to buffer the whole response in order to
// release the upstream application as soon as possible.By default, the response
// buffering is enabled.
DisableResponseBuffering param.Opt[bool] `json:"disable_response_buffering,omitzero"`
// contains filtered or unexported fields
}
Ingress options for the inference instance
func (InferenceDeploymentNewParamsIngressOpts) MarshalJSON ¶ added in v0.5.0
func (r InferenceDeploymentNewParamsIngressOpts) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsIngressOpts) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentNewParamsIngressOpts) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsLogging ¶
type InferenceDeploymentNewParamsLogging struct {
// ID of the region in which the logs will be stored
DestinationRegionID param.Opt[int64] `json:"destination_region_id,omitzero"`
// The topic name to stream logs to
TopicName param.Opt[string] `json:"topic_name,omitzero"`
// Enable or disable log streaming
Enabled param.Opt[bool] `json:"enabled,omitzero"`
// Logs retention policy
RetentionPolicy LaasIndexRetentionPolicyParam `json:"retention_policy,omitzero"`
// contains filtered or unexported fields
}
Logging configuration for the inference instance
func (InferenceDeploymentNewParamsLogging) MarshalJSON ¶
func (r InferenceDeploymentNewParamsLogging) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsLogging) UnmarshalJSON ¶
func (r *InferenceDeploymentNewParamsLogging) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsProbes ¶
type InferenceDeploymentNewParamsProbes struct {
// Liveness probe configuration
LivenessProbe InferenceDeploymentNewParamsProbesLivenessProbe `json:"liveness_probe,omitzero"`
// Readiness probe configuration
ReadinessProbe InferenceDeploymentNewParamsProbesReadinessProbe `json:"readiness_probe,omitzero"`
// Startup probe configuration
StartupProbe InferenceDeploymentNewParamsProbesStartupProbe `json:"startup_probe,omitzero"`
// contains filtered or unexported fields
}
Probes configured for all containers of the inference instance. If probes are not provided, and the `image_name` is from a the Model Catalog registry, the default probes will be used.
func (InferenceDeploymentNewParamsProbes) MarshalJSON ¶
func (r InferenceDeploymentNewParamsProbes) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsProbes) UnmarshalJSON ¶
func (r *InferenceDeploymentNewParamsProbes) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsProbesLivenessProbe ¶ added in v0.5.0
type InferenceDeploymentNewParamsProbesLivenessProbe struct {
// Whether the probe is enabled or not.
Enabled bool `json:"enabled,required"`
// Probe configuration (exec, `http_get` or `tcp_socket`)
Probe InferenceDeploymentNewParamsProbesLivenessProbeProbe `json:"probe,omitzero"`
// contains filtered or unexported fields
}
Liveness probe configuration
The property Enabled is required.
func (InferenceDeploymentNewParamsProbesLivenessProbe) MarshalJSON ¶ added in v0.5.0
func (r InferenceDeploymentNewParamsProbesLivenessProbe) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsProbesLivenessProbe) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentNewParamsProbesLivenessProbe) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsProbesLivenessProbeProbe ¶ added in v0.5.0
type InferenceDeploymentNewParamsProbesLivenessProbeProbe struct {
// The number of consecutive probe failures that mark the container as unhealthy.
FailureThreshold param.Opt[int64] `json:"failure_threshold,omitzero"`
// The initial delay before starting the first probe.
InitialDelaySeconds param.Opt[int64] `json:"initial_delay_seconds,omitzero"`
// How often (in seconds) to perform the probe.
PeriodSeconds param.Opt[int64] `json:"period_seconds,omitzero"`
// The number of consecutive successful probes that mark the container as healthy.
SuccessThreshold param.Opt[int64] `json:"success_threshold,omitzero"`
// The timeout for each probe.
TimeoutSeconds param.Opt[int64] `json:"timeout_seconds,omitzero"`
// Exec probe configuration
Exec InferenceDeploymentNewParamsProbesLivenessProbeProbeExec `json:"exec,omitzero"`
// HTTP GET probe configuration
HTTPGet InferenceDeploymentNewParamsProbesLivenessProbeProbeHTTPGet `json:"http_get,omitzero"`
// TCP socket probe configuration
TcpSocket InferenceDeploymentNewParamsProbesLivenessProbeProbeTcpSocket `json:"tcp_socket,omitzero"`
// contains filtered or unexported fields
}
Probe configuration (exec, `http_get` or `tcp_socket`)
func (InferenceDeploymentNewParamsProbesLivenessProbeProbe) MarshalJSON ¶ added in v0.5.0
func (r InferenceDeploymentNewParamsProbesLivenessProbeProbe) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsProbesLivenessProbeProbe) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentNewParamsProbesLivenessProbeProbe) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsProbesLivenessProbeProbeExec ¶ added in v0.5.0
type InferenceDeploymentNewParamsProbesLivenessProbeProbeExec struct {
// Command to be executed inside the running container.
Command []string `json:"command,omitzero,required"`
// contains filtered or unexported fields
}
Exec probe configuration
The property Command is required.
func (InferenceDeploymentNewParamsProbesLivenessProbeProbeExec) MarshalJSON ¶ added in v0.5.0
func (r InferenceDeploymentNewParamsProbesLivenessProbeProbeExec) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsProbesLivenessProbeProbeExec) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentNewParamsProbesLivenessProbeProbeExec) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsProbesLivenessProbeProbeHTTPGet ¶ added in v0.5.0
type InferenceDeploymentNewParamsProbesLivenessProbeProbeHTTPGet struct {
// Port number the probe should connect to.
Port int64 `json:"port,required"`
// Host name to send HTTP request to.
Host param.Opt[string] `json:"host,omitzero"`
// The endpoint to send the HTTP request to.
Path param.Opt[string] `json:"path,omitzero"`
// Schema to use for the HTTP request.
Schema param.Opt[string] `json:"schema,omitzero"`
// HTTP headers to be sent with the request.
Headers map[string]string `json:"headers,omitzero"`
// contains filtered or unexported fields
}
HTTP GET probe configuration
The property Port is required.
func (InferenceDeploymentNewParamsProbesLivenessProbeProbeHTTPGet) MarshalJSON ¶ added in v0.5.0
func (r InferenceDeploymentNewParamsProbesLivenessProbeProbeHTTPGet) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsProbesLivenessProbeProbeHTTPGet) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentNewParamsProbesLivenessProbeProbeHTTPGet) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsProbesLivenessProbeProbeTcpSocket ¶ added in v0.5.0
type InferenceDeploymentNewParamsProbesLivenessProbeProbeTcpSocket struct {
// Port number to check if it's open.
Port int64 `json:"port,required"`
// contains filtered or unexported fields
}
TCP socket probe configuration
The property Port is required.
func (InferenceDeploymentNewParamsProbesLivenessProbeProbeTcpSocket) MarshalJSON ¶ added in v0.5.0
func (r InferenceDeploymentNewParamsProbesLivenessProbeProbeTcpSocket) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsProbesLivenessProbeProbeTcpSocket) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentNewParamsProbesLivenessProbeProbeTcpSocket) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsProbesReadinessProbe ¶ added in v0.5.0
type InferenceDeploymentNewParamsProbesReadinessProbe struct {
// Whether the probe is enabled or not.
Enabled bool `json:"enabled,required"`
// Probe configuration (exec, `http_get` or `tcp_socket`)
Probe InferenceDeploymentNewParamsProbesReadinessProbeProbe `json:"probe,omitzero"`
// contains filtered or unexported fields
}
Readiness probe configuration
The property Enabled is required.
func (InferenceDeploymentNewParamsProbesReadinessProbe) MarshalJSON ¶ added in v0.5.0
func (r InferenceDeploymentNewParamsProbesReadinessProbe) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsProbesReadinessProbe) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentNewParamsProbesReadinessProbe) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsProbesReadinessProbeProbe ¶ added in v0.5.0
type InferenceDeploymentNewParamsProbesReadinessProbeProbe struct {
// The number of consecutive probe failures that mark the container as unhealthy.
FailureThreshold param.Opt[int64] `json:"failure_threshold,omitzero"`
// The initial delay before starting the first probe.
InitialDelaySeconds param.Opt[int64] `json:"initial_delay_seconds,omitzero"`
// How often (in seconds) to perform the probe.
PeriodSeconds param.Opt[int64] `json:"period_seconds,omitzero"`
// The number of consecutive successful probes that mark the container as healthy.
SuccessThreshold param.Opt[int64] `json:"success_threshold,omitzero"`
// The timeout for each probe.
TimeoutSeconds param.Opt[int64] `json:"timeout_seconds,omitzero"`
// Exec probe configuration
Exec InferenceDeploymentNewParamsProbesReadinessProbeProbeExec `json:"exec,omitzero"`
// HTTP GET probe configuration
HTTPGet InferenceDeploymentNewParamsProbesReadinessProbeProbeHTTPGet `json:"http_get,omitzero"`
// TCP socket probe configuration
TcpSocket InferenceDeploymentNewParamsProbesReadinessProbeProbeTcpSocket `json:"tcp_socket,omitzero"`
// contains filtered or unexported fields
}
Probe configuration (exec, `http_get` or `tcp_socket`)
func (InferenceDeploymentNewParamsProbesReadinessProbeProbe) MarshalJSON ¶ added in v0.5.0
func (r InferenceDeploymentNewParamsProbesReadinessProbeProbe) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsProbesReadinessProbeProbe) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentNewParamsProbesReadinessProbeProbe) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsProbesReadinessProbeProbeExec ¶ added in v0.5.0
type InferenceDeploymentNewParamsProbesReadinessProbeProbeExec struct {
// Command to be executed inside the running container.
Command []string `json:"command,omitzero,required"`
// contains filtered or unexported fields
}
Exec probe configuration
The property Command is required.
func (InferenceDeploymentNewParamsProbesReadinessProbeProbeExec) MarshalJSON ¶ added in v0.5.0
func (r InferenceDeploymentNewParamsProbesReadinessProbeProbeExec) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsProbesReadinessProbeProbeExec) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentNewParamsProbesReadinessProbeProbeExec) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsProbesReadinessProbeProbeHTTPGet ¶ added in v0.5.0
type InferenceDeploymentNewParamsProbesReadinessProbeProbeHTTPGet struct {
// Port number the probe should connect to.
Port int64 `json:"port,required"`
// Host name to send HTTP request to.
Host param.Opt[string] `json:"host,omitzero"`
// The endpoint to send the HTTP request to.
Path param.Opt[string] `json:"path,omitzero"`
// Schema to use for the HTTP request.
Schema param.Opt[string] `json:"schema,omitzero"`
// HTTP headers to be sent with the request.
Headers map[string]string `json:"headers,omitzero"`
// contains filtered or unexported fields
}
HTTP GET probe configuration
The property Port is required.
func (InferenceDeploymentNewParamsProbesReadinessProbeProbeHTTPGet) MarshalJSON ¶ added in v0.5.0
func (r InferenceDeploymentNewParamsProbesReadinessProbeProbeHTTPGet) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsProbesReadinessProbeProbeHTTPGet) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentNewParamsProbesReadinessProbeProbeHTTPGet) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsProbesReadinessProbeProbeTcpSocket ¶ added in v0.5.0
type InferenceDeploymentNewParamsProbesReadinessProbeProbeTcpSocket struct {
// Port number to check if it's open.
Port int64 `json:"port,required"`
// contains filtered or unexported fields
}
TCP socket probe configuration
The property Port is required.
func (InferenceDeploymentNewParamsProbesReadinessProbeProbeTcpSocket) MarshalJSON ¶ added in v0.5.0
func (r InferenceDeploymentNewParamsProbesReadinessProbeProbeTcpSocket) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsProbesReadinessProbeProbeTcpSocket) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentNewParamsProbesReadinessProbeProbeTcpSocket) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsProbesStartupProbe ¶ added in v0.5.0
type InferenceDeploymentNewParamsProbesStartupProbe struct {
// Whether the probe is enabled or not.
Enabled bool `json:"enabled,required"`
// Probe configuration (exec, `http_get` or `tcp_socket`)
Probe InferenceDeploymentNewParamsProbesStartupProbeProbe `json:"probe,omitzero"`
// contains filtered or unexported fields
}
Startup probe configuration
The property Enabled is required.
func (InferenceDeploymentNewParamsProbesStartupProbe) MarshalJSON ¶ added in v0.5.0
func (r InferenceDeploymentNewParamsProbesStartupProbe) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsProbesStartupProbe) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentNewParamsProbesStartupProbe) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsProbesStartupProbeProbe ¶ added in v0.5.0
type InferenceDeploymentNewParamsProbesStartupProbeProbe struct {
// The number of consecutive probe failures that mark the container as unhealthy.
FailureThreshold param.Opt[int64] `json:"failure_threshold,omitzero"`
// The initial delay before starting the first probe.
InitialDelaySeconds param.Opt[int64] `json:"initial_delay_seconds,omitzero"`
// How often (in seconds) to perform the probe.
PeriodSeconds param.Opt[int64] `json:"period_seconds,omitzero"`
// The number of consecutive successful probes that mark the container as healthy.
SuccessThreshold param.Opt[int64] `json:"success_threshold,omitzero"`
// The timeout for each probe.
TimeoutSeconds param.Opt[int64] `json:"timeout_seconds,omitzero"`
// Exec probe configuration
Exec InferenceDeploymentNewParamsProbesStartupProbeProbeExec `json:"exec,omitzero"`
// HTTP GET probe configuration
HTTPGet InferenceDeploymentNewParamsProbesStartupProbeProbeHTTPGet `json:"http_get,omitzero"`
// TCP socket probe configuration
TcpSocket InferenceDeploymentNewParamsProbesStartupProbeProbeTcpSocket `json:"tcp_socket,omitzero"`
// contains filtered or unexported fields
}
Probe configuration (exec, `http_get` or `tcp_socket`)
func (InferenceDeploymentNewParamsProbesStartupProbeProbe) MarshalJSON ¶ added in v0.5.0
func (r InferenceDeploymentNewParamsProbesStartupProbeProbe) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsProbesStartupProbeProbe) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentNewParamsProbesStartupProbeProbe) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsProbesStartupProbeProbeExec ¶ added in v0.5.0
type InferenceDeploymentNewParamsProbesStartupProbeProbeExec struct {
// Command to be executed inside the running container.
Command []string `json:"command,omitzero,required"`
// contains filtered or unexported fields
}
Exec probe configuration
The property Command is required.
func (InferenceDeploymentNewParamsProbesStartupProbeProbeExec) MarshalJSON ¶ added in v0.5.0
func (r InferenceDeploymentNewParamsProbesStartupProbeProbeExec) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsProbesStartupProbeProbeExec) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentNewParamsProbesStartupProbeProbeExec) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsProbesStartupProbeProbeHTTPGet ¶ added in v0.5.0
type InferenceDeploymentNewParamsProbesStartupProbeProbeHTTPGet struct {
// Port number the probe should connect to.
Port int64 `json:"port,required"`
// Host name to send HTTP request to.
Host param.Opt[string] `json:"host,omitzero"`
// The endpoint to send the HTTP request to.
Path param.Opt[string] `json:"path,omitzero"`
// Schema to use for the HTTP request.
Schema param.Opt[string] `json:"schema,omitzero"`
// HTTP headers to be sent with the request.
Headers map[string]string `json:"headers,omitzero"`
// contains filtered or unexported fields
}
HTTP GET probe configuration
The property Port is required.
func (InferenceDeploymentNewParamsProbesStartupProbeProbeHTTPGet) MarshalJSON ¶ added in v0.5.0
func (r InferenceDeploymentNewParamsProbesStartupProbeProbeHTTPGet) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsProbesStartupProbeProbeHTTPGet) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentNewParamsProbesStartupProbeProbeHTTPGet) UnmarshalJSON(data []byte) error
type InferenceDeploymentNewParamsProbesStartupProbeProbeTcpSocket ¶ added in v0.5.0
type InferenceDeploymentNewParamsProbesStartupProbeProbeTcpSocket struct {
// Port number to check if it's open.
Port int64 `json:"port,required"`
// contains filtered or unexported fields
}
TCP socket probe configuration
The property Port is required.
func (InferenceDeploymentNewParamsProbesStartupProbeProbeTcpSocket) MarshalJSON ¶ added in v0.5.0
func (r InferenceDeploymentNewParamsProbesStartupProbeProbeTcpSocket) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentNewParamsProbesStartupProbeProbeTcpSocket) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentNewParamsProbesStartupProbeProbeTcpSocket) UnmarshalJSON(data []byte) error
type InferenceDeploymentObjectReference ¶ added in v0.5.0
type InferenceDeploymentObjectReference struct {
// Kind of the inference object to be referenced
//
// Any of "AppDeployment".
Kind string `json:"kind,required"`
// Name of the inference object to be referenced
Name string `json:"name,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Kind respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InferenceDeploymentObjectReference) RawJSON ¶ added in v0.5.0
func (r InferenceDeploymentObjectReference) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceDeploymentObjectReference) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentObjectReference) UnmarshalJSON(data []byte) error
type InferenceDeploymentProbes ¶ added in v0.5.0
type InferenceDeploymentProbes struct {
// Liveness probe configuration
LivenessProbe ProbeConfig `json:"liveness_probe,required"`
// Readiness probe configuration
ReadinessProbe ProbeConfig `json:"readiness_probe,required"`
// Startup probe configuration
StartupProbe ProbeConfig `json:"startup_probe,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
LivenessProbe respjson.Field
ReadinessProbe respjson.Field
StartupProbe respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Probes configured for all containers of the inference instance.
func (InferenceDeploymentProbes) RawJSON ¶ added in v0.5.0
func (r InferenceDeploymentProbes) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceDeploymentProbes) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentProbes) UnmarshalJSON(data []byte) error
type InferenceDeploymentService ¶
type InferenceDeploymentService struct {
Options []option.RequestOption
Logs InferenceDeploymentLogService
// contains filtered or unexported fields
}
InferenceDeploymentService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInferenceDeploymentService method instead.
func NewInferenceDeploymentService ¶
func NewInferenceDeploymentService(opts ...option.RequestOption) (r InferenceDeploymentService)
NewInferenceDeploymentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*InferenceDeploymentService) Delete ¶
func (r *InferenceDeploymentService) Delete(ctx context.Context, deploymentName string, body InferenceDeploymentDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Delete inference deployment
func (*InferenceDeploymentService) DeleteAndPoll ¶ added in v0.2.0
func (r *InferenceDeploymentService) DeleteAndPoll(ctx context.Context, deploymentName string, params InferenceDeploymentDeleteParams, opts ...option.RequestOption) error
DeleteAndPoll deletes an inference deployment and polls for completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
func (*InferenceDeploymentService) Get ¶
func (r *InferenceDeploymentService) Get(ctx context.Context, deploymentName string, query InferenceDeploymentGetParams, opts ...option.RequestOption) (res *InferenceDeployment, err error)
Get inference deployment
func (*InferenceDeploymentService) GetAPIKey ¶
func (r *InferenceDeploymentService) GetAPIKey(ctx context.Context, deploymentName string, query InferenceDeploymentGetAPIKeyParams, opts ...option.RequestOption) (res *InferenceDeploymentAPIKey, err error)
Get inference deployment API key
func (*InferenceDeploymentService) List ¶
func (r *InferenceDeploymentService) List(ctx context.Context, params InferenceDeploymentListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[InferenceDeployment], err error)
List inference deployments
func (*InferenceDeploymentService) ListAutoPaging ¶
func (r *InferenceDeploymentService) ListAutoPaging(ctx context.Context, params InferenceDeploymentListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[InferenceDeployment]
List inference deployments
func (*InferenceDeploymentService) New ¶
func (r *InferenceDeploymentService) New(ctx context.Context, params InferenceDeploymentNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Create inference deployment
func (*InferenceDeploymentService) NewAndPoll ¶ added in v0.2.0
func (r *InferenceDeploymentService) NewAndPoll(ctx context.Context, params InferenceDeploymentNewParams, opts ...option.RequestOption) (v *InferenceDeployment, err error)
NewAndPoll creates a new inference deployment and polls for completion
func (*InferenceDeploymentService) Start ¶
func (r *InferenceDeploymentService) Start(ctx context.Context, deploymentName string, body InferenceDeploymentStartParams, opts ...option.RequestOption) (err error)
This operation initializes an inference deployment after it was stopped, making it available to handle inference requests again. The instance will launch with the **minimum** number of replicas defined in the scaling settings.
- If the minimum replicas are set to **0**, the instance will initially start with **0** replicas.
- It will automatically scale up when it receives requests or SQS messages, according to the configured scaling rules.
func (*InferenceDeploymentService) Stop ¶
func (r *InferenceDeploymentService) Stop(ctx context.Context, deploymentName string, body InferenceDeploymentStopParams, opts ...option.RequestOption) (err error)
This operation shuts down an inference deployment, making it unavailable for handling requests. The deployment will scale down to **0** replicas, overriding any minimum replica settings.
- Once stopped, the deployment will **not** process any inference requests or SQS messages.
- It will **not** restart automatically and must be started manually.
- While stopped, the deployment will **not** incur any charges.
func (*InferenceDeploymentService) Update ¶
func (r *InferenceDeploymentService) Update(ctx context.Context, deploymentName string, params InferenceDeploymentUpdateParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Update inference deployment
func (*InferenceDeploymentService) UpdateAndPoll ¶ added in v0.2.0
func (r *InferenceDeploymentService) UpdateAndPoll(ctx context.Context, deploymentName string, params InferenceDeploymentUpdateParams, opts ...option.RequestOption) (v *InferenceDeployment, err error)
UpdateAndPoll updates an inference deployment and polls for completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
type InferenceDeploymentStatus ¶ added in v0.5.0
type InferenceDeploymentStatus string
Inference instance status. Value can be one of the following:
- `DEPLOYING` - The instance is being deployed. Containers are not yet created.
- `PARTIALLYDEPLOYED` - All containers have been created, but some may not be ready yet. Instances stuck in this state typically indicate either image being pulled, or a failure of some kind. In the latter case, the `error_message` field of the respective container object in the `containers` collection explains the failure reason.
- `ACTIVE` - The instance is running and ready to accept requests.
- `DISABLED` - The instance is disabled and not accepting any requests.
- `PENDING` - The instance is running but scaled to zero. It will be automatically scaled up when a request is made.
- `DELETING` - The instance is being deleted.
const ( InferenceDeploymentStatusActive InferenceDeploymentStatus = "ACTIVE" InferenceDeploymentStatusDeleting InferenceDeploymentStatus = "DELETING" InferenceDeploymentStatusDeploying InferenceDeploymentStatus = "DEPLOYING" InferenceDeploymentStatusDisabled InferenceDeploymentStatus = "DISABLED" InferenceDeploymentStatusPartiallydeployed InferenceDeploymentStatus = "PARTIALLYDEPLOYED" InferenceDeploymentStatusPending InferenceDeploymentStatus = "PENDING" )
type InferenceDeploymentUpdateParams ¶
type InferenceDeploymentUpdateParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Registry credentials name
CredentialsName param.Opt[string] `json:"credentials_name,omitzero"`
// Inference instance description.
Description param.Opt[string] `json:"description,omitzero"`
// Docker image for the inference instance. This field should contain the image
// name and tag in the format 'name:tag', e.g., 'nginx:latest'. It defaults to
// Docker Hub as the image registry, but any accessible Docker image URL can be
// specified.
Image param.Opt[string] `json:"image,omitzero"`
// Listening port for the inference instance.
ListeningPort param.Opt[int64] `json:"listening_port,omitzero"`
// Specifies the duration in seconds without any requests after which the
// containers will be downscaled to their minimum scale value as defined by
// `scale.min`. If set, this helps in optimizing resource usage by reducing the
// number of container instances during periods of inactivity. The default value
// when the parameter is not set is 120.
Timeout param.Opt[int64] `json:"timeout,omitzero"`
// Set to `true` to enable API key authentication for the inference instance.
// `"Authorization": "Bearer ****\*"` or `"X-Api-Key": "****\*"` header is required
// for the requests to the instance if enabled. This field is deprecated and will
// be removed in the future. Use `api_keys` field instead.If `auth_enabled` and
// `api_keys` are both specified, a ValidationError will be raised.
AuthEnabled param.Opt[bool] `json:"auth_enabled,omitzero"`
// Flavor name for the inference instance.
FlavorName param.Opt[string] `json:"flavor_name,omitzero"`
// List of API keys for the inference instance. Multiple keys can be attached to
// one deployment.If `auth_enabled` and `api_keys` are both specified, a
// ValidationError will be raised.If `[]` is provided, the API keys will be removed
// and auth will be disabled on the deployment.
APIKeys []string `json:"api_keys,omitzero"`
// Command to be executed when running a container from an image.
Command []string `json:"command,omitzero"`
// List of containers for the inference instance.
Containers []InferenceDeploymentUpdateParamsContainer `json:"containers,omitzero"`
// Environment variables for the inference instance.
Envs map[string]string `json:"envs,omitzero"`
// Ingress options for the inference instance
IngressOpts InferenceDeploymentUpdateParamsIngressOpts `json:"ingress_opts,omitzero"`
// Logging configuration for the inference instance
Logging InferenceDeploymentUpdateParamsLogging `json:"logging,omitzero"`
// Probes configured for all containers of the inference instance.
Probes InferenceDeploymentUpdateParamsProbes `json:"probes,omitzero"`
// contains filtered or unexported fields
}
func (InferenceDeploymentUpdateParams) MarshalJSON ¶
func (r InferenceDeploymentUpdateParams) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParams) UnmarshalJSON ¶
func (r *InferenceDeploymentUpdateParams) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsContainer ¶
type InferenceDeploymentUpdateParamsContainer struct {
// Region id for the container
RegionID param.Opt[int64] `json:"region_id,omitzero,required"`
// Scale for the container
Scale InferenceDeploymentUpdateParamsContainerScale `json:"scale,omitzero,required"`
// contains filtered or unexported fields
}
The properties RegionID, Scale are required.
func (InferenceDeploymentUpdateParamsContainer) MarshalJSON ¶
func (r InferenceDeploymentUpdateParamsContainer) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsContainer) UnmarshalJSON ¶
func (r *InferenceDeploymentUpdateParamsContainer) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsContainerScale ¶
type InferenceDeploymentUpdateParamsContainerScale struct {
// Maximum scale for the container
Max int64 `json:"max,required"`
// Minimum scale for the container
Min int64 `json:"min,required"`
// Cooldown period between scaling actions in seconds
CooldownPeriod param.Opt[int64] `json:"cooldown_period,omitzero"`
// Polling interval for scaling triggers in seconds
PollingInterval param.Opt[int64] `json:"polling_interval,omitzero"`
// Triggers for scaling actions
Triggers InferenceDeploymentUpdateParamsContainerScaleTriggers `json:"triggers,omitzero"`
// contains filtered or unexported fields
}
Scale for the container
The properties Max, Min are required.
func (InferenceDeploymentUpdateParamsContainerScale) MarshalJSON ¶
func (r InferenceDeploymentUpdateParamsContainerScale) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsContainerScale) UnmarshalJSON ¶
func (r *InferenceDeploymentUpdateParamsContainerScale) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsContainerScaleTriggers ¶
type InferenceDeploymentUpdateParamsContainerScaleTriggers struct {
// CPU trigger configuration
CPU InferenceDeploymentUpdateParamsContainerScaleTriggersCPU `json:"cpu,omitzero"`
// GPU memory trigger configuration. Calculated by `DCGM_FI_DEV_MEM_COPY_UTIL`
// metric
GPUMemory InferenceDeploymentUpdateParamsContainerScaleTriggersGPUMemory `json:"gpu_memory,omitzero"`
// GPU utilization trigger configuration. Calculated by `DCGM_FI_DEV_GPU_UTIL`
// metric
GPUUtilization InferenceDeploymentUpdateParamsContainerScaleTriggersGPUUtilization `json:"gpu_utilization,omitzero"`
// HTTP trigger configuration
HTTP InferenceDeploymentUpdateParamsContainerScaleTriggersHTTP `json:"http,omitzero"`
// Memory trigger configuration
Memory InferenceDeploymentUpdateParamsContainerScaleTriggersMemory `json:"memory,omitzero"`
// SQS trigger configuration
Sqs InferenceDeploymentUpdateParamsContainerScaleTriggersSqs `json:"sqs,omitzero"`
// contains filtered or unexported fields
}
Triggers for scaling actions
func (InferenceDeploymentUpdateParamsContainerScaleTriggers) MarshalJSON ¶
func (r InferenceDeploymentUpdateParamsContainerScaleTriggers) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsContainerScaleTriggers) UnmarshalJSON ¶
func (r *InferenceDeploymentUpdateParamsContainerScaleTriggers) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsContainerScaleTriggersCPU ¶
type InferenceDeploymentUpdateParamsContainerScaleTriggersCPU struct {
// Threshold value for the trigger in percentage
Threshold int64 `json:"threshold,required"`
// contains filtered or unexported fields
}
CPU trigger configuration
The property Threshold is required.
func (InferenceDeploymentUpdateParamsContainerScaleTriggersCPU) MarshalJSON ¶
func (r InferenceDeploymentUpdateParamsContainerScaleTriggersCPU) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsContainerScaleTriggersCPU) UnmarshalJSON ¶
func (r *InferenceDeploymentUpdateParamsContainerScaleTriggersCPU) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsContainerScaleTriggersGPUMemory ¶
type InferenceDeploymentUpdateParamsContainerScaleTriggersGPUMemory struct {
// Threshold value for the trigger in percentage
Threshold int64 `json:"threshold,required"`
// contains filtered or unexported fields
}
GPU memory trigger configuration. Calculated by `DCGM_FI_DEV_MEM_COPY_UTIL` metric
The property Threshold is required.
func (InferenceDeploymentUpdateParamsContainerScaleTriggersGPUMemory) MarshalJSON ¶
func (r InferenceDeploymentUpdateParamsContainerScaleTriggersGPUMemory) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsContainerScaleTriggersGPUMemory) UnmarshalJSON ¶
func (r *InferenceDeploymentUpdateParamsContainerScaleTriggersGPUMemory) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsContainerScaleTriggersGPUUtilization ¶
type InferenceDeploymentUpdateParamsContainerScaleTriggersGPUUtilization struct {
// Threshold value for the trigger in percentage
Threshold int64 `json:"threshold,required"`
// contains filtered or unexported fields
}
GPU utilization trigger configuration. Calculated by `DCGM_FI_DEV_GPU_UTIL` metric
The property Threshold is required.
func (InferenceDeploymentUpdateParamsContainerScaleTriggersGPUUtilization) MarshalJSON ¶
func (r InferenceDeploymentUpdateParamsContainerScaleTriggersGPUUtilization) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsContainerScaleTriggersGPUUtilization) UnmarshalJSON ¶
func (r *InferenceDeploymentUpdateParamsContainerScaleTriggersGPUUtilization) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsContainerScaleTriggersHTTP ¶
type InferenceDeploymentUpdateParamsContainerScaleTriggersHTTP struct {
// Request count per 'window' seconds for the http trigger
Rate int64 `json:"rate,required"`
// Time window for rate calculation in seconds
Window int64 `json:"window,required"`
// contains filtered or unexported fields
}
HTTP trigger configuration
The properties Rate, Window are required.
func (InferenceDeploymentUpdateParamsContainerScaleTriggersHTTP) MarshalJSON ¶
func (r InferenceDeploymentUpdateParamsContainerScaleTriggersHTTP) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsContainerScaleTriggersHTTP) UnmarshalJSON ¶
func (r *InferenceDeploymentUpdateParamsContainerScaleTriggersHTTP) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsContainerScaleTriggersMemory ¶
type InferenceDeploymentUpdateParamsContainerScaleTriggersMemory struct {
// Threshold value for the trigger in percentage
Threshold int64 `json:"threshold,required"`
// contains filtered or unexported fields
}
Memory trigger configuration
The property Threshold is required.
func (InferenceDeploymentUpdateParamsContainerScaleTriggersMemory) MarshalJSON ¶
func (r InferenceDeploymentUpdateParamsContainerScaleTriggersMemory) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsContainerScaleTriggersMemory) UnmarshalJSON ¶
func (r *InferenceDeploymentUpdateParamsContainerScaleTriggersMemory) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsContainerScaleTriggersSqs ¶
type InferenceDeploymentUpdateParamsContainerScaleTriggersSqs struct {
// Number of messages for activation
ActivationQueueLength int64 `json:"activation_queue_length,required"`
// AWS region
AwsRegion string `json:"aws_region,required"`
// Number of messages for one replica
QueueLength int64 `json:"queue_length,required"`
// SQS queue URL
QueueURL string `json:"queue_url,required"`
// Auth secret name
SecretName string `json:"secret_name,required"`
// Custom AWS endpoint
AwsEndpoint param.Opt[string] `json:"aws_endpoint,omitzero"`
// Scale on delayed messages
ScaleOnDelayed param.Opt[bool] `json:"scale_on_delayed,omitzero"`
// Scale on in-flight messages
ScaleOnFlight param.Opt[bool] `json:"scale_on_flight,omitzero"`
// contains filtered or unexported fields
}
SQS trigger configuration
The properties ActivationQueueLength, AwsRegion, QueueLength, QueueURL, SecretName are required.
func (InferenceDeploymentUpdateParamsContainerScaleTriggersSqs) MarshalJSON ¶
func (r InferenceDeploymentUpdateParamsContainerScaleTriggersSqs) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsContainerScaleTriggersSqs) UnmarshalJSON ¶
func (r *InferenceDeploymentUpdateParamsContainerScaleTriggersSqs) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsIngressOpts ¶ added in v0.5.0
type InferenceDeploymentUpdateParamsIngressOpts struct {
// Disable response buffering if true. A client usually has a much slower
// connection and can not consume the response data as fast as it is produced by an
// upstream application. Ingress tries to buffer the whole response in order to
// release the upstream application as soon as possible.By default, the response
// buffering is enabled.
DisableResponseBuffering param.Opt[bool] `json:"disable_response_buffering,omitzero"`
// contains filtered or unexported fields
}
Ingress options for the inference instance
func (InferenceDeploymentUpdateParamsIngressOpts) MarshalJSON ¶ added in v0.5.0
func (r InferenceDeploymentUpdateParamsIngressOpts) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsIngressOpts) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceDeploymentUpdateParamsIngressOpts) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsLogging ¶
type InferenceDeploymentUpdateParamsLogging struct {
// ID of the region in which the logs will be stored
DestinationRegionID param.Opt[int64] `json:"destination_region_id,omitzero"`
// The topic name to stream logs to
TopicName param.Opt[string] `json:"topic_name,omitzero"`
// Enable or disable log streaming
Enabled param.Opt[bool] `json:"enabled,omitzero"`
// Logs retention policy
RetentionPolicy LaasIndexRetentionPolicyParam `json:"retention_policy,omitzero"`
// contains filtered or unexported fields
}
Logging configuration for the inference instance
func (InferenceDeploymentUpdateParamsLogging) MarshalJSON ¶
func (r InferenceDeploymentUpdateParamsLogging) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsLogging) UnmarshalJSON ¶
func (r *InferenceDeploymentUpdateParamsLogging) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsProbes ¶
type InferenceDeploymentUpdateParamsProbes struct {
// Liveness probe configuration
LivenessProbe InferenceDeploymentUpdateParamsProbesLivenessProbe `json:"liveness_probe,omitzero"`
// Readiness probe configuration
ReadinessProbe InferenceDeploymentUpdateParamsProbesReadinessProbe `json:"readiness_probe,omitzero"`
// Startup probe configuration
StartupProbe InferenceDeploymentUpdateParamsProbesStartupProbe `json:"startup_probe,omitzero"`
// contains filtered or unexported fields
}
Probes configured for all containers of the inference instance.
func (InferenceDeploymentUpdateParamsProbes) MarshalJSON ¶
func (r InferenceDeploymentUpdateParamsProbes) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsProbes) UnmarshalJSON ¶
func (r *InferenceDeploymentUpdateParamsProbes) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsProbesLivenessProbe ¶ added in v0.2.0
type InferenceDeploymentUpdateParamsProbesLivenessProbe struct {
// Whether the probe is enabled or not.
Enabled param.Opt[bool] `json:"enabled,omitzero"`
// Probe configuration (exec, `http_get` or `tcp_socket`)
Probe InferenceDeploymentUpdateParamsProbesLivenessProbeProbe `json:"probe,omitzero"`
// contains filtered or unexported fields
}
Liveness probe configuration
func (InferenceDeploymentUpdateParamsProbesLivenessProbe) MarshalJSON ¶ added in v0.2.0
func (r InferenceDeploymentUpdateParamsProbesLivenessProbe) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsProbesLivenessProbe) UnmarshalJSON ¶ added in v0.2.0
func (r *InferenceDeploymentUpdateParamsProbesLivenessProbe) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsProbesLivenessProbeProbe ¶ added in v0.2.0
type InferenceDeploymentUpdateParamsProbesLivenessProbeProbe struct {
// The number of consecutive probe failures that mark the container as unhealthy.
FailureThreshold param.Opt[int64] `json:"failure_threshold,omitzero"`
// The initial delay before starting the first probe.
InitialDelaySeconds param.Opt[int64] `json:"initial_delay_seconds,omitzero"`
// How often (in seconds) to perform the probe.
PeriodSeconds param.Opt[int64] `json:"period_seconds,omitzero"`
// The number of consecutive successful probes that mark the container as healthy.
SuccessThreshold param.Opt[int64] `json:"success_threshold,omitzero"`
// The timeout for each probe.
TimeoutSeconds param.Opt[int64] `json:"timeout_seconds,omitzero"`
// Exec probe configuration
Exec InferenceDeploymentUpdateParamsProbesLivenessProbeProbeExec `json:"exec,omitzero"`
// HTTP GET probe configuration
HTTPGet InferenceDeploymentUpdateParamsProbesLivenessProbeProbeHTTPGet `json:"http_get,omitzero"`
// TCP socket probe configuration
TcpSocket InferenceDeploymentUpdateParamsProbesLivenessProbeProbeTcpSocket `json:"tcp_socket,omitzero"`
// contains filtered or unexported fields
}
Probe configuration (exec, `http_get` or `tcp_socket`)
func (InferenceDeploymentUpdateParamsProbesLivenessProbeProbe) MarshalJSON ¶ added in v0.2.0
func (r InferenceDeploymentUpdateParamsProbesLivenessProbeProbe) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsProbesLivenessProbeProbe) UnmarshalJSON ¶ added in v0.2.0
func (r *InferenceDeploymentUpdateParamsProbesLivenessProbeProbe) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsProbesLivenessProbeProbeExec ¶ added in v0.2.0
type InferenceDeploymentUpdateParamsProbesLivenessProbeProbeExec struct {
// Command to be executed inside the running container.
Command []string `json:"command,omitzero"`
// contains filtered or unexported fields
}
Exec probe configuration
func (InferenceDeploymentUpdateParamsProbesLivenessProbeProbeExec) MarshalJSON ¶ added in v0.2.0
func (r InferenceDeploymentUpdateParamsProbesLivenessProbeProbeExec) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsProbesLivenessProbeProbeExec) UnmarshalJSON ¶ added in v0.2.0
func (r *InferenceDeploymentUpdateParamsProbesLivenessProbeProbeExec) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsProbesLivenessProbeProbeHTTPGet ¶ added in v0.2.0
type InferenceDeploymentUpdateParamsProbesLivenessProbeProbeHTTPGet struct {
// Host name to send HTTP request to.
Host param.Opt[string] `json:"host,omitzero"`
// The endpoint to send the HTTP request to.
Path param.Opt[string] `json:"path,omitzero"`
// Port number the probe should connect to.
Port param.Opt[int64] `json:"port,omitzero"`
// Schema to use for the HTTP request.
Schema param.Opt[string] `json:"schema,omitzero"`
// HTTP headers to be sent with the request.
Headers map[string]string `json:"headers,omitzero"`
// contains filtered or unexported fields
}
HTTP GET probe configuration
func (InferenceDeploymentUpdateParamsProbesLivenessProbeProbeHTTPGet) MarshalJSON ¶ added in v0.2.0
func (r InferenceDeploymentUpdateParamsProbesLivenessProbeProbeHTTPGet) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsProbesLivenessProbeProbeHTTPGet) UnmarshalJSON ¶ added in v0.2.0
func (r *InferenceDeploymentUpdateParamsProbesLivenessProbeProbeHTTPGet) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsProbesLivenessProbeProbeTcpSocket ¶ added in v0.2.0
type InferenceDeploymentUpdateParamsProbesLivenessProbeProbeTcpSocket struct {
// Port number to check if it's open.
Port param.Opt[int64] `json:"port,omitzero"`
// contains filtered or unexported fields
}
TCP socket probe configuration
func (InferenceDeploymentUpdateParamsProbesLivenessProbeProbeTcpSocket) MarshalJSON ¶ added in v0.2.0
func (r InferenceDeploymentUpdateParamsProbesLivenessProbeProbeTcpSocket) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsProbesLivenessProbeProbeTcpSocket) UnmarshalJSON ¶ added in v0.2.0
func (r *InferenceDeploymentUpdateParamsProbesLivenessProbeProbeTcpSocket) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsProbesReadinessProbe ¶ added in v0.2.0
type InferenceDeploymentUpdateParamsProbesReadinessProbe struct {
// Whether the probe is enabled or not.
Enabled param.Opt[bool] `json:"enabled,omitzero"`
// Probe configuration (exec, `http_get` or `tcp_socket`)
Probe InferenceDeploymentUpdateParamsProbesReadinessProbeProbe `json:"probe,omitzero"`
// contains filtered or unexported fields
}
Readiness probe configuration
func (InferenceDeploymentUpdateParamsProbesReadinessProbe) MarshalJSON ¶ added in v0.2.0
func (r InferenceDeploymentUpdateParamsProbesReadinessProbe) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsProbesReadinessProbe) UnmarshalJSON ¶ added in v0.2.0
func (r *InferenceDeploymentUpdateParamsProbesReadinessProbe) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsProbesReadinessProbeProbe ¶ added in v0.2.0
type InferenceDeploymentUpdateParamsProbesReadinessProbeProbe struct {
// The number of consecutive probe failures that mark the container as unhealthy.
FailureThreshold param.Opt[int64] `json:"failure_threshold,omitzero"`
// The initial delay before starting the first probe.
InitialDelaySeconds param.Opt[int64] `json:"initial_delay_seconds,omitzero"`
// How often (in seconds) to perform the probe.
PeriodSeconds param.Opt[int64] `json:"period_seconds,omitzero"`
// The number of consecutive successful probes that mark the container as healthy.
SuccessThreshold param.Opt[int64] `json:"success_threshold,omitzero"`
// The timeout for each probe.
TimeoutSeconds param.Opt[int64] `json:"timeout_seconds,omitzero"`
// Exec probe configuration
Exec InferenceDeploymentUpdateParamsProbesReadinessProbeProbeExec `json:"exec,omitzero"`
// HTTP GET probe configuration
HTTPGet InferenceDeploymentUpdateParamsProbesReadinessProbeProbeHTTPGet `json:"http_get,omitzero"`
// TCP socket probe configuration
TcpSocket InferenceDeploymentUpdateParamsProbesReadinessProbeProbeTcpSocket `json:"tcp_socket,omitzero"`
// contains filtered or unexported fields
}
Probe configuration (exec, `http_get` or `tcp_socket`)
func (InferenceDeploymentUpdateParamsProbesReadinessProbeProbe) MarshalJSON ¶ added in v0.2.0
func (r InferenceDeploymentUpdateParamsProbesReadinessProbeProbe) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsProbesReadinessProbeProbe) UnmarshalJSON ¶ added in v0.2.0
func (r *InferenceDeploymentUpdateParamsProbesReadinessProbeProbe) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsProbesReadinessProbeProbeExec ¶ added in v0.2.0
type InferenceDeploymentUpdateParamsProbesReadinessProbeProbeExec struct {
// Command to be executed inside the running container.
Command []string `json:"command,omitzero"`
// contains filtered or unexported fields
}
Exec probe configuration
func (InferenceDeploymentUpdateParamsProbesReadinessProbeProbeExec) MarshalJSON ¶ added in v0.2.0
func (r InferenceDeploymentUpdateParamsProbesReadinessProbeProbeExec) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsProbesReadinessProbeProbeExec) UnmarshalJSON ¶ added in v0.2.0
func (r *InferenceDeploymentUpdateParamsProbesReadinessProbeProbeExec) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsProbesReadinessProbeProbeHTTPGet ¶ added in v0.2.0
type InferenceDeploymentUpdateParamsProbesReadinessProbeProbeHTTPGet struct {
// Host name to send HTTP request to.
Host param.Opt[string] `json:"host,omitzero"`
// The endpoint to send the HTTP request to.
Path param.Opt[string] `json:"path,omitzero"`
// Port number the probe should connect to.
Port param.Opt[int64] `json:"port,omitzero"`
// Schema to use for the HTTP request.
Schema param.Opt[string] `json:"schema,omitzero"`
// HTTP headers to be sent with the request.
Headers map[string]string `json:"headers,omitzero"`
// contains filtered or unexported fields
}
HTTP GET probe configuration
func (InferenceDeploymentUpdateParamsProbesReadinessProbeProbeHTTPGet) MarshalJSON ¶ added in v0.2.0
func (r InferenceDeploymentUpdateParamsProbesReadinessProbeProbeHTTPGet) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsProbesReadinessProbeProbeHTTPGet) UnmarshalJSON ¶ added in v0.2.0
func (r *InferenceDeploymentUpdateParamsProbesReadinessProbeProbeHTTPGet) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsProbesReadinessProbeProbeTcpSocket ¶ added in v0.2.0
type InferenceDeploymentUpdateParamsProbesReadinessProbeProbeTcpSocket struct {
// Port number to check if it's open.
Port param.Opt[int64] `json:"port,omitzero"`
// contains filtered or unexported fields
}
TCP socket probe configuration
func (InferenceDeploymentUpdateParamsProbesReadinessProbeProbeTcpSocket) MarshalJSON ¶ added in v0.2.0
func (r InferenceDeploymentUpdateParamsProbesReadinessProbeProbeTcpSocket) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsProbesReadinessProbeProbeTcpSocket) UnmarshalJSON ¶ added in v0.2.0
func (r *InferenceDeploymentUpdateParamsProbesReadinessProbeProbeTcpSocket) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsProbesStartupProbe ¶ added in v0.2.0
type InferenceDeploymentUpdateParamsProbesStartupProbe struct {
// Whether the probe is enabled or not.
Enabled param.Opt[bool] `json:"enabled,omitzero"`
// Probe configuration (exec, `http_get` or `tcp_socket`)
Probe InferenceDeploymentUpdateParamsProbesStartupProbeProbe `json:"probe,omitzero"`
// contains filtered or unexported fields
}
Startup probe configuration
func (InferenceDeploymentUpdateParamsProbesStartupProbe) MarshalJSON ¶ added in v0.2.0
func (r InferenceDeploymentUpdateParamsProbesStartupProbe) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsProbesStartupProbe) UnmarshalJSON ¶ added in v0.2.0
func (r *InferenceDeploymentUpdateParamsProbesStartupProbe) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsProbesStartupProbeProbe ¶ added in v0.2.0
type InferenceDeploymentUpdateParamsProbesStartupProbeProbe struct {
// The number of consecutive probe failures that mark the container as unhealthy.
FailureThreshold param.Opt[int64] `json:"failure_threshold,omitzero"`
// The initial delay before starting the first probe.
InitialDelaySeconds param.Opt[int64] `json:"initial_delay_seconds,omitzero"`
// How often (in seconds) to perform the probe.
PeriodSeconds param.Opt[int64] `json:"period_seconds,omitzero"`
// The number of consecutive successful probes that mark the container as healthy.
SuccessThreshold param.Opt[int64] `json:"success_threshold,omitzero"`
// The timeout for each probe.
TimeoutSeconds param.Opt[int64] `json:"timeout_seconds,omitzero"`
// Exec probe configuration
Exec InferenceDeploymentUpdateParamsProbesStartupProbeProbeExec `json:"exec,omitzero"`
// HTTP GET probe configuration
HTTPGet InferenceDeploymentUpdateParamsProbesStartupProbeProbeHTTPGet `json:"http_get,omitzero"`
// TCP socket probe configuration
TcpSocket InferenceDeploymentUpdateParamsProbesStartupProbeProbeTcpSocket `json:"tcp_socket,omitzero"`
// contains filtered or unexported fields
}
Probe configuration (exec, `http_get` or `tcp_socket`)
func (InferenceDeploymentUpdateParamsProbesStartupProbeProbe) MarshalJSON ¶ added in v0.2.0
func (r InferenceDeploymentUpdateParamsProbesStartupProbeProbe) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsProbesStartupProbeProbe) UnmarshalJSON ¶ added in v0.2.0
func (r *InferenceDeploymentUpdateParamsProbesStartupProbeProbe) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsProbesStartupProbeProbeExec ¶ added in v0.2.0
type InferenceDeploymentUpdateParamsProbesStartupProbeProbeExec struct {
// Command to be executed inside the running container.
Command []string `json:"command,omitzero"`
// contains filtered or unexported fields
}
Exec probe configuration
func (InferenceDeploymentUpdateParamsProbesStartupProbeProbeExec) MarshalJSON ¶ added in v0.2.0
func (r InferenceDeploymentUpdateParamsProbesStartupProbeProbeExec) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsProbesStartupProbeProbeExec) UnmarshalJSON ¶ added in v0.2.0
func (r *InferenceDeploymentUpdateParamsProbesStartupProbeProbeExec) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsProbesStartupProbeProbeHTTPGet ¶ added in v0.2.0
type InferenceDeploymentUpdateParamsProbesStartupProbeProbeHTTPGet struct {
// Host name to send HTTP request to.
Host param.Opt[string] `json:"host,omitzero"`
// The endpoint to send the HTTP request to.
Path param.Opt[string] `json:"path,omitzero"`
// Port number the probe should connect to.
Port param.Opt[int64] `json:"port,omitzero"`
// Schema to use for the HTTP request.
Schema param.Opt[string] `json:"schema,omitzero"`
// HTTP headers to be sent with the request.
Headers map[string]string `json:"headers,omitzero"`
// contains filtered or unexported fields
}
HTTP GET probe configuration
func (InferenceDeploymentUpdateParamsProbesStartupProbeProbeHTTPGet) MarshalJSON ¶ added in v0.2.0
func (r InferenceDeploymentUpdateParamsProbesStartupProbeProbeHTTPGet) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsProbesStartupProbeProbeHTTPGet) UnmarshalJSON ¶ added in v0.2.0
func (r *InferenceDeploymentUpdateParamsProbesStartupProbeProbeHTTPGet) UnmarshalJSON(data []byte) error
type InferenceDeploymentUpdateParamsProbesStartupProbeProbeTcpSocket ¶ added in v0.2.0
type InferenceDeploymentUpdateParamsProbesStartupProbeProbeTcpSocket struct {
// Port number to check if it's open.
Port param.Opt[int64] `json:"port,omitzero"`
// contains filtered or unexported fields
}
TCP socket probe configuration
func (InferenceDeploymentUpdateParamsProbesStartupProbeProbeTcpSocket) MarshalJSON ¶ added in v0.2.0
func (r InferenceDeploymentUpdateParamsProbesStartupProbeProbeTcpSocket) MarshalJSON() (data []byte, err error)
func (*InferenceDeploymentUpdateParamsProbesStartupProbeProbeTcpSocket) UnmarshalJSON ¶ added in v0.2.0
func (r *InferenceDeploymentUpdateParamsProbesStartupProbeProbeTcpSocket) UnmarshalJSON(data []byte) error
type InferenceFlavor ¶
type InferenceFlavor struct {
// Inference flavor cpu count.
CPU float64 `json:"cpu,required"`
// Inference flavor description.
Description string `json:"description,required"`
// Inference flavor gpu count.
GPU int64 `json:"gpu,required"`
// Inference flavor gpu compute capability.
GPUComputeCapability string `json:"gpu_compute_capability,required"`
// Inference flavor gpu memory in Gi.
GPUMemory float64 `json:"gpu_memory,required"`
// Inference flavor gpu model.
GPUModel string `json:"gpu_model,required"`
IsGPUShared bool `json:"is_gpu_shared,required"`
// Inference flavor memory in Gi.
Memory float64 `json:"memory,required"`
// Inference flavor name.
Name string `json:"name,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CPU respjson.Field
Description respjson.Field
GPU respjson.Field
GPUComputeCapability respjson.Field
GPUMemory respjson.Field
GPUModel respjson.Field
IsGPUShared respjson.Field
Memory respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InferenceFlavor) RawJSON ¶
func (r InferenceFlavor) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceFlavor) UnmarshalJSON ¶
func (r *InferenceFlavor) UnmarshalJSON(data []byte) error
type InferenceFlavorListParams ¶
type InferenceFlavorListParams struct {
// Optional. Limit the number of returned items
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Optional. Offset value is used to exclude the first set of records from the
// result
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (InferenceFlavorListParams) URLQuery ¶
func (r InferenceFlavorListParams) URLQuery() (v url.Values, err error)
URLQuery serializes InferenceFlavorListParams's query parameters as `url.Values`.
type InferenceFlavorService ¶
type InferenceFlavorService struct {
Options []option.RequestOption
}
InferenceFlavorService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInferenceFlavorService method instead.
func NewInferenceFlavorService ¶
func NewInferenceFlavorService(opts ...option.RequestOption) (r InferenceFlavorService)
NewInferenceFlavorService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*InferenceFlavorService) Get ¶
func (r *InferenceFlavorService) Get(ctx context.Context, flavorName string, opts ...option.RequestOption) (res *InferenceFlavor, err error)
Get inference flavor
func (*InferenceFlavorService) List ¶
func (r *InferenceFlavorService) List(ctx context.Context, query InferenceFlavorListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[InferenceFlavor], err error)
List inference flavors
func (*InferenceFlavorService) ListAutoPaging ¶
func (r *InferenceFlavorService) ListAutoPaging(ctx context.Context, query InferenceFlavorListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[InferenceFlavor]
List inference flavors
type InferenceModel ¶ added in v0.5.0
type InferenceModel struct {
// Model ID.
ID string `json:"id,required" format:"uuid"`
// Category of the model.
Category string `json:"category,required"`
// Default flavor for the model.
DefaultFlavorName string `json:"default_flavor_name,required"`
// Description of the model.
Description string `json:"description,required"`
// Developer of the model.
Developer string `json:"developer,required"`
// Path to the documentation page.
DocumentationPage string `json:"documentation_page,required"`
// URL to the EULA text.
EulaURL string `json:"eula_url,required"`
// Example curl request to the model.
ExampleCurlRequest string `json:"example_curl_request,required"`
// Whether the model has an EULA.
HasEula bool `json:"has_eula,required"`
// Image registry of the model.
ImageRegistryID string `json:"image_registry_id,required"`
// Image URL of the model.
ImageURL string `json:"image_url,required"`
// Describing underlying inference engine.
InferenceBackend string `json:"inference_backend,required"`
// Describing model frontend type.
InferenceFrontend string `json:"inference_frontend,required"`
// Model name to perform inference call.
ModelID string `json:"model_id,required"`
// Name of the model.
Name string `json:"name,required"`
// OpenAI compatibility level.
OpenAICompatibility string `json:"openai_compatibility,required"`
// Port on which the model runs.
Port int64 `json:"port,required"`
// Version of the model.
Version string `json:"version,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Category respjson.Field
DefaultFlavorName respjson.Field
Description respjson.Field
Developer respjson.Field
DocumentationPage respjson.Field
EulaURL respjson.Field
ExampleCurlRequest respjson.Field
HasEula respjson.Field
ImageRegistryID respjson.Field
ImageURL respjson.Field
InferenceBackend respjson.Field
InferenceFrontend respjson.Field
ModelID respjson.Field
Name respjson.Field
OpenAICompatibility respjson.Field
Port respjson.Field
Version respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InferenceModel) RawJSON ¶ added in v0.5.0
func (r InferenceModel) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceModel) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceModel) UnmarshalJSON(data []byte) error
type InferenceModelListParams ¶
type InferenceModelListParams struct {
// Optional. Limit the number of returned items
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Optional. Offset value is used to exclude the first set of records from the
// result
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Order instances by transmitted fields and directions
//
// Any of "name.asc", "name.desc".
OrderBy InferenceModelListParamsOrderBy `query:"order_by,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (InferenceModelListParams) URLQuery ¶
func (r InferenceModelListParams) URLQuery() (v url.Values, err error)
URLQuery serializes InferenceModelListParams's query parameters as `url.Values`.
type InferenceModelListParamsOrderBy ¶ added in v0.5.0
type InferenceModelListParamsOrderBy string
Order instances by transmitted fields and directions
const ( InferenceModelListParamsOrderByNameAsc InferenceModelListParamsOrderBy = "name.asc" InferenceModelListParamsOrderByNameDesc InferenceModelListParamsOrderBy = "name.desc" )
type InferenceModelService ¶
type InferenceModelService struct {
Options []option.RequestOption
}
InferenceModelService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInferenceModelService method instead.
func NewInferenceModelService ¶
func NewInferenceModelService(opts ...option.RequestOption) (r InferenceModelService)
NewInferenceModelService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*InferenceModelService) Get ¶
func (r *InferenceModelService) Get(ctx context.Context, modelID string, opts ...option.RequestOption) (res *InferenceModel, err error)
Get model from catalog
func (*InferenceModelService) List ¶
func (r *InferenceModelService) List(ctx context.Context, query InferenceModelListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[InferenceModel], err error)
List models from catalog
func (*InferenceModelService) ListAutoPaging ¶
func (r *InferenceModelService) ListAutoPaging(ctx context.Context, query InferenceModelListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[InferenceModel]
List models from catalog
type InferenceRegionCapacity ¶ added in v0.5.0
type InferenceRegionCapacity struct {
// List of capacities by flavor.
Capacity []InferenceRegionCapacityCapacity `json:"capacity,required"`
// Region ID.
RegionID int64 `json:"region_id,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Capacity respjson.Field
RegionID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InferenceRegionCapacity) RawJSON ¶ added in v0.5.0
func (r InferenceRegionCapacity) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceRegionCapacity) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceRegionCapacity) UnmarshalJSON(data []byte) error
type InferenceRegionCapacityCapacity ¶ added in v0.5.0
type InferenceRegionCapacityCapacity struct {
// Available capacity.
Capacity int64 `json:"capacity,required"`
// Flavor name.
FlavorName string `json:"flavor_name,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Capacity respjson.Field
FlavorName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InferenceRegionCapacityCapacity) RawJSON ¶ added in v0.5.0
func (r InferenceRegionCapacityCapacity) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceRegionCapacityCapacity) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceRegionCapacityCapacity) UnmarshalJSON(data []byte) error
type InferenceRegionCapacityList ¶ added in v0.5.0
type InferenceRegionCapacityList struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []InferenceRegionCapacity `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InferenceRegionCapacityList) RawJSON ¶ added in v0.5.0
func (r InferenceRegionCapacityList) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceRegionCapacityList) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceRegionCapacityList) UnmarshalJSON(data []byte) error
type InferenceRegistryCredentialListParams ¶
type InferenceRegistryCredentialListParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Optional. Limit the number of returned items
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Optional. Offset value is used to exclude the first set of records from the
// result
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (InferenceRegistryCredentialListParams) URLQuery ¶
func (r InferenceRegistryCredentialListParams) URLQuery() (v url.Values, err error)
URLQuery serializes InferenceRegistryCredentialListParams's query parameters as `url.Values`.
type InferenceRegistryCredentialNewParams ¶
type InferenceRegistryCredentialNewParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Registry credential name.
Name string `json:"name,required"`
// Registry password.
Password string `json:"password,required"`
// Registry URL.
RegistryURL string `json:"registry_url,required"`
// Registry username.
Username string `json:"username,required"`
// contains filtered or unexported fields
}
func (InferenceRegistryCredentialNewParams) MarshalJSON ¶
func (r InferenceRegistryCredentialNewParams) MarshalJSON() (data []byte, err error)
func (*InferenceRegistryCredentialNewParams) UnmarshalJSON ¶
func (r *InferenceRegistryCredentialNewParams) UnmarshalJSON(data []byte) error
type InferenceRegistryCredentialReplaceParams ¶
type InferenceRegistryCredentialReplaceParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Registry password.
Password string `json:"password,required"`
// Registry URL.
RegistryURL string `json:"registry_url,required"`
// Registry username.
Username string `json:"username,required"`
// contains filtered or unexported fields
}
func (InferenceRegistryCredentialReplaceParams) MarshalJSON ¶
func (r InferenceRegistryCredentialReplaceParams) MarshalJSON() (data []byte, err error)
func (*InferenceRegistryCredentialReplaceParams) UnmarshalJSON ¶
func (r *InferenceRegistryCredentialReplaceParams) UnmarshalJSON(data []byte) error
type InferenceRegistryCredentialService ¶
type InferenceRegistryCredentialService struct {
Options []option.RequestOption
}
InferenceRegistryCredentialService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInferenceRegistryCredentialService method instead.
func NewInferenceRegistryCredentialService ¶
func NewInferenceRegistryCredentialService(opts ...option.RequestOption) (r InferenceRegistryCredentialService)
NewInferenceRegistryCredentialService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*InferenceRegistryCredentialService) Delete ¶
func (r *InferenceRegistryCredentialService) Delete(ctx context.Context, credentialName string, body InferenceRegistryCredentialDeleteParams, opts ...option.RequestOption) (err error)
Delete inference registry credential
func (*InferenceRegistryCredentialService) Get ¶
func (r *InferenceRegistryCredentialService) Get(ctx context.Context, credentialName string, query InferenceRegistryCredentialGetParams, opts ...option.RequestOption) (res *InferenceRegistryCredentials, err error)
Get inference registry credential
func (*InferenceRegistryCredentialService) List ¶
func (r *InferenceRegistryCredentialService) List(ctx context.Context, params InferenceRegistryCredentialListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[InferenceRegistryCredentials], err error)
List inference registry credentials
func (*InferenceRegistryCredentialService) ListAutoPaging ¶
func (r *InferenceRegistryCredentialService) ListAutoPaging(ctx context.Context, params InferenceRegistryCredentialListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[InferenceRegistryCredentials]
List inference registry credentials
func (*InferenceRegistryCredentialService) New ¶
func (r *InferenceRegistryCredentialService) New(ctx context.Context, params InferenceRegistryCredentialNewParams, opts ...option.RequestOption) (res *InferenceRegistryCredentialsCreate, err error)
Create inference registry credential
func (*InferenceRegistryCredentialService) Replace ¶
func (r *InferenceRegistryCredentialService) Replace(ctx context.Context, credentialName string, params InferenceRegistryCredentialReplaceParams, opts ...option.RequestOption) (err error)
Replace inference registry credential
type InferenceRegistryCredentials ¶ added in v0.5.0
type InferenceRegistryCredentials struct {
// Registry credential name.
Name string `json:"name,required"`
// Project ID to which the inference registry credentials belongs.
ProjectID int64 `json:"project_id,required"`
// Registry URL.
RegistryURL string `json:"registry_url,required"`
// Registry username.
Username string `json:"username,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
ProjectID respjson.Field
RegistryURL respjson.Field
Username respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InferenceRegistryCredentials) RawJSON ¶ added in v0.5.0
func (r InferenceRegistryCredentials) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceRegistryCredentials) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceRegistryCredentials) UnmarshalJSON(data []byte) error
type InferenceRegistryCredentialsCreate ¶ added in v0.5.0
type InferenceRegistryCredentialsCreate struct {
// Registry credential name.
Name string `json:"name,required"`
// Registry password.
Password string `json:"password,required"`
// Project ID to which the inference registry credentials belongs.
ProjectID int64 `json:"project_id,required"`
// Registry URL.
RegistryURL string `json:"registry_url,required"`
// Registry username.
Username string `json:"username,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
Password respjson.Field
ProjectID respjson.Field
RegistryURL respjson.Field
Username respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InferenceRegistryCredentialsCreate) RawJSON ¶ added in v0.5.0
func (r InferenceRegistryCredentialsCreate) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceRegistryCredentialsCreate) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceRegistryCredentialsCreate) UnmarshalJSON(data []byte) error
type InferenceSecret ¶
type InferenceSecret struct {
// Secret data.
Data InferenceSecretData `json:"data,required"`
// Secret name.
Name string `json:"name,required"`
// Secret type.
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Name respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InferenceSecret) RawJSON ¶
func (r InferenceSecret) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceSecret) UnmarshalJSON ¶
func (r *InferenceSecret) UnmarshalJSON(data []byte) error
type InferenceSecretData ¶ added in v0.5.0
type InferenceSecretData struct {
// AWS IAM key ID.
AwsAccessKeyID string `json:"aws_access_key_id,required"`
// AWS IAM secret key.
AwsSecretAccessKey string `json:"aws_secret_access_key,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AwsAccessKeyID respjson.Field
AwsSecretAccessKey respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Secret data.
func (InferenceSecretData) RawJSON ¶ added in v0.5.0
func (r InferenceSecretData) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceSecretData) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceSecretData) UnmarshalJSON(data []byte) error
type InferenceSecretListParams ¶
type InferenceSecretListParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Optional. Limit the number of returned items
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Optional. Offset value is used to exclude the first set of records from the
// result
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (InferenceSecretListParams) URLQuery ¶
func (r InferenceSecretListParams) URLQuery() (v url.Values, err error)
URLQuery serializes InferenceSecretListParams's query parameters as `url.Values`.
type InferenceSecretNewParams ¶
type InferenceSecretNewParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Secret data.
Data InferenceSecretNewParamsData `json:"data,omitzero,required"`
// Secret name.
Name string `json:"name,required"`
// Secret type. Currently only `aws-iam` is supported.
Type string `json:"type,required"`
// contains filtered or unexported fields
}
func (InferenceSecretNewParams) MarshalJSON ¶
func (r InferenceSecretNewParams) MarshalJSON() (data []byte, err error)
func (*InferenceSecretNewParams) UnmarshalJSON ¶
func (r *InferenceSecretNewParams) UnmarshalJSON(data []byte) error
type InferenceSecretNewParamsData ¶ added in v0.5.0
type InferenceSecretNewParamsData struct {
// AWS IAM key ID.
AwsAccessKeyID string `json:"aws_access_key_id,required"`
// AWS IAM secret key.
AwsSecretAccessKey string `json:"aws_secret_access_key,required"`
// contains filtered or unexported fields
}
Secret data.
The properties AwsAccessKeyID, AwsSecretAccessKey are required.
func (InferenceSecretNewParamsData) MarshalJSON ¶ added in v0.5.0
func (r InferenceSecretNewParamsData) MarshalJSON() (data []byte, err error)
func (*InferenceSecretNewParamsData) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceSecretNewParamsData) UnmarshalJSON(data []byte) error
type InferenceSecretReplaceParams ¶
type InferenceSecretReplaceParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Secret data.
Data InferenceSecretReplaceParamsData `json:"data,omitzero,required"`
// Secret type.
Type string `json:"type,required"`
// contains filtered or unexported fields
}
func (InferenceSecretReplaceParams) MarshalJSON ¶
func (r InferenceSecretReplaceParams) MarshalJSON() (data []byte, err error)
func (*InferenceSecretReplaceParams) UnmarshalJSON ¶
func (r *InferenceSecretReplaceParams) UnmarshalJSON(data []byte) error
type InferenceSecretReplaceParamsData ¶ added in v0.5.0
type InferenceSecretReplaceParamsData struct {
// AWS IAM key ID.
AwsAccessKeyID string `json:"aws_access_key_id,required"`
// AWS IAM secret key.
AwsSecretAccessKey string `json:"aws_secret_access_key,required"`
// contains filtered or unexported fields
}
Secret data.
The properties AwsAccessKeyID, AwsSecretAccessKey are required.
func (InferenceSecretReplaceParamsData) MarshalJSON ¶ added in v0.5.0
func (r InferenceSecretReplaceParamsData) MarshalJSON() (data []byte, err error)
func (*InferenceSecretReplaceParamsData) UnmarshalJSON ¶ added in v0.5.0
func (r *InferenceSecretReplaceParamsData) UnmarshalJSON(data []byte) error
type InferenceSecretService ¶
type InferenceSecretService struct {
Options []option.RequestOption
}
InferenceSecretService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInferenceSecretService method instead.
func NewInferenceSecretService ¶
func NewInferenceSecretService(opts ...option.RequestOption) (r InferenceSecretService)
NewInferenceSecretService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*InferenceSecretService) Delete ¶
func (r *InferenceSecretService) Delete(ctx context.Context, secretName string, body InferenceSecretDeleteParams, opts ...option.RequestOption) (err error)
Delete Inference Secret
func (*InferenceSecretService) Get ¶
func (r *InferenceSecretService) Get(ctx context.Context, secretName string, query InferenceSecretGetParams, opts ...option.RequestOption) (res *InferenceSecret, err error)
Get inference secret
func (*InferenceSecretService) List ¶
func (r *InferenceSecretService) List(ctx context.Context, params InferenceSecretListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[InferenceSecret], err error)
List inference secrets
func (*InferenceSecretService) ListAutoPaging ¶
func (r *InferenceSecretService) ListAutoPaging(ctx context.Context, params InferenceSecretListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[InferenceSecret]
List inference secrets
func (*InferenceSecretService) New ¶
func (r *InferenceSecretService) New(ctx context.Context, params InferenceSecretNewParams, opts ...option.RequestOption) (res *InferenceSecret, err error)
Create inference secret
func (*InferenceSecretService) Replace ¶
func (r *InferenceSecretService) Replace(ctx context.Context, secretName string, params InferenceSecretReplaceParams, opts ...option.RequestOption) (res *InferenceSecret, err error)
Replace inference secret
type InferenceService ¶
type InferenceService struct {
Options []option.RequestOption
Flavors InferenceFlavorService
Models InferenceModelService
Deployments InferenceDeploymentService
RegistryCredentials InferenceRegistryCredentialService
Secrets InferenceSecretService
}
InferenceService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInferenceService method instead.
func NewInferenceService ¶
func NewInferenceService(opts ...option.RequestOption) (r InferenceService)
NewInferenceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*InferenceService) GetCapacityByRegion ¶
func (r *InferenceService) GetCapacityByRegion(ctx context.Context, opts ...option.RequestOption) (res *InferenceRegionCapacityList, err error)
Get inference capacity by region
type Instance ¶
type Instance struct {
// Instance ID
ID string `json:"id,required" format:"uuid4"`
// Map of `network_name` to list of addresses in that network
Addresses map[string][]InstanceAddressUnion `json:"addresses,required"`
// IP addresses of the instances that are blackholed by DDoS mitigation system
BlackholePorts []BlackholePort `json:"blackhole_ports,required"`
// Datetime when instance was created
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Task that created this entity
CreatorTaskID string `json:"creator_task_id,required"`
// Advanced DDoS protection profile. It is always `null` if query parameter
// `with_ddos=true` is not set.
DDOSProfile DDOSProfile `json:"ddos_profile,required"`
// Fixed IP assigned to instance
FixedIPAssignments []InstanceFixedIPAssignment `json:"fixed_ip_assignments,required"`
// Flavor
Flavor InstanceFlavorUnion `json:"flavor,required"`
// Instance description
InstanceDescription string `json:"instance_description,required"`
// Instance isolation information
InstanceIsolation InstanceIsolation `json:"instance_isolation,required"`
// Instance name
Name string `json:"name,required"`
// Project ID
ProjectID int64 `json:"project_id,required"`
// Region name
Region string `json:"region,required"`
// Region ID
RegionID int64 `json:"region_id,required"`
// Security groups
SecurityGroups []InstanceSecurityGroup `json:"security_groups,required"`
// SSH key assigned to instance
SSHKeyName string `json:"ssh_key_name,required"`
// Instance status
//
// Any of "ACTIVE", "BUILD", "DELETED", "ERROR", "HARD_REBOOT", "MIGRATING",
// "PASSWORD", "PAUSED", "REBOOT", "REBUILD", "RESCUE", "RESIZE", "REVERT_RESIZE",
// "SHELVED", "SHELVED_OFFLOADED", "SHUTOFF", "SOFT_DELETED", "SUSPENDED",
// "UNKNOWN", "VERIFY_RESIZE".
Status InstanceStatus `json:"status,required"`
// List of key-value tags associated with the resource. A tag is a key-value pair
// that can be associated with a resource, enabling efficient filtering and
// grouping for better organization and management. Some tags are read-only and
// cannot be modified by the user. Tags are also integrated with cost reports,
// allowing cost data to be filtered based on tag keys or values.
Tags []Tag `json:"tags,required"`
// The UUID of the active task that currently holds a lock on the resource. This
// lock prevents concurrent modifications to ensure consistency. If `null`, the
// resource is not locked.
TaskID string `json:"task_id,required"`
// Task state
TaskState string `json:"task_state,required"`
// Virtual machine state (active)
//
// Any of "active", "building", "deleted", "error", "paused", "rescued", "resized",
// "shelved", "shelved_offloaded", "soft-deleted", "stopped", "suspended".
VmState InstanceVmState `json:"vm_state,required"`
// List of volumes
Volumes []InstanceVolume `json:"volumes,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Addresses respjson.Field
BlackholePorts respjson.Field
CreatedAt respjson.Field
CreatorTaskID respjson.Field
DDOSProfile respjson.Field
FixedIPAssignments respjson.Field
Flavor respjson.Field
InstanceDescription respjson.Field
InstanceIsolation respjson.Field
Name respjson.Field
ProjectID respjson.Field
Region respjson.Field
RegionID respjson.Field
SecurityGroups respjson.Field
SSHKeyName respjson.Field
Status respjson.Field
Tags respjson.Field
TaskID respjson.Field
TaskState respjson.Field
VmState respjson.Field
Volumes respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Instance) UnmarshalJSON ¶
type InstanceActionParams ¶
type InstanceActionParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// This field is a request body variant, only one variant field can be set.
OfStartActionInstanceSerializer *InstanceActionParamsBodyStartActionInstanceSerializer `json:",inline"`
// This field is a request body variant, only one variant field can be set.
OfBasicActionInstanceSerializer *InstanceActionParamsBodyBasicActionInstanceSerializer `json:",inline"`
// contains filtered or unexported fields
}
func (InstanceActionParams) MarshalJSON ¶
func (u InstanceActionParams) MarshalJSON() ([]byte, error)
func (*InstanceActionParams) UnmarshalJSON ¶
func (r *InstanceActionParams) UnmarshalJSON(data []byte) error
type InstanceActionParamsBodyBasicActionInstanceSerializer ¶
type InstanceActionParamsBodyBasicActionInstanceSerializer struct {
// Instance action name
//
// Any of "reboot", "reboot_hard", "resume", "stop", "suspend".
Action string `json:"action,omitzero,required"`
// contains filtered or unexported fields
}
The property Action is required.
func (InstanceActionParamsBodyBasicActionInstanceSerializer) MarshalJSON ¶
func (r InstanceActionParamsBodyBasicActionInstanceSerializer) MarshalJSON() (data []byte, err error)
func (*InstanceActionParamsBodyBasicActionInstanceSerializer) UnmarshalJSON ¶
func (r *InstanceActionParamsBodyBasicActionInstanceSerializer) UnmarshalJSON(data []byte) error
type InstanceActionParamsBodyStartActionInstanceSerializer ¶
type InstanceActionParamsBodyStartActionInstanceSerializer struct {
// Used on start instance to activate Advanced DDoS profile
ActivateProfile param.Opt[bool] `json:"activate_profile,omitzero"`
// Instance action name
//
// This field can be elided, and will marshal its zero value as "start".
Action constant.Start `json:"action,required"`
// contains filtered or unexported fields
}
The property Action is required.
func (InstanceActionParamsBodyStartActionInstanceSerializer) MarshalJSON ¶
func (r InstanceActionParamsBodyStartActionInstanceSerializer) MarshalJSON() (data []byte, err error)
func (*InstanceActionParamsBodyStartActionInstanceSerializer) UnmarshalJSON ¶
func (r *InstanceActionParamsBodyStartActionInstanceSerializer) UnmarshalJSON(data []byte) error
type InstanceAddToPlacementGroupParams ¶
type InstanceAddToPlacementGroupParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Anti-affinity or affinity or soft-anti-affinity server group ID.
ServergroupID string `json:"servergroup_id,required"`
// contains filtered or unexported fields
}
func (InstanceAddToPlacementGroupParams) MarshalJSON ¶
func (r InstanceAddToPlacementGroupParams) MarshalJSON() (data []byte, err error)
func (*InstanceAddToPlacementGroupParams) UnmarshalJSON ¶
func (r *InstanceAddToPlacementGroupParams) UnmarshalJSON(data []byte) error
type InstanceAddressUnion ¶
type InstanceAddressUnion struct {
Addr string `json:"addr"`
Type string `json:"type"`
InterfaceName string `json:"interface_name"`
// This field is from variant [FixedAddress].
SubnetID string `json:"subnet_id"`
// This field is from variant [FixedAddress].
SubnetName string `json:"subnet_name"`
JSON struct {
Addr respjson.Field
Type respjson.Field
InterfaceName respjson.Field
SubnetID respjson.Field
SubnetName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
InstanceAddressUnion contains all possible properties and values from FloatingAddress, FixedAddressShort, FixedAddress.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (InstanceAddressUnion) AsFixedIPAddress ¶
func (u InstanceAddressUnion) AsFixedIPAddress() (v FixedAddress)
func (InstanceAddressUnion) AsFixedIPAddressShort ¶
func (u InstanceAddressUnion) AsFixedIPAddressShort() (v FixedAddressShort)
func (InstanceAddressUnion) AsFloatingIPAddress ¶
func (u InstanceAddressUnion) AsFloatingIPAddress() (v FloatingAddress)
func (InstanceAddressUnion) RawJSON ¶
func (u InstanceAddressUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*InstanceAddressUnion) UnmarshalJSON ¶
func (r *InstanceAddressUnion) UnmarshalJSON(data []byte) error
type InstanceAssignSecurityGroupParams ¶
type InstanceAssignSecurityGroupParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Security group name, applies to all ports
Name param.Opt[string] `json:"name,omitzero"`
// Port security groups mapping
PortsSecurityGroupNames []InstanceAssignSecurityGroupParamsPortsSecurityGroupName `json:"ports_security_group_names,omitzero"`
// contains filtered or unexported fields
}
func (InstanceAssignSecurityGroupParams) MarshalJSON ¶
func (r InstanceAssignSecurityGroupParams) MarshalJSON() (data []byte, err error)
func (*InstanceAssignSecurityGroupParams) UnmarshalJSON ¶
func (r *InstanceAssignSecurityGroupParams) UnmarshalJSON(data []byte) error
type InstanceAssignSecurityGroupParamsPortsSecurityGroupName ¶
type InstanceAssignSecurityGroupParamsPortsSecurityGroupName struct {
// Port ID. If None, security groups will be applied to all ports
PortID param.Opt[string] `json:"port_id,omitzero,required"`
// List of security group names
SecurityGroupNames []string `json:"security_group_names,omitzero,required"`
// contains filtered or unexported fields
}
Port security group names
The properties PortID, SecurityGroupNames are required.
func (InstanceAssignSecurityGroupParamsPortsSecurityGroupName) MarshalJSON ¶
func (r InstanceAssignSecurityGroupParamsPortsSecurityGroupName) MarshalJSON() (data []byte, err error)
func (*InstanceAssignSecurityGroupParamsPortsSecurityGroupName) UnmarshalJSON ¶
func (r *InstanceAssignSecurityGroupParamsPortsSecurityGroupName) UnmarshalJSON(data []byte) error
type InstanceDeleteParams ¶
type InstanceDeleteParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// True if it is required to delete floating IPs assigned to the instance. Can't be
// used with `floatings`.
DeleteFloatings param.Opt[bool] `query:"delete_floatings,omitzero" json:"-"`
// Comma separated list of floating ids that should be deleted. Can't be used with
// `delete_floatings`.
Floatings param.Opt[string] `query:"floatings,omitzero" json:"-"`
// Comma separated list of port IDs to be deleted with the instance
ReservedFixedIPs param.Opt[string] `query:"reserved_fixed_ips,omitzero" json:"-"`
// Comma separated list of volume IDs to be deleted with the instance
Volumes param.Opt[string] `query:"volumes,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (InstanceDeleteParams) URLQuery ¶
func (r InstanceDeleteParams) URLQuery() (v url.Values, err error)
URLQuery serializes InstanceDeleteParams's query parameters as `url.Values`.
type InstanceFixedIPAssignment ¶
type InstanceFixedIPAssignment struct {
// Is network external
External bool `json:"external,required"`
// Ip address
IPAddress string `json:"ip_address,required"`
// Interface subnet id
SubnetID string `json:"subnet_id,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
External respjson.Field
IPAddress respjson.Field
SubnetID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InstanceFixedIPAssignment) RawJSON ¶
func (r InstanceFixedIPAssignment) RawJSON() string
Returns the unmodified JSON received from the API
func (*InstanceFixedIPAssignment) UnmarshalJSON ¶
func (r *InstanceFixedIPAssignment) UnmarshalJSON(data []byte) error
type InstanceFlavor ¶
type InstanceFlavor struct {
// Flavor architecture type
Architecture string `json:"architecture,required"`
// Disabled flavor flag
Disabled bool `json:"disabled,required"`
// Flavor ID is the same as name
FlavorID string `json:"flavor_id,required"`
// Flavor name
FlavorName string `json:"flavor_name,required"`
// Flavor operating system
OsType string `json:"os_type,required"`
// RAM size in MiB
Ram int64 `json:"ram,required"`
// Virtual CPU count. For bare metal flavors, it's a physical CPU count
Vcpus int64 `json:"vcpus,required"`
// Number of available instances of given configuration
Capacity int64 `json:"capacity,nullable"`
// Currency code. Shown if the `include_prices` query parameter if set to true
CurrencyCode string `json:"currency_code,nullable"`
// Additional hardware description
HardwareDescription map[string]string `json:"hardware_description"`
// Price per hour. Shown if the `include_prices` query parameter if set to true
PricePerHour float64 `json:"price_per_hour,nullable"`
// Price per month. Shown if the `include_prices` query parameter if set to true
PricePerMonth float64 `json:"price_per_month,nullable"`
// Price status for the UI
//
// Any of "error", "hide", "show".
PriceStatus InstanceFlavorPriceStatus `json:"price_status,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Architecture respjson.Field
Disabled respjson.Field
FlavorID respjson.Field
FlavorName respjson.Field
OsType respjson.Field
Ram respjson.Field
Vcpus respjson.Field
Capacity respjson.Field
CurrencyCode respjson.Field
HardwareDescription respjson.Field
PricePerHour respjson.Field
PricePerMonth respjson.Field
PriceStatus respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Instances flavor schema
func (InstanceFlavor) RawJSON ¶
func (r InstanceFlavor) RawJSON() string
Returns the unmodified JSON received from the API
func (*InstanceFlavor) UnmarshalJSON ¶
func (r *InstanceFlavor) UnmarshalJSON(data []byte) error
type InstanceFlavorBareMetalFlavor ¶
type InstanceFlavorBareMetalFlavor struct {
// CPU architecture
Architecture string `json:"architecture,required"`
// Flavor ID is the same as name
FlavorID string `json:"flavor_id,required"`
// Flavor name
FlavorName string `json:"flavor_name,required"`
// Additional hardware description
HardwareDescription InstanceFlavorBareMetalFlavorHardwareDescription `json:"hardware_description,required"`
// Operating system
OsType string `json:"os_type,required"`
// RAM size in MiB
Ram int64 `json:"ram,required"`
// Flavor resource class for mapping to hardware capacity
ResourceClass string `json:"resource_class,required"`
// Virtual CPU count. For bare metal flavors, it's a physical CPU count
Vcpus int64 `json:"vcpus,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Architecture respjson.Field
FlavorID respjson.Field
FlavorName respjson.Field
HardwareDescription respjson.Field
OsType respjson.Field
Ram respjson.Field
ResourceClass respjson.Field
Vcpus respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Bare metal flavor schema embedded into instance schema
func (InstanceFlavorBareMetalFlavor) RawJSON ¶
func (r InstanceFlavorBareMetalFlavor) RawJSON() string
Returns the unmodified JSON received from the API
func (*InstanceFlavorBareMetalFlavor) UnmarshalJSON ¶
func (r *InstanceFlavorBareMetalFlavor) UnmarshalJSON(data []byte) error
type InstanceFlavorBareMetalFlavorHardwareDescription ¶
type InstanceFlavorBareMetalFlavorHardwareDescription struct {
// Human-readable CPU description
CPU string `json:"cpu,required"`
// Human-readable disk description
Disk string `json:"disk,required"`
// If the flavor is licensed, this field contains the license type
License string `json:"license,required"`
// Human-readable NIC description
Network string `json:"network,required"`
// Human-readable RAM description
Ram string `json:"ram,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CPU respjson.Field
Disk respjson.Field
License respjson.Field
Network respjson.Field
Ram respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Additional hardware description
func (InstanceFlavorBareMetalFlavorHardwareDescription) RawJSON ¶
func (r InstanceFlavorBareMetalFlavorHardwareDescription) RawJSON() string
Returns the unmodified JSON received from the API
func (*InstanceFlavorBareMetalFlavorHardwareDescription) UnmarshalJSON ¶
func (r *InstanceFlavorBareMetalFlavorHardwareDescription) UnmarshalJSON(data []byte) error
type InstanceFlavorGPUClusterFlavor ¶
type InstanceFlavorGPUClusterFlavor struct {
// CPU architecture
Architecture string `json:"architecture,required"`
// Flavor ID is the same as name
FlavorID string `json:"flavor_id,required"`
// Flavor name
FlavorName string `json:"flavor_name,required"`
// Additional hardware description
HardwareDescription InstanceFlavorGPUClusterFlavorHardwareDescription `json:"hardware_description,required"`
// Operating system
OsType string `json:"os_type,required"`
// RAM size in MiB
Ram int64 `json:"ram,required"`
// Flavor resource class for mapping to hardware capacity
ResourceClass string `json:"resource_class,required"`
// Virtual CPU count. For bare metal flavors, it's a physical CPU count
Vcpus int64 `json:"vcpus,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Architecture respjson.Field
FlavorID respjson.Field
FlavorName respjson.Field
HardwareDescription respjson.Field
OsType respjson.Field
Ram respjson.Field
ResourceClass respjson.Field
Vcpus respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
GPU cluster flavor schema embedded into instance schema
func (InstanceFlavorGPUClusterFlavor) RawJSON ¶
func (r InstanceFlavorGPUClusterFlavor) RawJSON() string
Returns the unmodified JSON received from the API
func (*InstanceFlavorGPUClusterFlavor) UnmarshalJSON ¶
func (r *InstanceFlavorGPUClusterFlavor) UnmarshalJSON(data []byte) error
type InstanceFlavorGPUClusterFlavorHardwareDescription ¶
type InstanceFlavorGPUClusterFlavorHardwareDescription struct {
// Human-readable CPU description
CPU string `json:"cpu,required"`
// Human-readable disk description
Disk string `json:"disk,required"`
// Human-readable GPU description
GPU string `json:"gpu,required"`
// If the flavor is licensed, this field contains the license type
License string `json:"license,required"`
// Human-readable NIC description
Network string `json:"network,required"`
// Human-readable RAM description
Ram string `json:"ram,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CPU respjson.Field
Disk respjson.Field
GPU respjson.Field
License respjson.Field
Network respjson.Field
Ram respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Additional hardware description
func (InstanceFlavorGPUClusterFlavorHardwareDescription) RawJSON ¶
func (r InstanceFlavorGPUClusterFlavorHardwareDescription) RawJSON() string
Returns the unmodified JSON received from the API
func (*InstanceFlavorGPUClusterFlavorHardwareDescription) UnmarshalJSON ¶
func (r *InstanceFlavorGPUClusterFlavorHardwareDescription) UnmarshalJSON(data []byte) error
type InstanceFlavorInstanceFlavor ¶
type InstanceFlavorInstanceFlavor struct {
// CPU architecture
Architecture string `json:"architecture,required"`
// Flavor ID is the same as name
FlavorID string `json:"flavor_id,required"`
// Flavor name
FlavorName string `json:"flavor_name,required"`
// Additional hardware description
HardwareDescription InstanceFlavorInstanceFlavorHardwareDescription `json:"hardware_description,required"`
// Flavor operating system
OsType string `json:"os_type,required"`
// RAM size in MiB
Ram int64 `json:"ram,required"`
// Virtual CPU count. For bare metal flavors, it's a physical CPU count
Vcpus int64 `json:"vcpus,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Architecture respjson.Field
FlavorID respjson.Field
FlavorName respjson.Field
HardwareDescription respjson.Field
OsType respjson.Field
Ram respjson.Field
Vcpus respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Instances flavor schema embedded into instance schema
func (InstanceFlavorInstanceFlavor) RawJSON ¶
func (r InstanceFlavorInstanceFlavor) RawJSON() string
Returns the unmodified JSON received from the API
func (*InstanceFlavorInstanceFlavor) UnmarshalJSON ¶
func (r *InstanceFlavorInstanceFlavor) UnmarshalJSON(data []byte) error
type InstanceFlavorInstanceFlavorHardwareDescription ¶
type InstanceFlavorInstanceFlavorHardwareDescription struct {
// RAM description
Ram string `json:"ram,required"`
// CPU description
Vcpus string `json:"vcpus,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Ram respjson.Field
Vcpus respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Additional hardware description
func (InstanceFlavorInstanceFlavorHardwareDescription) RawJSON ¶
func (r InstanceFlavorInstanceFlavorHardwareDescription) RawJSON() string
Returns the unmodified JSON received from the API
func (*InstanceFlavorInstanceFlavorHardwareDescription) UnmarshalJSON ¶
func (r *InstanceFlavorInstanceFlavorHardwareDescription) UnmarshalJSON(data []byte) error
type InstanceFlavorList ¶
type InstanceFlavorList struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []InstanceFlavor `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InstanceFlavorList) RawJSON ¶
func (r InstanceFlavorList) RawJSON() string
Returns the unmodified JSON received from the API
func (*InstanceFlavorList) UnmarshalJSON ¶
func (r *InstanceFlavorList) UnmarshalJSON(data []byte) error
type InstanceFlavorListParams ¶
type InstanceFlavorListParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Flag for filtering disabled flavors in the region. Defaults to true
Disabled param.Opt[bool] `query:"disabled,omitzero" json:"-"`
// Set to true to exclude flavors dedicated to linux images. Default False
ExcludeLinux param.Opt[bool] `query:"exclude_linux,omitzero" json:"-"`
// Set to true to exclude flavors dedicated to windows images. Default False
ExcludeWindows param.Opt[bool] `query:"exclude_windows,omitzero" json:"-"`
// Set to true if the response should include flavor prices
IncludePrices param.Opt[bool] `query:"include_prices,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (InstanceFlavorListParams) URLQuery ¶
func (r InstanceFlavorListParams) URLQuery() (v url.Values, err error)
URLQuery serializes InstanceFlavorListParams's query parameters as `url.Values`.
type InstanceFlavorPriceStatus ¶
type InstanceFlavorPriceStatus string
Price status for the UI
const ( InstanceFlavorPriceStatusError InstanceFlavorPriceStatus = "error" InstanceFlavorPriceStatusHide InstanceFlavorPriceStatus = "hide" InstanceFlavorPriceStatusShow InstanceFlavorPriceStatus = "show" )
type InstanceFlavorService ¶
type InstanceFlavorService struct {
Options []option.RequestOption
}
InstanceFlavorService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInstanceFlavorService method instead.
func NewInstanceFlavorService ¶
func NewInstanceFlavorService(opts ...option.RequestOption) (r InstanceFlavorService)
NewInstanceFlavorService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*InstanceFlavorService) List ¶
func (r *InstanceFlavorService) List(ctx context.Context, params InstanceFlavorListParams, opts ...option.RequestOption) (res *InstanceFlavorList, err error)
Retrieve a list of available instance flavors in the project and region. When `include_prices` is specified, the list includes pricing information. Trial mode clients see all prices as 0. Contact support for pricing errors.
type InstanceFlavorUnion ¶
type InstanceFlavorUnion struct {
Architecture string `json:"architecture"`
FlavorID string `json:"flavor_id"`
FlavorName string `json:"flavor_name"`
// This field is a union of [InstanceFlavorInstanceFlavorHardwareDescription],
// [InstanceFlavorBareMetalFlavorHardwareDescription],
// [InstanceFlavorGPUClusterFlavorHardwareDescription]
HardwareDescription InstanceFlavorUnionHardwareDescription `json:"hardware_description"`
OsType string `json:"os_type"`
Ram int64 `json:"ram"`
Vcpus int64 `json:"vcpus"`
ResourceClass string `json:"resource_class"`
JSON struct {
Architecture respjson.Field
FlavorID respjson.Field
FlavorName respjson.Field
HardwareDescription respjson.Field
OsType respjson.Field
Ram respjson.Field
Vcpus respjson.Field
ResourceClass respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
InstanceFlavorUnion contains all possible properties and values from InstanceFlavorInstanceFlavor, InstanceFlavorBareMetalFlavor, InstanceFlavorGPUClusterFlavor.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (InstanceFlavorUnion) AsBareMetalFlavor ¶
func (u InstanceFlavorUnion) AsBareMetalFlavor() (v InstanceFlavorBareMetalFlavor)
func (InstanceFlavorUnion) AsGPUClusterFlavor ¶
func (u InstanceFlavorUnion) AsGPUClusterFlavor() (v InstanceFlavorGPUClusterFlavor)
func (InstanceFlavorUnion) AsInstanceFlavor ¶
func (u InstanceFlavorUnion) AsInstanceFlavor() (v InstanceFlavorInstanceFlavor)
func (InstanceFlavorUnion) RawJSON ¶
func (u InstanceFlavorUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*InstanceFlavorUnion) UnmarshalJSON ¶
func (r *InstanceFlavorUnion) UnmarshalJSON(data []byte) error
type InstanceFlavorUnionHardwareDescription ¶
type InstanceFlavorUnionHardwareDescription struct {
Ram string `json:"ram"`
// This field is from variant [InstanceFlavorInstanceFlavorHardwareDescription].
Vcpus string `json:"vcpus"`
CPU string `json:"cpu"`
Disk string `json:"disk"`
License string `json:"license"`
Network string `json:"network"`
// This field is from variant [InstanceFlavorGPUClusterFlavorHardwareDescription].
GPU string `json:"gpu"`
JSON struct {
Ram respjson.Field
Vcpus respjson.Field
CPU respjson.Field
Disk respjson.Field
License respjson.Field
Network respjson.Field
GPU respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
InstanceFlavorUnionHardwareDescription is an implicit subunion of InstanceFlavorUnion. InstanceFlavorUnionHardwareDescription provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the InstanceFlavorUnion.
func (*InstanceFlavorUnionHardwareDescription) UnmarshalJSON ¶
func (r *InstanceFlavorUnionHardwareDescription) UnmarshalJSON(data []byte) error
type InstanceGetConsoleParams ¶
type InstanceGetConsoleParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Console type
ConsoleType param.Opt[string] `query:"console_type,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (InstanceGetConsoleParams) URLQuery ¶
func (r InstanceGetConsoleParams) URLQuery() (v url.Values, err error)
URLQuery serializes InstanceGetConsoleParams's query parameters as `url.Values`.
type InstanceGetParams ¶
type InstanceImageGetParams ¶
type InstanceImageGetParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Show price
IncludePrices param.Opt[bool] `query:"include_prices,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (InstanceImageGetParams) URLQuery ¶
func (r InstanceImageGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes InstanceImageGetParams's query parameters as `url.Values`.
type InstanceImageListParams ¶
type InstanceImageListParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Show price
IncludePrices param.Opt[bool] `query:"include_prices,omitzero" json:"-"`
// Any value to show private images
Private param.Opt[string] `query:"private,omitzero" json:"-"`
// Filter by tag key-value pairs. Must be a valid JSON string.
TagKeyValue param.Opt[string] `query:"tag_key_value,omitzero" json:"-"`
// Filter by tag keys.
TagKey []string `query:"tag_key,omitzero" json:"-"`
// Image visibility. Globally visible images are public
//
// Any of "private", "public", "shared".
Visibility InstanceImageListParamsVisibility `query:"visibility,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (InstanceImageListParams) URLQuery ¶
func (r InstanceImageListParams) URLQuery() (v url.Values, err error)
URLQuery serializes InstanceImageListParams's query parameters as `url.Values`.
type InstanceImageListParamsVisibility ¶
type InstanceImageListParamsVisibility string
Image visibility. Globally visible images are public
const ( InstanceImageListParamsVisibilityPrivate InstanceImageListParamsVisibility = "private" InstanceImageListParamsVisibilityPublic InstanceImageListParamsVisibility = "public" )
type InstanceImageNewFromVolumeParams ¶
type InstanceImageNewFromVolumeParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Image name
Name string `json:"name,required"`
// Required if source is volume. Volume id
VolumeID string `json:"volume_id,required" format:"uuid4"`
// Set to true if the image will be used by bare metal servers. Defaults to false.
IsBaremetal param.Opt[bool] `json:"is_baremetal,omitzero"`
// Specifies the type of firmware with which to boot the guest.
//
// Any of "bios", "uefi".
HwFirmwareType InstanceImageNewFromVolumeParamsHwFirmwareType `json:"hw_firmware_type,omitzero"`
// A virtual chipset type.
//
// Any of "pc", "q35".
HwMachineType InstanceImageNewFromVolumeParamsHwMachineType `json:"hw_machine_type,omitzero"`
// Image CPU architecture type: `aarch64`, `x86_64`
//
// Any of "aarch64", "x86_64".
Architecture InstanceImageNewFromVolumeParamsArchitecture `json:"architecture,omitzero"`
// The operating system installed on the image.
//
// Any of "linux", "windows".
OsType InstanceImageNewFromVolumeParamsOsType `json:"os_type,omitzero"`
// Image source
//
// Any of "volume".
Source InstanceImageNewFromVolumeParamsSource `json:"source,omitzero"`
// Whether the image supports SSH key or not
//
// Any of "allow", "deny", "required".
SSHKey InstanceImageNewFromVolumeParamsSSHKey `json:"ssh_key,omitzero"`
// Key-value tags to associate with the resource. A tag is a key-value pair that
// can be associated with a resource, enabling efficient filtering and grouping for
// better organization and management. Some tags are read-only and cannot be
// modified by the user. Tags are also integrated with cost reports, allowing cost
// data to be filtered based on tag keys or values.
Tags map[string]string `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (InstanceImageNewFromVolumeParams) MarshalJSON ¶
func (r InstanceImageNewFromVolumeParams) MarshalJSON() (data []byte, err error)
func (*InstanceImageNewFromVolumeParams) UnmarshalJSON ¶
func (r *InstanceImageNewFromVolumeParams) UnmarshalJSON(data []byte) error
type InstanceImageNewFromVolumeParamsArchitecture ¶
type InstanceImageNewFromVolumeParamsArchitecture string
Image CPU architecture type: `aarch64`, `x86_64`
const ( InstanceImageNewFromVolumeParamsArchitectureAarch64 InstanceImageNewFromVolumeParamsArchitecture = "aarch64" InstanceImageNewFromVolumeParamsArchitectureX86_64 InstanceImageNewFromVolumeParamsArchitecture = "x86_64" )
type InstanceImageNewFromVolumeParamsHwFirmwareType ¶
type InstanceImageNewFromVolumeParamsHwFirmwareType string
Specifies the type of firmware with which to boot the guest.
const ( InstanceImageNewFromVolumeParamsHwFirmwareTypeBios InstanceImageNewFromVolumeParamsHwFirmwareType = "bios" InstanceImageNewFromVolumeParamsHwFirmwareTypeUefi InstanceImageNewFromVolumeParamsHwFirmwareType = "uefi" )
type InstanceImageNewFromVolumeParamsHwMachineType ¶
type InstanceImageNewFromVolumeParamsHwMachineType string
A virtual chipset type.
const ( InstanceImageNewFromVolumeParamsHwMachineTypePc InstanceImageNewFromVolumeParamsHwMachineType = "pc" InstanceImageNewFromVolumeParamsHwMachineTypeQ35 InstanceImageNewFromVolumeParamsHwMachineType = "q35" )
type InstanceImageNewFromVolumeParamsOsType ¶
type InstanceImageNewFromVolumeParamsOsType string
The operating system installed on the image.
const ( InstanceImageNewFromVolumeParamsOsTypeLinux InstanceImageNewFromVolumeParamsOsType = "linux" InstanceImageNewFromVolumeParamsOsTypeWindows InstanceImageNewFromVolumeParamsOsType = "windows" )
type InstanceImageNewFromVolumeParamsSSHKey ¶
type InstanceImageNewFromVolumeParamsSSHKey string
Whether the image supports SSH key or not
const ( InstanceImageNewFromVolumeParamsSSHKeyAllow InstanceImageNewFromVolumeParamsSSHKey = "allow" InstanceImageNewFromVolumeParamsSSHKeyDeny InstanceImageNewFromVolumeParamsSSHKey = "deny" InstanceImageNewFromVolumeParamsSSHKeyRequired InstanceImageNewFromVolumeParamsSSHKey = "required" )
type InstanceImageNewFromVolumeParamsSource ¶
type InstanceImageNewFromVolumeParamsSource string
Image source
const (
InstanceImageNewFromVolumeParamsSourceVolume InstanceImageNewFromVolumeParamsSource = "volume"
)
type InstanceImageService ¶
type InstanceImageService struct {
Options []option.RequestOption
// contains filtered or unexported fields
}
InstanceImageService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInstanceImageService method instead.
func NewInstanceImageService ¶
func NewInstanceImageService(opts ...option.RequestOption) (r InstanceImageService)
NewInstanceImageService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*InstanceImageService) Delete ¶
func (r *InstanceImageService) Delete(ctx context.Context, imageID string, body InstanceImageDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Delete a specific image. The image cannot be deleted if it is used by protected snapshots.
func (*InstanceImageService) DeleteAndPoll ¶
func (r *InstanceImageService) DeleteAndPoll(ctx context.Context, imageID string, body InstanceImageDeleteParams, opts ...option.RequestOption) error
DeleteAndPoll delete the image and poll for completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
func (*InstanceImageService) Get ¶
func (r *InstanceImageService) Get(ctx context.Context, imageID string, params InstanceImageGetParams, opts ...option.RequestOption) (res *Image, err error)
Retrieve detailed information about a specific image.
func (*InstanceImageService) List ¶
func (r *InstanceImageService) List(ctx context.Context, params InstanceImageListParams, opts ...option.RequestOption) (res *ImageList, err error)
Retrieve a list of available images in the project and region. The list can be filtered by visibility, tags, and other parameters. Returned entities are owned by the project or are public/shared with the client.
func (*InstanceImageService) NewFromVolume ¶
func (r *InstanceImageService) NewFromVolume(ctx context.Context, params InstanceImageNewFromVolumeParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Create a new image from a bootable volume. The volume must be bootable to create an image from it.
func (*InstanceImageService) NewFromVolumeAndPoll ¶
func (r *InstanceImageService) NewFromVolumeAndPoll(ctx context.Context, params InstanceImageNewFromVolumeParams, opts ...option.RequestOption) (v *Image, err error)
NewFromVolumeAndPoll create image from volume and poll for the result
func (*InstanceImageService) Update ¶
func (r *InstanceImageService) Update(ctx context.Context, imageID string, params InstanceImageUpdateParams, opts ...option.RequestOption) (res *Image, err error)
Update image properties and tags.
func (*InstanceImageService) Upload ¶
func (r *InstanceImageService) Upload(ctx context.Context, params InstanceImageUploadParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Upload an image from a URL. The image can be configured with various properties like OS type, architecture, and tags.
func (*InstanceImageService) UploadAndPoll ¶
func (r *InstanceImageService) UploadAndPoll(ctx context.Context, params InstanceImageUploadParams, opts ...option.RequestOption) (v *Image, err error)
UploadAndPoll upload image and poll for the task completion. Use the TaskService.Poll method if you need to poll for all tasks.
type InstanceImageUpdateParams ¶
type InstanceImageUpdateParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Set to true if the image will be used by bare metal servers.
IsBaremetal param.Opt[bool] `json:"is_baremetal,omitzero"`
// Image display name
Name param.Opt[string] `json:"name,omitzero"`
// Specifies the type of firmware with which to boot the guest.
//
// Any of "bios", "uefi".
HwFirmwareType InstanceImageUpdateParamsHwFirmwareType `json:"hw_firmware_type,omitzero"`
// A virtual chipset type.
//
// Any of "pc", "q35".
HwMachineType InstanceImageUpdateParamsHwMachineType `json:"hw_machine_type,omitzero"`
// The operating system installed on the image.
//
// Any of "linux", "windows".
OsType InstanceImageUpdateParamsOsType `json:"os_type,omitzero"`
// Whether the image supports SSH key or not
//
// Any of "allow", "deny", "required".
SSHKey InstanceImageUpdateParamsSSHKey `json:"ssh_key,omitzero"`
// Key-value tags to associate with the resource. A tag is a key-value pair that
// can be associated with a resource, enabling efficient filtering and grouping for
// better organization and management. Some tags are read-only and cannot be
// modified by the user. Tags are also integrated with cost reports, allowing cost
// data to be filtered based on tag keys or values.
Tags TagUpdateMap `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (InstanceImageUpdateParams) MarshalJSON ¶
func (r InstanceImageUpdateParams) MarshalJSON() (data []byte, err error)
func (*InstanceImageUpdateParams) UnmarshalJSON ¶
func (r *InstanceImageUpdateParams) UnmarshalJSON(data []byte) error
type InstanceImageUpdateParamsHwFirmwareType ¶
type InstanceImageUpdateParamsHwFirmwareType string
Specifies the type of firmware with which to boot the guest.
const ( InstanceImageUpdateParamsHwFirmwareTypeBios InstanceImageUpdateParamsHwFirmwareType = "bios" InstanceImageUpdateParamsHwFirmwareTypeUefi InstanceImageUpdateParamsHwFirmwareType = "uefi" )
type InstanceImageUpdateParamsHwMachineType ¶
type InstanceImageUpdateParamsHwMachineType string
A virtual chipset type.
const ( InstanceImageUpdateParamsHwMachineTypePc InstanceImageUpdateParamsHwMachineType = "pc" InstanceImageUpdateParamsHwMachineTypeQ35 InstanceImageUpdateParamsHwMachineType = "q35" )
type InstanceImageUpdateParamsOsType ¶
type InstanceImageUpdateParamsOsType string
The operating system installed on the image.
const ( InstanceImageUpdateParamsOsTypeLinux InstanceImageUpdateParamsOsType = "linux" InstanceImageUpdateParamsOsTypeWindows InstanceImageUpdateParamsOsType = "windows" )
type InstanceImageUpdateParamsSSHKey ¶
type InstanceImageUpdateParamsSSHKey string
Whether the image supports SSH key or not
const ( InstanceImageUpdateParamsSSHKeyAllow InstanceImageUpdateParamsSSHKey = "allow" InstanceImageUpdateParamsSSHKeyDeny InstanceImageUpdateParamsSSHKey = "deny" InstanceImageUpdateParamsSSHKeyRequired InstanceImageUpdateParamsSSHKey = "required" )
type InstanceImageUploadParams ¶
type InstanceImageUploadParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Image name
Name string `json:"name,required"`
// URL
URL string `json:"url,required" format:"uri"`
// OS Distribution, i.e. Debian, CentOS, Ubuntu, CoreOS etc.
OsDistro param.Opt[string] `json:"os_distro,omitzero"`
// OS version, i.e. 22.04 (for Ubuntu) or 9.4 for Debian
OsVersion param.Opt[string] `json:"os_version,omitzero"`
// When True, image cannot be deleted unless all volumes, created from it, are
// deleted.
CowFormat param.Opt[bool] `json:"cow_format,omitzero"`
// Set to true if the image will be used by bare metal servers. Defaults to false.
IsBaremetal param.Opt[bool] `json:"is_baremetal,omitzero"`
// Specifies the type of firmware with which to boot the guest.
//
// Any of "bios", "uefi".
HwFirmwareType InstanceImageUploadParamsHwFirmwareType `json:"hw_firmware_type,omitzero"`
// A virtual chipset type.
//
// Any of "pc", "q35".
HwMachineType InstanceImageUploadParamsHwMachineType `json:"hw_machine_type,omitzero"`
// Image CPU architecture type: `aarch64`, `x86_64`
//
// Any of "aarch64", "x86_64".
Architecture InstanceImageUploadParamsArchitecture `json:"architecture,omitzero"`
// The operating system installed on the image.
//
// Any of "linux", "windows".
OsType InstanceImageUploadParamsOsType `json:"os_type,omitzero"`
// Whether the image supports SSH key or not
//
// Any of "allow", "deny", "required".
SSHKey InstanceImageUploadParamsSSHKey `json:"ssh_key,omitzero"`
// Key-value tags to associate with the resource. A tag is a key-value pair that
// can be associated with a resource, enabling efficient filtering and grouping for
// better organization and management. Some tags are read-only and cannot be
// modified by the user. Tags are also integrated with cost reports, allowing cost
// data to be filtered based on tag keys or values.
Tags map[string]string `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (InstanceImageUploadParams) MarshalJSON ¶
func (r InstanceImageUploadParams) MarshalJSON() (data []byte, err error)
func (*InstanceImageUploadParams) UnmarshalJSON ¶
func (r *InstanceImageUploadParams) UnmarshalJSON(data []byte) error
type InstanceImageUploadParamsArchitecture ¶
type InstanceImageUploadParamsArchitecture string
Image CPU architecture type: `aarch64`, `x86_64`
const ( InstanceImageUploadParamsArchitectureAarch64 InstanceImageUploadParamsArchitecture = "aarch64" InstanceImageUploadParamsArchitectureX86_64 InstanceImageUploadParamsArchitecture = "x86_64" )
type InstanceImageUploadParamsHwFirmwareType ¶
type InstanceImageUploadParamsHwFirmwareType string
Specifies the type of firmware with which to boot the guest.
const ( InstanceImageUploadParamsHwFirmwareTypeBios InstanceImageUploadParamsHwFirmwareType = "bios" InstanceImageUploadParamsHwFirmwareTypeUefi InstanceImageUploadParamsHwFirmwareType = "uefi" )
type InstanceImageUploadParamsHwMachineType ¶
type InstanceImageUploadParamsHwMachineType string
A virtual chipset type.
const ( InstanceImageUploadParamsHwMachineTypePc InstanceImageUploadParamsHwMachineType = "pc" InstanceImageUploadParamsHwMachineTypeQ35 InstanceImageUploadParamsHwMachineType = "q35" )
type InstanceImageUploadParamsOsType ¶
type InstanceImageUploadParamsOsType string
The operating system installed on the image.
const ( InstanceImageUploadParamsOsTypeLinux InstanceImageUploadParamsOsType = "linux" InstanceImageUploadParamsOsTypeWindows InstanceImageUploadParamsOsType = "windows" )
type InstanceImageUploadParamsSSHKey ¶
type InstanceImageUploadParamsSSHKey string
Whether the image supports SSH key or not
const ( InstanceImageUploadParamsSSHKeyAllow InstanceImageUploadParamsSSHKey = "allow" InstanceImageUploadParamsSSHKeyDeny InstanceImageUploadParamsSSHKey = "deny" InstanceImageUploadParamsSSHKeyRequired InstanceImageUploadParamsSSHKey = "required" )
type InstanceInterface ¶
type InstanceInterface struct {
// Group of subnet masks and/or IP addresses that share the current IP as VIP
AllowedAddressPairs []AllowedAddressPairs `json:"allowed_address_pairs,required"`
// Bodies of floating IPs that are NAT-ing IPs of this port
FloatingipDetails []FloatingIP `json:"floatingip_details,required"`
// IP addresses assigned to this port
IPAssignments []IPAssignment `json:"ip_assignments,required"`
// Body of the network this port is attached to
NetworkDetails NetworkDetails `json:"network_details,required"`
// ID of the network the port is attached to
NetworkID string `json:"network_id,required" format:"uuid4"`
// ID of virtual ethernet port object
PortID string `json:"port_id,required" format:"uuid4"`
// Port security status
PortSecurityEnabled bool `json:"port_security_enabled,required"`
// Interface name
InterfaceName string `json:"interface_name,nullable"`
// MAC address of the virtual port
MacAddress string `json:"mac_address,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AllowedAddressPairs respjson.Field
FloatingipDetails respjson.Field
IPAssignments respjson.Field
NetworkDetails respjson.Field
NetworkID respjson.Field
PortID respjson.Field
PortSecurityEnabled respjson.Field
InterfaceName respjson.Field
MacAddress respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InstanceInterface) RawJSON ¶
func (r InstanceInterface) RawJSON() string
Returns the unmodified JSON received from the API
func (*InstanceInterface) UnmarshalJSON ¶
func (r *InstanceInterface) UnmarshalJSON(data []byte) error
type InstanceInterfaceAttachParams ¶
type InstanceInterfaceAttachParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// This field is a request body variant, only one variant field can be set.
// Instance will be attached to default external network
OfNewInterfaceExternalExtendSchemaWithDDOS *InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOS `json:",inline"`
// This field is a request body variant, only one variant field can be set.
// Instance will be attached to specified subnet
OfNewInterfaceSpecificSubnetSchema *InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchema `json:",inline"`
// This field is a request body variant, only one variant field can be set.
// Instance will be attached to the network subnet with the largest count of
// available ips
OfNewInterfaceAnySubnetSchema *InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchema `json:",inline"`
// This field is a request body variant, only one variant field can be set.
// Instance will be attached to the given port. Floating IP will be created and
// attached to that IP
OfNewInterfaceReservedFixedIPSchema *InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchema `json:",inline"`
// contains filtered or unexported fields
}
func (InstanceInterfaceAttachParams) MarshalJSON ¶
func (u InstanceInterfaceAttachParams) MarshalJSON() ([]byte, error)
func (*InstanceInterfaceAttachParams) UnmarshalJSON ¶
func (r *InstanceInterfaceAttachParams) UnmarshalJSON(data []byte) error
type InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchema ¶
type InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchema struct {
// Port will get an IP address in this network subnet
NetworkID string `json:"network_id,required"`
// Interface name
InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
// Each group will be added to the separate trunk.
PortGroup param.Opt[int64] `json:"port_group,omitzero"`
// Must be '`any_subnet`'
Type param.Opt[string] `json:"type,omitzero"`
// Advanced DDoS protection.
DDOSProfile InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaDDOSProfile `json:"ddos_profile,omitzero"`
// Which subnets should be selected: IPv4, IPv6 or use dual stack.
//
// Any of "dual", "ipv4", "ipv6".
IPFamily string `json:"ip_family,omitzero"`
// List of security group IDs
SecurityGroups []InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaSecurityGroup `json:"security_groups,omitzero"`
// contains filtered or unexported fields
}
Instance will be attached to the network subnet with the largest count of available ips
The property NetworkID is required.
func (InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchema) MarshalJSON ¶
func (r InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchema) MarshalJSON() (data []byte, err error)
func (*InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchema) UnmarshalJSON ¶
func (r *InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchema) UnmarshalJSON(data []byte) error
type InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaDDOSProfile ¶
type InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaDDOSProfile struct {
// DDoS profile template ID.
ProfileTemplate int64 `json:"profile_template,required"`
// DDoS profile template name.
ProfileTemplateName param.Opt[string] `json:"profile_template_name,omitzero"`
// Protection parameters.
Fields []InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaDDOSProfileField `json:"fields,omitzero"`
// contains filtered or unexported fields
}
Advanced DDoS protection.
The property ProfileTemplate is required.
func (InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaDDOSProfile) MarshalJSON ¶
func (r InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaDDOSProfile) MarshalJSON() (data []byte, err error)
func (*InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaDDOSProfile) UnmarshalJSON ¶
func (r *InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaDDOSProfile) UnmarshalJSON(data []byte) error
type InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaDDOSProfileField ¶
type InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaDDOSProfileField struct {
// ID of DDoS profile field
BaseField param.Opt[int64] `json:"base_field,omitzero"`
// Name of DDoS profile field
FieldName param.Opt[string] `json:"field_name,omitzero"`
// Basic type value. Only one of 'value' or '`field_value`' must be specified.
Value param.Opt[string] `json:"value,omitzero"`
// Complex value. Only one of 'value' or '`field_value`' must be specified.
FieldValue any `json:"field_value,omitzero"`
// contains filtered or unexported fields
}
func (InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaDDOSProfileField) MarshalJSON ¶
func (r InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaDDOSProfileField) MarshalJSON() (data []byte, err error)
func (*InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaDDOSProfileField) UnmarshalJSON ¶
func (r *InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaDDOSProfileField) UnmarshalJSON(data []byte) error
type InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaSecurityGroup ¶
type InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaSecurityGroup struct {
// Resource ID
ID string `json:"id,required"`
// contains filtered or unexported fields
}
MandatoryIdSchema schema
The property ID is required.
func (InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaSecurityGroup) MarshalJSON ¶
func (r InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaSecurityGroup) MarshalJSON() (data []byte, err error)
func (*InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaSecurityGroup) UnmarshalJSON ¶
func (r *InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaSecurityGroup) UnmarshalJSON(data []byte) error
type InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOS ¶
type InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOS struct {
// Interface name
InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
// Each group will be added to the separate trunk.
PortGroup param.Opt[int64] `json:"port_group,omitzero"`
// Must be 'external'. Union tag
Type param.Opt[string] `json:"type,omitzero"`
// Advanced DDoS protection.
DDOSProfile InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfile `json:"ddos_profile,omitzero"`
// Which subnets should be selected: IPv4, IPv6 or use dual stack.
//
// Any of "dual", "ipv4", "ipv6".
IPFamily string `json:"ip_family,omitzero"`
// List of security group IDs
SecurityGroups []InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSSecurityGroup `json:"security_groups,omitzero"`
// contains filtered or unexported fields
}
Instance will be attached to default external network
func (InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOS) MarshalJSON ¶
func (r InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOS) MarshalJSON() (data []byte, err error)
func (*InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOS) UnmarshalJSON ¶
func (r *InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOS) UnmarshalJSON(data []byte) error
type InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfile ¶
type InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfile struct {
// DDoS profile template ID.
ProfileTemplate int64 `json:"profile_template,required"`
// DDoS profile template name.
ProfileTemplateName param.Opt[string] `json:"profile_template_name,omitzero"`
// Protection parameters.
Fields []InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField `json:"fields,omitzero"`
// contains filtered or unexported fields
}
Advanced DDoS protection.
The property ProfileTemplate is required.
func (InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfile) MarshalJSON ¶
func (r InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfile) MarshalJSON() (data []byte, err error)
func (*InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfile) UnmarshalJSON ¶
func (r *InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfile) UnmarshalJSON(data []byte) error
type InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField ¶
type InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField struct {
// ID of DDoS profile field
BaseField param.Opt[int64] `json:"base_field,omitzero"`
// Name of DDoS profile field
FieldName param.Opt[string] `json:"field_name,omitzero"`
// Basic type value. Only one of 'value' or '`field_value`' must be specified.
Value param.Opt[string] `json:"value,omitzero"`
// Complex value. Only one of 'value' or '`field_value`' must be specified.
FieldValue any `json:"field_value,omitzero"`
// contains filtered or unexported fields
}
func (InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField) MarshalJSON ¶
func (r InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField) MarshalJSON() (data []byte, err error)
func (*InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField) UnmarshalJSON ¶
func (r *InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField) UnmarshalJSON(data []byte) error
type InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSSecurityGroup ¶
type InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSSecurityGroup struct {
// Resource ID
ID string `json:"id,required"`
// contains filtered or unexported fields
}
MandatoryIdSchema schema
The property ID is required.
func (InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSSecurityGroup) MarshalJSON ¶
func (r InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSSecurityGroup) MarshalJSON() (data []byte, err error)
func (*InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSSecurityGroup) UnmarshalJSON ¶
func (r *InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSSecurityGroup) UnmarshalJSON(data []byte) error
type InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchema ¶
type InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchema struct {
// Port ID
PortID string `json:"port_id,required"`
// Interface name
InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
// Each group will be added to the separate trunk.
PortGroup param.Opt[int64] `json:"port_group,omitzero"`
// Must be '`reserved_fixed_ip`'. Union tag
Type param.Opt[string] `json:"type,omitzero"`
// Advanced DDoS protection.
DDOSProfile InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfile `json:"ddos_profile,omitzero"`
// List of security group IDs
SecurityGroups []InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaSecurityGroup `json:"security_groups,omitzero"`
// contains filtered or unexported fields
}
Instance will be attached to the given port. Floating IP will be created and attached to that IP
The property PortID is required.
func (InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchema) MarshalJSON ¶
func (r InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchema) MarshalJSON() (data []byte, err error)
func (*InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchema) UnmarshalJSON ¶
func (r *InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchema) UnmarshalJSON(data []byte) error
type InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfile ¶
type InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfile struct {
// DDoS profile template ID.
ProfileTemplate int64 `json:"profile_template,required"`
// DDoS profile template name.
ProfileTemplateName param.Opt[string] `json:"profile_template_name,omitzero"`
// Protection parameters.
Fields []InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfileField `json:"fields,omitzero"`
// contains filtered or unexported fields
}
Advanced DDoS protection.
The property ProfileTemplate is required.
func (InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfile) MarshalJSON ¶
func (r InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfile) MarshalJSON() (data []byte, err error)
func (*InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfile) UnmarshalJSON ¶
func (r *InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfile) UnmarshalJSON(data []byte) error
type InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfileField ¶
type InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfileField struct {
// ID of DDoS profile field
BaseField param.Opt[int64] `json:"base_field,omitzero"`
// Name of DDoS profile field
FieldName param.Opt[string] `json:"field_name,omitzero"`
// Basic type value. Only one of 'value' or '`field_value`' must be specified.
Value param.Opt[string] `json:"value,omitzero"`
// Complex value. Only one of 'value' or '`field_value`' must be specified.
FieldValue any `json:"field_value,omitzero"`
// contains filtered or unexported fields
}
func (InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfileField) MarshalJSON ¶
func (r InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfileField) MarshalJSON() (data []byte, err error)
func (*InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfileField) UnmarshalJSON ¶
func (r *InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfileField) UnmarshalJSON(data []byte) error
type InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaSecurityGroup ¶
type InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaSecurityGroup struct {
// Resource ID
ID string `json:"id,required"`
// contains filtered or unexported fields
}
MandatoryIdSchema schema
The property ID is required.
func (InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaSecurityGroup) MarshalJSON ¶
func (r InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaSecurityGroup) MarshalJSON() (data []byte, err error)
func (*InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaSecurityGroup) UnmarshalJSON ¶
func (r *InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaSecurityGroup) UnmarshalJSON(data []byte) error
type InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchema ¶
type InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchema struct {
// Port will get an IP address from this subnet
SubnetID string `json:"subnet_id,required"`
// Interface name
InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
// Each group will be added to the separate trunk.
PortGroup param.Opt[int64] `json:"port_group,omitzero"`
// Must be 'subnet'
Type param.Opt[string] `json:"type,omitzero"`
// Advanced DDoS protection.
DDOSProfile InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfile `json:"ddos_profile,omitzero"`
// List of security group IDs
SecurityGroups []InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaSecurityGroup `json:"security_groups,omitzero"`
// contains filtered or unexported fields
}
Instance will be attached to specified subnet
The property SubnetID is required.
func (InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchema) MarshalJSON ¶
func (r InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchema) MarshalJSON() (data []byte, err error)
func (*InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchema) UnmarshalJSON ¶
func (r *InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchema) UnmarshalJSON(data []byte) error
type InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfile ¶
type InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfile struct {
// DDoS profile template ID.
ProfileTemplate int64 `json:"profile_template,required"`
// DDoS profile template name.
ProfileTemplateName param.Opt[string] `json:"profile_template_name,omitzero"`
// Protection parameters.
Fields []InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfileField `json:"fields,omitzero"`
// contains filtered or unexported fields
}
Advanced DDoS protection.
The property ProfileTemplate is required.
func (InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfile) MarshalJSON ¶
func (r InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfile) MarshalJSON() (data []byte, err error)
func (*InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfile) UnmarshalJSON ¶
func (r *InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfile) UnmarshalJSON(data []byte) error
type InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfileField ¶
type InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfileField struct {
// ID of DDoS profile field
BaseField param.Opt[int64] `json:"base_field,omitzero"`
// Name of DDoS profile field
FieldName param.Opt[string] `json:"field_name,omitzero"`
// Basic type value. Only one of 'value' or '`field_value`' must be specified.
Value param.Opt[string] `json:"value,omitzero"`
// Complex value. Only one of 'value' or '`field_value`' must be specified.
FieldValue any `json:"field_value,omitzero"`
// contains filtered or unexported fields
}
func (InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfileField) MarshalJSON ¶
func (r InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfileField) MarshalJSON() (data []byte, err error)
func (*InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfileField) UnmarshalJSON ¶
func (r *InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfileField) UnmarshalJSON(data []byte) error
type InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaSecurityGroup ¶
type InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaSecurityGroup struct {
// Resource ID
ID string `json:"id,required"`
// contains filtered or unexported fields
}
MandatoryIdSchema schema
The property ID is required.
func (InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaSecurityGroup) MarshalJSON ¶
func (r InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaSecurityGroup) MarshalJSON() (data []byte, err error)
func (*InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaSecurityGroup) UnmarshalJSON ¶
func (r *InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaSecurityGroup) UnmarshalJSON(data []byte) error
type InstanceInterfaceDetachParams ¶
type InstanceInterfaceDetachParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// IP address
IPAddress string `json:"ip_address,required"`
// ID of the port
PortID string `json:"port_id,required"`
// contains filtered or unexported fields
}
func (InstanceInterfaceDetachParams) MarshalJSON ¶
func (r InstanceInterfaceDetachParams) MarshalJSON() (data []byte, err error)
func (*InstanceInterfaceDetachParams) UnmarshalJSON ¶
func (r *InstanceInterfaceDetachParams) UnmarshalJSON(data []byte) error
type InstanceInterfaceService ¶
type InstanceInterfaceService struct {
Options []option.RequestOption
// contains filtered or unexported fields
}
InstanceInterfaceService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInstanceInterfaceService method instead.
func NewInstanceInterfaceService ¶
func NewInstanceInterfaceService(opts ...option.RequestOption) (r InstanceInterfaceService)
NewInstanceInterfaceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*InstanceInterfaceService) Attach ¶
func (r *InstanceInterfaceService) Attach(ctx context.Context, instanceID string, params InstanceInterfaceAttachParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Attach interface to instance
func (*InstanceInterfaceService) AttachAndPoll ¶
func (r *InstanceInterfaceService) AttachAndPoll(ctx context.Context, instanceID string, params InstanceInterfaceAttachParams, opts ...option.RequestOption) (v *NetworkInterfaceList, err error)
AttachAndPoll attach interface to instance and poll for the completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
func (*InstanceInterfaceService) Detach ¶
func (r *InstanceInterfaceService) Detach(ctx context.Context, instanceID string, params InstanceInterfaceDetachParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Detach interface from instance
func (*InstanceInterfaceService) DetachAndPoll ¶
func (r *InstanceInterfaceService) DetachAndPoll(ctx context.Context, instanceID string, params InstanceInterfaceDetachParams, opts ...option.RequestOption) (v *NetworkInterfaceList, err error)
DetachAndPoll interface from instance and poll for the completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
func (*InstanceInterfaceService) List ¶
func (r *InstanceInterfaceService) List(ctx context.Context, instanceID string, query InstanceInterfaceListParams, opts ...option.RequestOption) (res *NetworkInterfaceList, err error)
List all network interfaces attached to the specified instance.
type InstanceIsolation ¶
type InstanceIsolation struct {
// The reason of instance isolation if it is isolated from external internet.
Reason string `json:"reason,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InstanceIsolation) RawJSON ¶
func (r InstanceIsolation) RawJSON() string
Returns the unmodified JSON received from the API
func (*InstanceIsolation) UnmarshalJSON ¶
func (r *InstanceIsolation) UnmarshalJSON(data []byte) error
type InstanceList ¶
type InstanceList struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []Instance `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InstanceList) RawJSON ¶
func (r InstanceList) RawJSON() string
Returns the unmodified JSON received from the API
func (*InstanceList) UnmarshalJSON ¶
func (r *InstanceList) UnmarshalJSON(data []byte) error
type InstanceListParams ¶
type InstanceListParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Only show instances which are able to handle floating address
AvailableFloating param.Opt[bool] `query:"available_floating,omitzero" json:"-"`
// Filters the instances by a date and time stamp when the instances last changed.
ChangesBefore param.Opt[time.Time] `query:"changes-before,omitzero" format:"date-time" json:"-"`
// Filters the instances by a date and time stamp when the instances last changed
// status.
ChangesSince param.Opt[time.Time] `query:"changes-since,omitzero" format:"date-time" json:"-"`
// Exclude instances with specified flavor prefix
ExcludeFlavorPrefix param.Opt[string] `query:"exclude_flavor_prefix,omitzero" json:"-"`
// Exclude instances with specified security group name
ExcludeSecgroup param.Opt[string] `query:"exclude_secgroup,omitzero" json:"-"`
// Filter out instances by `flavor_id`. Flavor id must match exactly.
FlavorID param.Opt[string] `query:"flavor_id,omitzero" json:"-"`
// Filter out instances by `flavor_prefix`.
FlavorPrefix param.Opt[string] `query:"flavor_prefix,omitzero" json:"-"`
// Include GPU clusters' servers
IncludeAI param.Opt[bool] `query:"include_ai,omitzero" json:"-"`
// Include bare metal servers. Please, use `GET /v1/bminstances/` instead
IncludeBaremetal param.Opt[bool] `query:"include_baremetal,omitzero" json:"-"`
// Include managed k8s worker nodes
IncludeK8s param.Opt[bool] `query:"include_k8s,omitzero" json:"-"`
// An IPv4 address to filter results by. Note: partial matches are allowed. For
// example, searching for 192.168.0.1 will return 192.168.0.1, 192.168.0.10,
// 192.168.0.110, and so on.
IP param.Opt[string] `query:"ip,omitzero" json:"-"`
// Optional. Limit the number of returned items
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Filter instances by name. You can provide a full or partial name, instances with
// matching names will be returned. For example, entering 'test' will return all
// instances that contain 'test' in their name.
Name param.Opt[string] `query:"name,omitzero" json:"-"`
// Optional. Offset value is used to exclude the first set of records from the
// result
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Include only isolated instances
OnlyIsolated param.Opt[bool] `query:"only_isolated,omitzero" json:"-"`
// Return bare metals only with external fixed IP addresses.
OnlyWithFixedExternalIP param.Opt[bool] `query:"only_with_fixed_external_ip,omitzero" json:"-"`
// Filter result by ddos protection profile name. Effective only with `with_ddos`
// set to true.
ProfileName param.Opt[string] `query:"profile_name,omitzero" json:"-"`
// Optional. Filter by tag key-value pairs.
TagKeyValue param.Opt[string] `query:"tag_key_value,omitzero" json:"-"`
// Filter the server list result by the UUID of the server. Allowed UUID part
Uuid param.Opt[string] `query:"uuid,omitzero" json:"-"`
// Include DDoS profile information in the response when set to `true`. Otherwise,
// the `ddos_profile` field in the response is `null` by default.
WithDDOS param.Opt[bool] `query:"with_ddos,omitzero" json:"-"`
// Include `interface_name` in the addresses
WithInterfacesName param.Opt[bool] `query:"with_interfaces_name,omitzero" json:"-"`
// Order by field and direction.
//
// Any of "created.asc", "created.desc", "name.asc", "name.desc".
OrderBy InstanceListParamsOrderBy `query:"order_by,omitzero" json:"-"`
// Filter result by DDoS `protection_status`. if parameter is provided. Effective
// only with `with_ddos` set to true. (Active, Queued or Error)
//
// Any of "Active", "Queued", "Error".
ProtectionStatus InstanceListParamsProtectionStatus `query:"protection_status,omitzero" json:"-"`
// Filters instances by status.
//
// Any of "ACTIVE", "BUILD", "ERROR", "HARD_REBOOT", "MIGRATING", "PAUSED",
// "REBOOT", "REBUILD", "RESIZE", "REVERT_RESIZE", "SHELVED", "SHELVED_OFFLOADED",
// "SHUTOFF", "SOFT_DELETED", "SUSPENDED", "VERIFY_RESIZE".
Status InstanceListParamsStatus `query:"status,omitzero" json:"-"`
// Optional. Filter by tag values. ?`tag_value`=value1&`tag_value`=value2
TagValue []string `query:"tag_value,omitzero" json:"-"`
// Return bare metals either only with advanced or only basic DDoS protection.
// Effective only with `with_ddos` set to true. (advanced or basic)
//
// Any of "basic", "advanced".
TypeDDOSProfile InstanceListParamsTypeDDOSProfile `query:"type_ddos_profile,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (InstanceListParams) URLQuery ¶
func (r InstanceListParams) URLQuery() (v url.Values, err error)
URLQuery serializes InstanceListParams's query parameters as `url.Values`.
type InstanceListParamsOrderBy ¶
type InstanceListParamsOrderBy string
Order by field and direction.
const ( InstanceListParamsOrderByCreatedAsc InstanceListParamsOrderBy = "created.asc" InstanceListParamsOrderByCreatedDesc InstanceListParamsOrderBy = "created.desc" InstanceListParamsOrderByNameAsc InstanceListParamsOrderBy = "name.asc" InstanceListParamsOrderByNameDesc InstanceListParamsOrderBy = "name.desc" )
type InstanceListParamsProtectionStatus ¶
type InstanceListParamsProtectionStatus string
Filter result by DDoS `protection_status`. if parameter is provided. Effective only with `with_ddos` set to true. (Active, Queued or Error)
const ( InstanceListParamsProtectionStatusActive InstanceListParamsProtectionStatus = "Active" InstanceListParamsProtectionStatusQueued InstanceListParamsProtectionStatus = "Queued" InstanceListParamsProtectionStatusError InstanceListParamsProtectionStatus = "Error" )
type InstanceListParamsStatus ¶
type InstanceListParamsStatus string
Filters instances by status.
const ( InstanceListParamsStatusActive InstanceListParamsStatus = "ACTIVE" InstanceListParamsStatusBuild InstanceListParamsStatus = "BUILD" InstanceListParamsStatusError InstanceListParamsStatus = "ERROR" InstanceListParamsStatusHardReboot InstanceListParamsStatus = "HARD_REBOOT" InstanceListParamsStatusMigrating InstanceListParamsStatus = "MIGRATING" InstanceListParamsStatusPaused InstanceListParamsStatus = "PAUSED" InstanceListParamsStatusReboot InstanceListParamsStatus = "REBOOT" InstanceListParamsStatusRebuild InstanceListParamsStatus = "REBUILD" InstanceListParamsStatusResize InstanceListParamsStatus = "RESIZE" InstanceListParamsStatusRevertResize InstanceListParamsStatus = "REVERT_RESIZE" InstanceListParamsStatusShelved InstanceListParamsStatus = "SHELVED" InstanceListParamsStatusShelvedOffloaded InstanceListParamsStatus = "SHELVED_OFFLOADED" InstanceListParamsStatusShutoff InstanceListParamsStatus = "SHUTOFF" InstanceListParamsStatusSoftDeleted InstanceListParamsStatus = "SOFT_DELETED" InstanceListParamsStatusSuspended InstanceListParamsStatus = "SUSPENDED" InstanceListParamsStatusVerifyResize InstanceListParamsStatus = "VERIFY_RESIZE" )
type InstanceListParamsTypeDDOSProfile ¶
type InstanceListParamsTypeDDOSProfile string
Return bare metals either only with advanced or only basic DDoS protection. Effective only with `with_ddos` set to true. (advanced or basic)
const ( InstanceListParamsTypeDDOSProfileBasic InstanceListParamsTypeDDOSProfile = "basic" InstanceListParamsTypeDDOSProfileAdvanced InstanceListParamsTypeDDOSProfile = "advanced" )
type InstanceMetricListParams ¶
type InstanceMetricListParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Time interval.
TimeInterval int64 `json:"time_interval,required"`
// Time interval unit.
//
// Any of "day", "hour".
TimeUnit InstanceMetricsTimeUnit `json:"time_unit,omitzero,required"`
// contains filtered or unexported fields
}
func (InstanceMetricListParams) MarshalJSON ¶
func (r InstanceMetricListParams) MarshalJSON() (data []byte, err error)
func (*InstanceMetricListParams) UnmarshalJSON ¶
func (r *InstanceMetricListParams) UnmarshalJSON(data []byte) error
type InstanceMetricService ¶
type InstanceMetricService struct {
Options []option.RequestOption
}
InstanceMetricService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInstanceMetricService method instead.
func NewInstanceMetricService ¶
func NewInstanceMetricService(opts ...option.RequestOption) (r InstanceMetricService)
NewInstanceMetricService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*InstanceMetricService) List ¶
func (r *InstanceMetricService) List(ctx context.Context, instanceID string, params InstanceMetricListParams, opts ...option.RequestOption) (res *MetricsList, err error)
Get instance metrics, including cpu, memory, network and disk metrics
type InstanceMetricsTimeUnit ¶
type InstanceMetricsTimeUnit string
const ( InstanceMetricsTimeUnitDay InstanceMetricsTimeUnit = "day" InstanceMetricsTimeUnitHour InstanceMetricsTimeUnit = "hour" )
type InstanceNewParams ¶
type InstanceNewParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// The flavor of the instance.
Flavor string `json:"flavor,required"`
// A list of network interfaces for the instance. You can create one or more
// interfaces - private, public, or both.
Interfaces []InstanceNewParamsInterfaceUnion `json:"interfaces,omitzero,required"`
// List of volumes that will be attached to the instance.
Volumes []InstanceNewParamsVolumeUnion `json:"volumes,omitzero,required"`
// Specifies the name of the SSH keypair, created via the
// [/v1/`ssh_keys` endpoint](/docs/api-reference/cloud/ssh-keys/add-or-generate-ssh-key).
SSHKeyName param.Opt[string] `json:"ssh_key_name,omitzero"`
// Set to `true` if creating the instance from an `apptemplate`. This allows
// application ports in the security group for instances created from a marketplace
// application template.
AllowAppPorts param.Opt[bool] `json:"allow_app_ports,omitzero"`
// Instance name.
Name param.Opt[string] `json:"name,omitzero"`
// If you want the instance name to be automatically generated based on IP
// addresses, you can provide a name template instead of specifying the name
// manually. The template should include a placeholder that will be replaced during
// provisioning. Supported placeholders are: `{`ip_octets`}` (last 3 octets of the
// IP), `{`two_ip_octets`}`, and `{`one_ip_octet`}`.
NameTemplate param.Opt[string] `json:"name_template,omitzero"`
// For Linux instances, 'username' and 'password' are used to create a new user.
// When only 'password' is provided, it is set as the password for the default user
// of the image. For Windows instances, 'username' cannot be specified. Use the
// 'password' field to set the password for the 'Admin' user on Windows. Use the
// '`user_data`' field to provide a script to create new users on Windows. The
// password of the Admin user cannot be updated via '`user_data`'.
Password param.Opt[string] `json:"password,omitzero"`
// Placement group ID for instance placement policy. Supported group types:
//
// - `anti-affinity`: Ensures instances are placed on different hosts for high
// availability.
// - `affinity`: Places instances on the same host for low-latency communication.
// - `soft-anti-affinity`: Tries to place instances on different hosts but allows
// sharing if needed.
ServergroupID param.Opt[string] `json:"servergroup_id,omitzero" format:"uuid4"`
// String in base64 format. For Linux instances, '`user_data`' is ignored when
// 'password' field is provided. For Windows instances, Admin user password is set
// by 'password' field and cannot be updated via '`user_data`'. Examples of the
// `user_data`: https://cloudinit.readthedocs.io/en/latest/topics/examples.html
UserData param.Opt[string] `json:"user_data,omitzero"`
// For Linux instances, 'username' and 'password' are used to create a new user.
// For Windows instances, 'username' cannot be specified. Use 'password' field to
// set the password for the 'Admin' user on Windows.
Username param.Opt[string] `json:"username,omitzero"`
// Parameters for the application template if creating the instance from an
// `apptemplate`.
Configuration any `json:"configuration,omitzero"`
// Specifies security group UUIDs to be applied to all instance network interfaces.
SecurityGroups []InstanceNewParamsSecurityGroup `json:"security_groups,omitzero"`
// Key-value tags to associate with the resource. A tag is a key-value pair that
// can be associated with a resource, enabling efficient filtering and grouping for
// better organization and management. Some tags are read-only and cannot be
// modified by the user. Tags are also integrated with cost reports, allowing cost
// data to be filtered based on tag keys or values.
Tags map[string]string `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (InstanceNewParams) MarshalJSON ¶
func (r InstanceNewParams) MarshalJSON() (data []byte, err error)
func (*InstanceNewParams) UnmarshalJSON ¶
func (r *InstanceNewParams) UnmarshalJSON(data []byte) error
type InstanceNewParamsInterfaceAnySubnet ¶
type InstanceNewParamsInterfaceAnySubnet struct {
// The network where the instance will be connected.
NetworkID string `json:"network_id,required" format:"uuid4"`
// Interface name. Defaults to `null` and is returned as `null` in the API response
// if not set.
InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
// You can specify a specific IP address from your subnet.
IPAddress param.Opt[string] `json:"ip_address,omitzero" format:"ipvanyaddress"`
// Allows the instance to have a public IP that can be reached from the internet.
FloatingIP InstanceNewParamsInterfaceAnySubnetFloatingIPUnion `json:"floating_ip,omitzero"`
// Specify `ipv4`, `ipv6`, or `dual` to enable both.
//
// Any of "dual", "ipv4", "ipv6".
IPFamily InterfaceIPFamily `json:"ip_family,omitzero"`
// Specifies security group UUIDs to be applied to the instance network interface.
SecurityGroups []InstanceNewParamsInterfaceAnySubnetSecurityGroup `json:"security_groups,omitzero"`
// Instance will be attached to a subnet with the largest count of free IPs.
//
// This field can be elided, and will marshal its zero value as "any_subnet".
Type constant.AnySubnet `json:"type,required"`
// contains filtered or unexported fields
}
The properties NetworkID, Type are required.
func (InstanceNewParamsInterfaceAnySubnet) MarshalJSON ¶
func (r InstanceNewParamsInterfaceAnySubnet) MarshalJSON() (data []byte, err error)
func (*InstanceNewParamsInterfaceAnySubnet) UnmarshalJSON ¶
func (r *InstanceNewParamsInterfaceAnySubnet) UnmarshalJSON(data []byte) error
type InstanceNewParamsInterfaceAnySubnetFloatingIPExisting ¶
type InstanceNewParamsInterfaceAnySubnetFloatingIPExisting struct {
// An existing available floating IP id must be specified if the source is set to
// `existing`
ExistingFloatingID string `json:"existing_floating_id,required" format:"uuid4"`
// An existing available floating IP will be attached to the instance. A floating
// IP is a public IP that makes the instance accessible from the internet, even if
// it only has a private IP. It works like SNAT, allowing outgoing and incoming
// traffic.
//
// This field can be elided, and will marshal its zero value as "existing".
Source constant.Existing `json:"source,required"`
// contains filtered or unexported fields
}
The properties ExistingFloatingID, Source are required.
func (InstanceNewParamsInterfaceAnySubnetFloatingIPExisting) MarshalJSON ¶
func (r InstanceNewParamsInterfaceAnySubnetFloatingIPExisting) MarshalJSON() (data []byte, err error)
func (*InstanceNewParamsInterfaceAnySubnetFloatingIPExisting) UnmarshalJSON ¶
func (r *InstanceNewParamsInterfaceAnySubnetFloatingIPExisting) UnmarshalJSON(data []byte) error
type InstanceNewParamsInterfaceAnySubnetFloatingIPNew ¶
type InstanceNewParamsInterfaceAnySubnetFloatingIPNew struct {
// A new floating IP will be created and attached to the instance. A floating IP is
// a public IP that makes the instance accessible from the internet, even if it
// only has a private IP. It works like SNAT, allowing outgoing and incoming
// traffic.
Source constant.New `json:"source,required"`
// contains filtered or unexported fields
}
This struct has a constant value, construct it with NewInstanceNewParamsInterfaceAnySubnetFloatingIPNew.
func NewInstanceNewParamsInterfaceAnySubnetFloatingIPNew ¶
func NewInstanceNewParamsInterfaceAnySubnetFloatingIPNew() InstanceNewParamsInterfaceAnySubnetFloatingIPNew
func (InstanceNewParamsInterfaceAnySubnetFloatingIPNew) MarshalJSON ¶
func (r InstanceNewParamsInterfaceAnySubnetFloatingIPNew) MarshalJSON() (data []byte, err error)
func (*InstanceNewParamsInterfaceAnySubnetFloatingIPNew) UnmarshalJSON ¶
func (r *InstanceNewParamsInterfaceAnySubnetFloatingIPNew) UnmarshalJSON(data []byte) error
type InstanceNewParamsInterfaceAnySubnetFloatingIPUnion ¶
type InstanceNewParamsInterfaceAnySubnetFloatingIPUnion struct {
OfNew *InstanceNewParamsInterfaceAnySubnetFloatingIPNew `json:",omitzero,inline"`
OfExisting *InstanceNewParamsInterfaceAnySubnetFloatingIPExisting `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (InstanceNewParamsInterfaceAnySubnetFloatingIPUnion) GetExistingFloatingID ¶
func (u InstanceNewParamsInterfaceAnySubnetFloatingIPUnion) GetExistingFloatingID() *string
Returns a pointer to the underlying variant's property, if present.
func (InstanceNewParamsInterfaceAnySubnetFloatingIPUnion) GetSource ¶
func (u InstanceNewParamsInterfaceAnySubnetFloatingIPUnion) GetSource() *string
Returns a pointer to the underlying variant's property, if present.
func (InstanceNewParamsInterfaceAnySubnetFloatingIPUnion) MarshalJSON ¶
func (u InstanceNewParamsInterfaceAnySubnetFloatingIPUnion) MarshalJSON() ([]byte, error)
func (*InstanceNewParamsInterfaceAnySubnetFloatingIPUnion) UnmarshalJSON ¶
func (u *InstanceNewParamsInterfaceAnySubnetFloatingIPUnion) UnmarshalJSON(data []byte) error
type InstanceNewParamsInterfaceAnySubnetSecurityGroup ¶
type InstanceNewParamsInterfaceAnySubnetSecurityGroup struct {
// Resource ID
ID string `json:"id,required" format:"uuid4"`
// contains filtered or unexported fields
}
The property ID is required.
func (InstanceNewParamsInterfaceAnySubnetSecurityGroup) MarshalJSON ¶
func (r InstanceNewParamsInterfaceAnySubnetSecurityGroup) MarshalJSON() (data []byte, err error)
func (*InstanceNewParamsInterfaceAnySubnetSecurityGroup) UnmarshalJSON ¶
func (r *InstanceNewParamsInterfaceAnySubnetSecurityGroup) UnmarshalJSON(data []byte) error
type InstanceNewParamsInterfaceExternal ¶
type InstanceNewParamsInterfaceExternal struct {
// Interface name. Defaults to `null` and is returned as `null` in the API response
// if not set.
InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
// Specify `ipv4`, `ipv6`, or `dual` to enable both.
//
// Any of "dual", "ipv4", "ipv6".
IPFamily InterfaceIPFamily `json:"ip_family,omitzero"`
// Specifies security group UUIDs to be applied to the instance network interface.
SecurityGroups []InstanceNewParamsInterfaceExternalSecurityGroup `json:"security_groups,omitzero"`
// A public IP address will be assigned to the instance.
//
// This field can be elided, and will marshal its zero value as "external".
Type constant.External `json:"type,required"`
// contains filtered or unexported fields
}
Instance will be attached to default external network
The property Type is required.
func (InstanceNewParamsInterfaceExternal) MarshalJSON ¶
func (r InstanceNewParamsInterfaceExternal) MarshalJSON() (data []byte, err error)
func (*InstanceNewParamsInterfaceExternal) UnmarshalJSON ¶
func (r *InstanceNewParamsInterfaceExternal) UnmarshalJSON(data []byte) error
type InstanceNewParamsInterfaceExternalSecurityGroup ¶
type InstanceNewParamsInterfaceExternalSecurityGroup struct {
// Resource ID
ID string `json:"id,required" format:"uuid4"`
// contains filtered or unexported fields
}
The property ID is required.
func (InstanceNewParamsInterfaceExternalSecurityGroup) MarshalJSON ¶
func (r InstanceNewParamsInterfaceExternalSecurityGroup) MarshalJSON() (data []byte, err error)
func (*InstanceNewParamsInterfaceExternalSecurityGroup) UnmarshalJSON ¶
func (r *InstanceNewParamsInterfaceExternalSecurityGroup) UnmarshalJSON(data []byte) error
type InstanceNewParamsInterfaceReservedFixedIP ¶
type InstanceNewParamsInterfaceReservedFixedIP struct {
// Network ID the subnet belongs to. Port will be plugged in this network.
PortID string `json:"port_id,required"`
// Interface name. Defaults to `null` and is returned as `null` in the API response
// if not set.
InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
// Allows the instance to have a public IP that can be reached from the internet.
FloatingIP InstanceNewParamsInterfaceReservedFixedIPFloatingIPUnion `json:"floating_ip,omitzero"`
// Specifies security group UUIDs to be applied to the instance network interface.
SecurityGroups []InstanceNewParamsInterfaceReservedFixedIPSecurityGroup `json:"security_groups,omitzero"`
// An existing available reserved fixed IP will be attached to the instance. If the
// reserved IP is not public and you choose to add a floating IP, the instance will
// be accessible from the internet.
//
// This field can be elided, and will marshal its zero value as
// "reserved_fixed_ip".
Type constant.ReservedFixedIP `json:"type,required"`
// contains filtered or unexported fields
}
The properties PortID, Type are required.
func (InstanceNewParamsInterfaceReservedFixedIP) MarshalJSON ¶
func (r InstanceNewParamsInterfaceReservedFixedIP) MarshalJSON() (data []byte, err error)
func (*InstanceNewParamsInterfaceReservedFixedIP) UnmarshalJSON ¶
func (r *InstanceNewParamsInterfaceReservedFixedIP) UnmarshalJSON(data []byte) error
type InstanceNewParamsInterfaceReservedFixedIPFloatingIPExisting ¶
type InstanceNewParamsInterfaceReservedFixedIPFloatingIPExisting struct {
// An existing available floating IP id must be specified if the source is set to
// `existing`
ExistingFloatingID string `json:"existing_floating_id,required" format:"uuid4"`
// An existing available floating IP will be attached to the instance. A floating
// IP is a public IP that makes the instance accessible from the internet, even if
// it only has a private IP. It works like SNAT, allowing outgoing and incoming
// traffic.
//
// This field can be elided, and will marshal its zero value as "existing".
Source constant.Existing `json:"source,required"`
// contains filtered or unexported fields
}
The properties ExistingFloatingID, Source are required.
func (InstanceNewParamsInterfaceReservedFixedIPFloatingIPExisting) MarshalJSON ¶
func (r InstanceNewParamsInterfaceReservedFixedIPFloatingIPExisting) MarshalJSON() (data []byte, err error)
func (*InstanceNewParamsInterfaceReservedFixedIPFloatingIPExisting) UnmarshalJSON ¶
func (r *InstanceNewParamsInterfaceReservedFixedIPFloatingIPExisting) UnmarshalJSON(data []byte) error
type InstanceNewParamsInterfaceReservedFixedIPFloatingIPNew ¶
type InstanceNewParamsInterfaceReservedFixedIPFloatingIPNew struct {
// A new floating IP will be created and attached to the instance. A floating IP is
// a public IP that makes the instance accessible from the internet, even if it
// only has a private IP. It works like SNAT, allowing outgoing and incoming
// traffic.
Source constant.New `json:"source,required"`
// contains filtered or unexported fields
}
This struct has a constant value, construct it with NewInstanceNewParamsInterfaceReservedFixedIPFloatingIPNew.
func NewInstanceNewParamsInterfaceReservedFixedIPFloatingIPNew ¶
func NewInstanceNewParamsInterfaceReservedFixedIPFloatingIPNew() InstanceNewParamsInterfaceReservedFixedIPFloatingIPNew
func (InstanceNewParamsInterfaceReservedFixedIPFloatingIPNew) MarshalJSON ¶
func (r InstanceNewParamsInterfaceReservedFixedIPFloatingIPNew) MarshalJSON() (data []byte, err error)
func (*InstanceNewParamsInterfaceReservedFixedIPFloatingIPNew) UnmarshalJSON ¶
func (r *InstanceNewParamsInterfaceReservedFixedIPFloatingIPNew) UnmarshalJSON(data []byte) error
type InstanceNewParamsInterfaceReservedFixedIPFloatingIPUnion ¶
type InstanceNewParamsInterfaceReservedFixedIPFloatingIPUnion struct {
OfNew *InstanceNewParamsInterfaceReservedFixedIPFloatingIPNew `json:",omitzero,inline"`
OfExisting *InstanceNewParamsInterfaceReservedFixedIPFloatingIPExisting `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (InstanceNewParamsInterfaceReservedFixedIPFloatingIPUnion) GetExistingFloatingID ¶
func (u InstanceNewParamsInterfaceReservedFixedIPFloatingIPUnion) GetExistingFloatingID() *string
Returns a pointer to the underlying variant's property, if present.
func (InstanceNewParamsInterfaceReservedFixedIPFloatingIPUnion) GetSource ¶
func (u InstanceNewParamsInterfaceReservedFixedIPFloatingIPUnion) GetSource() *string
Returns a pointer to the underlying variant's property, if present.
func (InstanceNewParamsInterfaceReservedFixedIPFloatingIPUnion) MarshalJSON ¶
func (u InstanceNewParamsInterfaceReservedFixedIPFloatingIPUnion) MarshalJSON() ([]byte, error)
func (*InstanceNewParamsInterfaceReservedFixedIPFloatingIPUnion) UnmarshalJSON ¶
func (u *InstanceNewParamsInterfaceReservedFixedIPFloatingIPUnion) UnmarshalJSON(data []byte) error
type InstanceNewParamsInterfaceReservedFixedIPSecurityGroup ¶
type InstanceNewParamsInterfaceReservedFixedIPSecurityGroup struct {
// Resource ID
ID string `json:"id,required" format:"uuid4"`
// contains filtered or unexported fields
}
The property ID is required.
func (InstanceNewParamsInterfaceReservedFixedIPSecurityGroup) MarshalJSON ¶
func (r InstanceNewParamsInterfaceReservedFixedIPSecurityGroup) MarshalJSON() (data []byte, err error)
func (*InstanceNewParamsInterfaceReservedFixedIPSecurityGroup) UnmarshalJSON ¶
func (r *InstanceNewParamsInterfaceReservedFixedIPSecurityGroup) UnmarshalJSON(data []byte) error
type InstanceNewParamsInterfaceSubnet ¶
type InstanceNewParamsInterfaceSubnet struct {
// The network where the instance will be connected.
NetworkID string `json:"network_id,required" format:"uuid4"`
// The instance will get an IP address from this subnet.
SubnetID string `json:"subnet_id,required" format:"uuid4"`
// Interface name. Defaults to `null` and is returned as `null` in the API response
// if not set.
InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
// Allows the instance to have a public IP that can be reached from the internet.
FloatingIP InstanceNewParamsInterfaceSubnetFloatingIPUnion `json:"floating_ip,omitzero"`
// Specifies security group UUIDs to be applied to the instance network interface.
SecurityGroups []InstanceNewParamsInterfaceSubnetSecurityGroup `json:"security_groups,omitzero"`
// The instance will get an IP address from the selected network. If you choose to
// add a floating IP, the instance will be reachable from the internet. Otherwise,
// it will only have a private IP within the network.
//
// This field can be elided, and will marshal its zero value as "subnet".
Type constant.Subnet `json:"type,required"`
// contains filtered or unexported fields
}
The instance will get an IP address from the selected network. If you choose to add a floating IP, the instance will be reachable from the internet. Otherwise, it will only have a private IP within the network.
The properties NetworkID, SubnetID, Type are required.
func (InstanceNewParamsInterfaceSubnet) MarshalJSON ¶
func (r InstanceNewParamsInterfaceSubnet) MarshalJSON() (data []byte, err error)
func (*InstanceNewParamsInterfaceSubnet) UnmarshalJSON ¶
func (r *InstanceNewParamsInterfaceSubnet) UnmarshalJSON(data []byte) error
type InstanceNewParamsInterfaceSubnetFloatingIPExisting ¶
type InstanceNewParamsInterfaceSubnetFloatingIPExisting struct {
// An existing available floating IP id must be specified if the source is set to
// `existing`
ExistingFloatingID string `json:"existing_floating_id,required" format:"uuid4"`
// An existing available floating IP will be attached to the instance. A floating
// IP is a public IP that makes the instance accessible from the internet, even if
// it only has a private IP. It works like SNAT, allowing outgoing and incoming
// traffic.
//
// This field can be elided, and will marshal its zero value as "existing".
Source constant.Existing `json:"source,required"`
// contains filtered or unexported fields
}
The properties ExistingFloatingID, Source are required.
func (InstanceNewParamsInterfaceSubnetFloatingIPExisting) MarshalJSON ¶
func (r InstanceNewParamsInterfaceSubnetFloatingIPExisting) MarshalJSON() (data []byte, err error)
func (*InstanceNewParamsInterfaceSubnetFloatingIPExisting) UnmarshalJSON ¶
func (r *InstanceNewParamsInterfaceSubnetFloatingIPExisting) UnmarshalJSON(data []byte) error
type InstanceNewParamsInterfaceSubnetFloatingIPNew ¶
type InstanceNewParamsInterfaceSubnetFloatingIPNew struct {
// A new floating IP will be created and attached to the instance. A floating IP is
// a public IP that makes the instance accessible from the internet, even if it
// only has a private IP. It works like SNAT, allowing outgoing and incoming
// traffic.
Source constant.New `json:"source,required"`
// contains filtered or unexported fields
}
This struct has a constant value, construct it with NewInstanceNewParamsInterfaceSubnetFloatingIPNew.
func NewInstanceNewParamsInterfaceSubnetFloatingIPNew ¶
func NewInstanceNewParamsInterfaceSubnetFloatingIPNew() InstanceNewParamsInterfaceSubnetFloatingIPNew
func (InstanceNewParamsInterfaceSubnetFloatingIPNew) MarshalJSON ¶
func (r InstanceNewParamsInterfaceSubnetFloatingIPNew) MarshalJSON() (data []byte, err error)
func (*InstanceNewParamsInterfaceSubnetFloatingIPNew) UnmarshalJSON ¶
func (r *InstanceNewParamsInterfaceSubnetFloatingIPNew) UnmarshalJSON(data []byte) error
type InstanceNewParamsInterfaceSubnetFloatingIPUnion ¶
type InstanceNewParamsInterfaceSubnetFloatingIPUnion struct {
OfNew *InstanceNewParamsInterfaceSubnetFloatingIPNew `json:",omitzero,inline"`
OfExisting *InstanceNewParamsInterfaceSubnetFloatingIPExisting `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (InstanceNewParamsInterfaceSubnetFloatingIPUnion) GetExistingFloatingID ¶
func (u InstanceNewParamsInterfaceSubnetFloatingIPUnion) GetExistingFloatingID() *string
Returns a pointer to the underlying variant's property, if present.
func (InstanceNewParamsInterfaceSubnetFloatingIPUnion) GetSource ¶
func (u InstanceNewParamsInterfaceSubnetFloatingIPUnion) GetSource() *string
Returns a pointer to the underlying variant's property, if present.
func (InstanceNewParamsInterfaceSubnetFloatingIPUnion) MarshalJSON ¶
func (u InstanceNewParamsInterfaceSubnetFloatingIPUnion) MarshalJSON() ([]byte, error)
func (*InstanceNewParamsInterfaceSubnetFloatingIPUnion) UnmarshalJSON ¶
func (u *InstanceNewParamsInterfaceSubnetFloatingIPUnion) UnmarshalJSON(data []byte) error
type InstanceNewParamsInterfaceSubnetSecurityGroup ¶
type InstanceNewParamsInterfaceSubnetSecurityGroup struct {
// Resource ID
ID string `json:"id,required" format:"uuid4"`
// contains filtered or unexported fields
}
The property ID is required.
func (InstanceNewParamsInterfaceSubnetSecurityGroup) MarshalJSON ¶
func (r InstanceNewParamsInterfaceSubnetSecurityGroup) MarshalJSON() (data []byte, err error)
func (*InstanceNewParamsInterfaceSubnetSecurityGroup) UnmarshalJSON ¶
func (r *InstanceNewParamsInterfaceSubnetSecurityGroup) UnmarshalJSON(data []byte) error
type InstanceNewParamsInterfaceUnion ¶
type InstanceNewParamsInterfaceUnion struct {
OfExternal *InstanceNewParamsInterfaceExternal `json:",omitzero,inline"`
OfSubnet *InstanceNewParamsInterfaceSubnet `json:",omitzero,inline"`
OfAnySubnet *InstanceNewParamsInterfaceAnySubnet `json:",omitzero,inline"`
OfReservedFixedIP *InstanceNewParamsInterfaceReservedFixedIP `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (InstanceNewParamsInterfaceUnion) GetFloatingIP ¶
func (u InstanceNewParamsInterfaceUnion) GetFloatingIP() (res instanceNewParamsInterfaceUnionFloatingIP)
Returns a subunion which exports methods to access subproperties
Or use AsAny() to get the underlying value
func (InstanceNewParamsInterfaceUnion) GetIPAddress ¶
func (u InstanceNewParamsInterfaceUnion) GetIPAddress() *string
Returns a pointer to the underlying variant's property, if present.
func (InstanceNewParamsInterfaceUnion) GetIPFamily ¶
func (u InstanceNewParamsInterfaceUnion) GetIPFamily() *string
Returns a pointer to the underlying variant's property, if present.
func (InstanceNewParamsInterfaceUnion) GetInterfaceName ¶
func (u InstanceNewParamsInterfaceUnion) GetInterfaceName() *string
Returns a pointer to the underlying variant's property, if present.
func (InstanceNewParamsInterfaceUnion) GetNetworkID ¶
func (u InstanceNewParamsInterfaceUnion) GetNetworkID() *string
Returns a pointer to the underlying variant's property, if present.
func (InstanceNewParamsInterfaceUnion) GetPortID ¶
func (u InstanceNewParamsInterfaceUnion) GetPortID() *string
Returns a pointer to the underlying variant's property, if present.
func (InstanceNewParamsInterfaceUnion) GetSecurityGroups ¶
func (u InstanceNewParamsInterfaceUnion) GetSecurityGroups() (res instanceNewParamsInterfaceUnionSecurityGroups)
Returns a subunion which exports methods to access subproperties
Or use AsAny() to get the underlying value
func (InstanceNewParamsInterfaceUnion) GetSubnetID ¶
func (u InstanceNewParamsInterfaceUnion) GetSubnetID() *string
Returns a pointer to the underlying variant's property, if present.
func (InstanceNewParamsInterfaceUnion) GetType ¶
func (u InstanceNewParamsInterfaceUnion) GetType() *string
Returns a pointer to the underlying variant's property, if present.
func (InstanceNewParamsInterfaceUnion) MarshalJSON ¶
func (u InstanceNewParamsInterfaceUnion) MarshalJSON() ([]byte, error)
func (*InstanceNewParamsInterfaceUnion) UnmarshalJSON ¶
func (u *InstanceNewParamsInterfaceUnion) UnmarshalJSON(data []byte) error
type InstanceNewParamsSecurityGroup ¶
type InstanceNewParamsSecurityGroup struct {
// Resource ID
ID string `json:"id,required" format:"uuid4"`
// contains filtered or unexported fields
}
The property ID is required.
func (InstanceNewParamsSecurityGroup) MarshalJSON ¶
func (r InstanceNewParamsSecurityGroup) MarshalJSON() (data []byte, err error)
func (*InstanceNewParamsSecurityGroup) UnmarshalJSON ¶
func (r *InstanceNewParamsSecurityGroup) UnmarshalJSON(data []byte) error
type InstanceNewParamsVolumeApptemplate ¶
type InstanceNewParamsVolumeApptemplate struct {
// App template ID.
ApptemplateID string `json:"apptemplate_id,required"`
// Block device attachment tag (not exposed in the normal tags)
AttachmentTag param.Opt[string] `json:"attachment_tag,omitzero"`
// - `0` means that this is the primary boot device;
// - A unique positive value is set for the secondary bootable devices;
// - A negative number means that the boot is prohibited.
BootIndex param.Opt[int64] `json:"boot_index,omitzero"`
// Set to `true` to automatically delete the volume when the instance is deleted.
DeleteOnTermination param.Opt[bool] `json:"delete_on_termination,omitzero"`
// The name of the volume. If not specified, a name will be generated
// automatically.
Name param.Opt[string] `json:"name,omitzero"`
// Volume size in GiB.
Size param.Opt[int64] `json:"size,omitzero"`
// Key-value tags to associate with the resource. A tag is a key-value pair that
// can be associated with a resource, enabling efficient filtering and grouping for
// better organization and management. Some tags are read-only and cannot be
// modified by the user. Tags are also integrated with cost reports, allowing cost
// data to be filtered based on tag keys or values.
Tags map[string]string `json:"tags,omitzero"`
// Volume type name. Supported values:
//
// - `standard` - Network SSD block storage offering stable performance with high
// random I/O and data reliability (6 IOPS per 1 GiB, 0.4 MB/s per 1 GiB). Max
// IOPS: 4500. Max bandwidth: 300 MB/s.
// - `ssd_hiiops` - High-performance SSD storage for latency-sensitive
// transactional workloads (60 IOPS per 1 GiB, 2.5 MB/s per 1 GiB). Max
// IOPS: 9000. Max bandwidth: 500 MB/s.
// - `ssd_lowlatency` - SSD storage optimized for low-latency and real-time
// processing. Max IOPS: 5000. Average latency: 300 µs. Snapshots and volume
// resizing are **not** supported for `ssd_lowlatency`.
//
// Any of "cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra".
TypeName string `json:"type_name,omitzero"`
// New volume will be created from the app template and attached to the instance.
//
// This field can be elided, and will marshal its zero value as "apptemplate".
Source constant.Apptemplate `json:"source,required"`
// contains filtered or unexported fields
}
The properties ApptemplateID, Source are required.
func (InstanceNewParamsVolumeApptemplate) MarshalJSON ¶
func (r InstanceNewParamsVolumeApptemplate) MarshalJSON() (data []byte, err error)
func (*InstanceNewParamsVolumeApptemplate) UnmarshalJSON ¶
func (r *InstanceNewParamsVolumeApptemplate) UnmarshalJSON(data []byte) error
type InstanceNewParamsVolumeExistingVolume ¶
type InstanceNewParamsVolumeExistingVolume struct {
// Volume ID.
VolumeID string `json:"volume_id,required" format:"uuid4"`
// Block device attachment tag (not exposed in the normal tags)
AttachmentTag param.Opt[string] `json:"attachment_tag,omitzero"`
// - `0` means that this is the primary boot device;
// - A unique positive value is set for the secondary bootable devices;
// - A negative number means that the boot is prohibited.
BootIndex param.Opt[int64] `json:"boot_index,omitzero"`
// Set to `true` to automatically delete the volume when the instance is deleted.
DeleteOnTermination param.Opt[bool] `json:"delete_on_termination,omitzero"`
// Key-value tags to associate with the resource. A tag is a key-value pair that
// can be associated with a resource, enabling efficient filtering and grouping for
// better organization and management. Some tags are read-only and cannot be
// modified by the user. Tags are also integrated with cost reports, allowing cost
// data to be filtered based on tag keys or values.
Tags map[string]string `json:"tags,omitzero"`
// Existing available volume will be attached to the instance.
//
// This field can be elided, and will marshal its zero value as "existing-volume".
Source constant.ExistingVolume `json:"source,required"`
// contains filtered or unexported fields
}
The properties Source, VolumeID are required.
func (InstanceNewParamsVolumeExistingVolume) MarshalJSON ¶
func (r InstanceNewParamsVolumeExistingVolume) MarshalJSON() (data []byte, err error)
func (*InstanceNewParamsVolumeExistingVolume) UnmarshalJSON ¶
func (r *InstanceNewParamsVolumeExistingVolume) UnmarshalJSON(data []byte) error
type InstanceNewParamsVolumeImage ¶
type InstanceNewParamsVolumeImage struct {
// Image ID.
ImageID string `json:"image_id,required" format:"uuid4"`
// Block device attachment tag (not exposed in the normal tags)
AttachmentTag param.Opt[string] `json:"attachment_tag,omitzero"`
// - `0` means that this is the primary boot device;
// - A unique positive value is set for the secondary bootable devices;
// - A negative number means that the boot is prohibited.
BootIndex param.Opt[int64] `json:"boot_index,omitzero"`
// Set to `true` to automatically delete the volume when the instance is deleted.
DeleteOnTermination param.Opt[bool] `json:"delete_on_termination,omitzero"`
// The name of the volume. If not specified, a name will be generated
// automatically.
Name param.Opt[string] `json:"name,omitzero"`
// Volume size in GiB.
//
// - For instances: **specify the desired volume size explicitly**.
// - For basic VMs: the size is set automatically based on the flavor.
Size param.Opt[int64] `json:"size,omitzero"`
// Key-value tags to associate with the resource. A tag is a key-value pair that
// can be associated with a resource, enabling efficient filtering and grouping for
// better organization and management. Some tags are read-only and cannot be
// modified by the user. Tags are also integrated with cost reports, allowing cost
// data to be filtered based on tag keys or values.
Tags map[string]string `json:"tags,omitzero"`
// Volume type name. Supported values:
//
// - `standard` - Network SSD block storage offering stable performance with high
// random I/O and data reliability (6 IOPS per 1 GiB, 0.4 MB/s per 1 GiB). Max
// IOPS: 4500. Max bandwidth: 300 MB/s.
// - `ssd_hiiops` - High-performance SSD storage for latency-sensitive
// transactional workloads (60 IOPS per 1 GiB, 2.5 MB/s per 1 GiB). Max
// IOPS: 9000. Max bandwidth: 500 MB/s.
// - `ssd_lowlatency` - SSD storage optimized for low-latency and real-time
// processing. Max IOPS: 5000. Average latency: 300 µs. Snapshots and volume
// resizing are **not** supported for `ssd_lowlatency`.
//
// Any of "cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra".
TypeName string `json:"type_name,omitzero"`
// New volume will be created from the image and attached to the instance. Specify
// `boot_index=0` to boot from this volume.
//
// This field can be elided, and will marshal its zero value as "image".
Source constant.Image `json:"source,required"`
// contains filtered or unexported fields
}
The properties ImageID, Source are required.
func (InstanceNewParamsVolumeImage) MarshalJSON ¶
func (r InstanceNewParamsVolumeImage) MarshalJSON() (data []byte, err error)
func (*InstanceNewParamsVolumeImage) UnmarshalJSON ¶
func (r *InstanceNewParamsVolumeImage) UnmarshalJSON(data []byte) error
type InstanceNewParamsVolumeNewVolume ¶
type InstanceNewParamsVolumeNewVolume struct {
// Volume size in GiB.
Size int64 `json:"size,required"`
// Block device attachment tag (not exposed in the normal tags)
AttachmentTag param.Opt[string] `json:"attachment_tag,omitzero"`
// Set to `true` to automatically delete the volume when the instance is deleted.
DeleteOnTermination param.Opt[bool] `json:"delete_on_termination,omitzero"`
// The name of the volume. If not specified, a name will be generated
// automatically.
Name param.Opt[string] `json:"name,omitzero"`
// Key-value tags to associate with the resource. A tag is a key-value pair that
// can be associated with a resource, enabling efficient filtering and grouping for
// better organization and management. Some tags are read-only and cannot be
// modified by the user. Tags are also integrated with cost reports, allowing cost
// data to be filtered based on tag keys or values.
Tags map[string]string `json:"tags,omitzero"`
// Volume type name. Supported values:
//
// - `standard` - Network SSD block storage offering stable performance with high
// random I/O and data reliability (6 IOPS per 1 GiB, 0.4 MB/s per 1 GiB). Max
// IOPS: 4500. Max bandwidth: 300 MB/s.
// - `ssd_hiiops` - High-performance SSD storage for latency-sensitive
// transactional workloads (60 IOPS per 1 GiB, 2.5 MB/s per 1 GiB). Max
// IOPS: 9000. Max bandwidth: 500 MB/s.
// - `ssd_lowlatency` - SSD storage optimized for low-latency and real-time
// processing. Max IOPS: 5000. Average latency: 300 µs. Snapshots and volume
// resizing are **not** supported for `ssd_lowlatency`.
//
// Any of "cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra".
TypeName string `json:"type_name,omitzero"`
// New volume will be created from scratch and attached to the instance.
//
// This field can be elided, and will marshal its zero value as "new-volume".
Source constant.NewVolume `json:"source,required"`
// contains filtered or unexported fields
}
The properties Size, Source are required.
func (InstanceNewParamsVolumeNewVolume) MarshalJSON ¶
func (r InstanceNewParamsVolumeNewVolume) MarshalJSON() (data []byte, err error)
func (*InstanceNewParamsVolumeNewVolume) UnmarshalJSON ¶
func (r *InstanceNewParamsVolumeNewVolume) UnmarshalJSON(data []byte) error
type InstanceNewParamsVolumeSnapshot ¶
type InstanceNewParamsVolumeSnapshot struct {
// Volume size in GiB.
Size int64 `json:"size,required"`
// Snapshot ID.
SnapshotID string `json:"snapshot_id,required" format:"uuid4"`
// Block device attachment tag (not exposed in the normal tags)
AttachmentTag param.Opt[string] `json:"attachment_tag,omitzero"`
// - `0` means that this is the primary boot device;
// - A unique positive value is set for the secondary bootable devices;
// - A negative number means that the boot is prohibited.
BootIndex param.Opt[int64] `json:"boot_index,omitzero"`
// Set to `true` to automatically delete the volume when the instance is deleted.
DeleteOnTermination param.Opt[bool] `json:"delete_on_termination,omitzero"`
// The name of the volume. If not specified, a name will be generated
// automatically.
Name param.Opt[string] `json:"name,omitzero"`
// Key-value tags to associate with the resource. A tag is a key-value pair that
// can be associated with a resource, enabling efficient filtering and grouping for
// better organization and management. Some tags are read-only and cannot be
// modified by the user. Tags are also integrated with cost reports, allowing cost
// data to be filtered based on tag keys or values.
Tags map[string]string `json:"tags,omitzero"`
// Specifies the volume type. If omitted, the type from the source volume will be
// used by default.
//
// Any of "ssd_hiiops", "standard".
TypeName string `json:"type_name,omitzero"`
// New volume will be created from the snapshot and attached to the instance.
//
// This field can be elided, and will marshal its zero value as "snapshot".
Source constant.Snapshot `json:"source,required"`
// contains filtered or unexported fields
}
The properties Size, SnapshotID, Source are required.
func (InstanceNewParamsVolumeSnapshot) MarshalJSON ¶
func (r InstanceNewParamsVolumeSnapshot) MarshalJSON() (data []byte, err error)
func (*InstanceNewParamsVolumeSnapshot) UnmarshalJSON ¶
func (r *InstanceNewParamsVolumeSnapshot) UnmarshalJSON(data []byte) error
type InstanceNewParamsVolumeUnion ¶
type InstanceNewParamsVolumeUnion struct {
OfNewVolume *InstanceNewParamsVolumeNewVolume `json:",omitzero,inline"`
OfImage *InstanceNewParamsVolumeImage `json:",omitzero,inline"`
OfSnapshot *InstanceNewParamsVolumeSnapshot `json:",omitzero,inline"`
OfApptemplate *InstanceNewParamsVolumeApptemplate `json:",omitzero,inline"`
OfExistingVolume *InstanceNewParamsVolumeExistingVolume `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (InstanceNewParamsVolumeUnion) GetApptemplateID ¶
func (u InstanceNewParamsVolumeUnion) GetApptemplateID() *string
Returns a pointer to the underlying variant's property, if present.
func (InstanceNewParamsVolumeUnion) GetAttachmentTag ¶
func (u InstanceNewParamsVolumeUnion) GetAttachmentTag() *string
Returns a pointer to the underlying variant's property, if present.
func (InstanceNewParamsVolumeUnion) GetBootIndex ¶
func (u InstanceNewParamsVolumeUnion) GetBootIndex() *int64
Returns a pointer to the underlying variant's property, if present.
func (InstanceNewParamsVolumeUnion) GetDeleteOnTermination ¶
func (u InstanceNewParamsVolumeUnion) GetDeleteOnTermination() *bool
Returns a pointer to the underlying variant's property, if present.
func (InstanceNewParamsVolumeUnion) GetImageID ¶
func (u InstanceNewParamsVolumeUnion) GetImageID() *string
Returns a pointer to the underlying variant's property, if present.
func (InstanceNewParamsVolumeUnion) GetName ¶
func (u InstanceNewParamsVolumeUnion) GetName() *string
Returns a pointer to the underlying variant's property, if present.
func (InstanceNewParamsVolumeUnion) GetSize ¶
func (u InstanceNewParamsVolumeUnion) GetSize() *int64
Returns a pointer to the underlying variant's property, if present.
func (InstanceNewParamsVolumeUnion) GetSnapshotID ¶
func (u InstanceNewParamsVolumeUnion) GetSnapshotID() *string
Returns a pointer to the underlying variant's property, if present.
func (InstanceNewParamsVolumeUnion) GetSource ¶
func (u InstanceNewParamsVolumeUnion) GetSource() *string
Returns a pointer to the underlying variant's property, if present.
func (InstanceNewParamsVolumeUnion) GetTags ¶
func (u InstanceNewParamsVolumeUnion) GetTags() map[string]string
Returns a pointer to the underlying variant's Tags property, if present.
func (InstanceNewParamsVolumeUnion) GetTypeName ¶
func (u InstanceNewParamsVolumeUnion) GetTypeName() *string
Returns a pointer to the underlying variant's property, if present.
func (InstanceNewParamsVolumeUnion) GetVolumeID ¶
func (u InstanceNewParamsVolumeUnion) GetVolumeID() *string
Returns a pointer to the underlying variant's property, if present.
func (InstanceNewParamsVolumeUnion) MarshalJSON ¶
func (u InstanceNewParamsVolumeUnion) MarshalJSON() ([]byte, error)
func (*InstanceNewParamsVolumeUnion) UnmarshalJSON ¶
func (u *InstanceNewParamsVolumeUnion) UnmarshalJSON(data []byte) error
type InstanceResizeParams ¶
type InstanceResizeParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Flavor ID
FlavorID string `json:"flavor_id,required"`
// contains filtered or unexported fields
}
func (InstanceResizeParams) MarshalJSON ¶
func (r InstanceResizeParams) MarshalJSON() (data []byte, err error)
func (*InstanceResizeParams) UnmarshalJSON ¶
func (r *InstanceResizeParams) UnmarshalJSON(data []byte) error
type InstanceSecurityGroup ¶
type InstanceSecurityGroup struct {
// Name.
Name string `json:"name,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InstanceSecurityGroup) RawJSON ¶
func (r InstanceSecurityGroup) RawJSON() string
Returns the unmodified JSON received from the API
func (*InstanceSecurityGroup) UnmarshalJSON ¶
func (r *InstanceSecurityGroup) UnmarshalJSON(data []byte) error
type InstanceService ¶
type InstanceService struct {
Options []option.RequestOption
Flavors InstanceFlavorService
Interfaces InstanceInterfaceService
Images InstanceImageService
Metrics InstanceMetricService
// contains filtered or unexported fields
}
InstanceService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInstanceService method instead.
func NewInstanceService ¶
func NewInstanceService(opts ...option.RequestOption) (r InstanceService)
NewInstanceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*InstanceService) Action ¶
func (r *InstanceService) Action(ctx context.Context, instanceID string, params InstanceActionParams, opts ...option.RequestOption) (res *TaskIDList, err error)
The action can be one of: start, stop, reboot, powercycle, suspend or resume. Suspend and resume are not available for bare metal instances.
func (*InstanceService) ActionAndPoll ¶
func (r *InstanceService) ActionAndPoll(ctx context.Context, instanceID string, params InstanceActionParams, opts ...option.RequestOption) (v *Instance, err error)
ActionAndPoll perform an action on the instance and poll for completion
func (*InstanceService) AddToPlacementGroup ¶
func (r *InstanceService) AddToPlacementGroup(ctx context.Context, instanceID string, params InstanceAddToPlacementGroupParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Add an instance to a server group. The instance must not already be in a server group. Bare metal servers do not support server groups.
func (*InstanceService) AddToPlacementGroupAndPoll ¶
func (r *InstanceService) AddToPlacementGroupAndPoll(ctx context.Context, instanceID string, params InstanceAddToPlacementGroupParams, opts ...option.RequestOption) (v *Instance, err error)
AddToPlacementGroupAndPoll add instance to placement group and poll for completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
func (*InstanceService) AssignSecurityGroup ¶
func (r *InstanceService) AssignSecurityGroup(ctx context.Context, instanceID string, params InstanceAssignSecurityGroupParams, opts ...option.RequestOption) (err error)
Assign the security group to the server. To assign multiple security groups to all ports, use the NULL value for the `port_id` field
func (*InstanceService) Delete ¶
func (r *InstanceService) Delete(ctx context.Context, instanceID string, params InstanceDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Delete instance
func (*InstanceService) DeleteAndPoll ¶
func (r *InstanceService) DeleteAndPoll(ctx context.Context, instanceID string, params InstanceDeleteParams, opts ...option.RequestOption) error
DeleteAndPoll delete instance and poll for completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
func (*InstanceService) DisablePortSecurity ¶
func (r *InstanceService) DisablePortSecurity(ctx context.Context, portID string, body InstanceDisablePortSecurityParams, opts ...option.RequestOption) (res *InstanceInterface, err error)
Disable port security for instance interface
func (*InstanceService) EnablePortSecurity ¶
func (r *InstanceService) EnablePortSecurity(ctx context.Context, portID string, body InstanceEnablePortSecurityParams, opts ...option.RequestOption) (res *InstanceInterface, err error)
Enable port security for instance interface
func (*InstanceService) Get ¶
func (r *InstanceService) Get(ctx context.Context, instanceID string, query InstanceGetParams, opts ...option.RequestOption) (res *Instance, err error)
Retrieve detailed information about a specific instance. The response content language for `ddos_profile` can be controlled via the 'language' cookie parameter. **Cookie Parameters**:
- `language` (str, optional): Language for the response content. Affects the `ddos_profile` field. Supported values:
- `'en'` (default)
- `'de'`
- `'ru'`
func (*InstanceService) GetConsole ¶
func (r *InstanceService) GetConsole(ctx context.Context, instanceID string, params InstanceGetConsoleParams, opts ...option.RequestOption) (res *Console, err error)
Get instance console URL
func (*InstanceService) List ¶
func (r *InstanceService) List(ctx context.Context, params InstanceListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[Instance], err error)
List all instances in the specified project and region. Results can be filtered by various parameters like name, status, and IP address.
func (*InstanceService) ListAutoPaging ¶
func (r *InstanceService) ListAutoPaging(ctx context.Context, params InstanceListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[Instance]
List all instances in the specified project and region. Results can be filtered by various parameters like name, status, and IP address.
func (*InstanceService) New ¶
func (r *InstanceService) New(ctx context.Context, params InstanceNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Create an instance with specified configuration. How to get access: For Linux,
- Use the `user_data` field to provide a [cloud-init script](https://cloudinit.readthedocs.io/en/latest/reference/examples.html) in base64 to apply configurations to the instance.
- Specify the `username` and `password` to create a new user.
- When only `password` is provided, it is set as the password for the default user of the image.
- The `user_data` is ignored when the `password` is specified. For Windows,
- Use the `user_data` field to provide a [cloudbase-init script](https://cloudbase-init.readthedocs.io/en/latest/userdata.html#cloud-config) in base64 to create new users on Windows.
- Use the `password` field to set the password for the 'Admin' user on Windows.
- The password of the Admin user cannot be updated via `user_data`.
- The `username` cannot be specified in the request.
func (*InstanceService) NewAndPoll ¶
func (r *InstanceService) NewAndPoll(ctx context.Context, params InstanceNewParams, opts ...option.RequestOption) (v *Instance, err error)
NewAndPoll create instance and poll for the result
func (*InstanceService) RemoveFromPlacementGroup ¶
func (r *InstanceService) RemoveFromPlacementGroup(ctx context.Context, instanceID string, body InstanceRemoveFromPlacementGroupParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Remove an instance from its current server group. The instance must be in a server group to be removed. Bare metal servers do not support server groups.
func (*InstanceService) RemoveFromPlacementGroupAndPoll ¶
func (r *InstanceService) RemoveFromPlacementGroupAndPoll(ctx context.Context, instanceID string, body InstanceRemoveFromPlacementGroupParams, opts ...option.RequestOption) (v *Instance, err error)
RemoveFromPlacementGroupAndPoll remove instance from placement group and poll for completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
func (*InstanceService) Resize ¶
func (r *InstanceService) Resize(ctx context.Context, instanceID string, params InstanceResizeParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Change flavor of the instance
func (*InstanceService) ResizeAndPoll ¶ added in v0.2.0
func (r *InstanceService) ResizeAndPoll(ctx context.Context, instanceID string, params InstanceResizeParams, opts ...option.RequestOption) (v *Instance, err error)
ResizeAndPoll change flavor of the instance and poll for completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
func (*InstanceService) UnassignSecurityGroup ¶
func (r *InstanceService) UnassignSecurityGroup(ctx context.Context, instanceID string, params InstanceUnassignSecurityGroupParams, opts ...option.RequestOption) (err error)
Un-assign the security group to the server. To un-assign multiple security groups to all ports, use the NULL value for the `port_id` field
func (*InstanceService) Update ¶
func (r *InstanceService) Update(ctx context.Context, instanceID string, params InstanceUpdateParams, opts ...option.RequestOption) (res *Instance, err error)
Rename instance
type InstanceStatus ¶
type InstanceStatus string
Instance status
const ( InstanceStatusActive InstanceStatus = "ACTIVE" InstanceStatusBuild InstanceStatus = "BUILD" InstanceStatusDeleted InstanceStatus = "DELETED" InstanceStatusError InstanceStatus = "ERROR" InstanceStatusHardReboot InstanceStatus = "HARD_REBOOT" InstanceStatusMigrating InstanceStatus = "MIGRATING" InstanceStatusPassword InstanceStatus = "PASSWORD" InstanceStatusPaused InstanceStatus = "PAUSED" InstanceStatusReboot InstanceStatus = "REBOOT" InstanceStatusRebuild InstanceStatus = "REBUILD" InstanceStatusRescue InstanceStatus = "RESCUE" InstanceStatusResize InstanceStatus = "RESIZE" InstanceStatusRevertResize InstanceStatus = "REVERT_RESIZE" InstanceStatusShelved InstanceStatus = "SHELVED" InstanceStatusShelvedOffloaded InstanceStatus = "SHELVED_OFFLOADED" InstanceStatusShutoff InstanceStatus = "SHUTOFF" InstanceStatusSoftDeleted InstanceStatus = "SOFT_DELETED" InstanceStatusSuspended InstanceStatus = "SUSPENDED" InstanceStatusUnknown InstanceStatus = "UNKNOWN" InstanceStatusVerifyResize InstanceStatus = "VERIFY_RESIZE" )
type InstanceUnassignSecurityGroupParams ¶
type InstanceUnassignSecurityGroupParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Security group name, applies to all ports
Name param.Opt[string] `json:"name,omitzero"`
// Port security groups mapping
PortsSecurityGroupNames []InstanceUnassignSecurityGroupParamsPortsSecurityGroupName `json:"ports_security_group_names,omitzero"`
// contains filtered or unexported fields
}
func (InstanceUnassignSecurityGroupParams) MarshalJSON ¶
func (r InstanceUnassignSecurityGroupParams) MarshalJSON() (data []byte, err error)
func (*InstanceUnassignSecurityGroupParams) UnmarshalJSON ¶
func (r *InstanceUnassignSecurityGroupParams) UnmarshalJSON(data []byte) error
type InstanceUnassignSecurityGroupParamsPortsSecurityGroupName ¶
type InstanceUnassignSecurityGroupParamsPortsSecurityGroupName struct {
// Port ID. If None, security groups will be applied to all ports
PortID param.Opt[string] `json:"port_id,omitzero,required"`
// List of security group names
SecurityGroupNames []string `json:"security_group_names,omitzero,required"`
// contains filtered or unexported fields
}
Port security group names
The properties PortID, SecurityGroupNames are required.
func (InstanceUnassignSecurityGroupParamsPortsSecurityGroupName) MarshalJSON ¶
func (r InstanceUnassignSecurityGroupParamsPortsSecurityGroupName) MarshalJSON() (data []byte, err error)
func (*InstanceUnassignSecurityGroupParamsPortsSecurityGroupName) UnmarshalJSON ¶
func (r *InstanceUnassignSecurityGroupParamsPortsSecurityGroupName) UnmarshalJSON(data []byte) error
type InstanceUpdateParams ¶
type InstanceUpdateParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Name.
Name string `json:"name,required"`
// contains filtered or unexported fields
}
func (InstanceUpdateParams) MarshalJSON ¶
func (r InstanceUpdateParams) MarshalJSON() (data []byte, err error)
func (*InstanceUpdateParams) UnmarshalJSON ¶
func (r *InstanceUpdateParams) UnmarshalJSON(data []byte) error
type InstanceVmState ¶
type InstanceVmState string
Virtual machine state (active)
const ( InstanceVmStateActive InstanceVmState = "active" InstanceVmStateBuilding InstanceVmState = "building" InstanceVmStateDeleted InstanceVmState = "deleted" InstanceVmStateError InstanceVmState = "error" InstanceVmStatePaused InstanceVmState = "paused" InstanceVmStateRescued InstanceVmState = "rescued" InstanceVmStateResized InstanceVmState = "resized" InstanceVmStateShelved InstanceVmState = "shelved" InstanceVmStateShelvedOffloaded InstanceVmState = "shelved_offloaded" InstanceVmStateSoftDeleted InstanceVmState = "soft-deleted" InstanceVmStateStopped InstanceVmState = "stopped" InstanceVmStateSuspended InstanceVmState = "suspended" )
type InstanceVolume ¶
type InstanceVolume struct {
// Volume ID
ID string `json:"id,required"`
// Whether the volume is deleted together with the VM
DeleteOnTermination bool `json:"delete_on_termination,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
DeleteOnTermination respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InstanceVolume) RawJSON ¶
func (r InstanceVolume) RawJSON() string
Returns the unmodified JSON received from the API
func (*InstanceVolume) UnmarshalJSON ¶
func (r *InstanceVolume) UnmarshalJSON(data []byte) error
type InterfaceIPFamily ¶
type InterfaceIPFamily string
const ( InterfaceIPFamilyDual InterfaceIPFamily = "dual" InterfaceIPFamilyIpv4 InterfaceIPFamily = "ipv4" InterfaceIPFamilyIpv6 InterfaceIPFamily = "ipv6" )
type LaasIndexRetentionPolicy ¶
type LaasIndexRetentionPolicy struct {
// Duration of days for which logs must be kept.
Period int64 `json:"period,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Period respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LaasIndexRetentionPolicy) RawJSON ¶
func (r LaasIndexRetentionPolicy) RawJSON() string
Returns the unmodified JSON received from the API
func (LaasIndexRetentionPolicy) ToParam ¶
func (r LaasIndexRetentionPolicy) ToParam() LaasIndexRetentionPolicyParam
ToParam converts this LaasIndexRetentionPolicy to a LaasIndexRetentionPolicyParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with LaasIndexRetentionPolicyParam.Overrides()
func (*LaasIndexRetentionPolicy) UnmarshalJSON ¶
func (r *LaasIndexRetentionPolicy) UnmarshalJSON(data []byte) error
type LaasIndexRetentionPolicyParam ¶
type LaasIndexRetentionPolicyParam struct {
// Duration of days for which logs must be kept.
Period param.Opt[int64] `json:"period,omitzero,required"`
// contains filtered or unexported fields
}
The property Period is required.
func (LaasIndexRetentionPolicyParam) MarshalJSON ¶
func (r LaasIndexRetentionPolicyParam) MarshalJSON() (data []byte, err error)
func (*LaasIndexRetentionPolicyParam) UnmarshalJSON ¶
func (r *LaasIndexRetentionPolicyParam) UnmarshalJSON(data []byte) error
type LbAlgorithm ¶
type LbAlgorithm string
const ( LbAlgorithmLeastConnections LbAlgorithm = "LEAST_CONNECTIONS" LbAlgorithmRoundRobin LbAlgorithm = "ROUND_ROBIN" LbAlgorithmSourceIP LbAlgorithm = "SOURCE_IP" )
type LbHealthMonitorType ¶
type LbHealthMonitorType string
const ( LbHealthMonitorTypeHTTP LbHealthMonitorType = "HTTP" LbHealthMonitorTypeHTTPS LbHealthMonitorType = "HTTPS" LbHealthMonitorTypeK8S LbHealthMonitorType = "K8S" LbHealthMonitorTypePing LbHealthMonitorType = "PING" LbHealthMonitorTypeTcp LbHealthMonitorType = "TCP" LbHealthMonitorTypeTlsHello LbHealthMonitorType = "TLS-HELLO" LbHealthMonitorTypeUdpConnect LbHealthMonitorType = "UDP-CONNECT" )
type LbListenerProtocol ¶
type LbListenerProtocol string
const ( LbListenerProtocolHTTP LbListenerProtocol = "HTTP" LbListenerProtocolHTTPS LbListenerProtocol = "HTTPS" LbListenerProtocolPrometheus LbListenerProtocol = "PROMETHEUS" LbListenerProtocolTcp LbListenerProtocol = "TCP" LbListenerProtocolTerminatedHTTPS LbListenerProtocol = "TERMINATED_HTTPS" LbListenerProtocolUdp LbListenerProtocol = "UDP" )
type LbPoolProtocol ¶
type LbPoolProtocol string
const ( LbPoolProtocolHTTP LbPoolProtocol = "HTTP" LbPoolProtocolHTTPS LbPoolProtocol = "HTTPS" LbPoolProtocolProxy LbPoolProtocol = "PROXY" LbPoolProtocolProxyv2 LbPoolProtocol = "PROXYV2" LbPoolProtocolTcp LbPoolProtocol = "TCP" LbPoolProtocolUdp LbPoolProtocol = "UDP" )
type LbSessionPersistenceType ¶
type LbSessionPersistenceType string
const ( LbSessionPersistenceTypeAppCookie LbSessionPersistenceType = "APP_COOKIE" LbSessionPersistenceTypeHTTPCookie LbSessionPersistenceType = "HTTP_COOKIE" LbSessionPersistenceTypeSourceIP LbSessionPersistenceType = "SOURCE_IP" )
type ListenerStatus ¶
type ListenerStatus struct {
// UUID of the entity
ID string `json:"id,required" format:"uuid"`
// Name of the load balancer listener
Name string `json:"name,required"`
// Operating status of the entity
//
// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
OperatingStatus LoadBalancerOperatingStatus `json:"operating_status,required"`
// Pools of the Listeners
Pools []PoolStatus `json:"pools,required"`
// Provisioning status of the entity
//
// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
// "PENDING_UPDATE".
ProvisioningStatus ProvisioningStatus `json:"provisioning_status,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
OperatingStatus respjson.Field
Pools respjson.Field
ProvisioningStatus respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListenerStatus) RawJSON ¶
func (r ListenerStatus) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListenerStatus) UnmarshalJSON ¶
func (r *ListenerStatus) UnmarshalJSON(data []byte) error
type LoadBalancer ¶
type LoadBalancer struct {
// Load balancer ID
ID string `json:"id,required" format:"uuid4"`
// Datetime when the load balancer was created
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Load balancer name
Name string `json:"name,required"`
// Load balancer operating status
//
// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
OperatingStatus LoadBalancerOperatingStatus `json:"operating_status,required"`
// Project ID
ProjectID int64 `json:"project_id,required"`
// Load balancer lifecycle status
//
// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
// "PENDING_UPDATE".
ProvisioningStatus ProvisioningStatus `json:"provisioning_status,required"`
// Region name
Region string `json:"region,required"`
// Region ID
RegionID int64 `json:"region_id,required"`
// List of key-value tags associated with the resource. A tag is a key-value pair
// that can be associated with a resource, enabling efficient filtering and
// grouping for better organization and management. Some tags are read-only and
// cannot be modified by the user. Tags are also integrated with cost reports,
// allowing cost data to be filtered based on tag keys or values.
TagsV2 []Tag `json:"tags_v2,required"`
// List of additional IP addresses
AdditionalVips []LoadBalancerAdditionalVip `json:"additional_vips"`
// Task that created this entity
CreatorTaskID string `json:"creator_task_id,nullable" format:"uuid4"`
// Loadbalancer advanced DDoS protection profile.
DDOSProfile DDOSProfile `json:"ddos_profile,nullable"`
// Load balancer flavor (if not default)
Flavor LoadBalancerFlavor `json:"flavor,nullable"`
// List of assigned floating IPs
FloatingIPs []FloatingIP `json:"floating_ips"`
// Load balancer listeners
Listeners []LoadBalancerListener `json:"listeners"`
// Logging configuration
Logging Logging `json:"logging,nullable"`
// Preferred option to establish connectivity between load balancer and its pools
// members
//
// Any of "L2", "L3".
PreferredConnectivity LoadBalancerMemberConnectivity `json:"preferred_connectivity"`
// Statistics of load balancer.
Stats LoadBalancerStatistics `json:"stats,nullable"`
// The UUID of the active task that currently holds a lock on the resource. This
// lock prevents concurrent modifications to ensure consistency. If `null`, the
// resource is not locked.
TaskID string `json:"task_id,nullable" format:"uuid4"`
// Datetime when the load balancer was last updated
UpdatedAt time.Time `json:"updated_at,nullable" format:"date-time"`
// Load balancer IP address
VipAddress string `json:"vip_address,nullable" format:"ipvanyaddress"`
// Load balancer IP family
//
// Any of "dual", "ipv4", "ipv6".
VipIPFamily InterfaceIPFamily `json:"vip_ip_family,nullable"`
// The ID of the Virtual IP (VIP) port.
VipPortID string `json:"vip_port_id,nullable" format:"uuid4"`
// List of VRRP IP addresses
VrrpIPs []LoadBalancerVrrpIP `json:"vrrp_ips"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Name respjson.Field
OperatingStatus respjson.Field
ProjectID respjson.Field
ProvisioningStatus respjson.Field
Region respjson.Field
RegionID respjson.Field
TagsV2 respjson.Field
AdditionalVips respjson.Field
CreatorTaskID respjson.Field
DDOSProfile respjson.Field
Flavor respjson.Field
FloatingIPs respjson.Field
Listeners respjson.Field
Logging respjson.Field
PreferredConnectivity respjson.Field
Stats respjson.Field
TaskID respjson.Field
UpdatedAt respjson.Field
VipAddress respjson.Field
VipIPFamily respjson.Field
VipPortID respjson.Field
VrrpIPs respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancer) RawJSON ¶
func (r LoadBalancer) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancer) UnmarshalJSON ¶
func (r *LoadBalancer) UnmarshalJSON(data []byte) error
type LoadBalancerAdditionalVip ¶
type LoadBalancerAdditionalVip struct {
// IP address
IPAddress string `json:"ip_address,required" format:"ipvanyaddress"`
// Subnet UUID
SubnetID string `json:"subnet_id,required" format:"uuid4"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
IPAddress respjson.Field
SubnetID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancerAdditionalVip) RawJSON ¶
func (r LoadBalancerAdditionalVip) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerAdditionalVip) UnmarshalJSON ¶
func (r *LoadBalancerAdditionalVip) UnmarshalJSON(data []byte) error
type LoadBalancerFailoverParams ¶
type LoadBalancerFailoverParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Validate current load balancer status before failover or not.
Force param.Opt[bool] `json:"force,omitzero"`
// contains filtered or unexported fields
}
func (LoadBalancerFailoverParams) MarshalJSON ¶
func (r LoadBalancerFailoverParams) MarshalJSON() (data []byte, err error)
func (*LoadBalancerFailoverParams) UnmarshalJSON ¶
func (r *LoadBalancerFailoverParams) UnmarshalJSON(data []byte) error
type LoadBalancerFlavor ¶
type LoadBalancerFlavor struct {
// Flavor ID is the same as name
FlavorID string `json:"flavor_id,required"`
// Flavor name
FlavorName string `json:"flavor_name,required"`
// RAM size in MiB
Ram int64 `json:"ram,required"`
// Virtual CPU count. For bare metal flavors, it's a physical CPU count
Vcpus int64 `json:"vcpus,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FlavorID respjson.Field
FlavorName respjson.Field
Ram respjson.Field
Vcpus respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Load balancer flavor (if not default)
func (LoadBalancerFlavor) RawJSON ¶
func (r LoadBalancerFlavor) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerFlavor) UnmarshalJSON ¶
func (r *LoadBalancerFlavor) UnmarshalJSON(data []byte) error
type LoadBalancerFlavorDetail ¶
type LoadBalancerFlavorDetail struct {
// Flavor ID is the same as name
FlavorID string `json:"flavor_id,required"`
// Flavor name
FlavorName string `json:"flavor_name,required"`
// Additional hardware description.
HardwareDescription FlavorHardwareDescription `json:"hardware_description,required"`
// RAM size in MiB
Ram int64 `json:"ram,required"`
// Virtual CPU count. For bare metal flavors, it's a physical CPU count
Vcpus int64 `json:"vcpus,required"`
// Currency code. Shown if the `include_prices` query parameter if set to true
CurrencyCode string `json:"currency_code,nullable"`
// Price per hour. Shown if the `include_prices` query parameter if set to true
PricePerHour float64 `json:"price_per_hour,nullable"`
// Price per month. Shown if the `include_prices` query parameter if set to true
PricePerMonth float64 `json:"price_per_month,nullable"`
// Price status for the UI
//
// Any of "error", "hide", "show".
PriceStatus LoadBalancerFlavorDetailPriceStatus `json:"price_status,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FlavorID respjson.Field
FlavorName respjson.Field
HardwareDescription respjson.Field
Ram respjson.Field
Vcpus respjson.Field
CurrencyCode respjson.Field
PricePerHour respjson.Field
PricePerMonth respjson.Field
PriceStatus respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancerFlavorDetail) RawJSON ¶
func (r LoadBalancerFlavorDetail) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerFlavorDetail) UnmarshalJSON ¶
func (r *LoadBalancerFlavorDetail) UnmarshalJSON(data []byte) error
type LoadBalancerFlavorDetailPriceStatus ¶
type LoadBalancerFlavorDetailPriceStatus string
Price status for the UI
const ( LoadBalancerFlavorDetailPriceStatusError LoadBalancerFlavorDetailPriceStatus = "error" LoadBalancerFlavorDetailPriceStatusHide LoadBalancerFlavorDetailPriceStatus = "hide" LoadBalancerFlavorDetailPriceStatusShow LoadBalancerFlavorDetailPriceStatus = "show" )
type LoadBalancerFlavorList ¶
type LoadBalancerFlavorList struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []LoadBalancerFlavorDetail `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancerFlavorList) RawJSON ¶
func (r LoadBalancerFlavorList) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerFlavorList) UnmarshalJSON ¶
func (r *LoadBalancerFlavorList) UnmarshalJSON(data []byte) error
type LoadBalancerFlavorListParams ¶
type LoadBalancerFlavorListParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Set to true if the response should include flavor prices
IncludePrices param.Opt[bool] `query:"include_prices,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (LoadBalancerFlavorListParams) URLQuery ¶
func (r LoadBalancerFlavorListParams) URLQuery() (v url.Values, err error)
URLQuery serializes LoadBalancerFlavorListParams's query parameters as `url.Values`.
type LoadBalancerFlavorService ¶
type LoadBalancerFlavorService struct {
Options []option.RequestOption
}
LoadBalancerFlavorService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLoadBalancerFlavorService method instead.
func NewLoadBalancerFlavorService ¶
func NewLoadBalancerFlavorService(opts ...option.RequestOption) (r LoadBalancerFlavorService)
NewLoadBalancerFlavorService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LoadBalancerFlavorService) List ¶
func (r *LoadBalancerFlavorService) List(ctx context.Context, params LoadBalancerFlavorListParams, opts ...option.RequestOption) (res *LoadBalancerFlavorList, err error)
Retrieve a list of load balancer flavors. When the `include_prices` query parameter is specified, the list shows prices. A client in trial mode gets all price values as 0. If you get Pricing Error contact the support
type LoadBalancerGetParams ¶
type LoadBalancerGetParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Show statistics
ShowStats param.Opt[bool] `query:"show_stats,omitzero" json:"-"`
// Show DDoS profile
WithDDOS param.Opt[bool] `query:"with_ddos,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (LoadBalancerGetParams) URLQuery ¶
func (r LoadBalancerGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes LoadBalancerGetParams's query parameters as `url.Values`.
type LoadBalancerInstanceRole ¶
type LoadBalancerInstanceRole string
const ( LoadBalancerInstanceRoleBackup LoadBalancerInstanceRole = "BACKUP" LoadBalancerInstanceRoleMaster LoadBalancerInstanceRole = "MASTER" LoadBalancerInstanceRoleStandalone LoadBalancerInstanceRole = "STANDALONE" )
type LoadBalancerL7Policy ¶
type LoadBalancerL7Policy struct {
// ID
ID string `json:"id"`
// Action
//
// Any of "REDIRECT_PREFIX", "REDIRECT_TO_POOL", "REDIRECT_TO_URL", "REJECT".
Action LoadBalancerL7PolicyAction `json:"action"`
// Listener ID
ListenerID string `json:"listener_id"`
// Human-readable name of the policy
Name string `json:"name"`
// L7 policy operating status
//
// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
OperatingStatus LoadBalancerL7PolicyOperatingStatus `json:"operating_status"`
// The position of this policy on the listener. Positions start at 1.
Position int64 `json:"position"`
// Project ID
ProjectID int64 `json:"project_id"`
// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
// "PENDING_UPDATE".
ProvisioningStatus LoadBalancerL7PolicyProvisioningStatus `json:"provisioning_status"`
// Requests matching this policy will be redirected to the specified URL or Prefix
// URL with the HTTP response code. Valid if action is `REDIRECT_TO_URL` or
// `REDIRECT_PREFIX`. Valid options are 301, 302, 303, 307, or 308. Default is 302.
RedirectHTTPCode int64 `json:"redirect_http_code"`
// Requests matching this policy will be redirected to the pool with this ID. Only
// valid if action is `REDIRECT_TO_POOL`.
RedirectPoolID string `json:"redirect_pool_id"`
// Requests matching this policy will be redirected to this Prefix URL. Only valid
// if action is `REDIRECT_PREFIX`.
RedirectPrefix string `json:"redirect_prefix"`
// Requests matching this policy will be redirected to this URL. Only valid if
// action is `REDIRECT_TO_URL`.
RedirectURL string `json:"redirect_url"`
// Region name
Region string `json:"region"`
// Region ID
RegionID int64 `json:"region_id"`
// Rules. All the rules associated with a given policy are logically ANDed
// together. A request must match all the policy's rules to match the policy.If you
// need to express a logical OR operation between rules, then do this by creating
// multiple policies with the same action.
Rules []LoadBalancerL7Rule `json:"rules"`
// A list of simple strings assigned to the resource.
Tags []string `json:"tags"`
// The UUID of the active task that currently holds a lock on the resource. This
// lock prevents concurrent modifications to ensure consistency. If `null`, the
// resource is not locked.
TaskID string `json:"task_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Action respjson.Field
ListenerID respjson.Field
Name respjson.Field
OperatingStatus respjson.Field
Position respjson.Field
ProjectID respjson.Field
ProvisioningStatus respjson.Field
RedirectHTTPCode respjson.Field
RedirectPoolID respjson.Field
RedirectPrefix respjson.Field
RedirectURL respjson.Field
Region respjson.Field
RegionID respjson.Field
Rules respjson.Field
Tags respjson.Field
TaskID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
L7Policy schema
func (LoadBalancerL7Policy) RawJSON ¶
func (r LoadBalancerL7Policy) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerL7Policy) UnmarshalJSON ¶
func (r *LoadBalancerL7Policy) UnmarshalJSON(data []byte) error
type LoadBalancerL7PolicyAction ¶
type LoadBalancerL7PolicyAction string
Action
const ( LoadBalancerL7PolicyActionRedirectPrefix LoadBalancerL7PolicyAction = "REDIRECT_PREFIX" LoadBalancerL7PolicyActionRedirectToPool LoadBalancerL7PolicyAction = "REDIRECT_TO_POOL" LoadBalancerL7PolicyActionRedirectToURL LoadBalancerL7PolicyAction = "REDIRECT_TO_URL" LoadBalancerL7PolicyActionReject LoadBalancerL7PolicyAction = "REJECT" )
type LoadBalancerL7PolicyList ¶
type LoadBalancerL7PolicyList struct {
// Number of objects
Count int64 `json:"count"`
// Objects
Results []LoadBalancerL7Policy `json:"results"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancerL7PolicyList) RawJSON ¶
func (r LoadBalancerL7PolicyList) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerL7PolicyList) UnmarshalJSON ¶
func (r *LoadBalancerL7PolicyList) UnmarshalJSON(data []byte) error
type LoadBalancerL7PolicyNewParams ¶
type LoadBalancerL7PolicyNewParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Action
//
// Any of "REDIRECT_PREFIX", "REDIRECT_TO_POOL", "REDIRECT_TO_URL", "REJECT".
Action LoadBalancerL7PolicyNewParamsAction `json:"action,omitzero,required"`
// Listener ID
ListenerID string `json:"listener_id,required"`
// Human-readable name of the policy
Name param.Opt[string] `json:"name,omitzero"`
// The position of this policy on the listener. Positions start at 1.
Position param.Opt[int64] `json:"position,omitzero"`
// Requests matching this policy will be redirected to the specified URL or Prefix
// URL with the HTTP response code. Valid if action is `REDIRECT_TO_URL` or
// `REDIRECT_PREFIX`. Valid options are 301, 302, 303, 307, or 308. Default is 302.
RedirectHTTPCode param.Opt[int64] `json:"redirect_http_code,omitzero"`
// Requests matching this policy will be redirected to the pool withthis ID. Only
// valid if action is `REDIRECT_TO_POOL`.
RedirectPoolID param.Opt[string] `json:"redirect_pool_id,omitzero"`
// Requests matching this policy will be redirected to this Prefix URL. Only valid
// if action is `REDIRECT_PREFIX`.
RedirectPrefix param.Opt[string] `json:"redirect_prefix,omitzero"`
// Requests matching this policy will be redirected to this URL. Only valid if
// action is `REDIRECT_TO_URL`.
RedirectURL param.Opt[string] `json:"redirect_url,omitzero"`
// A list of simple strings assigned to the resource.
Tags []string `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (LoadBalancerL7PolicyNewParams) MarshalJSON ¶
func (r LoadBalancerL7PolicyNewParams) MarshalJSON() (data []byte, err error)
func (*LoadBalancerL7PolicyNewParams) UnmarshalJSON ¶
func (r *LoadBalancerL7PolicyNewParams) UnmarshalJSON(data []byte) error
type LoadBalancerL7PolicyNewParamsAction ¶
type LoadBalancerL7PolicyNewParamsAction string
Action
const ( LoadBalancerL7PolicyNewParamsActionRedirectPrefix LoadBalancerL7PolicyNewParamsAction = "REDIRECT_PREFIX" LoadBalancerL7PolicyNewParamsActionRedirectToPool LoadBalancerL7PolicyNewParamsAction = "REDIRECT_TO_POOL" LoadBalancerL7PolicyNewParamsActionRedirectToURL LoadBalancerL7PolicyNewParamsAction = "REDIRECT_TO_URL" LoadBalancerL7PolicyNewParamsActionReject LoadBalancerL7PolicyNewParamsAction = "REJECT" )
type LoadBalancerL7PolicyOperatingStatus ¶
type LoadBalancerL7PolicyOperatingStatus string
L7 policy operating status
const ( LoadBalancerL7PolicyOperatingStatusDegraded LoadBalancerL7PolicyOperatingStatus = "DEGRADED" LoadBalancerL7PolicyOperatingStatusDraining LoadBalancerL7PolicyOperatingStatus = "DRAINING" LoadBalancerL7PolicyOperatingStatusError LoadBalancerL7PolicyOperatingStatus = "ERROR" LoadBalancerL7PolicyOperatingStatusNoMonitor LoadBalancerL7PolicyOperatingStatus = "NO_MONITOR" LoadBalancerL7PolicyOperatingStatusOffline LoadBalancerL7PolicyOperatingStatus = "OFFLINE" LoadBalancerL7PolicyOperatingStatusOnline LoadBalancerL7PolicyOperatingStatus = "ONLINE" )
type LoadBalancerL7PolicyProvisioningStatus ¶
type LoadBalancerL7PolicyProvisioningStatus string
const ( LoadBalancerL7PolicyProvisioningStatusActive LoadBalancerL7PolicyProvisioningStatus = "ACTIVE" LoadBalancerL7PolicyProvisioningStatusDeleted LoadBalancerL7PolicyProvisioningStatus = "DELETED" LoadBalancerL7PolicyProvisioningStatusError LoadBalancerL7PolicyProvisioningStatus = "ERROR" LoadBalancerL7PolicyProvisioningStatusPendingCreate LoadBalancerL7PolicyProvisioningStatus = "PENDING_CREATE" LoadBalancerL7PolicyProvisioningStatusPendingDelete LoadBalancerL7PolicyProvisioningStatus = "PENDING_DELETE" LoadBalancerL7PolicyProvisioningStatusPendingUpdate LoadBalancerL7PolicyProvisioningStatus = "PENDING_UPDATE" )
type LoadBalancerL7PolicyReplaceParams ¶
type LoadBalancerL7PolicyReplaceParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Action
//
// Any of "REDIRECT_PREFIX", "REDIRECT_TO_POOL", "REDIRECT_TO_URL", "REJECT".
Action LoadBalancerL7PolicyReplaceParamsAction `json:"action,omitzero,required"`
// Human-readable name of the policy
Name param.Opt[string] `json:"name,omitzero"`
// The position of this policy on the listener. Positions start at 1.
Position param.Opt[int64] `json:"position,omitzero"`
// Requests matching this policy will be redirected to the specified URL or Prefix
// URL with the HTTP response code. Valid if action is `REDIRECT_TO_URL` or
// `REDIRECT_PREFIX`. Valid options are 301, 302, 303, 307, or 308. Default is 302.
RedirectHTTPCode param.Opt[int64] `json:"redirect_http_code,omitzero"`
// Requests matching this policy will be redirected to the pool with this ID. Only
// valid if action is `REDIRECT_TO_POOL`.
RedirectPoolID param.Opt[string] `json:"redirect_pool_id,omitzero"`
// Requests matching this policy will be redirected to this Prefix URL. Only valid
// if action is `REDIRECT_PREFIX`.
RedirectPrefix param.Opt[string] `json:"redirect_prefix,omitzero"`
// Requests matching this policy will be redirected to this URL. Only valid if
// action is `REDIRECT_TO_URL`.
RedirectURL param.Opt[string] `json:"redirect_url,omitzero"`
// A list of simple strings assigned to the resource.
Tags []string `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (LoadBalancerL7PolicyReplaceParams) MarshalJSON ¶
func (r LoadBalancerL7PolicyReplaceParams) MarshalJSON() (data []byte, err error)
func (*LoadBalancerL7PolicyReplaceParams) UnmarshalJSON ¶
func (r *LoadBalancerL7PolicyReplaceParams) UnmarshalJSON(data []byte) error
type LoadBalancerL7PolicyReplaceParamsAction ¶
type LoadBalancerL7PolicyReplaceParamsAction string
Action
const ( LoadBalancerL7PolicyReplaceParamsActionRedirectPrefix LoadBalancerL7PolicyReplaceParamsAction = "REDIRECT_PREFIX" LoadBalancerL7PolicyReplaceParamsActionRedirectToPool LoadBalancerL7PolicyReplaceParamsAction = "REDIRECT_TO_POOL" LoadBalancerL7PolicyReplaceParamsActionRedirectToURL LoadBalancerL7PolicyReplaceParamsAction = "REDIRECT_TO_URL" LoadBalancerL7PolicyReplaceParamsActionReject LoadBalancerL7PolicyReplaceParamsAction = "REJECT" )
type LoadBalancerL7PolicyRuleNewParams ¶
type LoadBalancerL7PolicyRuleNewParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// The comparison type for the L7 rule
//
// Any of "CONTAINS", "ENDS_WITH", "EQUAL_TO", "REGEX", "STARTS_WITH".
CompareType LoadBalancerL7PolicyRuleNewParamsCompareType `json:"compare_type,omitzero,required"`
// The L7 rule type
//
// Any of "COOKIE", "FILE_TYPE", "HEADER", "HOST_NAME", "PATH",
// "SSL_CONN_HAS_CERT", "SSL_DN_FIELD", "SSL_VERIFY_RESULT".
Type LoadBalancerL7PolicyRuleNewParamsType `json:"type,omitzero,required"`
// The value to use for the comparison. For example, the file type to compare
Value string `json:"value,required"`
// When true the logic of the rule is inverted. For example, with invert true,
// 'equal to' would become 'not equal to'. Default is false.
Invert param.Opt[bool] `json:"invert,omitzero"`
// The key to use for the comparison. For example, the name of the cookie to
// evaluate.
Key param.Opt[string] `json:"key,omitzero"`
// A list of simple strings assigned to the l7 rule
Tags []string `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (LoadBalancerL7PolicyRuleNewParams) MarshalJSON ¶
func (r LoadBalancerL7PolicyRuleNewParams) MarshalJSON() (data []byte, err error)
func (*LoadBalancerL7PolicyRuleNewParams) UnmarshalJSON ¶
func (r *LoadBalancerL7PolicyRuleNewParams) UnmarshalJSON(data []byte) error
type LoadBalancerL7PolicyRuleNewParamsCompareType ¶
type LoadBalancerL7PolicyRuleNewParamsCompareType string
The comparison type for the L7 rule
const ( LoadBalancerL7PolicyRuleNewParamsCompareTypeContains LoadBalancerL7PolicyRuleNewParamsCompareType = "CONTAINS" LoadBalancerL7PolicyRuleNewParamsCompareTypeEndsWith LoadBalancerL7PolicyRuleNewParamsCompareType = "ENDS_WITH" LoadBalancerL7PolicyRuleNewParamsCompareTypeEqualTo LoadBalancerL7PolicyRuleNewParamsCompareType = "EQUAL_TO" LoadBalancerL7PolicyRuleNewParamsCompareTypeRegex LoadBalancerL7PolicyRuleNewParamsCompareType = "REGEX" LoadBalancerL7PolicyRuleNewParamsCompareTypeStartsWith LoadBalancerL7PolicyRuleNewParamsCompareType = "STARTS_WITH" )
type LoadBalancerL7PolicyRuleNewParamsType ¶
type LoadBalancerL7PolicyRuleNewParamsType string
The L7 rule type
const ( LoadBalancerL7PolicyRuleNewParamsTypeCookie LoadBalancerL7PolicyRuleNewParamsType = "COOKIE" LoadBalancerL7PolicyRuleNewParamsTypeFileType LoadBalancerL7PolicyRuleNewParamsType = "FILE_TYPE" LoadBalancerL7PolicyRuleNewParamsTypeHeader LoadBalancerL7PolicyRuleNewParamsType = "HEADER" LoadBalancerL7PolicyRuleNewParamsTypeHostName LoadBalancerL7PolicyRuleNewParamsType = "HOST_NAME" LoadBalancerL7PolicyRuleNewParamsTypePath LoadBalancerL7PolicyRuleNewParamsType = "PATH" LoadBalancerL7PolicyRuleNewParamsTypeSslConnHasCert LoadBalancerL7PolicyRuleNewParamsType = "SSL_CONN_HAS_CERT" LoadBalancerL7PolicyRuleNewParamsTypeSslDnField LoadBalancerL7PolicyRuleNewParamsType = "SSL_DN_FIELD" LoadBalancerL7PolicyRuleNewParamsTypeSslVerifyResult LoadBalancerL7PolicyRuleNewParamsType = "SSL_VERIFY_RESULT" )
type LoadBalancerL7PolicyRuleReplaceParams ¶
type LoadBalancerL7PolicyRuleReplaceParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
L7policyID string `path:"l7policy_id,required" json:"-"`
// When true the logic of the rule is inverted. For example, with invert true,
// 'equal to' would become 'not equal to'. Default is false.
Invert param.Opt[bool] `json:"invert,omitzero"`
// The key to use for the comparison. For example, the name of the cookie to
// evaluate.
Key param.Opt[string] `json:"key,omitzero"`
// The value to use for the comparison. For example, the file type to compare
Value param.Opt[string] `json:"value,omitzero"`
// The comparison type for the L7 rule
//
// Any of "CONTAINS", "ENDS_WITH", "EQUAL_TO", "REGEX", "STARTS_WITH".
CompareType LoadBalancerL7PolicyRuleReplaceParamsCompareType `json:"compare_type,omitzero"`
// A list of simple strings assigned to the l7 rule
Tags []string `json:"tags,omitzero"`
// The L7 rule type
//
// Any of "COOKIE", "FILE_TYPE", "HEADER", "HOST_NAME", "PATH",
// "SSL_CONN_HAS_CERT", "SSL_DN_FIELD", "SSL_VERIFY_RESULT".
Type LoadBalancerL7PolicyRuleReplaceParamsType `json:"type,omitzero"`
// contains filtered or unexported fields
}
func (LoadBalancerL7PolicyRuleReplaceParams) MarshalJSON ¶
func (r LoadBalancerL7PolicyRuleReplaceParams) MarshalJSON() (data []byte, err error)
func (*LoadBalancerL7PolicyRuleReplaceParams) UnmarshalJSON ¶
func (r *LoadBalancerL7PolicyRuleReplaceParams) UnmarshalJSON(data []byte) error
type LoadBalancerL7PolicyRuleReplaceParamsCompareType ¶
type LoadBalancerL7PolicyRuleReplaceParamsCompareType string
The comparison type for the L7 rule
const ( LoadBalancerL7PolicyRuleReplaceParamsCompareTypeContains LoadBalancerL7PolicyRuleReplaceParamsCompareType = "CONTAINS" LoadBalancerL7PolicyRuleReplaceParamsCompareTypeEndsWith LoadBalancerL7PolicyRuleReplaceParamsCompareType = "ENDS_WITH" LoadBalancerL7PolicyRuleReplaceParamsCompareTypeEqualTo LoadBalancerL7PolicyRuleReplaceParamsCompareType = "EQUAL_TO" LoadBalancerL7PolicyRuleReplaceParamsCompareTypeRegex LoadBalancerL7PolicyRuleReplaceParamsCompareType = "REGEX" LoadBalancerL7PolicyRuleReplaceParamsCompareTypeStartsWith LoadBalancerL7PolicyRuleReplaceParamsCompareType = "STARTS_WITH" )
type LoadBalancerL7PolicyRuleReplaceParamsType ¶
type LoadBalancerL7PolicyRuleReplaceParamsType string
The L7 rule type
const ( LoadBalancerL7PolicyRuleReplaceParamsTypeCookie LoadBalancerL7PolicyRuleReplaceParamsType = "COOKIE" LoadBalancerL7PolicyRuleReplaceParamsTypeFileType LoadBalancerL7PolicyRuleReplaceParamsType = "FILE_TYPE" LoadBalancerL7PolicyRuleReplaceParamsTypeHeader LoadBalancerL7PolicyRuleReplaceParamsType = "HEADER" LoadBalancerL7PolicyRuleReplaceParamsTypeHostName LoadBalancerL7PolicyRuleReplaceParamsType = "HOST_NAME" LoadBalancerL7PolicyRuleReplaceParamsTypePath LoadBalancerL7PolicyRuleReplaceParamsType = "PATH" LoadBalancerL7PolicyRuleReplaceParamsTypeSslConnHasCert LoadBalancerL7PolicyRuleReplaceParamsType = "SSL_CONN_HAS_CERT" LoadBalancerL7PolicyRuleReplaceParamsTypeSslDnField LoadBalancerL7PolicyRuleReplaceParamsType = "SSL_DN_FIELD" LoadBalancerL7PolicyRuleReplaceParamsTypeSslVerifyResult LoadBalancerL7PolicyRuleReplaceParamsType = "SSL_VERIFY_RESULT" )
type LoadBalancerL7PolicyRuleService ¶
type LoadBalancerL7PolicyRuleService struct {
Options []option.RequestOption
// contains filtered or unexported fields
}
LoadBalancerL7PolicyRuleService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLoadBalancerL7PolicyRuleService method instead.
func NewLoadBalancerL7PolicyRuleService ¶
func NewLoadBalancerL7PolicyRuleService(opts ...option.RequestOption) (r LoadBalancerL7PolicyRuleService)
NewLoadBalancerL7PolicyRuleService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LoadBalancerL7PolicyRuleService) Delete ¶
func (r *LoadBalancerL7PolicyRuleService) Delete(ctx context.Context, l7ruleID string, body LoadBalancerL7PolicyRuleDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Delete load balancer L7 rule
func (*LoadBalancerL7PolicyRuleService) DeleteAndPoll ¶ added in v0.2.0
func (r *LoadBalancerL7PolicyRuleService) DeleteAndPoll(ctx context.Context, l7ruleID string, body LoadBalancerL7PolicyRuleDeleteParams, opts ...option.RequestOption) error
DeleteAndPoll deletes an L7 rule and polls for completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
func (*LoadBalancerL7PolicyRuleService) Get ¶
func (r *LoadBalancerL7PolicyRuleService) Get(ctx context.Context, l7ruleID string, query LoadBalancerL7PolicyRuleGetParams, opts ...option.RequestOption) (res *LoadBalancerL7Rule, err error)
Get load balancer L7 rule
func (*LoadBalancerL7PolicyRuleService) List ¶
func (r *LoadBalancerL7PolicyRuleService) List(ctx context.Context, l7policyID string, query LoadBalancerL7PolicyRuleListParams, opts ...option.RequestOption) (res *LoadBalancerL7RuleList, err error)
List load balancer L7 policy rules
func (*LoadBalancerL7PolicyRuleService) New ¶
func (r *LoadBalancerL7PolicyRuleService) New(ctx context.Context, l7policyID string, params LoadBalancerL7PolicyRuleNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Create load balancer L7 rule
func (*LoadBalancerL7PolicyRuleService) NewAndPoll ¶ added in v0.2.0
func (r *LoadBalancerL7PolicyRuleService) NewAndPoll(ctx context.Context, l7policyID string, params LoadBalancerL7PolicyRuleNewParams, opts ...option.RequestOption) (v *LoadBalancerL7Rule, err error)
NewAndPoll creates a new L7 rule and polls for completion
func (*LoadBalancerL7PolicyRuleService) Replace ¶
func (r *LoadBalancerL7PolicyRuleService) Replace(ctx context.Context, l7ruleID string, params LoadBalancerL7PolicyRuleReplaceParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Replace load balancer L7 rule properties
func (*LoadBalancerL7PolicyRuleService) ReplaceAndPoll ¶ added in v0.2.0
func (r *LoadBalancerL7PolicyRuleService) ReplaceAndPoll(ctx context.Context, l7ruleID string, params LoadBalancerL7PolicyRuleReplaceParams, opts ...option.RequestOption) (v *LoadBalancerL7Rule, err error)
ReplaceAndPoll replaces an L7 rule and polls for completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
type LoadBalancerL7PolicyService ¶
type LoadBalancerL7PolicyService struct {
Options []option.RequestOption
Rules LoadBalancerL7PolicyRuleService
// contains filtered or unexported fields
}
LoadBalancerL7PolicyService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLoadBalancerL7PolicyService method instead.
func NewLoadBalancerL7PolicyService ¶
func NewLoadBalancerL7PolicyService(opts ...option.RequestOption) (r LoadBalancerL7PolicyService)
NewLoadBalancerL7PolicyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LoadBalancerL7PolicyService) Delete ¶
func (r *LoadBalancerL7PolicyService) Delete(ctx context.Context, l7policyID string, body LoadBalancerL7PolicyDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Delete load balancer L7 policy
func (*LoadBalancerL7PolicyService) DeleteAndPoll ¶ added in v0.2.0
func (r *LoadBalancerL7PolicyService) DeleteAndPoll(ctx context.Context, l7policyID string, body LoadBalancerL7PolicyDeleteParams, opts ...option.RequestOption) error
DeleteAndPoll deletes an L7 policy and polls for completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
func (*LoadBalancerL7PolicyService) Get ¶
func (r *LoadBalancerL7PolicyService) Get(ctx context.Context, l7policyID string, query LoadBalancerL7PolicyGetParams, opts ...option.RequestOption) (res *LoadBalancerL7Policy, err error)
Get load balancer L7 policy
func (*LoadBalancerL7PolicyService) List ¶
func (r *LoadBalancerL7PolicyService) List(ctx context.Context, query LoadBalancerL7PolicyListParams, opts ...option.RequestOption) (res *LoadBalancerL7PolicyList, err error)
List load balancer L7 policies
func (*LoadBalancerL7PolicyService) New ¶
func (r *LoadBalancerL7PolicyService) New(ctx context.Context, params LoadBalancerL7PolicyNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Create load balancer L7 policy
func (*LoadBalancerL7PolicyService) NewAndPoll ¶ added in v0.2.0
func (r *LoadBalancerL7PolicyService) NewAndPoll(ctx context.Context, params LoadBalancerL7PolicyNewParams, opts ...option.RequestOption) (v *LoadBalancerL7Policy, err error)
NewAndPoll creates a new L7 policy and polls for completion
func (*LoadBalancerL7PolicyService) Replace ¶
func (r *LoadBalancerL7PolicyService) Replace(ctx context.Context, l7policyID string, params LoadBalancerL7PolicyReplaceParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Replace load balancer L7 policy properties
func (*LoadBalancerL7PolicyService) ReplaceAndPoll ¶ added in v0.2.0
func (r *LoadBalancerL7PolicyService) ReplaceAndPoll(ctx context.Context, l7policyID string, params LoadBalancerL7PolicyReplaceParams, opts ...option.RequestOption) (v *LoadBalancerL7Policy, err error)
ReplaceAndPoll replaces an L7 policy and polls for completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
type LoadBalancerL7Rule ¶
type LoadBalancerL7Rule struct {
// L7Rule ID
ID string `json:"id"`
// The comparison type for the L7 rule
//
// Any of "CONTAINS", "ENDS_WITH", "EQUAL_TO", "REGEX", "STARTS_WITH".
CompareType LoadBalancerL7RuleCompareType `json:"compare_type"`
// When true the logic of the rule is inverted. For example, with invert true,
// 'equal to' would become 'not equal to'. Default is false.
Invert bool `json:"invert"`
// The key to use for the comparison. For example, the name of the cookie to
// evaluate.
Key string `json:"key"`
// L7 policy operating status
//
// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
OperatingStatus LoadBalancerL7RuleOperatingStatus `json:"operating_status"`
// Project ID
ProjectID int64 `json:"project_id"`
// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
// "PENDING_UPDATE".
ProvisioningStatus LoadBalancerL7RuleProvisioningStatus `json:"provisioning_status"`
// Region name
Region string `json:"region"`
// Region ID
RegionID int64 `json:"region_id"`
// A list of simple strings assigned to the l7 rule
Tags []string `json:"tags"`
// The UUID of the active task that currently holds a lock on the resource. This
// lock prevents concurrent modifications to ensure consistency. If `null`, the
// resource is not locked.
TaskID string `json:"task_id"`
// The L7 rule type
//
// Any of "COOKIE", "FILE_TYPE", "HEADER", "HOST_NAME", "PATH",
// "SSL_CONN_HAS_CERT", "SSL_DN_FIELD", "SSL_VERIFY_RESULT".
Type LoadBalancerL7RuleType `json:"type"`
// The value to use for the comparison. For example, the file type to compare.
Value string `json:"value"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CompareType respjson.Field
Invert respjson.Field
Key respjson.Field
OperatingStatus respjson.Field
ProjectID respjson.Field
ProvisioningStatus respjson.Field
Region respjson.Field
RegionID respjson.Field
Tags respjson.Field
TaskID respjson.Field
Type respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
L7Rule schema All the rules associated with a given policy are logically ANDed together. A request must match all the policy’s rules to match the policy. If you need to express a logical OR operation between rules, then do this by creating multiple policies with the same action.
func (LoadBalancerL7Rule) RawJSON ¶
func (r LoadBalancerL7Rule) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerL7Rule) UnmarshalJSON ¶
func (r *LoadBalancerL7Rule) UnmarshalJSON(data []byte) error
type LoadBalancerL7RuleCompareType ¶
type LoadBalancerL7RuleCompareType string
The comparison type for the L7 rule
const ( LoadBalancerL7RuleCompareTypeContains LoadBalancerL7RuleCompareType = "CONTAINS" LoadBalancerL7RuleCompareTypeEndsWith LoadBalancerL7RuleCompareType = "ENDS_WITH" LoadBalancerL7RuleCompareTypeEqualTo LoadBalancerL7RuleCompareType = "EQUAL_TO" LoadBalancerL7RuleCompareTypeRegex LoadBalancerL7RuleCompareType = "REGEX" LoadBalancerL7RuleCompareTypeStartsWith LoadBalancerL7RuleCompareType = "STARTS_WITH" )
type LoadBalancerL7RuleList ¶
type LoadBalancerL7RuleList struct {
// Number of objects
Count int64 `json:"count"`
// Objects
Results []LoadBalancerL7Rule `json:"results"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancerL7RuleList) RawJSON ¶
func (r LoadBalancerL7RuleList) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerL7RuleList) UnmarshalJSON ¶
func (r *LoadBalancerL7RuleList) UnmarshalJSON(data []byte) error
type LoadBalancerL7RuleOperatingStatus ¶
type LoadBalancerL7RuleOperatingStatus string
L7 policy operating status
const ( LoadBalancerL7RuleOperatingStatusDegraded LoadBalancerL7RuleOperatingStatus = "DEGRADED" LoadBalancerL7RuleOperatingStatusDraining LoadBalancerL7RuleOperatingStatus = "DRAINING" LoadBalancerL7RuleOperatingStatusError LoadBalancerL7RuleOperatingStatus = "ERROR" LoadBalancerL7RuleOperatingStatusNoMonitor LoadBalancerL7RuleOperatingStatus = "NO_MONITOR" LoadBalancerL7RuleOperatingStatusOffline LoadBalancerL7RuleOperatingStatus = "OFFLINE" LoadBalancerL7RuleOperatingStatusOnline LoadBalancerL7RuleOperatingStatus = "ONLINE" )
type LoadBalancerL7RuleProvisioningStatus ¶
type LoadBalancerL7RuleProvisioningStatus string
const ( LoadBalancerL7RuleProvisioningStatusActive LoadBalancerL7RuleProvisioningStatus = "ACTIVE" LoadBalancerL7RuleProvisioningStatusDeleted LoadBalancerL7RuleProvisioningStatus = "DELETED" LoadBalancerL7RuleProvisioningStatusError LoadBalancerL7RuleProvisioningStatus = "ERROR" LoadBalancerL7RuleProvisioningStatusPendingCreate LoadBalancerL7RuleProvisioningStatus = "PENDING_CREATE" LoadBalancerL7RuleProvisioningStatusPendingDelete LoadBalancerL7RuleProvisioningStatus = "PENDING_DELETE" LoadBalancerL7RuleProvisioningStatusPendingUpdate LoadBalancerL7RuleProvisioningStatus = "PENDING_UPDATE" )
type LoadBalancerL7RuleType ¶
type LoadBalancerL7RuleType string
The L7 rule type
const ( LoadBalancerL7RuleTypeCookie LoadBalancerL7RuleType = "COOKIE" LoadBalancerL7RuleTypeFileType LoadBalancerL7RuleType = "FILE_TYPE" LoadBalancerL7RuleTypeHeader LoadBalancerL7RuleType = "HEADER" LoadBalancerL7RuleTypeHostName LoadBalancerL7RuleType = "HOST_NAME" LoadBalancerL7RuleTypePath LoadBalancerL7RuleType = "PATH" LoadBalancerL7RuleTypeSslConnHasCert LoadBalancerL7RuleType = "SSL_CONN_HAS_CERT" LoadBalancerL7RuleTypeSslDnField LoadBalancerL7RuleType = "SSL_DN_FIELD" LoadBalancerL7RuleTypeSslVerifyResult LoadBalancerL7RuleType = "SSL_VERIFY_RESULT" )
type LoadBalancerListParams ¶
type LoadBalancerListParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// With or without assigned floating IP
AssignedFloating param.Opt[bool] `query:"assigned_floating,omitzero" json:"-"`
// Limit the number of returned limit request entities.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// With or without logging
LoggingEnabled param.Opt[bool] `query:"logging_enabled,omitzero" json:"-"`
// Filter by name
Name param.Opt[string] `query:"name,omitzero" json:"-"`
// Offset value is used to exclude the first set of records from the result.
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Ordering Load Balancer list result by name, `created_at`, `updated_at`,
// `operating_status`, `provisioning_status`, `vip_address`, `vip_ip_family` and
// flavor fields of the load balancer and directions (name.asc), default is
// "`created_at`.asc"
OrderBy param.Opt[string] `query:"order_by,omitzero" json:"-"`
// Show statistics
ShowStats param.Opt[bool] `query:"show_stats,omitzero" json:"-"`
// Filter by tag key-value pairs. Must be a valid JSON string.
TagKeyValue param.Opt[string] `query:"tag_key_value,omitzero" json:"-"`
// Show Advanced DDoS protection profile, if exists
WithDDOS param.Opt[bool] `query:"with_ddos,omitzero" json:"-"`
// Filter by tag keys.
TagKey []string `query:"tag_key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (LoadBalancerListParams) URLQuery ¶
func (r LoadBalancerListParams) URLQuery() (v url.Values, err error)
URLQuery serializes LoadBalancerListParams's query parameters as `url.Values`.
type LoadBalancerListener ¶
type LoadBalancerListener struct {
// Listener ID
ID string `json:"id,required" format:"uuid4"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancerListener) RawJSON ¶
func (r LoadBalancerListener) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerListener) UnmarshalJSON ¶
func (r *LoadBalancerListener) UnmarshalJSON(data []byte) error
type LoadBalancerListenerDetail ¶
type LoadBalancerListenerDetail struct {
// Load balancer listener ID
ID string `json:"id,required" format:"uuid4"`
// Network CIDRs from which service will be accessible
AllowedCidrs []string `json:"allowed_cidrs,required" format:"ipvanynetwork"`
// Limit of simultaneous connections
ConnectionLimit int64 `json:"connection_limit,required"`
// Task that created this entity
CreatorTaskID string `json:"creator_task_id,required" format:"uuid4"`
// Dictionary of additional header insertion into HTTP headers. Only used with HTTP
// and `TERMINATED_HTTPS` protocols.
InsertHeaders any `json:"insert_headers,required"`
// Load balancer ID
LoadbalancerID string `json:"loadbalancer_id,required" format:"uuid4"`
// Load balancer listener name
Name string `json:"name,required"`
// Listener operating status
//
// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
OperatingStatus LoadBalancerOperatingStatus `json:"operating_status,required"`
// Number of pools (for UI)
PoolCount int64 `json:"pool_count,required"`
// Load balancer protocol
//
// Any of "HTTP", "HTTPS", "PROMETHEUS", "TCP", "TERMINATED_HTTPS", "UDP".
Protocol LbListenerProtocol `json:"protocol,required"`
// Protocol port
ProtocolPort int64 `json:"protocol_port,required"`
// Listener lifecycle status
//
// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
// "PENDING_UPDATE".
ProvisioningStatus ProvisioningStatus `json:"provisioning_status,required"`
// ID of the secret where PKCS12 file is stored for `TERMINATED_HTTPS` or
// PROMETHEUS load balancer
SecretID string `json:"secret_id,required"`
// List of secret's ID containing PKCS12 format certificate/key bundles for
// `TERMINATED_HTTPS` or PROMETHEUS listeners
SniSecretID []string `json:"sni_secret_id,required"`
// Statistics of the load balancer. It is available only in get functions by a
// flag.
Stats LoadBalancerStatistics `json:"stats,required"`
// The UUID of the active task that currently holds a lock on the resource. This
// lock prevents concurrent modifications to ensure consistency. If `null`, the
// resource is not locked.
TaskID string `json:"task_id,required" format:"uuid4"`
// Frontend client inactivity timeout in milliseconds
TimeoutClientData int64 `json:"timeout_client_data,required"`
// Backend member connection timeout in milliseconds
TimeoutMemberConnect int64 `json:"timeout_member_connect,required"`
// Backend member inactivity timeout in milliseconds
TimeoutMemberData int64 `json:"timeout_member_data,required"`
// Load balancer listener users list
UserList []LoadBalancerListenerDetailUserList `json:"user_list,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AllowedCidrs respjson.Field
ConnectionLimit respjson.Field
CreatorTaskID respjson.Field
InsertHeaders respjson.Field
LoadbalancerID respjson.Field
Name respjson.Field
OperatingStatus respjson.Field
PoolCount respjson.Field
Protocol respjson.Field
ProtocolPort respjson.Field
ProvisioningStatus respjson.Field
SecretID respjson.Field
SniSecretID respjson.Field
Stats respjson.Field
TaskID respjson.Field
TimeoutClientData respjson.Field
TimeoutMemberConnect respjson.Field
TimeoutMemberData respjson.Field
UserList respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancerListenerDetail) RawJSON ¶
func (r LoadBalancerListenerDetail) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerListenerDetail) UnmarshalJSON ¶
func (r *LoadBalancerListenerDetail) UnmarshalJSON(data []byte) error
type LoadBalancerListenerDetailUserList ¶
type LoadBalancerListenerDetailUserList struct {
// Encrypted password to auth via Basic Authentication
EncryptedPassword string `json:"encrypted_password,required"`
// Username to auth via Basic Authentication
Username string `json:"username,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
EncryptedPassword respjson.Field
Username respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancerListenerDetailUserList) RawJSON ¶
func (r LoadBalancerListenerDetailUserList) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerListenerDetailUserList) UnmarshalJSON ¶
func (r *LoadBalancerListenerDetailUserList) UnmarshalJSON(data []byte) error
type LoadBalancerListenerGetParams ¶
type LoadBalancerListenerGetParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Show stats
ShowStats param.Opt[bool] `query:"show_stats,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (LoadBalancerListenerGetParams) URLQuery ¶
func (r LoadBalancerListenerGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes LoadBalancerListenerGetParams's query parameters as `url.Values`.
type LoadBalancerListenerList ¶
type LoadBalancerListenerList struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []LoadBalancerListenerDetail `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancerListenerList) RawJSON ¶
func (r LoadBalancerListenerList) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerListenerList) UnmarshalJSON ¶
func (r *LoadBalancerListenerList) UnmarshalJSON(data []byte) error
type LoadBalancerListenerListParams ¶
type LoadBalancerListenerListParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Load Balancer ID
LoadbalancerID param.Opt[string] `query:"loadbalancer_id,omitzero" format:"uuid4" json:"-"`
// Show stats
ShowStats param.Opt[bool] `query:"show_stats,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (LoadBalancerListenerListParams) URLQuery ¶
func (r LoadBalancerListenerListParams) URLQuery() (v url.Values, err error)
URLQuery serializes LoadBalancerListenerListParams's query parameters as `url.Values`.
type LoadBalancerListenerListResponse ¶ added in v0.2.0
type LoadBalancerListenerListResponse struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []LoadBalancerListenerDetail `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancerListenerListResponse) RawJSON ¶ added in v0.2.0
func (r LoadBalancerListenerListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerListenerListResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *LoadBalancerListenerListResponse) UnmarshalJSON(data []byte) error
type LoadBalancerListenerNewParams ¶
type LoadBalancerListenerNewParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Load balancer ID
LoadbalancerID string `json:"loadbalancer_id,required" format:"uuid4"`
// Load balancer listener name
Name string `json:"name,required"`
// Load balancer listener protocol
//
// Any of "HTTP", "HTTPS", "PROMETHEUS", "TCP", "TERMINATED_HTTPS", "UDP".
Protocol LbListenerProtocol `json:"protocol,omitzero,required"`
// Protocol port
ProtocolPort int64 `json:"protocol_port,required"`
// Frontend client inactivity timeout in milliseconds
TimeoutClientData param.Opt[int64] `json:"timeout_client_data,omitzero"`
// Backend member connection timeout in milliseconds
TimeoutMemberConnect param.Opt[int64] `json:"timeout_member_connect,omitzero"`
// Backend member inactivity timeout in milliseconds
TimeoutMemberData param.Opt[int64] `json:"timeout_member_data,omitzero"`
// Limit of the simultaneous connections
ConnectionLimit param.Opt[int64] `json:"connection_limit,omitzero"`
// Add headers X-Forwarded-For, X-Forwarded-Port, X-Forwarded-Proto to requests.
// Only used with HTTP or `TERMINATED_HTTPS` protocols.
InsertXForwarded param.Opt[bool] `json:"insert_x_forwarded,omitzero"`
// ID of the secret where PKCS12 file is stored for `TERMINATED_HTTPS` or
// PROMETHEUS listener
SecretID param.Opt[string] `json:"secret_id,omitzero"`
// Network CIDRs from which service will be accessible
AllowedCidrs []string `json:"allowed_cidrs,omitzero" format:"ipvanynetwork"`
// List of secrets IDs containing PKCS12 format certificate/key bundles for
// `TERMINATED_HTTPS` or PROMETHEUS listeners
SniSecretID []string `json:"sni_secret_id,omitzero" format:"uuid4"`
// Load balancer listener list of username and encrypted password items
UserList []LoadBalancerListenerNewParamsUserList `json:"user_list,omitzero"`
// contains filtered or unexported fields
}
func (LoadBalancerListenerNewParams) MarshalJSON ¶
func (r LoadBalancerListenerNewParams) MarshalJSON() (data []byte, err error)
func (*LoadBalancerListenerNewParams) UnmarshalJSON ¶
func (r *LoadBalancerListenerNewParams) UnmarshalJSON(data []byte) error
type LoadBalancerListenerNewParamsUserList ¶
type LoadBalancerListenerNewParamsUserList struct {
// Encrypted password to auth via Basic Authentication
EncryptedPassword string `json:"encrypted_password,required"`
// Username to auth via Basic Authentication
Username string `json:"username,required"`
// contains filtered or unexported fields
}
The properties EncryptedPassword, Username are required.
func (LoadBalancerListenerNewParamsUserList) MarshalJSON ¶
func (r LoadBalancerListenerNewParamsUserList) MarshalJSON() (data []byte, err error)
func (*LoadBalancerListenerNewParamsUserList) UnmarshalJSON ¶
func (r *LoadBalancerListenerNewParamsUserList) UnmarshalJSON(data []byte) error
type LoadBalancerListenerService ¶
type LoadBalancerListenerService struct {
Options []option.RequestOption
// contains filtered or unexported fields
}
LoadBalancerListenerService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLoadBalancerListenerService method instead.
func NewLoadBalancerListenerService ¶
func NewLoadBalancerListenerService(opts ...option.RequestOption) (r LoadBalancerListenerService)
NewLoadBalancerListenerService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LoadBalancerListenerService) Delete ¶
func (r *LoadBalancerListenerService) Delete(ctx context.Context, listenerID string, body LoadBalancerListenerDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Delete load balancer listener
func (*LoadBalancerListenerService) DeleteAndPoll ¶ added in v0.2.0
func (r *LoadBalancerListenerService) DeleteAndPoll(ctx context.Context, listenerID string, params LoadBalancerListenerDeleteParams, opts ...option.RequestOption) error
DeleteAndPoll deletes a listener and polls for completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
func (*LoadBalancerListenerService) Get ¶
func (r *LoadBalancerListenerService) Get(ctx context.Context, listenerID string, params LoadBalancerListenerGetParams, opts ...option.RequestOption) (res *LoadBalancerListenerDetail, err error)
Get load balancer listener
func (*LoadBalancerListenerService) List ¶
func (r *LoadBalancerListenerService) List(ctx context.Context, params LoadBalancerListenerListParams, opts ...option.RequestOption) (res *LoadBalancerListenerList, err error)
List load balancer listeners
func (*LoadBalancerListenerService) New ¶
func (r *LoadBalancerListenerService) New(ctx context.Context, params LoadBalancerListenerNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Create load balancer listener
func (*LoadBalancerListenerService) NewAndPoll ¶ added in v0.2.0
func (r *LoadBalancerListenerService) NewAndPoll(ctx context.Context, params LoadBalancerListenerNewParams, opts ...option.RequestOption) (v *LoadBalancerListenerDetail, err error)
NewAndPoll creates a new listener and polls for completion
func (*LoadBalancerListenerService) Update ¶
func (r *LoadBalancerListenerService) Update(ctx context.Context, listenerID string, params LoadBalancerListenerUpdateParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Update load balancer listener
func (*LoadBalancerListenerService) UpdateAndPoll ¶ added in v0.2.0
func (r *LoadBalancerListenerService) UpdateAndPoll(ctx context.Context, listenerID string, params LoadBalancerListenerUpdateParams, opts ...option.RequestOption) (v *LoadBalancerListenerDetail, err error)
UpdateAndPoll updates a listener and polls for completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
type LoadBalancerListenerUpdateParams ¶
type LoadBalancerListenerUpdateParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// ID of the secret where PKCS12 file is stored for `TERMINATED_HTTPS` or
// PROMETHEUS load balancer
SecretID param.Opt[string] `json:"secret_id,omitzero" format:"uuid4"`
// Frontend client inactivity timeout in milliseconds
TimeoutClientData param.Opt[int64] `json:"timeout_client_data,omitzero"`
// Backend member connection timeout in milliseconds
TimeoutMemberConnect param.Opt[int64] `json:"timeout_member_connect,omitzero"`
// Backend member inactivity timeout in milliseconds
TimeoutMemberData param.Opt[int64] `json:"timeout_member_data,omitzero"`
// Limit of simultaneous connections
ConnectionLimit param.Opt[int64] `json:"connection_limit,omitzero"`
// Load balancer listener name
Name param.Opt[string] `json:"name,omitzero"`
// Network CIDRs from which service will be accessible
AllowedCidrs []string `json:"allowed_cidrs,omitzero" format:"ipvanynetwork"`
// List of secret's ID containing PKCS12 format certificate/key bundfles for
// `TERMINATED_HTTPS` or PROMETHEUS listeners
SniSecretID []string `json:"sni_secret_id,omitzero" format:"uuid4"`
// Load balancer listener users list
UserList []LoadBalancerListenerUpdateParamsUserList `json:"user_list,omitzero"`
// contains filtered or unexported fields
}
func (LoadBalancerListenerUpdateParams) MarshalJSON ¶
func (r LoadBalancerListenerUpdateParams) MarshalJSON() (data []byte, err error)
func (*LoadBalancerListenerUpdateParams) UnmarshalJSON ¶
func (r *LoadBalancerListenerUpdateParams) UnmarshalJSON(data []byte) error
type LoadBalancerListenerUpdateParamsUserList ¶
type LoadBalancerListenerUpdateParamsUserList struct {
// Encrypted password to auth via Basic Authentication
EncryptedPassword string `json:"encrypted_password,required"`
// Username to auth via Basic Authentication
Username string `json:"username,required"`
// contains filtered or unexported fields
}
The properties EncryptedPassword, Username are required.
func (LoadBalancerListenerUpdateParamsUserList) MarshalJSON ¶
func (r LoadBalancerListenerUpdateParamsUserList) MarshalJSON() (data []byte, err error)
func (*LoadBalancerListenerUpdateParamsUserList) UnmarshalJSON ¶
func (r *LoadBalancerListenerUpdateParamsUserList) UnmarshalJSON(data []byte) error
type LoadBalancerMemberConnectivity ¶
type LoadBalancerMemberConnectivity string
const ( LoadBalancerMemberConnectivityL2 LoadBalancerMemberConnectivity = "L2" LoadBalancerMemberConnectivityL3 LoadBalancerMemberConnectivity = "L3" )
type LoadBalancerMetricListParams ¶
type LoadBalancerMetricListParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Time interval
TimeInterval int64 `json:"time_interval,required"`
// Time interval unit
//
// Any of "day", "hour".
TimeUnit InstanceMetricsTimeUnit `json:"time_unit,omitzero,required"`
// contains filtered or unexported fields
}
func (LoadBalancerMetricListParams) MarshalJSON ¶
func (r LoadBalancerMetricListParams) MarshalJSON() (data []byte, err error)
func (*LoadBalancerMetricListParams) UnmarshalJSON ¶
func (r *LoadBalancerMetricListParams) UnmarshalJSON(data []byte) error
type LoadBalancerMetricService ¶
type LoadBalancerMetricService struct {
Options []option.RequestOption
}
LoadBalancerMetricService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLoadBalancerMetricService method instead.
func NewLoadBalancerMetricService ¶
func NewLoadBalancerMetricService(opts ...option.RequestOption) (r LoadBalancerMetricService)
NewLoadBalancerMetricService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LoadBalancerMetricService) List ¶
func (r *LoadBalancerMetricService) List(ctx context.Context, loadbalancerID string, params LoadBalancerMetricListParams, opts ...option.RequestOption) (res *LoadBalancerMetricsList, err error)
Get load balancer metrics, including cpu, memory and network
type LoadBalancerMetrics ¶
type LoadBalancerMetrics struct {
// CPU utilization, % (max 100% for multi-core)
CPUUtil float64 `json:"cpu_util,nullable"`
// RAM utilization, %
MemoryUtil float64 `json:"memory_util,nullable"`
// Network out, bytes per second
NetworkBpsEgress float64 `json:"network_Bps_egress,nullable"`
// Network in, bytes per second
NetworkBpsIngress float64 `json:"network_Bps_ingress,nullable"`
// Network out, packets per second
NetworkPpsEgress float64 `json:"network_pps_egress,nullable"`
// Network in, packets per second
NetworkPpsIngress float64 `json:"network_pps_ingress,nullable"`
// Timestamp
Time string `json:"time,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CPUUtil respjson.Field
MemoryUtil respjson.Field
NetworkBpsEgress respjson.Field
NetworkBpsIngress respjson.Field
NetworkPpsEgress respjson.Field
NetworkPpsIngress respjson.Field
Time respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancerMetrics) RawJSON ¶
func (r LoadBalancerMetrics) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerMetrics) UnmarshalJSON ¶
func (r *LoadBalancerMetrics) UnmarshalJSON(data []byte) error
type LoadBalancerMetricsList ¶
type LoadBalancerMetricsList struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []LoadBalancerMetrics `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancerMetricsList) RawJSON ¶
func (r LoadBalancerMetricsList) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerMetricsList) UnmarshalJSON ¶
func (r *LoadBalancerMetricsList) UnmarshalJSON(data []byte) error
type LoadBalancerNewParams ¶
type LoadBalancerNewParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Load balancer flavor name
Flavor param.Opt[string] `json:"flavor,omitzero"`
// Load balancer name
Name param.Opt[string] `json:"name,omitzero"`
// Load balancer name which will be changed by template.
NameTemplate param.Opt[string] `json:"name_template,omitzero"`
// Network ID for load balancer. If not specified, default external network will be
// used. Mutually exclusive with `vip_port_id`
VipNetworkID param.Opt[string] `json:"vip_network_id,omitzero" format:"uuid4"`
// Existing Reserved Fixed IP port ID for load balancer. Mutually exclusive with
// `vip_network_id`
VipPortID param.Opt[string] `json:"vip_port_id,omitzero" format:"uuid4"`
// Subnet ID for load balancer. If not specified, any subnet from `vip_network_id`
// will be selected. Ignored when `vip_network_id` is not specified.
VipSubnetID param.Opt[string] `json:"vip_subnet_id,omitzero" format:"uuid4"`
// Floating IP configuration for assignment
FloatingIP LoadBalancerNewParamsFloatingIPUnion `json:"floating_ip,omitzero"`
// Load balancer listeners. Maximum 50 per LB (excluding Prometheus endpoint
// listener).
Listeners []LoadBalancerNewParamsListener `json:"listeners,omitzero"`
// Logging configuration
Logging LoadBalancerNewParamsLogging `json:"logging,omitzero"`
// Preferred option to establish connectivity between load balancer and its pools
// members. L2 provides best performance, L3 provides less IPs usage. It is taking
// effect only if `instance_id` + `ip_address` is provided, not `subnet_id` +
// `ip_address`, because we're considering this as intentional `subnet_id`
// specification.
//
// Any of "L2", "L3".
PreferredConnectivity LoadBalancerMemberConnectivity `json:"preferred_connectivity,omitzero"`
// Key-value tags to associate with the resource. A tag is a key-value pair that
// can be associated with a resource, enabling efficient filtering and grouping for
// better organization and management. Some tags are read-only and cannot be
// modified by the user. Tags are also integrated with cost reports, allowing cost
// data to be filtered based on tag keys or values.
Tags map[string]string `json:"tags,omitzero"`
// IP family for load balancer subnet auto-selection if `vip_network_id` is
// specified
//
// Any of "dual", "ipv4", "ipv6".
VipIPFamily InterfaceIPFamily `json:"vip_ip_family,omitzero"`
// contains filtered or unexported fields
}
func (LoadBalancerNewParams) MarshalJSON ¶
func (r LoadBalancerNewParams) MarshalJSON() (data []byte, err error)
func (*LoadBalancerNewParams) UnmarshalJSON ¶
func (r *LoadBalancerNewParams) UnmarshalJSON(data []byte) error
type LoadBalancerNewParamsFloatingIPExisting ¶
type LoadBalancerNewParamsFloatingIPExisting struct {
// An existing available floating IP id must be specified if the source is set to
// `existing`
ExistingFloatingID string `json:"existing_floating_id,required" format:"uuid4"`
// An existing available floating IP will be attached to the instance. A floating
// IP is a public IP that makes the instance accessible from the internet, even if
// it only has a private IP. It works like SNAT, allowing outgoing and incoming
// traffic.
//
// This field can be elided, and will marshal its zero value as "existing".
Source constant.Existing `json:"source,required"`
// contains filtered or unexported fields
}
The properties ExistingFloatingID, Source are required.
func (LoadBalancerNewParamsFloatingIPExisting) MarshalJSON ¶
func (r LoadBalancerNewParamsFloatingIPExisting) MarshalJSON() (data []byte, err error)
func (*LoadBalancerNewParamsFloatingIPExisting) UnmarshalJSON ¶
func (r *LoadBalancerNewParamsFloatingIPExisting) UnmarshalJSON(data []byte) error
type LoadBalancerNewParamsFloatingIPNew ¶
type LoadBalancerNewParamsFloatingIPNew struct {
// A new floating IP will be created and attached to the instance. A floating IP is
// a public IP that makes the instance accessible from the internet, even if it
// only has a private IP. It works like SNAT, allowing outgoing and incoming
// traffic.
Source constant.New `json:"source,required"`
// contains filtered or unexported fields
}
This struct has a constant value, construct it with NewLoadBalancerNewParamsFloatingIPNew.
func NewLoadBalancerNewParamsFloatingIPNew ¶
func NewLoadBalancerNewParamsFloatingIPNew() LoadBalancerNewParamsFloatingIPNew
func (LoadBalancerNewParamsFloatingIPNew) MarshalJSON ¶
func (r LoadBalancerNewParamsFloatingIPNew) MarshalJSON() (data []byte, err error)
func (*LoadBalancerNewParamsFloatingIPNew) UnmarshalJSON ¶
func (r *LoadBalancerNewParamsFloatingIPNew) UnmarshalJSON(data []byte) error
type LoadBalancerNewParamsFloatingIPUnion ¶
type LoadBalancerNewParamsFloatingIPUnion struct {
OfNew *LoadBalancerNewParamsFloatingIPNew `json:",omitzero,inline"`
OfExisting *LoadBalancerNewParamsFloatingIPExisting `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (LoadBalancerNewParamsFloatingIPUnion) GetExistingFloatingID ¶
func (u LoadBalancerNewParamsFloatingIPUnion) GetExistingFloatingID() *string
Returns a pointer to the underlying variant's property, if present.
func (LoadBalancerNewParamsFloatingIPUnion) GetSource ¶
func (u LoadBalancerNewParamsFloatingIPUnion) GetSource() *string
Returns a pointer to the underlying variant's property, if present.
func (LoadBalancerNewParamsFloatingIPUnion) MarshalJSON ¶
func (u LoadBalancerNewParamsFloatingIPUnion) MarshalJSON() ([]byte, error)
func (*LoadBalancerNewParamsFloatingIPUnion) UnmarshalJSON ¶
func (u *LoadBalancerNewParamsFloatingIPUnion) UnmarshalJSON(data []byte) error
type LoadBalancerNewParamsListener ¶
type LoadBalancerNewParamsListener struct {
// Load balancer listener name
Name string `json:"name,required"`
// Load balancer listener protocol
//
// Any of "HTTP", "HTTPS", "PROMETHEUS", "TCP", "TERMINATED_HTTPS", "UDP".
Protocol LbListenerProtocol `json:"protocol,omitzero,required"`
// Protocol port
ProtocolPort int64 `json:"protocol_port,required"`
// Frontend client inactivity timeout in milliseconds
TimeoutClientData param.Opt[int64] `json:"timeout_client_data,omitzero"`
// Backend member connection timeout in milliseconds
TimeoutMemberConnect param.Opt[int64] `json:"timeout_member_connect,omitzero"`
// Backend member inactivity timeout in milliseconds
TimeoutMemberData param.Opt[int64] `json:"timeout_member_data,omitzero"`
// Limit of the simultaneous connections
ConnectionLimit param.Opt[int64] `json:"connection_limit,omitzero"`
// Add headers X-Forwarded-For, X-Forwarded-Port, X-Forwarded-Proto to requests.
// Only used with HTTP or `TERMINATED_HTTPS` protocols.
InsertXForwarded param.Opt[bool] `json:"insert_x_forwarded,omitzero"`
// ID of the secret where PKCS12 file is stored for `TERMINATED_HTTPS` or
// PROMETHEUS listener
SecretID param.Opt[string] `json:"secret_id,omitzero"`
// Network CIDRs from which service will be accessible
AllowedCidrs []string `json:"allowed_cidrs,omitzero" format:"ipvanynetwork"`
// Member pools
Pools []LoadBalancerNewParamsListenerPool `json:"pools,omitzero"`
// List of secrets IDs containing PKCS12 format certificate/key bundles for
// `TERMINATED_HTTPS` or PROMETHEUS listeners
SniSecretID []string `json:"sni_secret_id,omitzero" format:"uuid4"`
// Load balancer listener list of username and encrypted password items
UserList []LoadBalancerNewParamsListenerUserList `json:"user_list,omitzero"`
// contains filtered or unexported fields
}
The properties Name, Protocol, ProtocolPort are required.
func (LoadBalancerNewParamsListener) MarshalJSON ¶
func (r LoadBalancerNewParamsListener) MarshalJSON() (data []byte, err error)
func (*LoadBalancerNewParamsListener) UnmarshalJSON ¶
func (r *LoadBalancerNewParamsListener) UnmarshalJSON(data []byte) error
type LoadBalancerNewParamsListenerPool ¶
type LoadBalancerNewParamsListenerPool struct {
// Load balancer algorithm
//
// Any of "LEAST_CONNECTIONS", "ROUND_ROBIN", "SOURCE_IP".
LbAlgorithm LbAlgorithm `json:"lb_algorithm,omitzero,required"`
// Pool name
Name string `json:"name,required"`
// Protocol
//
// Any of "HTTP", "HTTPS", "PROXY", "PROXYV2", "TCP", "UDP".
Protocol LbPoolProtocol `json:"protocol,omitzero,required"`
// Secret ID of CA certificate bundle
CaSecretID param.Opt[string] `json:"ca_secret_id,omitzero" format:"uuid4"`
// Secret ID of CA revocation list file
CrlSecretID param.Opt[string] `json:"crl_secret_id,omitzero" format:"uuid4"`
// Listener ID
ListenerID param.Opt[string] `json:"listener_id,omitzero" format:"uuid4"`
// Loadbalancer ID
LoadbalancerID param.Opt[string] `json:"loadbalancer_id,omitzero" format:"uuid4"`
// Secret ID for TLS client authentication to the member servers
SecretID param.Opt[string] `json:"secret_id,omitzero" format:"uuid4"`
// Frontend client inactivity timeout in milliseconds
TimeoutClientData param.Opt[int64] `json:"timeout_client_data,omitzero"`
// Backend member connection timeout in milliseconds
TimeoutMemberConnect param.Opt[int64] `json:"timeout_member_connect,omitzero"`
// Backend member inactivity timeout in milliseconds
TimeoutMemberData param.Opt[int64] `json:"timeout_member_data,omitzero"`
// Health monitor details
Healthmonitor LoadBalancerNewParamsListenerPoolHealthmonitor `json:"healthmonitor,omitzero"`
// Pool members
Members []LoadBalancerNewParamsListenerPoolMember `json:"members,omitzero"`
// Session persistence details
SessionPersistence LoadBalancerNewParamsListenerPoolSessionPersistence `json:"session_persistence,omitzero"`
// contains filtered or unexported fields
}
The properties LbAlgorithm, Name, Protocol are required.
func (LoadBalancerNewParamsListenerPool) MarshalJSON ¶
func (r LoadBalancerNewParamsListenerPool) MarshalJSON() (data []byte, err error)
func (*LoadBalancerNewParamsListenerPool) UnmarshalJSON ¶
func (r *LoadBalancerNewParamsListenerPool) UnmarshalJSON(data []byte) error
type LoadBalancerNewParamsListenerPoolHealthmonitor ¶
type LoadBalancerNewParamsListenerPoolHealthmonitor struct {
// The time, in seconds, between sending probes to members
Delay int64 `json:"delay,required"`
// Number of successes before the member is switched to ONLINE state
MaxRetries int64 `json:"max_retries,required"`
// The maximum time to connect. Must be less than the delay value
Timeout int64 `json:"timeout,required"`
// Health monitor type. Once health monitor is created, cannot be changed.
//
// Any of "HTTP", "HTTPS", "K8S", "PING", "TCP", "TLS-HELLO", "UDP-CONNECT".
Type LbHealthMonitorType `json:"type,omitzero,required"`
// Can only be used together with `HTTP` or `HTTPS` health monitor type.
ExpectedCodes param.Opt[string] `json:"expected_codes,omitzero"`
// Number of failures before the member is switched to ERROR state.
MaxRetriesDown param.Opt[int64] `json:"max_retries_down,omitzero"`
// URL Path. Defaults to '/'. Can only be used together with `HTTP` or `HTTPS`
// health monitor type.
URLPath param.Opt[string] `json:"url_path,omitzero"`
// HTTP method. Can only be used together with `HTTP` or `HTTPS` health monitor
// type.
//
// Any of "CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT",
// "TRACE".
HTTPMethod HTTPMethod `json:"http_method,omitzero"`
// contains filtered or unexported fields
}
Health monitor details
The properties Delay, MaxRetries, Timeout, Type are required.
func (LoadBalancerNewParamsListenerPoolHealthmonitor) MarshalJSON ¶
func (r LoadBalancerNewParamsListenerPoolHealthmonitor) MarshalJSON() (data []byte, err error)
func (*LoadBalancerNewParamsListenerPoolHealthmonitor) UnmarshalJSON ¶
func (r *LoadBalancerNewParamsListenerPoolHealthmonitor) UnmarshalJSON(data []byte) error
type LoadBalancerNewParamsListenerPoolMember ¶
type LoadBalancerNewParamsListenerPoolMember struct {
// Member IP address
Address string `json:"address,required" format:"ipvanyaddress"`
// Member IP port
ProtocolPort int64 `json:"protocol_port,required"`
// Administrative state of the resource. When set to true, the resource is enabled
// and operational. When set to false, the resource is disabled and will not
// process traffic. When null is passed, the value is skipped and defaults to true.
AdminStateUp param.Opt[bool] `json:"admin_state_up,omitzero"`
// Either `subnet_id` or `instance_id` should be provided
InstanceID param.Opt[string] `json:"instance_id,omitzero" format:"uuid4"`
// An alternate IP address used for health monitoring of a backend member. Default
// is null which monitors the member address.
MonitorAddress param.Opt[string] `json:"monitor_address,omitzero" format:"ipvanyaddress"`
// An alternate protocol port used for health monitoring of a backend member.
// Default is null which monitors the member `protocol_port`.
MonitorPort param.Opt[int64] `json:"monitor_port,omitzero"`
// Either `subnet_id` or `instance_id` should be provided
SubnetID param.Opt[string] `json:"subnet_id,omitzero" format:"uuid4"`
// Member weight. Valid values: 0 to 256, defaults to 1
Weight param.Opt[int64] `json:"weight,omitzero"`
// contains filtered or unexported fields
}
The properties Address, ProtocolPort are required.
func (LoadBalancerNewParamsListenerPoolMember) MarshalJSON ¶
func (r LoadBalancerNewParamsListenerPoolMember) MarshalJSON() (data []byte, err error)
func (*LoadBalancerNewParamsListenerPoolMember) UnmarshalJSON ¶
func (r *LoadBalancerNewParamsListenerPoolMember) UnmarshalJSON(data []byte) error
type LoadBalancerNewParamsListenerPoolSessionPersistence ¶
type LoadBalancerNewParamsListenerPoolSessionPersistence struct {
// Session persistence type
//
// Any of "APP_COOKIE", "HTTP_COOKIE", "SOURCE_IP".
Type LbSessionPersistenceType `json:"type,omitzero,required"`
// Should be set if app cookie or http cookie is used
CookieName param.Opt[string] `json:"cookie_name,omitzero"`
// Subnet mask if `source_ip` is used. For UDP ports only
PersistenceGranularity param.Opt[string] `json:"persistence_granularity,omitzero"`
// Session persistence timeout. For UDP ports only
PersistenceTimeout param.Opt[int64] `json:"persistence_timeout,omitzero"`
// contains filtered or unexported fields
}
Session persistence details
The property Type is required.
func (LoadBalancerNewParamsListenerPoolSessionPersistence) MarshalJSON ¶
func (r LoadBalancerNewParamsListenerPoolSessionPersistence) MarshalJSON() (data []byte, err error)
func (*LoadBalancerNewParamsListenerPoolSessionPersistence) UnmarshalJSON ¶
func (r *LoadBalancerNewParamsListenerPoolSessionPersistence) UnmarshalJSON(data []byte) error
type LoadBalancerNewParamsListenerUserList ¶
type LoadBalancerNewParamsListenerUserList struct {
// Encrypted password to auth via Basic Authentication
EncryptedPassword string `json:"encrypted_password,required"`
// Username to auth via Basic Authentication
Username string `json:"username,required"`
// contains filtered or unexported fields
}
The properties EncryptedPassword, Username are required.
func (LoadBalancerNewParamsListenerUserList) MarshalJSON ¶
func (r LoadBalancerNewParamsListenerUserList) MarshalJSON() (data []byte, err error)
func (*LoadBalancerNewParamsListenerUserList) UnmarshalJSON ¶
func (r *LoadBalancerNewParamsListenerUserList) UnmarshalJSON(data []byte) error
type LoadBalancerNewParamsLogging ¶
type LoadBalancerNewParamsLogging struct {
// Destination region id to which the logs will be written
DestinationRegionID param.Opt[int64] `json:"destination_region_id,omitzero"`
// The topic name to which the logs will be written
TopicName param.Opt[string] `json:"topic_name,omitzero"`
// Enable/disable forwarding logs to LaaS
Enabled param.Opt[bool] `json:"enabled,omitzero"`
// The logs retention policy
RetentionPolicy LaasIndexRetentionPolicyParam `json:"retention_policy,omitzero"`
// contains filtered or unexported fields
}
Logging configuration
func (LoadBalancerNewParamsLogging) MarshalJSON ¶
func (r LoadBalancerNewParamsLogging) MarshalJSON() (data []byte, err error)
func (*LoadBalancerNewParamsLogging) UnmarshalJSON ¶
func (r *LoadBalancerNewParamsLogging) UnmarshalJSON(data []byte) error
type LoadBalancerOperatingStatus ¶
type LoadBalancerOperatingStatus string
const ( LoadBalancerOperatingStatusDegraded LoadBalancerOperatingStatus = "DEGRADED" LoadBalancerOperatingStatusDraining LoadBalancerOperatingStatus = "DRAINING" LoadBalancerOperatingStatusError LoadBalancerOperatingStatus = "ERROR" LoadBalancerOperatingStatusNoMonitor LoadBalancerOperatingStatus = "NO_MONITOR" LoadBalancerOperatingStatusOffline LoadBalancerOperatingStatus = "OFFLINE" LoadBalancerOperatingStatusOnline LoadBalancerOperatingStatus = "ONLINE" )
type LoadBalancerPool ¶
type LoadBalancerPool struct {
// Pool ID
ID string `json:"id,required" format:"uuid4"`
// Secret ID of CA certificate bundle
CaSecretID string `json:"ca_secret_id,required" format:"uuid4"`
// Task that created this entity
CreatorTaskID string `json:"creator_task_id,required" format:"uuid4"`
// Secret ID of CA revocation list file
CrlSecretID string `json:"crl_secret_id,required" format:"uuid4"`
// Health monitor parameters
Healthmonitor HealthMonitor `json:"healthmonitor,required"`
// Load balancer algorithm
//
// Any of "LEAST_CONNECTIONS", "ROUND_ROBIN", "SOURCE_IP".
LbAlgorithm LbAlgorithm `json:"lb_algorithm,required"`
// Listeners IDs
Listeners []LoadBalancerPoolListener `json:"listeners,required"`
// Load balancers IDs
Loadbalancers []LoadBalancerPoolLoadbalancer `json:"loadbalancers,required"`
// Pool members
Members []Member `json:"members,required"`
// Pool name
Name string `json:"name,required"`
// Pool operating status
//
// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
OperatingStatus LoadBalancerOperatingStatus `json:"operating_status,required"`
// Protocol
//
// Any of "HTTP", "HTTPS", "PROXY", "PROXYV2", "TCP", "UDP".
Protocol LbPoolProtocol `json:"protocol,required"`
// Pool lifecycle status
//
// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
// "PENDING_UPDATE".
ProvisioningStatus ProvisioningStatus `json:"provisioning_status,required"`
// Secret ID for TLS client authentication to the member servers
SecretID string `json:"secret_id,required" format:"uuid4"`
// Session persistence parameters
SessionPersistence SessionPersistence `json:"session_persistence,required"`
// The UUID of the active task that currently holds a lock on the resource. This
// lock prevents concurrent modifications to ensure consistency. If `null`, the
// resource is not locked.
TaskID string `json:"task_id,required" format:"uuid4"`
// Frontend client inactivity timeout in milliseconds
TimeoutClientData int64 `json:"timeout_client_data,required"`
// Backend member connection timeout in milliseconds
TimeoutMemberConnect int64 `json:"timeout_member_connect,required"`
// Backend member inactivity timeout in milliseconds
TimeoutMemberData int64 `json:"timeout_member_data,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CaSecretID respjson.Field
CreatorTaskID respjson.Field
CrlSecretID respjson.Field
Healthmonitor respjson.Field
LbAlgorithm respjson.Field
Listeners respjson.Field
Loadbalancers respjson.Field
Members respjson.Field
Name respjson.Field
OperatingStatus respjson.Field
Protocol respjson.Field
ProvisioningStatus respjson.Field
SecretID respjson.Field
SessionPersistence respjson.Field
TaskID respjson.Field
TimeoutClientData respjson.Field
TimeoutMemberConnect respjson.Field
TimeoutMemberData respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancerPool) RawJSON ¶
func (r LoadBalancerPool) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerPool) UnmarshalJSON ¶
func (r *LoadBalancerPool) UnmarshalJSON(data []byte) error
type LoadBalancerPoolHealthMonitorNewParams ¶
type LoadBalancerPoolHealthMonitorNewParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// The time, in seconds, between sending probes to members
Delay int64 `json:"delay,required"`
// Number of successes before the member is switched to ONLINE state
MaxRetries int64 `json:"max_retries,required"`
// The maximum time to connect. Must be less than the delay value
Timeout int64 `json:"timeout,required"`
// Health monitor type. Once health monitor is created, cannot be changed.
//
// Any of "HTTP", "HTTPS", "K8S", "PING", "TCP", "TLS-HELLO", "UDP-CONNECT".
Type LbHealthMonitorType `json:"type,omitzero,required"`
// Can only be used together with `HTTP` or `HTTPS` health monitor type.
ExpectedCodes param.Opt[string] `json:"expected_codes,omitzero"`
// Number of failures before the member is switched to ERROR state.
MaxRetriesDown param.Opt[int64] `json:"max_retries_down,omitzero"`
// URL Path. Defaults to '/'. Can only be used together with `HTTP` or `HTTPS`
// health monitor type.
URLPath param.Opt[string] `json:"url_path,omitzero"`
// HTTP method. Can only be used together with `HTTP` or `HTTPS` health monitor
// type.
//
// Any of "CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT",
// "TRACE".
HTTPMethod HTTPMethod `json:"http_method,omitzero"`
// contains filtered or unexported fields
}
func (LoadBalancerPoolHealthMonitorNewParams) MarshalJSON ¶
func (r LoadBalancerPoolHealthMonitorNewParams) MarshalJSON() (data []byte, err error)
func (*LoadBalancerPoolHealthMonitorNewParams) UnmarshalJSON ¶
func (r *LoadBalancerPoolHealthMonitorNewParams) UnmarshalJSON(data []byte) error
type LoadBalancerPoolHealthMonitorService ¶
type LoadBalancerPoolHealthMonitorService struct {
Options []option.RequestOption
}
LoadBalancerPoolHealthMonitorService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLoadBalancerPoolHealthMonitorService method instead.
func NewLoadBalancerPoolHealthMonitorService ¶
func NewLoadBalancerPoolHealthMonitorService(opts ...option.RequestOption) (r LoadBalancerPoolHealthMonitorService)
NewLoadBalancerPoolHealthMonitorService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LoadBalancerPoolHealthMonitorService) Delete ¶
func (r *LoadBalancerPoolHealthMonitorService) Delete(ctx context.Context, poolID string, body LoadBalancerPoolHealthMonitorDeleteParams, opts ...option.RequestOption) (err error)
Delete load balancer pool health monitor
func (*LoadBalancerPoolHealthMonitorService) New ¶
func (r *LoadBalancerPoolHealthMonitorService) New(ctx context.Context, poolID string, params LoadBalancerPoolHealthMonitorNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Create load balancer pool health monitor
type LoadBalancerPoolList ¶
type LoadBalancerPoolList struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []LoadBalancerPoolListResult `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancerPoolList) RawJSON ¶
func (r LoadBalancerPoolList) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerPoolList) UnmarshalJSON ¶
func (r *LoadBalancerPoolList) UnmarshalJSON(data []byte) error
type LoadBalancerPoolListParams ¶
type LoadBalancerPoolListParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Show members and Health Monitor details
Details param.Opt[bool] `query:"details,omitzero" json:"-"`
// Listener ID
ListenerID param.Opt[string] `query:"listener_id,omitzero" format:"uuid4" json:"-"`
// Load Balancer ID
LoadbalancerID param.Opt[string] `query:"loadbalancer_id,omitzero" format:"uuid4" json:"-"`
// contains filtered or unexported fields
}
func (LoadBalancerPoolListParams) URLQuery ¶
func (r LoadBalancerPoolListParams) URLQuery() (v url.Values, err error)
URLQuery serializes LoadBalancerPoolListParams's query parameters as `url.Values`.
type LoadBalancerPoolListResult ¶ added in v0.2.0
type LoadBalancerPoolListResult struct {
// Pool ID
ID string `json:"id,required" format:"uuid4"`
// Secret ID of CA certificate bundle
CaSecretID string `json:"ca_secret_id,required" format:"uuid4"`
// Task that created this entity
CreatorTaskID string `json:"creator_task_id,required" format:"uuid4"`
// Secret ID of CA revocation list file
CrlSecretID string `json:"crl_secret_id,required" format:"uuid4"`
// Health monitor parameters
Healthmonitor HealthMonitor `json:"healthmonitor,required"`
// Load balancer algorithm
//
// Any of "LEAST_CONNECTIONS", "ROUND_ROBIN", "SOURCE_IP".
LbAlgorithm LbAlgorithm `json:"lb_algorithm,required"`
// Listeners IDs
Listeners []LoadBalancerPoolListResultListener `json:"listeners,required"`
// Load balancers IDs
Loadbalancers []LoadBalancerPoolListResultLoadbalancer `json:"loadbalancers,required"`
// Pool members
Members []LoadBalancerPoolListResultMemberUnion `json:"members,required"`
// Pool name
Name string `json:"name,required"`
// Pool operating status
//
// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
OperatingStatus LoadBalancerOperatingStatus `json:"operating_status,required"`
// Protocol
//
// Any of "HTTP", "HTTPS", "PROXY", "PROXYV2", "TCP", "UDP".
Protocol LbPoolProtocol `json:"protocol,required"`
// Pool lifecycle status
//
// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
// "PENDING_UPDATE".
ProvisioningStatus ProvisioningStatus `json:"provisioning_status,required"`
// Secret ID for TLS client authentication to the member servers
SecretID string `json:"secret_id,required" format:"uuid4"`
// Session persistence parameters
SessionPersistence SessionPersistence `json:"session_persistence,required"`
// The UUID of the active task that currently holds a lock on the resource. This
// lock prevents concurrent modifications to ensure consistency. If `null`, the
// resource is not locked.
TaskID string `json:"task_id,required" format:"uuid4"`
// Frontend client inactivity timeout in milliseconds
TimeoutClientData int64 `json:"timeout_client_data,required"`
// Backend member connection timeout in milliseconds
TimeoutMemberConnect int64 `json:"timeout_member_connect,required"`
// Backend member inactivity timeout in milliseconds
TimeoutMemberData int64 `json:"timeout_member_data,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CaSecretID respjson.Field
CreatorTaskID respjson.Field
CrlSecretID respjson.Field
Healthmonitor respjson.Field
LbAlgorithm respjson.Field
Listeners respjson.Field
Loadbalancers respjson.Field
Members respjson.Field
Name respjson.Field
OperatingStatus respjson.Field
Protocol respjson.Field
ProvisioningStatus respjson.Field
SecretID respjson.Field
SessionPersistence respjson.Field
TaskID respjson.Field
TimeoutClientData respjson.Field
TimeoutMemberConnect respjson.Field
TimeoutMemberData respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancerPoolListResult) RawJSON ¶ added in v0.2.0
func (r LoadBalancerPoolListResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerPoolListResult) UnmarshalJSON ¶ added in v0.2.0
func (r *LoadBalancerPoolListResult) UnmarshalJSON(data []byte) error
type LoadBalancerPoolListResultListener ¶ added in v0.2.0
type LoadBalancerPoolListResultListener struct {
// Resource ID
ID string `json:"id,required" format:"uuid4"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancerPoolListResultListener) RawJSON ¶ added in v0.2.0
func (r LoadBalancerPoolListResultListener) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerPoolListResultListener) UnmarshalJSON ¶ added in v0.2.0
func (r *LoadBalancerPoolListResultListener) UnmarshalJSON(data []byte) error
type LoadBalancerPoolListResultLoadbalancer ¶ added in v0.2.0
type LoadBalancerPoolListResultLoadbalancer struct {
// Resource ID
ID string `json:"id,required" format:"uuid4"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancerPoolListResultLoadbalancer) RawJSON ¶ added in v0.2.0
func (r LoadBalancerPoolListResultLoadbalancer) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerPoolListResultLoadbalancer) UnmarshalJSON ¶ added in v0.2.0
func (r *LoadBalancerPoolListResultLoadbalancer) UnmarshalJSON(data []byte) error
type LoadBalancerPoolListResultMemberLbPoolMemberSerializer ¶ added in v0.2.0
type LoadBalancerPoolListResultMemberLbPoolMemberSerializer struct {
// Member ID must be provided if an existing member is being updated
ID string `json:"id,required" format:"uuid4"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancerPoolListResultMemberLbPoolMemberSerializer) RawJSON ¶ added in v0.2.0
func (r LoadBalancerPoolListResultMemberLbPoolMemberSerializer) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerPoolListResultMemberLbPoolMemberSerializer) UnmarshalJSON ¶ added in v0.2.0
func (r *LoadBalancerPoolListResultMemberLbPoolMemberSerializer) UnmarshalJSON(data []byte) error
type LoadBalancerPoolListResultMemberUnion ¶ added in v0.2.0
type LoadBalancerPoolListResultMemberUnion struct {
ID string `json:"id"`
// This field is from variant [Member].
Address string `json:"address"`
// This field is from variant [Member].
AdminStateUp bool `json:"admin_state_up"`
// This field is from variant [Member].
OperatingStatus LoadBalancerOperatingStatus `json:"operating_status"`
// This field is from variant [Member].
ProtocolPort int64 `json:"protocol_port"`
// This field is from variant [Member].
ProvisioningStatus ProvisioningStatus `json:"provisioning_status"`
// This field is from variant [Member].
Weight int64 `json:"weight"`
// This field is from variant [Member].
MonitorAddress string `json:"monitor_address"`
// This field is from variant [Member].
MonitorPort int64 `json:"monitor_port"`
// This field is from variant [Member].
SubnetID string `json:"subnet_id"`
JSON struct {
ID respjson.Field
Address respjson.Field
AdminStateUp respjson.Field
OperatingStatus respjson.Field
ProtocolPort respjson.Field
ProvisioningStatus respjson.Field
Weight respjson.Field
MonitorAddress respjson.Field
MonitorPort respjson.Field
SubnetID respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
LoadBalancerPoolListResultMemberUnion contains all possible properties and values from LoadBalancerPoolListResultMemberLbPoolMemberSerializer, Member.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (LoadBalancerPoolListResultMemberUnion) AsDetailedLbPoolMemberSerializer ¶ added in v0.2.0
func (u LoadBalancerPoolListResultMemberUnion) AsDetailedLbPoolMemberSerializer() (v Member)
func (LoadBalancerPoolListResultMemberUnion) AsLbPoolMemberSerializer ¶ added in v0.2.0
func (u LoadBalancerPoolListResultMemberUnion) AsLbPoolMemberSerializer() (v LoadBalancerPoolListResultMemberLbPoolMemberSerializer)
func (LoadBalancerPoolListResultMemberUnion) RawJSON ¶ added in v0.2.0
func (u LoadBalancerPoolListResultMemberUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerPoolListResultMemberUnion) UnmarshalJSON ¶ added in v0.2.0
func (r *LoadBalancerPoolListResultMemberUnion) UnmarshalJSON(data []byte) error
type LoadBalancerPoolListener ¶
type LoadBalancerPoolListener struct {
// Resource ID
ID string `json:"id,required" format:"uuid4"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancerPoolListener) RawJSON ¶
func (r LoadBalancerPoolListener) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerPoolListener) UnmarshalJSON ¶
func (r *LoadBalancerPoolListener) UnmarshalJSON(data []byte) error
type LoadBalancerPoolLoadbalancer ¶
type LoadBalancerPoolLoadbalancer struct {
// Resource ID
ID string `json:"id,required" format:"uuid4"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancerPoolLoadbalancer) RawJSON ¶
func (r LoadBalancerPoolLoadbalancer) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerPoolLoadbalancer) UnmarshalJSON ¶
func (r *LoadBalancerPoolLoadbalancer) UnmarshalJSON(data []byte) error
type LoadBalancerPoolMemberAddParams ¶
type LoadBalancerPoolMemberAddParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Member IP address
Address string `json:"address,required" format:"ipvanyaddress"`
// Member IP port
ProtocolPort int64 `json:"protocol_port,required"`
// Administrative state of the resource. When set to true, the resource is enabled
// and operational. When set to false, the resource is disabled and will not
// process traffic. When null is passed, the value is skipped and defaults to true.
AdminStateUp param.Opt[bool] `json:"admin_state_up,omitzero"`
// Either `subnet_id` or `instance_id` should be provided
InstanceID param.Opt[string] `json:"instance_id,omitzero" format:"uuid4"`
// An alternate IP address used for health monitoring of a backend member. Default
// is null which monitors the member address.
MonitorAddress param.Opt[string] `json:"monitor_address,omitzero" format:"ipvanyaddress"`
// An alternate protocol port used for health monitoring of a backend member.
// Default is null which monitors the member `protocol_port`.
MonitorPort param.Opt[int64] `json:"monitor_port,omitzero"`
// Either `subnet_id` or `instance_id` should be provided
SubnetID param.Opt[string] `json:"subnet_id,omitzero" format:"uuid4"`
// Member weight. Valid values: 0 to 256, defaults to 1
Weight param.Opt[int64] `json:"weight,omitzero"`
// contains filtered or unexported fields
}
func (LoadBalancerPoolMemberAddParams) MarshalJSON ¶
func (r LoadBalancerPoolMemberAddParams) MarshalJSON() (data []byte, err error)
func (*LoadBalancerPoolMemberAddParams) UnmarshalJSON ¶
func (r *LoadBalancerPoolMemberAddParams) UnmarshalJSON(data []byte) error
type LoadBalancerPoolMemberRemoveParams ¶
type LoadBalancerPoolMemberRemoveParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Pool ID
PoolID string `path:"pool_id,required" format:"uuid4" json:"-"`
// contains filtered or unexported fields
}
type LoadBalancerPoolMemberService ¶
type LoadBalancerPoolMemberService struct {
Options []option.RequestOption
}
LoadBalancerPoolMemberService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLoadBalancerPoolMemberService method instead.
func NewLoadBalancerPoolMemberService ¶
func NewLoadBalancerPoolMemberService(opts ...option.RequestOption) (r LoadBalancerPoolMemberService)
NewLoadBalancerPoolMemberService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LoadBalancerPoolMemberService) Add ¶
func (r *LoadBalancerPoolMemberService) Add(ctx context.Context, poolID string, params LoadBalancerPoolMemberAddParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Create load balancer pool member
func (*LoadBalancerPoolMemberService) Remove ¶
func (r *LoadBalancerPoolMemberService) Remove(ctx context.Context, memberID string, body LoadBalancerPoolMemberRemoveParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Delete load balancer pool member
type LoadBalancerPoolNewParams ¶
type LoadBalancerPoolNewParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Load balancer algorithm
//
// Any of "LEAST_CONNECTIONS", "ROUND_ROBIN", "SOURCE_IP".
LbAlgorithm LbAlgorithm `json:"lb_algorithm,omitzero,required"`
// Pool name
Name string `json:"name,required"`
// Protocol
//
// Any of "HTTP", "HTTPS", "PROXY", "PROXYV2", "TCP", "UDP".
Protocol LbPoolProtocol `json:"protocol,omitzero,required"`
// Secret ID of CA certificate bundle
CaSecretID param.Opt[string] `json:"ca_secret_id,omitzero" format:"uuid4"`
// Secret ID of CA revocation list file
CrlSecretID param.Opt[string] `json:"crl_secret_id,omitzero" format:"uuid4"`
// Listener ID
ListenerID param.Opt[string] `json:"listener_id,omitzero" format:"uuid4"`
// Loadbalancer ID
LoadbalancerID param.Opt[string] `json:"loadbalancer_id,omitzero" format:"uuid4"`
// Secret ID for TLS client authentication to the member servers
SecretID param.Opt[string] `json:"secret_id,omitzero" format:"uuid4"`
// Frontend client inactivity timeout in milliseconds
TimeoutClientData param.Opt[int64] `json:"timeout_client_data,omitzero"`
// Backend member connection timeout in milliseconds
TimeoutMemberConnect param.Opt[int64] `json:"timeout_member_connect,omitzero"`
// Backend member inactivity timeout in milliseconds
TimeoutMemberData param.Opt[int64] `json:"timeout_member_data,omitzero"`
// Health monitor details
Healthmonitor LoadBalancerPoolNewParamsHealthmonitor `json:"healthmonitor,omitzero"`
// Pool members
Members []LoadBalancerPoolNewParamsMember `json:"members,omitzero"`
// Session persistence details
SessionPersistence LoadBalancerPoolNewParamsSessionPersistence `json:"session_persistence,omitzero"`
// contains filtered or unexported fields
}
func (LoadBalancerPoolNewParams) MarshalJSON ¶
func (r LoadBalancerPoolNewParams) MarshalJSON() (data []byte, err error)
func (*LoadBalancerPoolNewParams) UnmarshalJSON ¶
func (r *LoadBalancerPoolNewParams) UnmarshalJSON(data []byte) error
type LoadBalancerPoolNewParamsHealthmonitor ¶
type LoadBalancerPoolNewParamsHealthmonitor struct {
// The time, in seconds, between sending probes to members
Delay int64 `json:"delay,required"`
// Number of successes before the member is switched to ONLINE state
MaxRetries int64 `json:"max_retries,required"`
// The maximum time to connect. Must be less than the delay value
Timeout int64 `json:"timeout,required"`
// Health monitor type. Once health monitor is created, cannot be changed.
//
// Any of "HTTP", "HTTPS", "K8S", "PING", "TCP", "TLS-HELLO", "UDP-CONNECT".
Type LbHealthMonitorType `json:"type,omitzero,required"`
// Can only be used together with `HTTP` or `HTTPS` health monitor type.
ExpectedCodes param.Opt[string] `json:"expected_codes,omitzero"`
// Number of failures before the member is switched to ERROR state.
MaxRetriesDown param.Opt[int64] `json:"max_retries_down,omitzero"`
// URL Path. Defaults to '/'. Can only be used together with `HTTP` or `HTTPS`
// health monitor type.
URLPath param.Opt[string] `json:"url_path,omitzero"`
// HTTP method. Can only be used together with `HTTP` or `HTTPS` health monitor
// type.
//
// Any of "CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT",
// "TRACE".
HTTPMethod HTTPMethod `json:"http_method,omitzero"`
// contains filtered or unexported fields
}
Health monitor details
The properties Delay, MaxRetries, Timeout, Type are required.
func (LoadBalancerPoolNewParamsHealthmonitor) MarshalJSON ¶
func (r LoadBalancerPoolNewParamsHealthmonitor) MarshalJSON() (data []byte, err error)
func (*LoadBalancerPoolNewParamsHealthmonitor) UnmarshalJSON ¶
func (r *LoadBalancerPoolNewParamsHealthmonitor) UnmarshalJSON(data []byte) error
type LoadBalancerPoolNewParamsMember ¶
type LoadBalancerPoolNewParamsMember struct {
// Member IP address
Address string `json:"address,required" format:"ipvanyaddress"`
// Member IP port
ProtocolPort int64 `json:"protocol_port,required"`
// Administrative state of the resource. When set to true, the resource is enabled
// and operational. When set to false, the resource is disabled and will not
// process traffic. When null is passed, the value is skipped and defaults to true.
AdminStateUp param.Opt[bool] `json:"admin_state_up,omitzero"`
// Either `subnet_id` or `instance_id` should be provided
InstanceID param.Opt[string] `json:"instance_id,omitzero" format:"uuid4"`
// An alternate IP address used for health monitoring of a backend member. Default
// is null which monitors the member address.
MonitorAddress param.Opt[string] `json:"monitor_address,omitzero" format:"ipvanyaddress"`
// An alternate protocol port used for health monitoring of a backend member.
// Default is null which monitors the member `protocol_port`.
MonitorPort param.Opt[int64] `json:"monitor_port,omitzero"`
// Either `subnet_id` or `instance_id` should be provided
SubnetID param.Opt[string] `json:"subnet_id,omitzero" format:"uuid4"`
// Member weight. Valid values: 0 to 256, defaults to 1
Weight param.Opt[int64] `json:"weight,omitzero"`
// contains filtered or unexported fields
}
The properties Address, ProtocolPort are required.
func (LoadBalancerPoolNewParamsMember) MarshalJSON ¶
func (r LoadBalancerPoolNewParamsMember) MarshalJSON() (data []byte, err error)
func (*LoadBalancerPoolNewParamsMember) UnmarshalJSON ¶
func (r *LoadBalancerPoolNewParamsMember) UnmarshalJSON(data []byte) error
type LoadBalancerPoolNewParamsSessionPersistence ¶
type LoadBalancerPoolNewParamsSessionPersistence struct {
// Session persistence type
//
// Any of "APP_COOKIE", "HTTP_COOKIE", "SOURCE_IP".
Type LbSessionPersistenceType `json:"type,omitzero,required"`
// Should be set if app cookie or http cookie is used
CookieName param.Opt[string] `json:"cookie_name,omitzero"`
// Subnet mask if `source_ip` is used. For UDP ports only
PersistenceGranularity param.Opt[string] `json:"persistence_granularity,omitzero"`
// Session persistence timeout. For UDP ports only
PersistenceTimeout param.Opt[int64] `json:"persistence_timeout,omitzero"`
// contains filtered or unexported fields
}
Session persistence details
The property Type is required.
func (LoadBalancerPoolNewParamsSessionPersistence) MarshalJSON ¶
func (r LoadBalancerPoolNewParamsSessionPersistence) MarshalJSON() (data []byte, err error)
func (*LoadBalancerPoolNewParamsSessionPersistence) UnmarshalJSON ¶
func (r *LoadBalancerPoolNewParamsSessionPersistence) UnmarshalJSON(data []byte) error
type LoadBalancerPoolService ¶
type LoadBalancerPoolService struct {
Options []option.RequestOption
HealthMonitors LoadBalancerPoolHealthMonitorService
Members LoadBalancerPoolMemberService
// contains filtered or unexported fields
}
LoadBalancerPoolService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLoadBalancerPoolService method instead.
func NewLoadBalancerPoolService ¶
func NewLoadBalancerPoolService(opts ...option.RequestOption) (r LoadBalancerPoolService)
NewLoadBalancerPoolService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LoadBalancerPoolService) Delete ¶
func (r *LoadBalancerPoolService) Delete(ctx context.Context, poolID string, body LoadBalancerPoolDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Delete load balancer pool
func (*LoadBalancerPoolService) DeleteAndPoll ¶ added in v0.2.0
func (r *LoadBalancerPoolService) DeleteAndPoll(ctx context.Context, poolID string, params LoadBalancerPoolDeleteParams, opts ...option.RequestOption) error
DeleteAndPoll deletes a pool and polls for completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
func (*LoadBalancerPoolService) Get ¶
func (r *LoadBalancerPoolService) Get(ctx context.Context, poolID string, query LoadBalancerPoolGetParams, opts ...option.RequestOption) (res *LoadBalancerPool, err error)
Get load balancer pool
func (*LoadBalancerPoolService) List ¶
func (r *LoadBalancerPoolService) List(ctx context.Context, params LoadBalancerPoolListParams, opts ...option.RequestOption) (res *LoadBalancerPoolList, err error)
List load balancer pools
func (*LoadBalancerPoolService) New ¶
func (r *LoadBalancerPoolService) New(ctx context.Context, params LoadBalancerPoolNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Create load balancer pool
func (*LoadBalancerPoolService) NewAndPoll ¶ added in v0.2.0
func (r *LoadBalancerPoolService) NewAndPoll(ctx context.Context, params LoadBalancerPoolNewParams, opts ...option.RequestOption) (v *LoadBalancerPool, err error)
NewAndPoll creates a new pool and polls for completion
func (*LoadBalancerPoolService) Update ¶
func (r *LoadBalancerPoolService) Update(ctx context.Context, poolID string, params LoadBalancerPoolUpdateParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Changes provided here will overwrite existing load balancer pool settings. Undefined fields will be kept as is. Complex objects need to be specified fully, they will be overwritten.
func (*LoadBalancerPoolService) UpdateAndPoll ¶ added in v0.2.0
func (r *LoadBalancerPoolService) UpdateAndPoll(ctx context.Context, poolID string, params LoadBalancerPoolUpdateParams, opts ...option.RequestOption) (v *LoadBalancerPool, err error)
UpdateAndPoll updates a pool and polls for completion of the first task. Use the TaskService.Poll method if you // need to poll for all tasks.
type LoadBalancerPoolUpdateParams ¶
type LoadBalancerPoolUpdateParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Secret ID of CA certificate bundle
CaSecretID param.Opt[string] `json:"ca_secret_id,omitzero" format:"uuid4"`
// Secret ID of CA revocation list file
CrlSecretID param.Opt[string] `json:"crl_secret_id,omitzero" format:"uuid4"`
// Secret ID for TLS client authentication to the member servers
SecretID param.Opt[string] `json:"secret_id,omitzero" format:"uuid4"`
// Frontend client inactivity timeout in milliseconds
TimeoutClientData param.Opt[int64] `json:"timeout_client_data,omitzero"`
// Backend member connection timeout in milliseconds
TimeoutMemberConnect param.Opt[int64] `json:"timeout_member_connect,omitzero"`
// Backend member inactivity timeout in milliseconds
TimeoutMemberData param.Opt[int64] `json:"timeout_member_data,omitzero"`
// New pool name
Name param.Opt[string] `json:"name,omitzero"`
// New pool health monitor settings
Healthmonitor LoadBalancerPoolUpdateParamsHealthmonitor `json:"healthmonitor,omitzero"`
// New sequence of load balancer pool members. If members are the same (by
// address + port), they will be kept as is without recreation and downtime.
Members []LoadBalancerPoolUpdateParamsMember `json:"members,omitzero"`
// New session persistence settings
SessionPersistence LoadBalancerPoolUpdateParamsSessionPersistence `json:"session_persistence,omitzero"`
// New load balancer pool algorithm of how to distribute requests
//
// Any of "LEAST_CONNECTIONS", "ROUND_ROBIN", "SOURCE_IP".
LbAlgorithm LbAlgorithm `json:"lb_algorithm,omitzero"`
// New communication protocol
//
// Any of "HTTP", "HTTPS", "PROXY", "PROXYV2", "TCP", "UDP".
Protocol LbPoolProtocol `json:"protocol,omitzero"`
// contains filtered or unexported fields
}
func (LoadBalancerPoolUpdateParams) MarshalJSON ¶
func (r LoadBalancerPoolUpdateParams) MarshalJSON() (data []byte, err error)
func (*LoadBalancerPoolUpdateParams) UnmarshalJSON ¶
func (r *LoadBalancerPoolUpdateParams) UnmarshalJSON(data []byte) error
type LoadBalancerPoolUpdateParamsHealthmonitor ¶
type LoadBalancerPoolUpdateParamsHealthmonitor struct {
// The time, in seconds, between sending probes to members
Delay int64 `json:"delay,required"`
// Number of successes before the member is switched to ONLINE state
MaxRetries int64 `json:"max_retries,required"`
// The maximum time to connect. Must be less than the delay value
Timeout int64 `json:"timeout,required"`
// Can only be used together with `HTTP` or `HTTPS` health monitor type.
ExpectedCodes param.Opt[string] `json:"expected_codes,omitzero"`
// Number of failures before the member is switched to ERROR state.
MaxRetriesDown param.Opt[int64] `json:"max_retries_down,omitzero"`
// URL Path. Defaults to '/'. Can only be used together with `HTTP` or `HTTPS`
// health monitor type.
URLPath param.Opt[string] `json:"url_path,omitzero"`
// HTTP method. Can only be used together with `HTTP` or `HTTPS` health monitor
// type.
//
// Any of "CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT",
// "TRACE".
HTTPMethod HTTPMethod `json:"http_method,omitzero"`
// Health monitor type. Once health monitor is created, cannot be changed.
//
// Any of "HTTP", "HTTPS", "K8S", "PING", "TCP", "TLS-HELLO", "UDP-CONNECT".
Type LbHealthMonitorType `json:"type,omitzero"`
// contains filtered or unexported fields
}
New pool health monitor settings
The properties Delay, MaxRetries, Timeout are required.
func (LoadBalancerPoolUpdateParamsHealthmonitor) MarshalJSON ¶
func (r LoadBalancerPoolUpdateParamsHealthmonitor) MarshalJSON() (data []byte, err error)
func (*LoadBalancerPoolUpdateParamsHealthmonitor) UnmarshalJSON ¶
func (r *LoadBalancerPoolUpdateParamsHealthmonitor) UnmarshalJSON(data []byte) error
type LoadBalancerPoolUpdateParamsMember ¶
type LoadBalancerPoolUpdateParamsMember struct {
// Member IP address
Address string `json:"address,required" format:"ipvanyaddress"`
// Member IP port
ProtocolPort int64 `json:"protocol_port,required"`
// Administrative state of the resource. When set to true, the resource is enabled
// and operational. When set to false, the resource is disabled and will not
// process traffic. When null is passed, the value is skipped and defaults to true.
AdminStateUp param.Opt[bool] `json:"admin_state_up,omitzero"`
// Either `subnet_id` or `instance_id` should be provided
InstanceID param.Opt[string] `json:"instance_id,omitzero" format:"uuid4"`
// An alternate IP address used for health monitoring of a backend member. Default
// is null which monitors the member address.
MonitorAddress param.Opt[string] `json:"monitor_address,omitzero" format:"ipvanyaddress"`
// An alternate protocol port used for health monitoring of a backend member.
// Default is null which monitors the member `protocol_port`.
MonitorPort param.Opt[int64] `json:"monitor_port,omitzero"`
// Either `subnet_id` or `instance_id` should be provided
SubnetID param.Opt[string] `json:"subnet_id,omitzero" format:"uuid4"`
// Member weight. Valid values: 0 to 256, defaults to 1
Weight param.Opt[int64] `json:"weight,omitzero"`
// contains filtered or unexported fields
}
The properties Address, ProtocolPort are required.
func (LoadBalancerPoolUpdateParamsMember) MarshalJSON ¶
func (r LoadBalancerPoolUpdateParamsMember) MarshalJSON() (data []byte, err error)
func (*LoadBalancerPoolUpdateParamsMember) UnmarshalJSON ¶
func (r *LoadBalancerPoolUpdateParamsMember) UnmarshalJSON(data []byte) error
type LoadBalancerPoolUpdateParamsSessionPersistence ¶
type LoadBalancerPoolUpdateParamsSessionPersistence struct {
// Session persistence type
//
// Any of "APP_COOKIE", "HTTP_COOKIE", "SOURCE_IP".
Type LbSessionPersistenceType `json:"type,omitzero,required"`
// Should be set if app cookie or http cookie is used
CookieName param.Opt[string] `json:"cookie_name,omitzero"`
// Subnet mask if `source_ip` is used. For UDP ports only
PersistenceGranularity param.Opt[string] `json:"persistence_granularity,omitzero"`
// Session persistence timeout. For UDP ports only
PersistenceTimeout param.Opt[int64] `json:"persistence_timeout,omitzero"`
// contains filtered or unexported fields
}
New session persistence settings
The property Type is required.
func (LoadBalancerPoolUpdateParamsSessionPersistence) MarshalJSON ¶
func (r LoadBalancerPoolUpdateParamsSessionPersistence) MarshalJSON() (data []byte, err error)
func (*LoadBalancerPoolUpdateParamsSessionPersistence) UnmarshalJSON ¶
func (r *LoadBalancerPoolUpdateParamsSessionPersistence) UnmarshalJSON(data []byte) error
type LoadBalancerResizeParams ¶
type LoadBalancerResizeParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Name of the desired flavor to resize to.
Flavor string `json:"flavor,required"`
// contains filtered or unexported fields
}
func (LoadBalancerResizeParams) MarshalJSON ¶
func (r LoadBalancerResizeParams) MarshalJSON() (data []byte, err error)
func (*LoadBalancerResizeParams) UnmarshalJSON ¶
func (r *LoadBalancerResizeParams) UnmarshalJSON(data []byte) error
type LoadBalancerService ¶
type LoadBalancerService struct {
Options []option.RequestOption
L7Policies LoadBalancerL7PolicyService
Flavors LoadBalancerFlavorService
Listeners LoadBalancerListenerService
Pools LoadBalancerPoolService
Metrics LoadBalancerMetricService
Statuses LoadBalancerStatusService
// contains filtered or unexported fields
}
LoadBalancerService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLoadBalancerService method instead.
func NewLoadBalancerService ¶
func NewLoadBalancerService(opts ...option.RequestOption) (r LoadBalancerService)
NewLoadBalancerService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LoadBalancerService) Delete ¶
func (r *LoadBalancerService) Delete(ctx context.Context, loadbalancerID string, body LoadBalancerDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Delete load balancer
func (*LoadBalancerService) DeleteAndPoll ¶ added in v0.2.0
func (r *LoadBalancerService) DeleteAndPoll(ctx context.Context, loadbalancerID string, params LoadBalancerDeleteParams, opts ...option.RequestOption) error
DeleteAndPoll delete load balancer and poll for completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
func (*LoadBalancerService) Failover ¶
func (r *LoadBalancerService) Failover(ctx context.Context, loadbalancerID string, params LoadBalancerFailoverParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Failover load balancer
func (*LoadBalancerService) FailoverAndPoll ¶ added in v0.2.0
func (r *LoadBalancerService) FailoverAndPoll(ctx context.Context, loadbalancerID string, params LoadBalancerFailoverParams, opts ...option.RequestOption) (v *LoadBalancer, err error)
FailoverAndPoll failover load balancer and poll for completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
func (*LoadBalancerService) Get ¶
func (r *LoadBalancerService) Get(ctx context.Context, loadbalancerID string, params LoadBalancerGetParams, opts ...option.RequestOption) (res *LoadBalancer, err error)
Get load balancer
func (*LoadBalancerService) List ¶
func (r *LoadBalancerService) List(ctx context.Context, params LoadBalancerListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[LoadBalancer], err error)
List load balancers
func (*LoadBalancerService) ListAutoPaging ¶
func (r *LoadBalancerService) ListAutoPaging(ctx context.Context, params LoadBalancerListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[LoadBalancer]
List load balancers
func (*LoadBalancerService) New ¶
func (r *LoadBalancerService) New(ctx context.Context, params LoadBalancerNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Create load balancer
func (*LoadBalancerService) NewAndPoll ¶ added in v0.2.0
func (r *LoadBalancerService) NewAndPoll(ctx context.Context, params LoadBalancerNewParams, opts ...option.RequestOption) (v *LoadBalancer, err error)
NewAndPoll create load balancer and poll for the result
func (*LoadBalancerService) Resize ¶
func (r *LoadBalancerService) Resize(ctx context.Context, loadbalancerID string, params LoadBalancerResizeParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Resize load balancer
func (*LoadBalancerService) ResizeAndPoll ¶ added in v0.2.0
func (r *LoadBalancerService) ResizeAndPoll(ctx context.Context, loadbalancerID string, params LoadBalancerResizeParams, opts ...option.RequestOption) (v *LoadBalancer, err error)
ResizeAndPoll resize load balancer and poll for completion of the first task. Use the TaskService.Poll method if you need to poll for all tasks.
func (*LoadBalancerService) Update ¶
func (r *LoadBalancerService) Update(ctx context.Context, loadbalancerID string, params LoadBalancerUpdateParams, opts ...option.RequestOption) (res *LoadBalancer, err error)
Rename load balancer, activate/deactivate logging, update preferred connectivity type and/or modify load balancer tags. The request will only process the fields that are provided in the request body. Any fields that are not included will remain unchanged.
type LoadBalancerStatistics ¶
type LoadBalancerStatistics struct {
// Currently active connections
ActiveConnections int64 `json:"active_connections,required"`
// Total bytes received
BytesIn int64 `json:"bytes_in,required"`
// Total bytes sent
BytesOut int64 `json:"bytes_out,required"`
// Total requests that were unable to be fulfilled
RequestErrors int64 `json:"request_errors,required"`
// Total connections handled
TotalConnections int64 `json:"total_connections,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActiveConnections respjson.Field
BytesIn respjson.Field
BytesOut respjson.Field
RequestErrors respjson.Field
TotalConnections respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancerStatistics) RawJSON ¶
func (r LoadBalancerStatistics) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerStatistics) UnmarshalJSON ¶
func (r *LoadBalancerStatistics) UnmarshalJSON(data []byte) error
type LoadBalancerStatus ¶
type LoadBalancerStatus struct {
// UUID of the entity
ID string `json:"id,required" format:"uuid"`
// Listeners of the Load Balancer
Listeners []ListenerStatus `json:"listeners,required"`
// Name of the load balancer
Name string `json:"name,required"`
// Operating status of the entity
//
// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
OperatingStatus LoadBalancerOperatingStatus `json:"operating_status,required"`
// Provisioning status of the entity
//
// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
// "PENDING_UPDATE".
ProvisioningStatus ProvisioningStatus `json:"provisioning_status,required"`
// List of key-value tags associated with the resource. A tag is a key-value pair
// that can be associated with a resource, enabling efficient filtering and
// grouping for better organization and management. Some tags are read-only and
// cannot be modified by the user. Tags are also integrated with cost reports,
// allowing cost data to be filtered based on tag keys or values.
Tags []Tag `json:"tags"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Listeners respjson.Field
Name respjson.Field
OperatingStatus respjson.Field
ProvisioningStatus respjson.Field
Tags respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancerStatus) RawJSON ¶
func (r LoadBalancerStatus) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerStatus) UnmarshalJSON ¶
func (r *LoadBalancerStatus) UnmarshalJSON(data []byte) error
type LoadBalancerStatusList ¶
type LoadBalancerStatusList struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []LoadBalancerStatus `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancerStatusList) RawJSON ¶
func (r LoadBalancerStatusList) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerStatusList) UnmarshalJSON ¶
func (r *LoadBalancerStatusList) UnmarshalJSON(data []byte) error
type LoadBalancerStatusService ¶
type LoadBalancerStatusService struct {
Options []option.RequestOption
}
LoadBalancerStatusService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLoadBalancerStatusService method instead.
func NewLoadBalancerStatusService ¶
func NewLoadBalancerStatusService(opts ...option.RequestOption) (r LoadBalancerStatusService)
NewLoadBalancerStatusService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LoadBalancerStatusService) Get ¶
func (r *LoadBalancerStatusService) Get(ctx context.Context, loadbalancerID string, query LoadBalancerStatusGetParams, opts ...option.RequestOption) (res *LoadBalancerStatus, err error)
Get load balancer status
func (*LoadBalancerStatusService) List ¶
func (r *LoadBalancerStatusService) List(ctx context.Context, query LoadBalancerStatusListParams, opts ...option.RequestOption) (res *LoadBalancerStatusList, err error)
List load balancers statuses
type LoadBalancerUpdateParams ¶
type LoadBalancerUpdateParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Name.
Name param.Opt[string] `json:"name,omitzero"`
// Logging configuration
Logging LoadBalancerUpdateParamsLogging `json:"logging,omitzero"`
// Preferred option to establish connectivity between load balancer and its pools
// members
//
// Any of "L2", "L3".
PreferredConnectivity LoadBalancerMemberConnectivity `json:"preferred_connectivity,omitzero"`
// Update key-value tags using JSON Merge Patch semantics (RFC 7386). Provide
// key-value pairs to add or update tags. Set tag values to `null` to remove tags.
// Unspecified tags remain unchanged. Read-only tags are always preserved and
// cannot be modified. **Examples:**
//
// - **Add/update tags:**
// `{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
// updates existing ones.
// - **Delete tags:** `{'tags': {'`old_tag`': null}}` removes specific tags.
// - **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
// tags are preserved).
// - **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
// specified tags.
// - **Mixed operations:**
// `{'tags': {'environment': 'production', '`cost_center`': 'engineering', '`deprecated_tag`': null}}`
// adds/updates 'environment' and '`cost_center`' while removing
// '`deprecated_tag`', preserving other existing tags.
// - **Replace all:** first delete existing tags with null values, then add new
// ones in the same request.
Tags TagUpdateMap `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (LoadBalancerUpdateParams) MarshalJSON ¶
func (r LoadBalancerUpdateParams) MarshalJSON() (data []byte, err error)
func (*LoadBalancerUpdateParams) UnmarshalJSON ¶
func (r *LoadBalancerUpdateParams) UnmarshalJSON(data []byte) error
type LoadBalancerUpdateParamsLogging ¶
type LoadBalancerUpdateParamsLogging struct {
// Destination region id to which the logs will be written
DestinationRegionID param.Opt[int64] `json:"destination_region_id,omitzero"`
// The topic name to which the logs will be written
TopicName param.Opt[string] `json:"topic_name,omitzero"`
// Enable/disable forwarding logs to LaaS
Enabled param.Opt[bool] `json:"enabled,omitzero"`
// The logs retention policy
RetentionPolicy LaasIndexRetentionPolicyParam `json:"retention_policy,omitzero"`
// contains filtered or unexported fields
}
Logging configuration
func (LoadBalancerUpdateParamsLogging) MarshalJSON ¶
func (r LoadBalancerUpdateParamsLogging) MarshalJSON() (data []byte, err error)
func (*LoadBalancerUpdateParamsLogging) UnmarshalJSON ¶
func (r *LoadBalancerUpdateParamsLogging) UnmarshalJSON(data []byte) error
type LoadBalancerVrrpIP ¶
type LoadBalancerVrrpIP struct {
// IP address
IPAddress string `json:"ip_address,required" format:"ipvanyaddress"`
// LoadBalancer instance role to which VRRP IP belong
//
// Any of "BACKUP", "MASTER", "STANDALONE".
Role LoadBalancerInstanceRole `json:"role,required"`
// Subnet UUID
SubnetID string `json:"subnet_id,required" format:"uuid4"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
IPAddress respjson.Field
Role respjson.Field
SubnetID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoadBalancerVrrpIP) RawJSON ¶
func (r LoadBalancerVrrpIP) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoadBalancerVrrpIP) UnmarshalJSON ¶
func (r *LoadBalancerVrrpIP) UnmarshalJSON(data []byte) error
type Logging ¶
type Logging struct {
// ID of the region in which the logs will be stored
DestinationRegionID int64 `json:"destination_region_id,required"`
// Indicates if log streaming is enabled or disabled
Enabled bool `json:"enabled,required"`
// The topic name to stream logs to
TopicName string `json:"topic_name,required"`
// Logs retention policy
RetentionPolicy LaasIndexRetentionPolicy `json:"retention_policy,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DestinationRegionID respjson.Field
Enabled respjson.Field
TopicName respjson.Field
RetentionPolicy respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Logging) UnmarshalJSON ¶
type Member ¶
type Member struct {
// Member ID must be provided if an existing member is being updated
ID string `json:"id,required" format:"uuid4"`
// Member IP address
Address string `json:"address,required" format:"ipvanyaddress"`
// Administrative state of the resource. When set to true, the resource is enabled
// and operational. When set to false, the resource is disabled and will not
// process traffic. When null is passed, the value is skipped and defaults to true.
AdminStateUp bool `json:"admin_state_up,required"`
// Member operating status of the entity
//
// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
OperatingStatus LoadBalancerOperatingStatus `json:"operating_status,required"`
// Member IP port
ProtocolPort int64 `json:"protocol_port,required"`
// Pool member lifecycle status
//
// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
// "PENDING_UPDATE".
ProvisioningStatus ProvisioningStatus `json:"provisioning_status,required"`
// Member weight. Valid values: 0 to 256, defaults to 1
Weight int64 `json:"weight,required"`
// An alternate IP address used for health monitoring of a backend member. Default
// is null which monitors the member address.
MonitorAddress string `json:"monitor_address,nullable" format:"ipvanyaddress"`
// An alternate protocol port used for health monitoring of a backend member.
// Default is null which monitors the member `protocol_port`.
MonitorPort int64 `json:"monitor_port,nullable"`
// Either `subnet_id` or `instance_id` should be provided
SubnetID string `json:"subnet_id,nullable" format:"uuid4"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Address respjson.Field
AdminStateUp respjson.Field
OperatingStatus respjson.Field
ProtocolPort respjson.Field
ProvisioningStatus respjson.Field
Weight respjson.Field
MonitorAddress respjson.Field
MonitorPort respjson.Field
SubnetID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Member) UnmarshalJSON ¶
type MemberStatus ¶
type MemberStatus struct {
// UUID of the entity
ID string `json:"id,required" format:"uuid"`
// Address of the member (server)
Address string `json:"address,required" format:"ipvanyaddress"`
// Operating status of the entity
//
// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
OperatingStatus LoadBalancerOperatingStatus `json:"operating_status,required"`
// Port of the member (server)
ProtocolPort int64 `json:"protocol_port,required"`
// Provisioning status of the entity
//
// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
// "PENDING_UPDATE".
ProvisioningStatus ProvisioningStatus `json:"provisioning_status,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Address respjson.Field
OperatingStatus respjson.Field
ProtocolPort respjson.Field
ProvisioningStatus respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MemberStatus) RawJSON ¶
func (r MemberStatus) RawJSON() string
Returns the unmodified JSON received from the API
func (*MemberStatus) UnmarshalJSON ¶
func (r *MemberStatus) UnmarshalJSON(data []byte) error
type Metrics ¶
type Metrics struct {
// Timestamp
Time string `json:"time,required"`
// CPU utilization, % (max 100% for multi-core)
CPUUtil float64 `json:"cpu_util,nullable"`
// Disks metrics for each of the disks attached
Disks []MetricsDisk `json:"disks,nullable"`
// RAM utilization, %
MemoryUtil float64 `json:"memory_util,nullable"`
// Network out, bytes per second
NetworkBpsEgress float64 `json:"network_Bps_egress,nullable"`
// Network in, bytes per second
NetworkBpsIngress float64 `json:"network_Bps_ingress,nullable"`
// Network out, packets per second
NetworkPpsEgress float64 `json:"network_pps_egress,nullable"`
// Network in, packets per second
NetworkPpsIngress float64 `json:"network_pps_ingress,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Time respjson.Field
CPUUtil respjson.Field
Disks respjson.Field
MemoryUtil respjson.Field
NetworkBpsEgress respjson.Field
NetworkBpsIngress respjson.Field
NetworkPpsEgress respjson.Field
NetworkPpsIngress respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Instance metrics item
func (*Metrics) UnmarshalJSON ¶
type MetricsDisk ¶
type MetricsDisk struct {
// Disk read, Bytes per second
DiskBpsRead float64 `json:"disk_Bps_read,nullable"`
// Disk write, Bytes per second
DiskBpsWrite float64 `json:"disk_Bps_write,nullable"`
// Disk read, iops
DiskIopsRead float64 `json:"disk_iops_read,nullable"`
// Disk write, iops
DiskIopsWrite float64 `json:"disk_iops_write,nullable"`
// Disk attached slot name
DiskName string `json:"disk_name,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DiskBpsRead respjson.Field
DiskBpsWrite respjson.Field
DiskIopsRead respjson.Field
DiskIopsWrite respjson.Field
DiskName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Disk metrics item
func (MetricsDisk) RawJSON ¶
func (r MetricsDisk) RawJSON() string
Returns the unmodified JSON received from the API
func (*MetricsDisk) UnmarshalJSON ¶
func (r *MetricsDisk) UnmarshalJSON(data []byte) error
type MetricsList ¶
type MetricsList struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []Metrics `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MetricsList) RawJSON ¶
func (r MetricsList) RawJSON() string
Returns the unmodified JSON received from the API
func (*MetricsList) UnmarshalJSON ¶
func (r *MetricsList) UnmarshalJSON(data []byte) error
type Network ¶
type Network struct {
// Network ID
ID string `json:"id,required" format:"uuid4"`
// Datetime when the network was created
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Task that created this entity
CreatorTaskID string `json:"creator_task_id,required" format:"uuid4"`
// True if network has `is_default` attribute
Default bool `json:"default,required"`
// True if the network `router:external` attribute
External bool `json:"external,required"`
// MTU (maximum transmission unit). Default value is 1450
Mtu int64 `json:"mtu,required"`
// Network name
Name string `json:"name,required"`
// Indicates `port_security_enabled` status of all newly created in the network
// ports.
PortSecurityEnabled bool `json:"port_security_enabled,required"`
// Project ID
ProjectID int64 `json:"project_id,required"`
// Region name
Region string `json:"region,required"`
// Region ID
RegionID int64 `json:"region_id,required"`
// Id of network segment
SegmentationID int64 `json:"segmentation_id,required"`
Shared bool `json:"shared,required"`
// List of subnetworks
Subnets []string `json:"subnets,required" format:"uuid4"`
// List of key-value tags associated with the resource. A tag is a key-value pair
// that can be associated with a resource, enabling efficient filtering and
// grouping for better organization and management. Some tags are read-only and
// cannot be modified by the user. Tags are also integrated with cost reports,
// allowing cost data to be filtered based on tag keys or values.
Tags []Tag `json:"tags,required"`
// The UUID of the active task that currently holds a lock on the resource. This
// lock prevents concurrent modifications to ensure consistency. If `null`, the
// resource is not locked.
TaskID string `json:"task_id,required" format:"uuid4"`
// Network type (vlan, vxlan)
Type string `json:"type,required"`
// Datetime when the network was last updated
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
CreatorTaskID respjson.Field
Default respjson.Field
External respjson.Field
Mtu respjson.Field
Name respjson.Field
PortSecurityEnabled respjson.Field
ProjectID respjson.Field
Region respjson.Field
RegionID respjson.Field
SegmentationID respjson.Field
Shared respjson.Field
Subnets respjson.Field
Tags respjson.Field
TaskID respjson.Field
Type respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Network) UnmarshalJSON ¶
type NetworkDeleteParams ¶
type NetworkDetails ¶
type NetworkDetails struct {
// Network ID
ID string `json:"id,required" format:"uuid4"`
// Datetime when the network was created
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Task that created this entity
CreatorTaskID string `json:"creator_task_id,required" format:"uuid4"`
// True if network has `is_default` attribute
Default bool `json:"default,required"`
// True if the network `router:external` attribute
External bool `json:"external,required"`
// MTU (maximum transmission unit). Default value is 1450
Mtu int64 `json:"mtu,required"`
// Network name
Name string `json:"name,required"`
// Indicates `port_security_enabled` status of all newly created in the network
// ports.
PortSecurityEnabled bool `json:"port_security_enabled,required"`
// Project ID
ProjectID int64 `json:"project_id,required"`
// Region name
Region string `json:"region,required"`
// Region ID
RegionID int64 `json:"region_id,required"`
// Id of network segment
SegmentationID int64 `json:"segmentation_id,required"`
Shared bool `json:"shared,required"`
// List of subnets associated with the network
Subnets []Subnet `json:"subnets,required"`
// List of key-value tags associated with the resource. A tag is a key-value pair
// that can be associated with a resource, enabling efficient filtering and
// grouping for better organization and management. Some tags are read-only and
// cannot be modified by the user. Tags are also integrated with cost reports,
// allowing cost data to be filtered based on tag keys or values.
Tags []Tag `json:"tags,required"`
// The UUID of the active task that currently holds a lock on the resource. This
// lock prevents concurrent modifications to ensure consistency. If `null`, the
// resource is not locked.
TaskID string `json:"task_id,required" format:"uuid4"`
// Network type (vlan, vxlan)
Type string `json:"type,required"`
// Datetime when the network was last updated
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
CreatorTaskID respjson.Field
Default respjson.Field
External respjson.Field
Mtu respjson.Field
Name respjson.Field
PortSecurityEnabled respjson.Field
ProjectID respjson.Field
Region respjson.Field
RegionID respjson.Field
SegmentationID respjson.Field
Shared respjson.Field
Subnets respjson.Field
Tags respjson.Field
TaskID respjson.Field
Type respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NetworkDetails) RawJSON ¶
func (r NetworkDetails) RawJSON() string
Returns the unmodified JSON received from the API
func (*NetworkDetails) UnmarshalJSON ¶
func (r *NetworkDetails) UnmarshalJSON(data []byte) error
type NetworkGetParams ¶
type NetworkInterface ¶
type NetworkInterface struct {
// Group of subnet masks and/or IP addresses that share the current IP as VIP
AllowedAddressPairs []AllowedAddressPairs `json:"allowed_address_pairs,required"`
// Bodies of floating IPs that are NAT-ing IPs of this port
FloatingipDetails []FloatingIP `json:"floatingip_details,required"`
// IP addresses assigned to this port
IPAssignments []IPAssignment `json:"ip_assignments,required"`
// Body of the network this port is attached to
NetworkDetails NetworkDetails `json:"network_details,required"`
// ID of the network the port is attached to
NetworkID string `json:"network_id,required" format:"uuid4"`
// ID of virtual ethernet port object
PortID string `json:"port_id,required" format:"uuid4"`
// Port security status
PortSecurityEnabled bool `json:"port_security_enabled,required"`
// body of ports that are included into trunk port
SubPorts []NetworkInterfaceSubPort `json:"sub_ports,required"`
// Interface name
InterfaceName string `json:"interface_name,nullable"`
// MAC address of the virtual port
MacAddress string `json:"mac_address,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AllowedAddressPairs respjson.Field
FloatingipDetails respjson.Field
IPAssignments respjson.Field
NetworkDetails respjson.Field
NetworkID respjson.Field
PortID respjson.Field
PortSecurityEnabled respjson.Field
SubPorts respjson.Field
InterfaceName respjson.Field
MacAddress respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NetworkInterface) RawJSON ¶
func (r NetworkInterface) RawJSON() string
Returns the unmodified JSON received from the API
func (*NetworkInterface) UnmarshalJSON ¶
func (r *NetworkInterface) UnmarshalJSON(data []byte) error
type NetworkInterfaceList ¶
type NetworkInterfaceList struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []NetworkInterface `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NetworkInterfaceList) RawJSON ¶
func (r NetworkInterfaceList) RawJSON() string
Returns the unmodified JSON received from the API
func (*NetworkInterfaceList) UnmarshalJSON ¶
func (r *NetworkInterfaceList) UnmarshalJSON(data []byte) error
type NetworkInterfaceSubPort ¶
type NetworkInterfaceSubPort struct {
// Group of subnet masks and/or IP addresses that share the current IP as VIP
AllowedAddressPairs []AllowedAddressPairs `json:"allowed_address_pairs,required"`
// Bodies of floating IPs that are NAT-ing IPs of this port
FloatingipDetails []FloatingIP `json:"floatingip_details,required"`
// IP addresses assigned to this port
IPAssignments []IPAssignment `json:"ip_assignments,required"`
// Body of the network this port is attached to
NetworkDetails NetworkDetails `json:"network_details,required"`
// ID of the network the port is attached to
NetworkID string `json:"network_id,required" format:"uuid4"`
// ID of virtual ethernet port object
PortID string `json:"port_id,required" format:"uuid4"`
// Port security status
PortSecurityEnabled bool `json:"port_security_enabled,required"`
// id of network segment
SegmentationID int64 `json:"segmentation_id,required"`
// type of network segment
SegmentationType string `json:"segmentation_type,required"`
// Interface name
InterfaceName string `json:"interface_name,nullable"`
// MAC address of the virtual port
MacAddress string `json:"mac_address,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AllowedAddressPairs respjson.Field
FloatingipDetails respjson.Field
IPAssignments respjson.Field
NetworkDetails respjson.Field
NetworkID respjson.Field
PortID respjson.Field
PortSecurityEnabled respjson.Field
SegmentationID respjson.Field
SegmentationType respjson.Field
InterfaceName respjson.Field
MacAddress respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NetworkInterfaceSubPort) RawJSON ¶
func (r NetworkInterfaceSubPort) RawJSON() string
Returns the unmodified JSON received from the API
func (*NetworkInterfaceSubPort) UnmarshalJSON ¶
func (r *NetworkInterfaceSubPort) UnmarshalJSON(data []byte) error
type NetworkListParams ¶
type NetworkListParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Optional. Limit the number of returned items
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Filter networks by name
Name param.Opt[string] `query:"name,omitzero" json:"-"`
// Optional. Offset value is used to exclude the first set of records from the
// result
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Optional. Filter by tag key-value pairs.
TagKeyValue param.Opt[string] `query:"tag_key_value,omitzero" json:"-"`
// Ordering networks list result by `name`, `created_at` fields of the network and
// directions (`created_at.desc`).
//
// Any of "created_at.asc", "created_at.desc", "name.asc", "name.desc".
OrderBy NetworkListParamsOrderBy `query:"order_by,omitzero" json:"-"`
// Optional. Filter by tag keys. ?`tag_key`=key1&`tag_key`=key2
TagKey []string `query:"tag_key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (NetworkListParams) URLQuery ¶
func (r NetworkListParams) URLQuery() (v url.Values, err error)
URLQuery serializes NetworkListParams's query parameters as `url.Values`.
type NetworkListParamsOrderBy ¶
type NetworkListParamsOrderBy string
Ordering networks list result by `name`, `created_at` fields of the network and directions (`created_at.desc`).
const ( NetworkListParamsOrderByCreatedAtAsc NetworkListParamsOrderBy = "created_at.asc" NetworkListParamsOrderByCreatedAtDesc NetworkListParamsOrderBy = "created_at.desc" NetworkListParamsOrderByNameAsc NetworkListParamsOrderBy = "name.asc" NetworkListParamsOrderByNameDesc NetworkListParamsOrderBy = "name.desc" )
type NetworkNewParams ¶
type NetworkNewParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Network name
Name string `json:"name,required"`
// Defaults to True
CreateRouter param.Opt[bool] `json:"create_router,omitzero"`
// Key-value tags to associate with the resource. A tag is a key-value pair that
// can be associated with a resource, enabling efficient filtering and grouping for
// better organization and management. Some tags are read-only and cannot be
// modified by the user. Tags are also integrated with cost reports, allowing cost
// data to be filtered based on tag keys or values.
Tags map[string]string `json:"tags,omitzero"`
// vlan or vxlan network type is allowed. Default value is vxlan
//
// Any of "vlan", "vxlan".
Type NetworkNewParamsType `json:"type,omitzero"`
// contains filtered or unexported fields
}
func (NetworkNewParams) MarshalJSON ¶
func (r NetworkNewParams) MarshalJSON() (data []byte, err error)
func (*NetworkNewParams) UnmarshalJSON ¶
func (r *NetworkNewParams) UnmarshalJSON(data []byte) error
type NetworkNewParamsType ¶
type NetworkNewParamsType string
vlan or vxlan network type is allowed. Default value is vxlan
const ( NetworkNewParamsTypeVlan NetworkNewParamsType = "vlan" NetworkNewParamsTypeVxlan NetworkNewParamsType = "vxlan" )
type NetworkRouterAttachSubnetParams ¶
type NetworkRouterAttachSubnetParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Subnet ID on which router interface will be created
SubnetID string `json:"subnet_id,required" format:"uuid4"`
// IP address to assign for router's interface, if not specified, address will be
// selected automatically
IPAddress param.Opt[string] `json:"ip_address,omitzero" format:"ipvanyaddress"`
// contains filtered or unexported fields
}
func (NetworkRouterAttachSubnetParams) MarshalJSON ¶
func (r NetworkRouterAttachSubnetParams) MarshalJSON() (data []byte, err error)
func (*NetworkRouterAttachSubnetParams) UnmarshalJSON ¶
func (r *NetworkRouterAttachSubnetParams) UnmarshalJSON(data []byte) error
type NetworkRouterDetachSubnetParams ¶
type NetworkRouterDetachSubnetParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
SubnetID SubnetIDParam
// contains filtered or unexported fields
}
func (NetworkRouterDetachSubnetParams) MarshalJSON ¶
func (r NetworkRouterDetachSubnetParams) MarshalJSON() (data []byte, err error)
func (*NetworkRouterDetachSubnetParams) UnmarshalJSON ¶
func (r *NetworkRouterDetachSubnetParams) UnmarshalJSON(data []byte) error
type NetworkRouterGetParams ¶
type NetworkRouterListParams ¶
type NetworkRouterListParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Limit the number of returned routers
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Offset value is used to exclude the first set of records from the result
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (NetworkRouterListParams) URLQuery ¶
func (r NetworkRouterListParams) URLQuery() (v url.Values, err error)
URLQuery serializes NetworkRouterListParams's query parameters as `url.Values`.
type NetworkRouterNewParams ¶
type NetworkRouterNewParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// name of router
Name string `json:"name,required"`
ExternalGatewayInfo NetworkRouterNewParamsExternalGatewayInfoUnion `json:"external_gateway_info,omitzero"`
// List of interfaces to attach to router immediately after creation.
Interfaces []NetworkRouterNewParamsInterface `json:"interfaces,omitzero"`
// List of custom routes.
Routes []NetworkRouterNewParamsRoute `json:"routes,omitzero"`
// contains filtered or unexported fields
}
func (NetworkRouterNewParams) MarshalJSON ¶
func (r NetworkRouterNewParams) MarshalJSON() (data []byte, err error)
func (*NetworkRouterNewParams) UnmarshalJSON ¶
func (r *NetworkRouterNewParams) UnmarshalJSON(data []byte) error
type NetworkRouterNewParamsExternalGatewayInfoRouterExternalDefaultGwSerializer ¶
type NetworkRouterNewParamsExternalGatewayInfoRouterExternalDefaultGwSerializer struct {
// Is SNAT enabled. Defaults to true.
EnableSnat param.Opt[bool] `json:"enable_snat,omitzero"`
// must be 'default'.
//
// Any of "default".
Type string `json:"type,omitzero"`
// contains filtered or unexported fields
}
func (NetworkRouterNewParamsExternalGatewayInfoRouterExternalDefaultGwSerializer) MarshalJSON ¶
func (r NetworkRouterNewParamsExternalGatewayInfoRouterExternalDefaultGwSerializer) MarshalJSON() (data []byte, err error)
func (*NetworkRouterNewParamsExternalGatewayInfoRouterExternalDefaultGwSerializer) UnmarshalJSON ¶
func (r *NetworkRouterNewParamsExternalGatewayInfoRouterExternalDefaultGwSerializer) UnmarshalJSON(data []byte) error
type NetworkRouterNewParamsExternalGatewayInfoRouterExternalManualGwSerializer ¶
type NetworkRouterNewParamsExternalGatewayInfoRouterExternalManualGwSerializer struct {
// id of the external network.
NetworkID string `json:"network_id,required" format:"uuid4"`
// Is SNAT enabled. Defaults to true.
EnableSnat param.Opt[bool] `json:"enable_snat,omitzero"`
// must be 'manual'.
//
// Any of "manual".
Type string `json:"type,omitzero"`
// contains filtered or unexported fields
}
The property NetworkID is required.
func (NetworkRouterNewParamsExternalGatewayInfoRouterExternalManualGwSerializer) MarshalJSON ¶
func (r NetworkRouterNewParamsExternalGatewayInfoRouterExternalManualGwSerializer) MarshalJSON() (data []byte, err error)
func (*NetworkRouterNewParamsExternalGatewayInfoRouterExternalManualGwSerializer) UnmarshalJSON ¶
func (r *NetworkRouterNewParamsExternalGatewayInfoRouterExternalManualGwSerializer) UnmarshalJSON(data []byte) error
type NetworkRouterNewParamsExternalGatewayInfoUnion ¶
type NetworkRouterNewParamsExternalGatewayInfoUnion struct {
OfRouterExternalManualGwSerializer *NetworkRouterNewParamsExternalGatewayInfoRouterExternalManualGwSerializer `json:",omitzero,inline"`
OfRouterExternalDefaultGwSerializer *NetworkRouterNewParamsExternalGatewayInfoRouterExternalDefaultGwSerializer `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (NetworkRouterNewParamsExternalGatewayInfoUnion) GetEnableSnat ¶
func (u NetworkRouterNewParamsExternalGatewayInfoUnion) GetEnableSnat() *bool
Returns a pointer to the underlying variant's property, if present.
func (NetworkRouterNewParamsExternalGatewayInfoUnion) GetNetworkID ¶
func (u NetworkRouterNewParamsExternalGatewayInfoUnion) GetNetworkID() *string
Returns a pointer to the underlying variant's property, if present.
func (NetworkRouterNewParamsExternalGatewayInfoUnion) GetType ¶
func (u NetworkRouterNewParamsExternalGatewayInfoUnion) GetType() *string
Returns a pointer to the underlying variant's property, if present.
func (NetworkRouterNewParamsExternalGatewayInfoUnion) MarshalJSON ¶
func (u NetworkRouterNewParamsExternalGatewayInfoUnion) MarshalJSON() ([]byte, error)
func (*NetworkRouterNewParamsExternalGatewayInfoUnion) UnmarshalJSON ¶
func (u *NetworkRouterNewParamsExternalGatewayInfoUnion) UnmarshalJSON(data []byte) error
type NetworkRouterNewParamsInterface ¶
type NetworkRouterNewParamsInterface struct {
// id of the subnet to attach to.
SubnetID string `json:"subnet_id,required" format:"uuid4"`
// must be 'subnet'.
//
// Any of "subnet".
Type string `json:"type,omitzero"`
// contains filtered or unexported fields
}
The property SubnetID is required.
func (NetworkRouterNewParamsInterface) MarshalJSON ¶
func (r NetworkRouterNewParamsInterface) MarshalJSON() (data []byte, err error)
func (*NetworkRouterNewParamsInterface) UnmarshalJSON ¶
func (r *NetworkRouterNewParamsInterface) UnmarshalJSON(data []byte) error
type NetworkRouterNewParamsRoute ¶
type NetworkRouterNewParamsRoute struct {
// CIDR of destination IPv4 subnet.
Destination string `json:"destination,required" format:"ipvanynetwork"`
// IPv4 address to forward traffic to if it's destination IP matches 'destination'
// CIDR.
Nexthop string `json:"nexthop,required" format:"ipvanyaddress"`
// contains filtered or unexported fields
}
The properties Destination, Nexthop are required.
func (NetworkRouterNewParamsRoute) MarshalJSON ¶
func (r NetworkRouterNewParamsRoute) MarshalJSON() (data []byte, err error)
func (*NetworkRouterNewParamsRoute) UnmarshalJSON ¶
func (r *NetworkRouterNewParamsRoute) UnmarshalJSON(data []byte) error
type NetworkRouterService ¶
type NetworkRouterService struct {
Options []option.RequestOption
}
NetworkRouterService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewNetworkRouterService method instead.
func NewNetworkRouterService ¶
func NewNetworkRouterService(opts ...option.RequestOption) (r NetworkRouterService)
NewNetworkRouterService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*NetworkRouterService) AttachSubnet ¶
func (r *NetworkRouterService) AttachSubnet(ctx context.Context, routerID string, params NetworkRouterAttachSubnetParams, opts ...option.RequestOption) (res *Router, err error)
Attach a subnet to an existing router.
func (*NetworkRouterService) Delete ¶
func (r *NetworkRouterService) Delete(ctx context.Context, routerID string, body NetworkRouterDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Delete a specific router and all its associated resources.
func (*NetworkRouterService) DetachSubnet ¶
func (r *NetworkRouterService) DetachSubnet(ctx context.Context, routerID string, params NetworkRouterDetachSubnetParams, opts ...option.RequestOption) (res *Router, err error)
Detach a subnet from an existing router.
func (*NetworkRouterService) Get ¶
func (r *NetworkRouterService) Get(ctx context.Context, routerID string, query NetworkRouterGetParams, opts ...option.RequestOption) (res *Router, err error)
Get detailed information about a specific router.
func (*NetworkRouterService) List ¶
func (r *NetworkRouterService) List(ctx context.Context, params NetworkRouterListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[Router], err error)
List all routers in the specified project and region.
func (*NetworkRouterService) ListAutoPaging ¶
func (r *NetworkRouterService) ListAutoPaging(ctx context.Context, params NetworkRouterListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[Router]
List all routers in the specified project and region.
func (*NetworkRouterService) New ¶
func (r *NetworkRouterService) New(ctx context.Context, params NetworkRouterNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Create a new router with the specified configuration.
func (*NetworkRouterService) Update ¶
func (r *NetworkRouterService) Update(ctx context.Context, routerID string, params NetworkRouterUpdateParams, opts ...option.RequestOption) (res *Router, err error)
Update the configuration of an existing router.
type NetworkRouterUpdateParams ¶
type NetworkRouterUpdateParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// New name of router
Name param.Opt[string] `json:"name,omitzero"`
// New external gateway.
ExternalGatewayInfo NetworkRouterUpdateParamsExternalGatewayInfo `json:"external_gateway_info,omitzero"`
// List of custom routes.
Routes []NetworkRouterUpdateParamsRoute `json:"routes,omitzero"`
// contains filtered or unexported fields
}
func (NetworkRouterUpdateParams) MarshalJSON ¶
func (r NetworkRouterUpdateParams) MarshalJSON() (data []byte, err error)
func (*NetworkRouterUpdateParams) UnmarshalJSON ¶
func (r *NetworkRouterUpdateParams) UnmarshalJSON(data []byte) error
type NetworkRouterUpdateParamsExternalGatewayInfo ¶
type NetworkRouterUpdateParamsExternalGatewayInfo struct {
// id of the external network.
NetworkID string `json:"network_id,required" format:"uuid4"`
// Is SNAT enabled. Defaults to true.
EnableSnat param.Opt[bool] `json:"enable_snat,omitzero"`
// must be 'manual'.
//
// Any of "manual".
Type string `json:"type,omitzero"`
// contains filtered or unexported fields
}
New external gateway.
The property NetworkID is required.
func (NetworkRouterUpdateParamsExternalGatewayInfo) MarshalJSON ¶
func (r NetworkRouterUpdateParamsExternalGatewayInfo) MarshalJSON() (data []byte, err error)
func (*NetworkRouterUpdateParamsExternalGatewayInfo) UnmarshalJSON ¶
func (r *NetworkRouterUpdateParamsExternalGatewayInfo) UnmarshalJSON(data []byte) error
type NetworkRouterUpdateParamsRoute ¶
type NetworkRouterUpdateParamsRoute struct {
// CIDR of destination IPv4 subnet.
Destination string `json:"destination,required" format:"ipvanynetwork"`
// IPv4 address to forward traffic to if it's destination IP matches 'destination'
// CIDR.
Nexthop string `json:"nexthop,required" format:"ipvanyaddress"`
// contains filtered or unexported fields
}
The properties Destination, Nexthop are required.
func (NetworkRouterUpdateParamsRoute) MarshalJSON ¶
func (r NetworkRouterUpdateParamsRoute) MarshalJSON() (data []byte, err error)
func (*NetworkRouterUpdateParamsRoute) UnmarshalJSON ¶
func (r *NetworkRouterUpdateParamsRoute) UnmarshalJSON(data []byte) error
type NetworkService ¶
type NetworkService struct {
Options []option.RequestOption
Subnets NetworkSubnetService
Routers NetworkRouterService
}
NetworkService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewNetworkService method instead.
func NewNetworkService ¶
func NewNetworkService(opts ...option.RequestOption) (r NetworkService)
NewNetworkService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*NetworkService) Delete ¶
func (r *NetworkService) Delete(ctx context.Context, networkID string, body NetworkDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Delete network
func (*NetworkService) Get ¶
func (r *NetworkService) Get(ctx context.Context, networkID string, query NetworkGetParams, opts ...option.RequestOption) (res *Network, err error)
Get network
func (*NetworkService) List ¶
func (r *NetworkService) List(ctx context.Context, params NetworkListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[Network], err error)
List networks
func (*NetworkService) ListAutoPaging ¶
func (r *NetworkService) ListAutoPaging(ctx context.Context, params NetworkListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[Network]
List networks
func (*NetworkService) New ¶
func (r *NetworkService) New(ctx context.Context, params NetworkNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Create network
func (*NetworkService) Update ¶
func (r *NetworkService) Update(ctx context.Context, networkID string, params NetworkUpdateParams, opts ...option.RequestOption) (res *Network, err error)
Rename network and/or update network tags. The request will only process the fields that are provided in the request body. Any fields that are not included will remain unchanged.
type NetworkSubnetGetParams ¶
type NetworkSubnetListParams ¶
type NetworkSubnetListParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Optional. Limit the number of returned items
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Only list subnets of this network
NetworkID param.Opt[string] `query:"network_id,omitzero" format:"uuid4" json:"-"`
// Optional. Offset value is used to exclude the first set of records from the
// result
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Optional. Filter by tag key-value pairs.
TagKeyValue param.Opt[string] `query:"tag_key_value,omitzero" json:"-"`
// Ordering subnets list result by `name`, `created_at`, `updated_at`,
// `available_ips`, `total_ips`, and `cidr` (default) fields of the subnet and
// directions (`name.asc`).
//
// Any of "available_ips.asc", "available_ips.desc", "cidr.asc", "cidr.desc",
// "created_at.asc", "created_at.desc", "name.asc", "name.desc", "total_ips.asc",
// "total_ips.desc", "updated_at.asc", "updated_at.desc".
OrderBy NetworkSubnetListParamsOrderBy `query:"order_by,omitzero" json:"-"`
// Optional. Filter by tag keys. ?`tag_key`=key1&`tag_key`=key2
TagKey []string `query:"tag_key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (NetworkSubnetListParams) URLQuery ¶
func (r NetworkSubnetListParams) URLQuery() (v url.Values, err error)
URLQuery serializes NetworkSubnetListParams's query parameters as `url.Values`.
type NetworkSubnetListParamsOrderBy ¶
type NetworkSubnetListParamsOrderBy string
Ordering subnets list result by `name`, `created_at`, `updated_at`, `available_ips`, `total_ips`, and `cidr` (default) fields of the subnet and directions (`name.asc`).
const ( NetworkSubnetListParamsOrderByAvailableIPsAsc NetworkSubnetListParamsOrderBy = "available_ips.asc" NetworkSubnetListParamsOrderByAvailableIPsDesc NetworkSubnetListParamsOrderBy = "available_ips.desc" NetworkSubnetListParamsOrderByCidrAsc NetworkSubnetListParamsOrderBy = "cidr.asc" NetworkSubnetListParamsOrderByCidrDesc NetworkSubnetListParamsOrderBy = "cidr.desc" NetworkSubnetListParamsOrderByCreatedAtAsc NetworkSubnetListParamsOrderBy = "created_at.asc" NetworkSubnetListParamsOrderByCreatedAtDesc NetworkSubnetListParamsOrderBy = "created_at.desc" NetworkSubnetListParamsOrderByNameAsc NetworkSubnetListParamsOrderBy = "name.asc" NetworkSubnetListParamsOrderByNameDesc NetworkSubnetListParamsOrderBy = "name.desc" NetworkSubnetListParamsOrderByTotalIPsAsc NetworkSubnetListParamsOrderBy = "total_ips.asc" NetworkSubnetListParamsOrderByTotalIPsDesc NetworkSubnetListParamsOrderBy = "total_ips.desc" NetworkSubnetListParamsOrderByUpdatedAtAsc NetworkSubnetListParamsOrderBy = "updated_at.asc" NetworkSubnetListParamsOrderByUpdatedAtDesc NetworkSubnetListParamsOrderBy = "updated_at.desc" )
type NetworkSubnetNewParams ¶
type NetworkSubnetNewParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// CIDR
Cidr string `json:"cidr,required" format:"ipvanynetwork"`
// Subnet name
Name string `json:"name,required"`
// Network ID
NetworkID string `json:"network_id,required" format:"uuid4"`
// Default GW IPv4 address to advertise in DHCP routes in this subnet. Omit this
// field to let the cloud backend allocate it automatically. Set to null if no
// gateway must be advertised by this subnet's DHCP (useful when attaching
// instances to multiple subnets in order to prevent default route conflicts).
GatewayIP param.Opt[string] `json:"gateway_ip,omitzero" format:"ipvanyaddress"`
// ID of the router to connect to. Requires `connect_to_network_router` set to
// true. If not specified, attempts to find a router created during network
// creation.
RouterIDToConnect param.Opt[string] `json:"router_id_to_connect,omitzero" format:"uuid4"`
// True if the network's router should get a gateway in this subnet. Must be
// explicitly 'false' when `gateway_ip` is null.
ConnectToNetworkRouter param.Opt[bool] `json:"connect_to_network_router,omitzero"`
// True if DHCP should be enabled
EnableDhcp param.Opt[bool] `json:"enable_dhcp,omitzero"`
// List IP addresses of DNS servers to advertise via DHCP.
DNSNameservers []string `json:"dns_nameservers,omitzero" format:"ipvanyaddress"`
// List of custom static routes to advertise via DHCP.
HostRoutes []NetworkSubnetNewParamsHostRoute `json:"host_routes,omitzero"`
// IP version
//
// Any of 4, 6.
IPVersion int64 `json:"ip_version,omitzero"`
// Key-value tags to associate with the resource. A tag is a key-value pair that
// can be associated with a resource, enabling efficient filtering and grouping for
// better organization and management. Some tags are read-only and cannot be
// modified by the user. Tags are also integrated with cost reports, allowing cost
// data to be filtered based on tag keys or values.
Tags map[string]string `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (NetworkSubnetNewParams) MarshalJSON ¶
func (r NetworkSubnetNewParams) MarshalJSON() (data []byte, err error)
func (*NetworkSubnetNewParams) UnmarshalJSON ¶
func (r *NetworkSubnetNewParams) UnmarshalJSON(data []byte) error
type NetworkSubnetNewParamsHostRoute ¶
type NetworkSubnetNewParamsHostRoute struct {
// CIDR of destination IPv4 subnet.
Destination string `json:"destination,required" format:"ipvanynetwork"`
// IPv4 address to forward traffic to if it's destination IP matches 'destination'
// CIDR.
Nexthop string `json:"nexthop,required" format:"ipvanyaddress"`
// contains filtered or unexported fields
}
The properties Destination, Nexthop are required.
func (NetworkSubnetNewParamsHostRoute) MarshalJSON ¶
func (r NetworkSubnetNewParamsHostRoute) MarshalJSON() (data []byte, err error)
func (*NetworkSubnetNewParamsHostRoute) UnmarshalJSON ¶
func (r *NetworkSubnetNewParamsHostRoute) UnmarshalJSON(data []byte) error
type NetworkSubnetService ¶
type NetworkSubnetService struct {
Options []option.RequestOption
}
NetworkSubnetService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewNetworkSubnetService method instead.
func NewNetworkSubnetService ¶
func NewNetworkSubnetService(opts ...option.RequestOption) (r NetworkSubnetService)
NewNetworkSubnetService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*NetworkSubnetService) Delete ¶
func (r *NetworkSubnetService) Delete(ctx context.Context, subnetID string, body NetworkSubnetDeleteParams, opts ...option.RequestOption) (err error)
Delete subnet
func (*NetworkSubnetService) Get ¶
func (r *NetworkSubnetService) Get(ctx context.Context, subnetID string, query NetworkSubnetGetParams, opts ...option.RequestOption) (res *Subnet, err error)
Get subnet
func (*NetworkSubnetService) List ¶
func (r *NetworkSubnetService) List(ctx context.Context, params NetworkSubnetListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[Subnet], err error)
List subnets
func (*NetworkSubnetService) ListAutoPaging ¶
func (r *NetworkSubnetService) ListAutoPaging(ctx context.Context, params NetworkSubnetListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[Subnet]
List subnets
func (*NetworkSubnetService) New ¶
func (r *NetworkSubnetService) New(ctx context.Context, params NetworkSubnetNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Create subnet
func (*NetworkSubnetService) Update ¶
func (r *NetworkSubnetService) Update(ctx context.Context, subnetID string, params NetworkSubnetUpdateParams, opts ...option.RequestOption) (res *Subnet, err error)
Update subnet
type NetworkSubnetUpdateParams ¶
type NetworkSubnetUpdateParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// True if DHCP should be enabled
EnableDhcp param.Opt[bool] `json:"enable_dhcp,omitzero"`
// Default GW IPv4 address to advertise in DHCP routes in this subnet. Omit this
// field to let the cloud backend allocate it automatically. Set to null if no
// gateway must be advertised by this subnet's DHCP (useful when attaching
// instances to multiple subnets in order to prevent default route conflicts).
GatewayIP param.Opt[string] `json:"gateway_ip,omitzero" format:"ipvanyaddress"`
// Name
Name param.Opt[string] `json:"name,omitzero"`
// List IP addresses of DNS servers to advertise via DHCP.
DNSNameservers []string `json:"dns_nameservers,omitzero" format:"ipvanyaddress"`
// List of custom static routes to advertise via DHCP.
HostRoutes []NetworkSubnetUpdateParamsHostRoute `json:"host_routes,omitzero"`
// Update key-value tags using JSON Merge Patch semantics (RFC 7386). Provide
// key-value pairs to add or update tags. Set tag values to `null` to remove tags.
// Unspecified tags remain unchanged. Read-only tags are always preserved and
// cannot be modified. **Examples:**
//
// - **Add/update tags:**
// `{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
// updates existing ones.
// - **Delete tags:** `{'tags': {'`old_tag`': null}}` removes specific tags.
// - **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
// tags are preserved).
// - **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
// specified tags.
// - **Mixed operations:**
// `{'tags': {'environment': 'production', '`cost_center`': 'engineering', '`deprecated_tag`': null}}`
// adds/updates 'environment' and '`cost_center`' while removing
// '`deprecated_tag`', preserving other existing tags.
// - **Replace all:** first delete existing tags with null values, then add new
// ones in the same request.
Tags TagUpdateMap `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (NetworkSubnetUpdateParams) MarshalJSON ¶
func (r NetworkSubnetUpdateParams) MarshalJSON() (data []byte, err error)
func (*NetworkSubnetUpdateParams) UnmarshalJSON ¶
func (r *NetworkSubnetUpdateParams) UnmarshalJSON(data []byte) error
type NetworkSubnetUpdateParamsHostRoute ¶
type NetworkSubnetUpdateParamsHostRoute struct {
// CIDR of destination IPv4 subnet.
Destination string `json:"destination,required" format:"ipvanynetwork"`
// IPv4 address to forward traffic to if it's destination IP matches 'destination'
// CIDR.
Nexthop string `json:"nexthop,required" format:"ipvanyaddress"`
// contains filtered or unexported fields
}
The properties Destination, Nexthop are required.
func (NetworkSubnetUpdateParamsHostRoute) MarshalJSON ¶
func (r NetworkSubnetUpdateParamsHostRoute) MarshalJSON() (data []byte, err error)
func (*NetworkSubnetUpdateParamsHostRoute) UnmarshalJSON ¶
func (r *NetworkSubnetUpdateParamsHostRoute) UnmarshalJSON(data []byte) error
type NetworkUpdateParams ¶
type NetworkUpdateParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Name.
Name param.Opt[string] `json:"name,omitzero"`
// Update key-value tags using JSON Merge Patch semantics (RFC 7386). Provide
// key-value pairs to add or update tags. Set tag values to `null` to remove tags.
// Unspecified tags remain unchanged. Read-only tags are always preserved and
// cannot be modified. **Examples:**
//
// - **Add/update tags:**
// `{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
// updates existing ones.
// - **Delete tags:** `{'tags': {'`old_tag`': null}}` removes specific tags.
// - **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
// tags are preserved).
// - **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
// specified tags.
// - **Mixed operations:**
// `{'tags': {'environment': 'production', '`cost_center`': 'engineering', '`deprecated_tag`': null}}`
// adds/updates 'environment' and '`cost_center`' while removing
// '`deprecated_tag`', preserving other existing tags.
// - **Replace all:** first delete existing tags with null values, then add new
// ones in the same request.
Tags TagUpdateMap `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (NetworkUpdateParams) MarshalJSON ¶
func (r NetworkUpdateParams) MarshalJSON() (data []byte, err error)
func (*NetworkUpdateParams) UnmarshalJSON ¶
func (r *NetworkUpdateParams) UnmarshalJSON(data []byte) error
type PlacementGroup ¶
type PlacementGroup struct {
// The list of instances in this server group.
Instances []PlacementGroupInstance `json:"instances,required"`
// The name of the server group.
Name string `json:"name,required"`
// The server group policy. Options are: anti-affinity, affinity, or
// soft-anti-affinity.
Policy string `json:"policy,required"`
// Project ID
ProjectID int64 `json:"project_id,required"`
// Region name
Region string `json:"region,required"`
// Region ID
RegionID int64 `json:"region_id,required"`
// The ID of the server group.
ServergroupID string `json:"servergroup_id,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Instances respjson.Field
Name respjson.Field
Policy respjson.Field
ProjectID respjson.Field
Region respjson.Field
RegionID respjson.Field
ServergroupID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (PlacementGroup) RawJSON ¶
func (r PlacementGroup) RawJSON() string
Returns the unmodified JSON received from the API
func (*PlacementGroup) UnmarshalJSON ¶
func (r *PlacementGroup) UnmarshalJSON(data []byte) error
type PlacementGroupGetParams ¶
type PlacementGroupInstance ¶
type PlacementGroupInstance struct {
// The ID of the instance, corresponding to the attribute 'id'.
InstanceID string `json:"instance_id,required"`
// The name of the instance, corresponding to the attribute 'name'.
InstanceName string `json:"instance_name,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
InstanceID respjson.Field
InstanceName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (PlacementGroupInstance) RawJSON ¶
func (r PlacementGroupInstance) RawJSON() string
Returns the unmodified JSON received from the API
func (*PlacementGroupInstance) UnmarshalJSON ¶
func (r *PlacementGroupInstance) UnmarshalJSON(data []byte) error
type PlacementGroupList ¶
type PlacementGroupList struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []PlacementGroup `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (PlacementGroupList) RawJSON ¶
func (r PlacementGroupList) RawJSON() string
Returns the unmodified JSON received from the API
func (*PlacementGroupList) UnmarshalJSON ¶
func (r *PlacementGroupList) UnmarshalJSON(data []byte) error
type PlacementGroupNewParams ¶
type PlacementGroupNewParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// The name of the server group.
Name string `json:"name,required"`
// The server group policy.
//
// Any of "affinity", "anti-affinity", "soft-anti-affinity".
Policy PlacementGroupNewParamsPolicy `json:"policy,omitzero,required"`
// contains filtered or unexported fields
}
func (PlacementGroupNewParams) MarshalJSON ¶
func (r PlacementGroupNewParams) MarshalJSON() (data []byte, err error)
func (*PlacementGroupNewParams) UnmarshalJSON ¶
func (r *PlacementGroupNewParams) UnmarshalJSON(data []byte) error
type PlacementGroupNewParamsPolicy ¶
type PlacementGroupNewParamsPolicy string
The server group policy.
const ( PlacementGroupNewParamsPolicyAffinity PlacementGroupNewParamsPolicy = "affinity" PlacementGroupNewParamsPolicyAntiAffinity PlacementGroupNewParamsPolicy = "anti-affinity" PlacementGroupNewParamsPolicySoftAntiAffinity PlacementGroupNewParamsPolicy = "soft-anti-affinity" )
type PlacementGroupService ¶
type PlacementGroupService struct {
Options []option.RequestOption
}
PlacementGroupService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPlacementGroupService method instead.
func NewPlacementGroupService ¶
func NewPlacementGroupService(opts ...option.RequestOption) (r PlacementGroupService)
NewPlacementGroupService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*PlacementGroupService) Delete ¶
func (r *PlacementGroupService) Delete(ctx context.Context, groupID string, body PlacementGroupDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Delete placement group
func (*PlacementGroupService) Get ¶
func (r *PlacementGroupService) Get(ctx context.Context, groupID string, query PlacementGroupGetParams, opts ...option.RequestOption) (res *PlacementGroup, err error)
Get placement group
func (*PlacementGroupService) List ¶
func (r *PlacementGroupService) List(ctx context.Context, query PlacementGroupListParams, opts ...option.RequestOption) (res *PlacementGroupList, err error)
List placement groups
func (*PlacementGroupService) New ¶
func (r *PlacementGroupService) New(ctx context.Context, params PlacementGroupNewParams, opts ...option.RequestOption) (res *PlacementGroup, err error)
Create an affinity or anti-affinity or soft-anti-affinity placement group
type PoolStatus ¶
type PoolStatus struct {
// UUID of the entity
ID string `json:"id,required" format:"uuid"`
// Members (servers) of the pool
Members []MemberStatus `json:"members,required"`
// Name of the load balancer pool
Name string `json:"name,required"`
// Operating status of the entity
//
// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
OperatingStatus LoadBalancerOperatingStatus `json:"operating_status,required"`
// Provisioning status of the entity
//
// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
// "PENDING_UPDATE".
ProvisioningStatus ProvisioningStatus `json:"provisioning_status,required"`
// Health Monitor of the Pool
HealthMonitor HealthMonitorStatus `json:"health_monitor"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Members respjson.Field
Name respjson.Field
OperatingStatus respjson.Field
ProvisioningStatus respjson.Field
HealthMonitor respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (PoolStatus) RawJSON ¶
func (r PoolStatus) RawJSON() string
Returns the unmodified JSON received from the API
func (*PoolStatus) UnmarshalJSON ¶
func (r *PoolStatus) UnmarshalJSON(data []byte) error
type Probe ¶ added in v0.5.0
type Probe struct {
// Exec probe configuration
Exec ProbeExec `json:"exec,required"`
// The number of consecutive probe failures that mark the container as unhealthy.
FailureThreshold int64 `json:"failure_threshold,required"`
// HTTP GET probe configuration
HTTPGet ProbeHTTPGet `json:"http_get,required"`
// The initial delay before starting the first probe.
InitialDelaySeconds int64 `json:"initial_delay_seconds,required"`
// How often (in seconds) to perform the probe.
PeriodSeconds int64 `json:"period_seconds,required"`
// The number of consecutive successful probes that mark the container as healthy.
SuccessThreshold int64 `json:"success_threshold,required"`
// TCP socket probe configuration
TcpSocket ProbeTcpSocket `json:"tcp_socket,required"`
// The timeout for each probe.
TimeoutSeconds int64 `json:"timeout_seconds,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Exec respjson.Field
FailureThreshold respjson.Field
HTTPGet respjson.Field
InitialDelaySeconds respjson.Field
PeriodSeconds respjson.Field
SuccessThreshold respjson.Field
TcpSocket respjson.Field
TimeoutSeconds respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Probe) UnmarshalJSON ¶ added in v0.5.0
type ProbeConfig ¶ added in v0.5.0
type ProbeConfig struct {
// Whether the probe is enabled or not.
Enabled bool `json:"enabled,required"`
// Probe configuration (exec, `http_get` or `tcp_socket`)
Probe Probe `json:"probe,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Enabled respjson.Field
Probe respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ProbeConfig) RawJSON ¶ added in v0.5.0
func (r ProbeConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProbeConfig) UnmarshalJSON ¶ added in v0.5.0
func (r *ProbeConfig) UnmarshalJSON(data []byte) error
type ProbeExec ¶ added in v0.5.0
type ProbeExec struct {
// Command to be executed inside the running container.
Command []string `json:"command,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Command respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*ProbeExec) UnmarshalJSON ¶ added in v0.5.0
type ProbeHTTPGet ¶ added in v0.5.0
type ProbeHTTPGet struct {
// HTTP headers to be sent with the request.
Headers map[string]string `json:"headers,required"`
// Host name to send HTTP request to.
Host string `json:"host,required"`
// The endpoint to send the HTTP request to.
Path string `json:"path,required"`
// Port number the probe should connect to.
Port int64 `json:"port,required"`
// Schema to use for the HTTP request.
Schema string `json:"schema,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Headers respjson.Field
Host respjson.Field
Path respjson.Field
Port respjson.Field
Schema respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ProbeHTTPGet) RawJSON ¶ added in v0.5.0
func (r ProbeHTTPGet) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProbeHTTPGet) UnmarshalJSON ¶ added in v0.5.0
func (r *ProbeHTTPGet) UnmarshalJSON(data []byte) error
type ProbeTcpSocket ¶ added in v0.5.0
type ProbeTcpSocket struct {
// Port number to check if it's open.
Port int64 `json:"port,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Port respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ProbeTcpSocket) RawJSON ¶ added in v0.5.0
func (r ProbeTcpSocket) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProbeTcpSocket) UnmarshalJSON ¶ added in v0.5.0
func (r *ProbeTcpSocket) UnmarshalJSON(data []byte) error
type Project ¶
type Project struct {
// Project ID, which is automatically generated upon creation.
ID int64 `json:"id,required"`
// ID associated with the client.
ClientID int64 `json:"client_id,required"`
// Datetime of creation, which is automatically generated.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Indicates if the project is the default one. Each client always has one default
// project.
IsDefault bool `json:"is_default,required"`
// Unique project name for a client.
Name string `json:"name,required"`
// The state of the project.
State string `json:"state,required"`
// Datetime of deletion, which is automatically generated if the project is
// deleted.
DeletedAt time.Time `json:"deleted_at,nullable" format:"date-time"`
// Description of the project.
Description string `json:"description,nullable"`
// The UUID of the active task that currently holds a lock on the resource. This
// lock prevents concurrent modifications to ensure consistency. If `null`, the
// resource is not locked.
TaskID string `json:"task_id,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ClientID respjson.Field
CreatedAt respjson.Field
IsDefault respjson.Field
Name respjson.Field
State respjson.Field
DeletedAt respjson.Field
Description respjson.Field
TaskID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Project) UnmarshalJSON ¶
type ProjectDeleteParams ¶
type ProjectGetParams ¶
type ProjectListParams ¶
type ProjectListParams struct {
// Client ID filter for administrators.
ClientID param.Opt[int64] `query:"client_id,omitzero" json:"-"`
// Whether to include deleted projects in the response.
IncludeDeleted param.Opt[bool] `query:"include_deleted,omitzero" json:"-"`
// Limit value is used to limit the number of records in the result
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Name to filter the results by.
Name param.Opt[string] `query:"name,omitzero" json:"-"`
// Offset value is used to exclude the first set of records from the result
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Order by field and direction.
//
// Any of "created_at.asc", "created_at.desc", "name.asc", "name.desc".
OrderBy ProjectListParamsOrderBy `query:"order_by,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ProjectListParams) URLQuery ¶
func (r ProjectListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ProjectListParams's query parameters as `url.Values`.
type ProjectListParamsOrderBy ¶
type ProjectListParamsOrderBy string
Order by field and direction.
const ( ProjectListParamsOrderByCreatedAtAsc ProjectListParamsOrderBy = "created_at.asc" ProjectListParamsOrderByCreatedAtDesc ProjectListParamsOrderBy = "created_at.desc" ProjectListParamsOrderByNameAsc ProjectListParamsOrderBy = "name.asc" ProjectListParamsOrderByNameDesc ProjectListParamsOrderBy = "name.desc" )
type ProjectNewParams ¶
type ProjectNewParams struct {
// Unique project name for a client. Each client always has one "default" project.
Name string `json:"name,required"`
// ID associated with the client.
ClientID param.Opt[int64] `json:"client_id,omitzero"`
// Description of the project.
Description param.Opt[string] `json:"description,omitzero"`
// State of the project.
State param.Opt[string] `json:"state,omitzero"`
// contains filtered or unexported fields
}
func (ProjectNewParams) MarshalJSON ¶
func (r ProjectNewParams) MarshalJSON() (data []byte, err error)
func (*ProjectNewParams) UnmarshalJSON ¶
func (r *ProjectNewParams) UnmarshalJSON(data []byte) error
type ProjectReplaceParams ¶
type ProjectReplaceParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Name of the entity, following a specific format.
Name string `json:"name,required"`
// Description of the project.
Description param.Opt[string] `json:"description,omitzero"`
// contains filtered or unexported fields
}
func (ProjectReplaceParams) MarshalJSON ¶
func (r ProjectReplaceParams) MarshalJSON() (data []byte, err error)
func (*ProjectReplaceParams) UnmarshalJSON ¶
func (r *ProjectReplaceParams) UnmarshalJSON(data []byte) error
type ProjectService ¶
type ProjectService struct {
Options []option.RequestOption
}
ProjectService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewProjectService method instead.
func NewProjectService ¶
func NewProjectService(opts ...option.RequestOption) (r ProjectService)
NewProjectService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ProjectService) Delete ¶
func (r *ProjectService) Delete(ctx context.Context, body ProjectDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Delete a project and all its associated cloud resources across all regions. This operation is irreversible and cannot be undone. Default projects cannot be deleted.
func (*ProjectService) Get ¶
func (r *ProjectService) Get(ctx context.Context, query ProjectGetParams, opts ...option.RequestOption) (res *Project, err error)
Retrieve detailed information about a specific project.
func (*ProjectService) List ¶
func (r *ProjectService) List(ctx context.Context, query ProjectListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[Project], err error)
Retrieve a list of projects for a client. Results can be filtered by name and ordered by various fields.
func (*ProjectService) ListAutoPaging ¶
func (r *ProjectService) ListAutoPaging(ctx context.Context, query ProjectListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[Project]
Retrieve a list of projects for a client. Results can be filtered by name and ordered by various fields.
func (*ProjectService) New ¶
func (r *ProjectService) New(ctx context.Context, body ProjectNewParams, opts ...option.RequestOption) (res *Project, err error)
Create a new project for a client. Project management must be enabled to perform this operation.
func (*ProjectService) Replace ¶
func (r *ProjectService) Replace(ctx context.Context, params ProjectReplaceParams, opts ...option.RequestOption) (res *Project, err error)
Update project name and description. Project management must be enabled to perform this operation.
type ProvisioningStatus ¶
type ProvisioningStatus string
const ( ProvisioningStatusActive ProvisioningStatus = "ACTIVE" ProvisioningStatusDeleted ProvisioningStatus = "DELETED" ProvisioningStatusError ProvisioningStatus = "ERROR" ProvisioningStatusPendingCreate ProvisioningStatus = "PENDING_CREATE" ProvisioningStatusPendingDelete ProvisioningStatus = "PENDING_DELETE" ProvisioningStatusPendingUpdate ProvisioningStatus = "PENDING_UPDATE" )
type QuotaGetAllResponse ¶
type QuotaGetAllResponse struct {
// Global entity quotas
GlobalQuotas QuotaGetAllResponseGlobalQuotas `json:"global_quotas"`
// Regional entity quotas. Only contains initialized quotas.
RegionalQuotas []QuotaGetAllResponseRegionalQuota `json:"regional_quotas"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
GlobalQuotas respjson.Field
RegionalQuotas respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (QuotaGetAllResponse) RawJSON ¶
func (r QuotaGetAllResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuotaGetAllResponse) UnmarshalJSON ¶
func (r *QuotaGetAllResponse) UnmarshalJSON(data []byte) error
type QuotaGetAllResponseGlobalQuotas ¶
type QuotaGetAllResponseGlobalQuotas struct {
// Inference CPU millicore count limit
InferenceCPUMillicoreCountLimit int64 `json:"inference_cpu_millicore_count_limit"`
// Inference CPU millicore count usage
InferenceCPUMillicoreCountUsage int64 `json:"inference_cpu_millicore_count_usage"`
// Inference GPU A100 Count limit
InferenceGPUA100CountLimit int64 `json:"inference_gpu_a100_count_limit"`
// Inference GPU A100 Count usage
InferenceGPUA100CountUsage int64 `json:"inference_gpu_a100_count_usage"`
// Inference GPU H100 Count limit
InferenceGPUH100CountLimit int64 `json:"inference_gpu_h100_count_limit"`
// Inference GPU H100 Count usage
InferenceGPUH100CountUsage int64 `json:"inference_gpu_h100_count_usage"`
// Inference GPU L40s Count limit
InferenceGPUL40sCountLimit int64 `json:"inference_gpu_l40s_count_limit"`
// Inference GPU L40s Count usage
InferenceGPUL40sCountUsage int64 `json:"inference_gpu_l40s_count_usage"`
// Inference instance count limit
InferenceInstanceCountLimit int64 `json:"inference_instance_count_limit"`
// Inference instance count usage
InferenceInstanceCountUsage int64 `json:"inference_instance_count_usage"`
// SSH Keys Count limit
KeypairCountLimit int64 `json:"keypair_count_limit"`
// SSH Keys Count usage
KeypairCountUsage int64 `json:"keypair_count_usage"`
// Projects Count limit
ProjectCountLimit int64 `json:"project_count_limit"`
// Projects Count usage
ProjectCountUsage int64 `json:"project_count_usage"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
InferenceCPUMillicoreCountLimit respjson.Field
InferenceCPUMillicoreCountUsage respjson.Field
InferenceGPUA100CountLimit respjson.Field
InferenceGPUA100CountUsage respjson.Field
InferenceGPUH100CountLimit respjson.Field
InferenceGPUH100CountUsage respjson.Field
InferenceGPUL40sCountLimit respjson.Field
InferenceGPUL40sCountUsage respjson.Field
InferenceInstanceCountLimit respjson.Field
InferenceInstanceCountUsage respjson.Field
KeypairCountLimit respjson.Field
KeypairCountUsage respjson.Field
ProjectCountLimit respjson.Field
ProjectCountUsage respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Global entity quotas
func (QuotaGetAllResponseGlobalQuotas) RawJSON ¶
func (r QuotaGetAllResponseGlobalQuotas) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuotaGetAllResponseGlobalQuotas) UnmarshalJSON ¶
func (r *QuotaGetAllResponseGlobalQuotas) UnmarshalJSON(data []byte) error
type QuotaGetAllResponseRegionalQuota ¶
type QuotaGetAllResponseRegionalQuota struct {
// Basic bare metal servers count limit
BaremetalBasicCountLimit int64 `json:"baremetal_basic_count_limit"`
// Basic bare metal servers count usage
BaremetalBasicCountUsage int64 `json:"baremetal_basic_count_usage"`
// Baremetal A100 GPU card count limit
BaremetalGPUA100CountLimit int64 `json:"baremetal_gpu_a100_count_limit"`
// Baremetal A100 GPU card count usage
BaremetalGPUA100CountUsage int64 `json:"baremetal_gpu_a100_count_usage"`
// AI GPU bare metal servers count limit
BaremetalGPUCountLimit int64 `json:"baremetal_gpu_count_limit"`
// AI GPU bare metal servers count usage
BaremetalGPUCountUsage int64 `json:"baremetal_gpu_count_usage"`
// Baremetal H100 GPU card count limit
BaremetalGPUH100CountLimit int64 `json:"baremetal_gpu_h100_count_limit"`
// Baremetal H100 GPU card count usage
BaremetalGPUH100CountUsage int64 `json:"baremetal_gpu_h100_count_usage"`
// Baremetal L40S GPU card count limit
BaremetalGPUL40sCountLimit int64 `json:"baremetal_gpu_l40s_count_limit"`
// Baremetal L40S GPU card count usage
BaremetalGPUL40sCountUsage int64 `json:"baremetal_gpu_l40s_count_usage"`
// High-frequency bare metal servers count limit
BaremetalHfCountLimit int64 `json:"baremetal_hf_count_limit"`
// High-frequency bare metal servers count usage
BaremetalHfCountUsage int64 `json:"baremetal_hf_count_usage"`
// Infrastructure bare metal servers count limit
BaremetalInfrastructureCountLimit int64 `json:"baremetal_infrastructure_count_limit"`
// Infrastructure bare metal servers count usage
BaremetalInfrastructureCountUsage int64 `json:"baremetal_infrastructure_count_usage"`
// Bare metal Network Count limit
BaremetalNetworkCountLimit int64 `json:"baremetal_network_count_limit"`
// Bare metal Network Count usage
BaremetalNetworkCountUsage int64 `json:"baremetal_network_count_usage"`
// Storage bare metal servers count limit
BaremetalStorageCountLimit int64 `json:"baremetal_storage_count_limit"`
// Storage bare metal servers count usage
BaremetalStorageCountUsage int64 `json:"baremetal_storage_count_usage"`
// Containers count limit
CaasContainerCountLimit int64 `json:"caas_container_count_limit"`
// Containers count usage
CaasContainerCountUsage int64 `json:"caas_container_count_usage"`
// mCPU count for containers limit
CaasCPUCountLimit int64 `json:"caas_cpu_count_limit"`
// mCPU count for containers usage
CaasCPUCountUsage int64 `json:"caas_cpu_count_usage"`
// Containers gpu count limit
CaasGPUCountLimit int64 `json:"caas_gpu_count_limit"`
// Containers gpu count usage
CaasGPUCountUsage int64 `json:"caas_gpu_count_usage"`
// MB memory count for containers limit
CaasRamSizeLimit int64 `json:"caas_ram_size_limit"`
// MB memory count for containers usage
CaasRamSizeUsage int64 `json:"caas_ram_size_usage"`
// K8s clusters count limit
ClusterCountLimit int64 `json:"cluster_count_limit"`
// K8s clusters count usage
ClusterCountUsage int64 `json:"cluster_count_usage"`
// vCPU Count limit
CPUCountLimit int64 `json:"cpu_count_limit"`
// vCPU Count usage
CPUCountUsage int64 `json:"cpu_count_usage"`
// DBaaS cluster count limit
DbaasPostgresClusterCountLimit int64 `json:"dbaas_postgres_cluster_count_limit"`
// DBaaS cluster count usage
DbaasPostgresClusterCountUsage int64 `json:"dbaas_postgres_cluster_count_usage"`
// External IP Count limit
ExternalIPCountLimit int64 `json:"external_ip_count_limit"`
// External IP Count usage
ExternalIPCountUsage int64 `json:"external_ip_count_usage"`
// mCPU count for functions limit
FaasCPUCountLimit int64 `json:"faas_cpu_count_limit"`
// mCPU count for functions usage
FaasCPUCountUsage int64 `json:"faas_cpu_count_usage"`
// Functions count limit
FaasFunctionCountLimit int64 `json:"faas_function_count_limit"`
// Functions count usage
FaasFunctionCountUsage int64 `json:"faas_function_count_usage"`
// Functions namespace count limit
FaasNamespaceCountLimit int64 `json:"faas_namespace_count_limit"`
// Functions namespace count usage
FaasNamespaceCountUsage int64 `json:"faas_namespace_count_usage"`
// MB memory count for functions limit
FaasRamSizeLimit int64 `json:"faas_ram_size_limit"`
// MB memory count for functions usage
FaasRamSizeUsage int64 `json:"faas_ram_size_usage"`
// Firewalls Count limit
FirewallCountLimit int64 `json:"firewall_count_limit"`
// Firewalls Count usage
FirewallCountUsage int64 `json:"firewall_count_usage"`
// Floating IP Count limit
FloatingCountLimit int64 `json:"floating_count_limit"`
// Floating IP Count usage
FloatingCountUsage int64 `json:"floating_count_usage"`
// GPU Count limit
GPUCountLimit int64 `json:"gpu_count_limit"`
// GPU Count usage
GPUCountUsage int64 `json:"gpu_count_usage"`
// Virtual A100 GPU card count limit
GPUVirtualA100CountLimit int64 `json:"gpu_virtual_a100_count_limit"`
// Virtual A100 GPU card count usage
GPUVirtualA100CountUsage int64 `json:"gpu_virtual_a100_count_usage"`
// Virtual H100 GPU card count limit
GPUVirtualH100CountLimit int64 `json:"gpu_virtual_h100_count_limit"`
// Virtual H100 GPU card count usage
GPUVirtualH100CountUsage int64 `json:"gpu_virtual_h100_count_usage"`
// Virtual L40S GPU card count limit
GPUVirtualL40sCountLimit int64 `json:"gpu_virtual_l40s_count_limit"`
// Virtual L40S GPU card count usage
GPUVirtualL40sCountUsage int64 `json:"gpu_virtual_l40s_count_usage"`
// Images Count limit
ImageCountLimit int64 `json:"image_count_limit"`
// Images Count usage
ImageCountUsage int64 `json:"image_count_usage"`
// Images Size, GiB limit
ImageSizeLimit int64 `json:"image_size_limit"`
// Images Size, GiB usage
ImageSizeUsage int64 `json:"image_size_usage"`
// IPU Count limit
IpuCountLimit int64 `json:"ipu_count_limit"`
// IPU Count usage
IpuCountUsage int64 `json:"ipu_count_usage"`
// LaaS Topics Count limit
LaasTopicCountLimit int64 `json:"laas_topic_count_limit"`
// LaaS Topics Count usage
LaasTopicCountUsage int64 `json:"laas_topic_count_usage"`
// Load Balancers Count limit
LoadbalancerCountLimit int64 `json:"loadbalancer_count_limit"`
// Load Balancers Count usage
LoadbalancerCountUsage int64 `json:"loadbalancer_count_usage"`
// Networks Count limit
NetworkCountLimit int64 `json:"network_count_limit"`
// Networks Count usage
NetworkCountUsage int64 `json:"network_count_usage"`
// RAM Size, GiB limit
RamLimit int64 `json:"ram_limit"`
// RAM Size, GiB usage
RamUsage int64 `json:"ram_usage"`
// Region ID
RegionID int64 `json:"region_id"`
// Registries count limit
RegistryCountLimit int64 `json:"registry_count_limit"`
// Registries count usage
RegistryCountUsage int64 `json:"registry_count_usage"`
// Registries volume usage, GiB limit
RegistryStorageLimit int64 `json:"registry_storage_limit"`
// Registries volume usage, GiB usage
RegistryStorageUsage int64 `json:"registry_storage_usage"`
// Routers Count limit
RouterCountLimit int64 `json:"router_count_limit"`
// Routers Count usage
RouterCountUsage int64 `json:"router_count_usage"`
// Secret Count limit
SecretCountLimit int64 `json:"secret_count_limit"`
// Secret Count usage
SecretCountUsage int64 `json:"secret_count_usage"`
// Placement Group Count limit
ServergroupCountLimit int64 `json:"servergroup_count_limit"`
// Placement Group Count usage
ServergroupCountUsage int64 `json:"servergroup_count_usage"`
// Shared file system Count limit
SfsCountLimit int64 `json:"sfs_count_limit"`
// Shared file system Count usage
SfsCountUsage int64 `json:"sfs_count_usage"`
// Shared file system Size, GiB limit
SfsSizeLimit int64 `json:"sfs_size_limit"`
// Shared file system Size, GiB usage
SfsSizeUsage int64 `json:"sfs_size_usage"`
SharedVmCountLimit int64 `json:"shared_vm_count_limit"`
SharedVmCountUsage int64 `json:"shared_vm_count_usage"`
// Snapshot Schedules Count limit
SnapshotScheduleCountLimit int64 `json:"snapshot_schedule_count_limit"`
// Snapshot Schedules Count usage
SnapshotScheduleCountUsage int64 `json:"snapshot_schedule_count_usage"`
// Subnets Count limit
SubnetCountLimit int64 `json:"subnet_count_limit"`
// Subnets Count usage
SubnetCountUsage int64 `json:"subnet_count_usage"`
// Instances Dedicated Count limit
VmCountLimit int64 `json:"vm_count_limit"`
// Instances Dedicated Count usage
VmCountUsage int64 `json:"vm_count_usage"`
// Volumes Count limit
VolumeCountLimit int64 `json:"volume_count_limit"`
// Volumes Count usage
VolumeCountUsage int64 `json:"volume_count_usage"`
// Volumes Size, GiB limit
VolumeSizeLimit int64 `json:"volume_size_limit"`
// Volumes Size, GiB usage
VolumeSizeUsage int64 `json:"volume_size_usage"`
// Snapshots Count limit
VolumeSnapshotsCountLimit int64 `json:"volume_snapshots_count_limit"`
// Snapshots Count usage
VolumeSnapshotsCountUsage int64 `json:"volume_snapshots_count_usage"`
// Snapshots Size, GiB limit
VolumeSnapshotsSizeLimit int64 `json:"volume_snapshots_size_limit"`
// Snapshots Size, GiB usage
VolumeSnapshotsSizeUsage int64 `json:"volume_snapshots_size_usage"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BaremetalBasicCountLimit respjson.Field
BaremetalBasicCountUsage respjson.Field
BaremetalGPUA100CountLimit respjson.Field
BaremetalGPUA100CountUsage respjson.Field
BaremetalGPUCountLimit respjson.Field
BaremetalGPUCountUsage respjson.Field
BaremetalGPUH100CountLimit respjson.Field
BaremetalGPUH100CountUsage respjson.Field
BaremetalGPUL40sCountLimit respjson.Field
BaremetalGPUL40sCountUsage respjson.Field
BaremetalHfCountLimit respjson.Field
BaremetalHfCountUsage respjson.Field
BaremetalInfrastructureCountLimit respjson.Field
BaremetalInfrastructureCountUsage respjson.Field
BaremetalNetworkCountLimit respjson.Field
BaremetalNetworkCountUsage respjson.Field
BaremetalStorageCountLimit respjson.Field
BaremetalStorageCountUsage respjson.Field
CaasContainerCountLimit respjson.Field
CaasContainerCountUsage respjson.Field
CaasCPUCountLimit respjson.Field
CaasCPUCountUsage respjson.Field
CaasGPUCountLimit respjson.Field
CaasGPUCountUsage respjson.Field
CaasRamSizeLimit respjson.Field
CaasRamSizeUsage respjson.Field
ClusterCountLimit respjson.Field
ClusterCountUsage respjson.Field
CPUCountLimit respjson.Field
CPUCountUsage respjson.Field
DbaasPostgresClusterCountLimit respjson.Field
DbaasPostgresClusterCountUsage respjson.Field
ExternalIPCountLimit respjson.Field
ExternalIPCountUsage respjson.Field
FaasCPUCountLimit respjson.Field
FaasCPUCountUsage respjson.Field
FaasFunctionCountLimit respjson.Field
FaasFunctionCountUsage respjson.Field
FaasNamespaceCountLimit respjson.Field
FaasNamespaceCountUsage respjson.Field
FaasRamSizeLimit respjson.Field
FaasRamSizeUsage respjson.Field
FirewallCountLimit respjson.Field
FirewallCountUsage respjson.Field
FloatingCountLimit respjson.Field
FloatingCountUsage respjson.Field
GPUCountLimit respjson.Field
GPUCountUsage respjson.Field
GPUVirtualA100CountLimit respjson.Field
GPUVirtualA100CountUsage respjson.Field
GPUVirtualH100CountLimit respjson.Field
GPUVirtualH100CountUsage respjson.Field
GPUVirtualL40sCountLimit respjson.Field
GPUVirtualL40sCountUsage respjson.Field
ImageCountLimit respjson.Field
ImageCountUsage respjson.Field
ImageSizeLimit respjson.Field
ImageSizeUsage respjson.Field
IpuCountLimit respjson.Field
IpuCountUsage respjson.Field
LaasTopicCountLimit respjson.Field
LaasTopicCountUsage respjson.Field
LoadbalancerCountLimit respjson.Field
LoadbalancerCountUsage respjson.Field
NetworkCountLimit respjson.Field
NetworkCountUsage respjson.Field
RamLimit respjson.Field
RamUsage respjson.Field
RegionID respjson.Field
RegistryCountLimit respjson.Field
RegistryCountUsage respjson.Field
RegistryStorageLimit respjson.Field
RegistryStorageUsage respjson.Field
RouterCountLimit respjson.Field
RouterCountUsage respjson.Field
SecretCountLimit respjson.Field
SecretCountUsage respjson.Field
ServergroupCountLimit respjson.Field
ServergroupCountUsage respjson.Field
SfsCountLimit respjson.Field
SfsCountUsage respjson.Field
SfsSizeLimit respjson.Field
SfsSizeUsage respjson.Field
SharedVmCountLimit respjson.Field
SharedVmCountUsage respjson.Field
SnapshotScheduleCountLimit respjson.Field
SnapshotScheduleCountUsage respjson.Field
SubnetCountLimit respjson.Field
SubnetCountUsage respjson.Field
VmCountLimit respjson.Field
VmCountUsage respjson.Field
VolumeCountLimit respjson.Field
VolumeCountUsage respjson.Field
VolumeSizeLimit respjson.Field
VolumeSizeUsage respjson.Field
VolumeSnapshotsCountLimit respjson.Field
VolumeSnapshotsCountUsage respjson.Field
VolumeSnapshotsSizeLimit respjson.Field
VolumeSnapshotsSizeUsage respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (QuotaGetAllResponseRegionalQuota) RawJSON ¶
func (r QuotaGetAllResponseRegionalQuota) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuotaGetAllResponseRegionalQuota) UnmarshalJSON ¶
func (r *QuotaGetAllResponseRegionalQuota) UnmarshalJSON(data []byte) error
type QuotaGetByRegionParams ¶
type QuotaGetByRegionResponse ¶
type QuotaGetByRegionResponse struct {
// Basic bare metal servers count limit
BaremetalBasicCountLimit int64 `json:"baremetal_basic_count_limit"`
// Basic bare metal servers count usage
BaremetalBasicCountUsage int64 `json:"baremetal_basic_count_usage"`
// Baremetal A100 GPU card count limit
BaremetalGPUA100CountLimit int64 `json:"baremetal_gpu_a100_count_limit"`
// Baremetal A100 GPU card count usage
BaremetalGPUA100CountUsage int64 `json:"baremetal_gpu_a100_count_usage"`
// AI GPU bare metal servers count limit
BaremetalGPUCountLimit int64 `json:"baremetal_gpu_count_limit"`
// AI GPU bare metal servers count usage
BaremetalGPUCountUsage int64 `json:"baremetal_gpu_count_usage"`
// Baremetal H100 GPU card count limit
BaremetalGPUH100CountLimit int64 `json:"baremetal_gpu_h100_count_limit"`
// Baremetal H100 GPU card count usage
BaremetalGPUH100CountUsage int64 `json:"baremetal_gpu_h100_count_usage"`
// Baremetal L40S GPU card count limit
BaremetalGPUL40sCountLimit int64 `json:"baremetal_gpu_l40s_count_limit"`
// Baremetal L40S GPU card count usage
BaremetalGPUL40sCountUsage int64 `json:"baremetal_gpu_l40s_count_usage"`
// High-frequency bare metal servers count limit
BaremetalHfCountLimit int64 `json:"baremetal_hf_count_limit"`
// High-frequency bare metal servers count usage
BaremetalHfCountUsage int64 `json:"baremetal_hf_count_usage"`
// Infrastructure bare metal servers count limit
BaremetalInfrastructureCountLimit int64 `json:"baremetal_infrastructure_count_limit"`
// Infrastructure bare metal servers count usage
BaremetalInfrastructureCountUsage int64 `json:"baremetal_infrastructure_count_usage"`
// Bare metal Network Count limit
BaremetalNetworkCountLimit int64 `json:"baremetal_network_count_limit"`
// Bare metal Network Count usage
BaremetalNetworkCountUsage int64 `json:"baremetal_network_count_usage"`
// Storage bare metal servers count limit
BaremetalStorageCountLimit int64 `json:"baremetal_storage_count_limit"`
// Storage bare metal servers count usage
BaremetalStorageCountUsage int64 `json:"baremetal_storage_count_usage"`
// Containers count limit
CaasContainerCountLimit int64 `json:"caas_container_count_limit"`
// Containers count usage
CaasContainerCountUsage int64 `json:"caas_container_count_usage"`
// mCPU count for containers limit
CaasCPUCountLimit int64 `json:"caas_cpu_count_limit"`
// mCPU count for containers usage
CaasCPUCountUsage int64 `json:"caas_cpu_count_usage"`
// Containers gpu count limit
CaasGPUCountLimit int64 `json:"caas_gpu_count_limit"`
// Containers gpu count usage
CaasGPUCountUsage int64 `json:"caas_gpu_count_usage"`
// MB memory count for containers limit
CaasRamSizeLimit int64 `json:"caas_ram_size_limit"`
// MB memory count for containers usage
CaasRamSizeUsage int64 `json:"caas_ram_size_usage"`
// K8s clusters count limit
ClusterCountLimit int64 `json:"cluster_count_limit"`
// K8s clusters count usage
ClusterCountUsage int64 `json:"cluster_count_usage"`
// vCPU Count limit
CPUCountLimit int64 `json:"cpu_count_limit"`
// vCPU Count usage
CPUCountUsage int64 `json:"cpu_count_usage"`
// DBaaS cluster count limit
DbaasPostgresClusterCountLimit int64 `json:"dbaas_postgres_cluster_count_limit"`
// DBaaS cluster count usage
DbaasPostgresClusterCountUsage int64 `json:"dbaas_postgres_cluster_count_usage"`
// External IP Count limit
ExternalIPCountLimit int64 `json:"external_ip_count_limit"`
// External IP Count usage
ExternalIPCountUsage int64 `json:"external_ip_count_usage"`
// mCPU count for functions limit
FaasCPUCountLimit int64 `json:"faas_cpu_count_limit"`
// mCPU count for functions usage
FaasCPUCountUsage int64 `json:"faas_cpu_count_usage"`
// Functions count limit
FaasFunctionCountLimit int64 `json:"faas_function_count_limit"`
// Functions count usage
FaasFunctionCountUsage int64 `json:"faas_function_count_usage"`
// Functions namespace count limit
FaasNamespaceCountLimit int64 `json:"faas_namespace_count_limit"`
// Functions namespace count usage
FaasNamespaceCountUsage int64 `json:"faas_namespace_count_usage"`
// MB memory count for functions limit
FaasRamSizeLimit int64 `json:"faas_ram_size_limit"`
// MB memory count for functions usage
FaasRamSizeUsage int64 `json:"faas_ram_size_usage"`
// Firewalls Count limit
FirewallCountLimit int64 `json:"firewall_count_limit"`
// Firewalls Count usage
FirewallCountUsage int64 `json:"firewall_count_usage"`
// Floating IP Count limit
FloatingCountLimit int64 `json:"floating_count_limit"`
// Floating IP Count usage
FloatingCountUsage int64 `json:"floating_count_usage"`
// GPU Count limit
GPUCountLimit int64 `json:"gpu_count_limit"`
// GPU Count usage
GPUCountUsage int64 `json:"gpu_count_usage"`
// Virtual A100 GPU card count limit
GPUVirtualA100CountLimit int64 `json:"gpu_virtual_a100_count_limit"`
// Virtual A100 GPU card count usage
GPUVirtualA100CountUsage int64 `json:"gpu_virtual_a100_count_usage"`
// Virtual H100 GPU card count limit
GPUVirtualH100CountLimit int64 `json:"gpu_virtual_h100_count_limit"`
// Virtual H100 GPU card count usage
GPUVirtualH100CountUsage int64 `json:"gpu_virtual_h100_count_usage"`
// Virtual L40S GPU card count limit
GPUVirtualL40sCountLimit int64 `json:"gpu_virtual_l40s_count_limit"`
// Virtual L40S GPU card count usage
GPUVirtualL40sCountUsage int64 `json:"gpu_virtual_l40s_count_usage"`
// Images Count limit
ImageCountLimit int64 `json:"image_count_limit"`
// Images Count usage
ImageCountUsage int64 `json:"image_count_usage"`
// Images Size, GiB limit
ImageSizeLimit int64 `json:"image_size_limit"`
// Images Size, GiB usage
ImageSizeUsage int64 `json:"image_size_usage"`
// IPU Count limit
IpuCountLimit int64 `json:"ipu_count_limit"`
// IPU Count usage
IpuCountUsage int64 `json:"ipu_count_usage"`
// LaaS Topics Count limit
LaasTopicCountLimit int64 `json:"laas_topic_count_limit"`
// LaaS Topics Count usage
LaasTopicCountUsage int64 `json:"laas_topic_count_usage"`
// Load Balancers Count limit
LoadbalancerCountLimit int64 `json:"loadbalancer_count_limit"`
// Load Balancers Count usage
LoadbalancerCountUsage int64 `json:"loadbalancer_count_usage"`
// Networks Count limit
NetworkCountLimit int64 `json:"network_count_limit"`
// Networks Count usage
NetworkCountUsage int64 `json:"network_count_usage"`
// RAM Size, GiB limit
RamLimit int64 `json:"ram_limit"`
// RAM Size, GiB usage
RamUsage int64 `json:"ram_usage"`
// Region ID
RegionID int64 `json:"region_id"`
// Registries count limit
RegistryCountLimit int64 `json:"registry_count_limit"`
// Registries count usage
RegistryCountUsage int64 `json:"registry_count_usage"`
// Registries volume usage, GiB limit
RegistryStorageLimit int64 `json:"registry_storage_limit"`
// Registries volume usage, GiB usage
RegistryStorageUsage int64 `json:"registry_storage_usage"`
// Routers Count limit
RouterCountLimit int64 `json:"router_count_limit"`
// Routers Count usage
RouterCountUsage int64 `json:"router_count_usage"`
// Secret Count limit
SecretCountLimit int64 `json:"secret_count_limit"`
// Secret Count usage
SecretCountUsage int64 `json:"secret_count_usage"`
// Placement Group Count limit
ServergroupCountLimit int64 `json:"servergroup_count_limit"`
// Placement Group Count usage
ServergroupCountUsage int64 `json:"servergroup_count_usage"`
// Shared file system Count limit
SfsCountLimit int64 `json:"sfs_count_limit"`
// Shared file system Count usage
SfsCountUsage int64 `json:"sfs_count_usage"`
// Shared file system Size, GiB limit
SfsSizeLimit int64 `json:"sfs_size_limit"`
// Shared file system Size, GiB usage
SfsSizeUsage int64 `json:"sfs_size_usage"`
SharedVmCountLimit int64 `json:"shared_vm_count_limit"`
SharedVmCountUsage int64 `json:"shared_vm_count_usage"`
// Snapshot Schedules Count limit
SnapshotScheduleCountLimit int64 `json:"snapshot_schedule_count_limit"`
// Snapshot Schedules Count usage
SnapshotScheduleCountUsage int64 `json:"snapshot_schedule_count_usage"`
// Subnets Count limit
SubnetCountLimit int64 `json:"subnet_count_limit"`
// Subnets Count usage
SubnetCountUsage int64 `json:"subnet_count_usage"`
// Instances Dedicated Count limit
VmCountLimit int64 `json:"vm_count_limit"`
// Instances Dedicated Count usage
VmCountUsage int64 `json:"vm_count_usage"`
// Volumes Count limit
VolumeCountLimit int64 `json:"volume_count_limit"`
// Volumes Count usage
VolumeCountUsage int64 `json:"volume_count_usage"`
// Volumes Size, GiB limit
VolumeSizeLimit int64 `json:"volume_size_limit"`
// Volumes Size, GiB usage
VolumeSizeUsage int64 `json:"volume_size_usage"`
// Snapshots Count limit
VolumeSnapshotsCountLimit int64 `json:"volume_snapshots_count_limit"`
// Snapshots Count usage
VolumeSnapshotsCountUsage int64 `json:"volume_snapshots_count_usage"`
// Snapshots Size, GiB limit
VolumeSnapshotsSizeLimit int64 `json:"volume_snapshots_size_limit"`
// Snapshots Size, GiB usage
VolumeSnapshotsSizeUsage int64 `json:"volume_snapshots_size_usage"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BaremetalBasicCountLimit respjson.Field
BaremetalBasicCountUsage respjson.Field
BaremetalGPUA100CountLimit respjson.Field
BaremetalGPUA100CountUsage respjson.Field
BaremetalGPUCountLimit respjson.Field
BaremetalGPUCountUsage respjson.Field
BaremetalGPUH100CountLimit respjson.Field
BaremetalGPUH100CountUsage respjson.Field
BaremetalGPUL40sCountLimit respjson.Field
BaremetalGPUL40sCountUsage respjson.Field
BaremetalHfCountLimit respjson.Field
BaremetalHfCountUsage respjson.Field
BaremetalInfrastructureCountLimit respjson.Field
BaremetalInfrastructureCountUsage respjson.Field
BaremetalNetworkCountLimit respjson.Field
BaremetalNetworkCountUsage respjson.Field
BaremetalStorageCountLimit respjson.Field
BaremetalStorageCountUsage respjson.Field
CaasContainerCountLimit respjson.Field
CaasContainerCountUsage respjson.Field
CaasCPUCountLimit respjson.Field
CaasCPUCountUsage respjson.Field
CaasGPUCountLimit respjson.Field
CaasGPUCountUsage respjson.Field
CaasRamSizeLimit respjson.Field
CaasRamSizeUsage respjson.Field
ClusterCountLimit respjson.Field
ClusterCountUsage respjson.Field
CPUCountLimit respjson.Field
CPUCountUsage respjson.Field
DbaasPostgresClusterCountLimit respjson.Field
DbaasPostgresClusterCountUsage respjson.Field
ExternalIPCountLimit respjson.Field
ExternalIPCountUsage respjson.Field
FaasCPUCountLimit respjson.Field
FaasCPUCountUsage respjson.Field
FaasFunctionCountLimit respjson.Field
FaasFunctionCountUsage respjson.Field
FaasNamespaceCountLimit respjson.Field
FaasNamespaceCountUsage respjson.Field
FaasRamSizeLimit respjson.Field
FaasRamSizeUsage respjson.Field
FirewallCountLimit respjson.Field
FirewallCountUsage respjson.Field
FloatingCountLimit respjson.Field
FloatingCountUsage respjson.Field
GPUCountLimit respjson.Field
GPUCountUsage respjson.Field
GPUVirtualA100CountLimit respjson.Field
GPUVirtualA100CountUsage respjson.Field
GPUVirtualH100CountLimit respjson.Field
GPUVirtualH100CountUsage respjson.Field
GPUVirtualL40sCountLimit respjson.Field
GPUVirtualL40sCountUsage respjson.Field
ImageCountLimit respjson.Field
ImageCountUsage respjson.Field
ImageSizeLimit respjson.Field
ImageSizeUsage respjson.Field
IpuCountLimit respjson.Field
IpuCountUsage respjson.Field
LaasTopicCountLimit respjson.Field
LaasTopicCountUsage respjson.Field
LoadbalancerCountLimit respjson.Field
LoadbalancerCountUsage respjson.Field
NetworkCountLimit respjson.Field
NetworkCountUsage respjson.Field
RamLimit respjson.Field
RamUsage respjson.Field
RegionID respjson.Field
RegistryCountLimit respjson.Field
RegistryCountUsage respjson.Field
RegistryStorageLimit respjson.Field
RegistryStorageUsage respjson.Field
RouterCountLimit respjson.Field
RouterCountUsage respjson.Field
SecretCountLimit respjson.Field
SecretCountUsage respjson.Field
ServergroupCountLimit respjson.Field
ServergroupCountUsage respjson.Field
SfsCountLimit respjson.Field
SfsCountUsage respjson.Field
SfsSizeLimit respjson.Field
SfsSizeUsage respjson.Field
SharedVmCountLimit respjson.Field
SharedVmCountUsage respjson.Field
SnapshotScheduleCountLimit respjson.Field
SnapshotScheduleCountUsage respjson.Field
SubnetCountLimit respjson.Field
SubnetCountUsage respjson.Field
VmCountLimit respjson.Field
VmCountUsage respjson.Field
VolumeCountLimit respjson.Field
VolumeCountUsage respjson.Field
VolumeSizeLimit respjson.Field
VolumeSizeUsage respjson.Field
VolumeSnapshotsCountLimit respjson.Field
VolumeSnapshotsCountUsage respjson.Field
VolumeSnapshotsSizeLimit respjson.Field
VolumeSnapshotsSizeUsage respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (QuotaGetByRegionResponse) RawJSON ¶
func (r QuotaGetByRegionResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuotaGetByRegionResponse) UnmarshalJSON ¶
func (r *QuotaGetByRegionResponse) UnmarshalJSON(data []byte) error
type QuotaGetGlobalResponse ¶
type QuotaGetGlobalResponse struct {
// Inference CPU millicore count limit
InferenceCPUMillicoreCountLimit int64 `json:"inference_cpu_millicore_count_limit"`
// Inference CPU millicore count usage
InferenceCPUMillicoreCountUsage int64 `json:"inference_cpu_millicore_count_usage"`
// Inference GPU A100 Count limit
InferenceGPUA100CountLimit int64 `json:"inference_gpu_a100_count_limit"`
// Inference GPU A100 Count usage
InferenceGPUA100CountUsage int64 `json:"inference_gpu_a100_count_usage"`
// Inference GPU H100 Count limit
InferenceGPUH100CountLimit int64 `json:"inference_gpu_h100_count_limit"`
// Inference GPU H100 Count usage
InferenceGPUH100CountUsage int64 `json:"inference_gpu_h100_count_usage"`
// Inference GPU L40s Count limit
InferenceGPUL40sCountLimit int64 `json:"inference_gpu_l40s_count_limit"`
// Inference GPU L40s Count usage
InferenceGPUL40sCountUsage int64 `json:"inference_gpu_l40s_count_usage"`
// Inference instance count limit
InferenceInstanceCountLimit int64 `json:"inference_instance_count_limit"`
// Inference instance count usage
InferenceInstanceCountUsage int64 `json:"inference_instance_count_usage"`
// SSH Keys Count limit
KeypairCountLimit int64 `json:"keypair_count_limit"`
// SSH Keys Count usage
KeypairCountUsage int64 `json:"keypair_count_usage"`
// Projects Count limit
ProjectCountLimit int64 `json:"project_count_limit"`
// Projects Count usage
ProjectCountUsage int64 `json:"project_count_usage"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
InferenceCPUMillicoreCountLimit respjson.Field
InferenceCPUMillicoreCountUsage respjson.Field
InferenceGPUA100CountLimit respjson.Field
InferenceGPUA100CountUsage respjson.Field
InferenceGPUH100CountLimit respjson.Field
InferenceGPUH100CountUsage respjson.Field
InferenceGPUL40sCountLimit respjson.Field
InferenceGPUL40sCountUsage respjson.Field
InferenceInstanceCountLimit respjson.Field
InferenceInstanceCountUsage respjson.Field
KeypairCountLimit respjson.Field
KeypairCountUsage respjson.Field
ProjectCountLimit respjson.Field
ProjectCountUsage respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (QuotaGetGlobalResponse) RawJSON ¶
func (r QuotaGetGlobalResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuotaGetGlobalResponse) UnmarshalJSON ¶
func (r *QuotaGetGlobalResponse) UnmarshalJSON(data []byte) error
type QuotaRequestGetResponse ¶
type QuotaRequestGetResponse struct {
// Request ID
ID int64 `json:"id,required"`
// Client ID
ClientID int64 `json:"client_id,required"`
// Requested limits.
RequestedLimits QuotaRequestGetResponseRequestedLimits `json:"requested_limits,required"`
// Request status
Status string `json:"status,required"`
// Datetime when the request was created.
CreatedAt time.Time `json:"created_at" format:"date-time"`
// Describe the reason, in general terms.
Description string `json:"description,nullable"`
// Datetime when the request was updated.
UpdatedAt time.Time `json:"updated_at,nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ClientID respjson.Field
RequestedLimits respjson.Field
Status respjson.Field
CreatedAt respjson.Field
Description respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (QuotaRequestGetResponse) RawJSON ¶
func (r QuotaRequestGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuotaRequestGetResponse) UnmarshalJSON ¶
func (r *QuotaRequestGetResponse) UnmarshalJSON(data []byte) error
type QuotaRequestGetResponseRequestedLimits ¶
type QuotaRequestGetResponseRequestedLimits struct {
// Global entity quota limits
GlobalLimits QuotaRequestGetResponseRequestedLimitsGlobalLimits `json:"global_limits"`
// Regions and their quota limits
RegionalLimits []QuotaRequestGetResponseRequestedLimitsRegionalLimit `json:"regional_limits"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
GlobalLimits respjson.Field
RegionalLimits respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Requested limits.
func (QuotaRequestGetResponseRequestedLimits) RawJSON ¶
func (r QuotaRequestGetResponseRequestedLimits) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuotaRequestGetResponseRequestedLimits) UnmarshalJSON ¶
func (r *QuotaRequestGetResponseRequestedLimits) UnmarshalJSON(data []byte) error
type QuotaRequestGetResponseRequestedLimitsGlobalLimits ¶
type QuotaRequestGetResponseRequestedLimitsGlobalLimits struct {
// Inference CPU millicore count limit
InferenceCPUMillicoreCountLimit int64 `json:"inference_cpu_millicore_count_limit"`
// Inference GPU A100 Count limit
InferenceGPUA100CountLimit int64 `json:"inference_gpu_a100_count_limit"`
// Inference GPU H100 Count limit
InferenceGPUH100CountLimit int64 `json:"inference_gpu_h100_count_limit"`
// Inference GPU L40s Count limit
InferenceGPUL40sCountLimit int64 `json:"inference_gpu_l40s_count_limit"`
// Inference instance count limit
InferenceInstanceCountLimit int64 `json:"inference_instance_count_limit"`
// SSH Keys Count limit
KeypairCountLimit int64 `json:"keypair_count_limit"`
// Projects Count limit
ProjectCountLimit int64 `json:"project_count_limit"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
InferenceCPUMillicoreCountLimit respjson.Field
InferenceGPUA100CountLimit respjson.Field
InferenceGPUH100CountLimit respjson.Field
InferenceGPUL40sCountLimit respjson.Field
InferenceInstanceCountLimit respjson.Field
KeypairCountLimit respjson.Field
ProjectCountLimit respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Global entity quota limits
func (QuotaRequestGetResponseRequestedLimitsGlobalLimits) RawJSON ¶
func (r QuotaRequestGetResponseRequestedLimitsGlobalLimits) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuotaRequestGetResponseRequestedLimitsGlobalLimits) UnmarshalJSON ¶
func (r *QuotaRequestGetResponseRequestedLimitsGlobalLimits) UnmarshalJSON(data []byte) error
type QuotaRequestGetResponseRequestedLimitsRegionalLimit ¶
type QuotaRequestGetResponseRequestedLimitsRegionalLimit struct {
// Basic bare metal servers count limit
BaremetalBasicCountLimit int64 `json:"baremetal_basic_count_limit"`
// Baremetal A100 GPU card count limit
BaremetalGPUA100CountLimit int64 `json:"baremetal_gpu_a100_count_limit"`
// AI GPU bare metal servers count limit
BaremetalGPUCountLimit int64 `json:"baremetal_gpu_count_limit"`
// Baremetal H100 GPU card count limit
BaremetalGPUH100CountLimit int64 `json:"baremetal_gpu_h100_count_limit"`
// Baremetal L40S GPU card count limit
BaremetalGPUL40sCountLimit int64 `json:"baremetal_gpu_l40s_count_limit"`
// High-frequency bare metal servers count limit
BaremetalHfCountLimit int64 `json:"baremetal_hf_count_limit"`
// Infrastructure bare metal servers count limit
BaremetalInfrastructureCountLimit int64 `json:"baremetal_infrastructure_count_limit"`
// Bare metal Network Count limit
BaremetalNetworkCountLimit int64 `json:"baremetal_network_count_limit"`
// Storage bare metal servers count limit
BaremetalStorageCountLimit int64 `json:"baremetal_storage_count_limit"`
// Containers count limit
CaasContainerCountLimit int64 `json:"caas_container_count_limit"`
// mCPU count for containers limit
CaasCPUCountLimit int64 `json:"caas_cpu_count_limit"`
// Containers gpu count limit
CaasGPUCountLimit int64 `json:"caas_gpu_count_limit"`
// MB memory count for containers limit
CaasRamSizeLimit int64 `json:"caas_ram_size_limit"`
// K8s clusters count limit
ClusterCountLimit int64 `json:"cluster_count_limit"`
// vCPU Count limit
CPUCountLimit int64 `json:"cpu_count_limit"`
// DBaaS cluster count limit
DbaasPostgresClusterCountLimit int64 `json:"dbaas_postgres_cluster_count_limit"`
// External IP Count limit
ExternalIPCountLimit int64 `json:"external_ip_count_limit"`
// mCPU count for functions limit
FaasCPUCountLimit int64 `json:"faas_cpu_count_limit"`
// Functions count limit
FaasFunctionCountLimit int64 `json:"faas_function_count_limit"`
// Functions namespace count limit
FaasNamespaceCountLimit int64 `json:"faas_namespace_count_limit"`
// MB memory count for functions limit
FaasRamSizeLimit int64 `json:"faas_ram_size_limit"`
// Firewalls Count limit
FirewallCountLimit int64 `json:"firewall_count_limit"`
// Floating IP Count limit
FloatingCountLimit int64 `json:"floating_count_limit"`
// GPU Count limit
GPUCountLimit int64 `json:"gpu_count_limit"`
// Virtual A100 GPU card count limit
GPUVirtualA100CountLimit int64 `json:"gpu_virtual_a100_count_limit"`
// Virtual H100 GPU card count limit
GPUVirtualH100CountLimit int64 `json:"gpu_virtual_h100_count_limit"`
// Virtual L40S GPU card count limit
GPUVirtualL40sCountLimit int64 `json:"gpu_virtual_l40s_count_limit"`
// Images Count limit
ImageCountLimit int64 `json:"image_count_limit"`
// Images Size, GiB limit
ImageSizeLimit int64 `json:"image_size_limit"`
// IPU Count limit
IpuCountLimit int64 `json:"ipu_count_limit"`
// LaaS Topics Count limit
LaasTopicCountLimit int64 `json:"laas_topic_count_limit"`
// Load Balancers Count limit
LoadbalancerCountLimit int64 `json:"loadbalancer_count_limit"`
// Networks Count limit
NetworkCountLimit int64 `json:"network_count_limit"`
// RAM Size, GiB limit
RamLimit int64 `json:"ram_limit"`
// Region ID
RegionID int64 `json:"region_id"`
// Registries count limit
RegistryCountLimit int64 `json:"registry_count_limit"`
// Registries volume usage, GiB limit
RegistryStorageLimit int64 `json:"registry_storage_limit"`
// Routers Count limit
RouterCountLimit int64 `json:"router_count_limit"`
// Secret Count limit
SecretCountLimit int64 `json:"secret_count_limit"`
// Placement Group Count limit
ServergroupCountLimit int64 `json:"servergroup_count_limit"`
// Shared file system Count limit
SfsCountLimit int64 `json:"sfs_count_limit"`
// Shared file system Size, GiB limit
SfsSizeLimit int64 `json:"sfs_size_limit"`
SharedVmCountLimit int64 `json:"shared_vm_count_limit"`
// Snapshot Schedules Count limit
SnapshotScheduleCountLimit int64 `json:"snapshot_schedule_count_limit"`
// Subnets Count limit
SubnetCountLimit int64 `json:"subnet_count_limit"`
// Instances Dedicated Count limit
VmCountLimit int64 `json:"vm_count_limit"`
// Volumes Count limit
VolumeCountLimit int64 `json:"volume_count_limit"`
// Volumes Size, GiB limit
VolumeSizeLimit int64 `json:"volume_size_limit"`
// Snapshots Count limit
VolumeSnapshotsCountLimit int64 `json:"volume_snapshots_count_limit"`
// Snapshots Size, GiB limit
VolumeSnapshotsSizeLimit int64 `json:"volume_snapshots_size_limit"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BaremetalBasicCountLimit respjson.Field
BaremetalGPUA100CountLimit respjson.Field
BaremetalGPUCountLimit respjson.Field
BaremetalGPUH100CountLimit respjson.Field
BaremetalGPUL40sCountLimit respjson.Field
BaremetalHfCountLimit respjson.Field
BaremetalInfrastructureCountLimit respjson.Field
BaremetalNetworkCountLimit respjson.Field
BaremetalStorageCountLimit respjson.Field
CaasContainerCountLimit respjson.Field
CaasCPUCountLimit respjson.Field
CaasGPUCountLimit respjson.Field
CaasRamSizeLimit respjson.Field
ClusterCountLimit respjson.Field
CPUCountLimit respjson.Field
DbaasPostgresClusterCountLimit respjson.Field
ExternalIPCountLimit respjson.Field
FaasCPUCountLimit respjson.Field
FaasFunctionCountLimit respjson.Field
FaasNamespaceCountLimit respjson.Field
FaasRamSizeLimit respjson.Field
FirewallCountLimit respjson.Field
FloatingCountLimit respjson.Field
GPUCountLimit respjson.Field
GPUVirtualA100CountLimit respjson.Field
GPUVirtualH100CountLimit respjson.Field
GPUVirtualL40sCountLimit respjson.Field
ImageCountLimit respjson.Field
ImageSizeLimit respjson.Field
IpuCountLimit respjson.Field
LaasTopicCountLimit respjson.Field
LoadbalancerCountLimit respjson.Field
NetworkCountLimit respjson.Field
RamLimit respjson.Field
RegionID respjson.Field
RegistryCountLimit respjson.Field
RegistryStorageLimit respjson.Field
RouterCountLimit respjson.Field
SecretCountLimit respjson.Field
ServergroupCountLimit respjson.Field
SfsCountLimit respjson.Field
SfsSizeLimit respjson.Field
SharedVmCountLimit respjson.Field
SnapshotScheduleCountLimit respjson.Field
SubnetCountLimit respjson.Field
VmCountLimit respjson.Field
VolumeCountLimit respjson.Field
VolumeSizeLimit respjson.Field
VolumeSnapshotsCountLimit respjson.Field
VolumeSnapshotsSizeLimit respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (QuotaRequestGetResponseRequestedLimitsRegionalLimit) RawJSON ¶
func (r QuotaRequestGetResponseRequestedLimitsRegionalLimit) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuotaRequestGetResponseRequestedLimitsRegionalLimit) UnmarshalJSON ¶
func (r *QuotaRequestGetResponseRequestedLimitsRegionalLimit) UnmarshalJSON(data []byte) error
type QuotaRequestListParams ¶
type QuotaRequestListParams struct {
// Optional. Limit the number of returned items
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Optional. Offset value is used to exclude the first set of records from the
// result
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// List of limit requests statuses for filtering
//
// Any of "done", "in progress", "rejected".
Status []string `query:"status,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (QuotaRequestListParams) URLQuery ¶
func (r QuotaRequestListParams) URLQuery() (v url.Values, err error)
URLQuery serializes QuotaRequestListParams's query parameters as `url.Values`.
type QuotaRequestListResponse ¶
type QuotaRequestListResponse struct {
// Request ID
ID int64 `json:"id,required"`
// Client ID
ClientID int64 `json:"client_id,required"`
// Requested limits.
RequestedLimits QuotaRequestListResponseRequestedLimits `json:"requested_limits,required"`
// Request status
Status string `json:"status,required"`
// Datetime when the request was created.
CreatedAt time.Time `json:"created_at" format:"date-time"`
// Describe the reason, in general terms.
Description string `json:"description,nullable"`
// Datetime when the request was updated.
UpdatedAt time.Time `json:"updated_at,nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ClientID respjson.Field
RequestedLimits respjson.Field
Status respjson.Field
CreatedAt respjson.Field
Description respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (QuotaRequestListResponse) RawJSON ¶
func (r QuotaRequestListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuotaRequestListResponse) UnmarshalJSON ¶
func (r *QuotaRequestListResponse) UnmarshalJSON(data []byte) error
type QuotaRequestListResponseRequestedLimits ¶
type QuotaRequestListResponseRequestedLimits struct {
// Global entity quota limits
GlobalLimits QuotaRequestListResponseRequestedLimitsGlobalLimits `json:"global_limits"`
// Regions and their quota limits
RegionalLimits []QuotaRequestListResponseRequestedLimitsRegionalLimit `json:"regional_limits"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
GlobalLimits respjson.Field
RegionalLimits respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Requested limits.
func (QuotaRequestListResponseRequestedLimits) RawJSON ¶
func (r QuotaRequestListResponseRequestedLimits) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuotaRequestListResponseRequestedLimits) UnmarshalJSON ¶
func (r *QuotaRequestListResponseRequestedLimits) UnmarshalJSON(data []byte) error
type QuotaRequestListResponseRequestedLimitsGlobalLimits ¶
type QuotaRequestListResponseRequestedLimitsGlobalLimits struct {
// Inference CPU millicore count limit
InferenceCPUMillicoreCountLimit int64 `json:"inference_cpu_millicore_count_limit"`
// Inference GPU A100 Count limit
InferenceGPUA100CountLimit int64 `json:"inference_gpu_a100_count_limit"`
// Inference GPU H100 Count limit
InferenceGPUH100CountLimit int64 `json:"inference_gpu_h100_count_limit"`
// Inference GPU L40s Count limit
InferenceGPUL40sCountLimit int64 `json:"inference_gpu_l40s_count_limit"`
// Inference instance count limit
InferenceInstanceCountLimit int64 `json:"inference_instance_count_limit"`
// SSH Keys Count limit
KeypairCountLimit int64 `json:"keypair_count_limit"`
// Projects Count limit
ProjectCountLimit int64 `json:"project_count_limit"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
InferenceCPUMillicoreCountLimit respjson.Field
InferenceGPUA100CountLimit respjson.Field
InferenceGPUH100CountLimit respjson.Field
InferenceGPUL40sCountLimit respjson.Field
InferenceInstanceCountLimit respjson.Field
KeypairCountLimit respjson.Field
ProjectCountLimit respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Global entity quota limits
func (QuotaRequestListResponseRequestedLimitsGlobalLimits) RawJSON ¶
func (r QuotaRequestListResponseRequestedLimitsGlobalLimits) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuotaRequestListResponseRequestedLimitsGlobalLimits) UnmarshalJSON ¶
func (r *QuotaRequestListResponseRequestedLimitsGlobalLimits) UnmarshalJSON(data []byte) error
type QuotaRequestListResponseRequestedLimitsRegionalLimit ¶
type QuotaRequestListResponseRequestedLimitsRegionalLimit struct {
// Basic bare metal servers count limit
BaremetalBasicCountLimit int64 `json:"baremetal_basic_count_limit"`
// Baremetal A100 GPU card count limit
BaremetalGPUA100CountLimit int64 `json:"baremetal_gpu_a100_count_limit"`
// AI GPU bare metal servers count limit
BaremetalGPUCountLimit int64 `json:"baremetal_gpu_count_limit"`
// Baremetal H100 GPU card count limit
BaremetalGPUH100CountLimit int64 `json:"baremetal_gpu_h100_count_limit"`
// Baremetal L40S GPU card count limit
BaremetalGPUL40sCountLimit int64 `json:"baremetal_gpu_l40s_count_limit"`
// High-frequency bare metal servers count limit
BaremetalHfCountLimit int64 `json:"baremetal_hf_count_limit"`
// Infrastructure bare metal servers count limit
BaremetalInfrastructureCountLimit int64 `json:"baremetal_infrastructure_count_limit"`
// Bare metal Network Count limit
BaremetalNetworkCountLimit int64 `json:"baremetal_network_count_limit"`
// Storage bare metal servers count limit
BaremetalStorageCountLimit int64 `json:"baremetal_storage_count_limit"`
// Containers count limit
CaasContainerCountLimit int64 `json:"caas_container_count_limit"`
// mCPU count for containers limit
CaasCPUCountLimit int64 `json:"caas_cpu_count_limit"`
// Containers gpu count limit
CaasGPUCountLimit int64 `json:"caas_gpu_count_limit"`
// MB memory count for containers limit
CaasRamSizeLimit int64 `json:"caas_ram_size_limit"`
// K8s clusters count limit
ClusterCountLimit int64 `json:"cluster_count_limit"`
// vCPU Count limit
CPUCountLimit int64 `json:"cpu_count_limit"`
// DBaaS cluster count limit
DbaasPostgresClusterCountLimit int64 `json:"dbaas_postgres_cluster_count_limit"`
// External IP Count limit
ExternalIPCountLimit int64 `json:"external_ip_count_limit"`
// mCPU count for functions limit
FaasCPUCountLimit int64 `json:"faas_cpu_count_limit"`
// Functions count limit
FaasFunctionCountLimit int64 `json:"faas_function_count_limit"`
// Functions namespace count limit
FaasNamespaceCountLimit int64 `json:"faas_namespace_count_limit"`
// MB memory count for functions limit
FaasRamSizeLimit int64 `json:"faas_ram_size_limit"`
// Firewalls Count limit
FirewallCountLimit int64 `json:"firewall_count_limit"`
// Floating IP Count limit
FloatingCountLimit int64 `json:"floating_count_limit"`
// GPU Count limit
GPUCountLimit int64 `json:"gpu_count_limit"`
// Virtual A100 GPU card count limit
GPUVirtualA100CountLimit int64 `json:"gpu_virtual_a100_count_limit"`
// Virtual H100 GPU card count limit
GPUVirtualH100CountLimit int64 `json:"gpu_virtual_h100_count_limit"`
// Virtual L40S GPU card count limit
GPUVirtualL40sCountLimit int64 `json:"gpu_virtual_l40s_count_limit"`
// Images Count limit
ImageCountLimit int64 `json:"image_count_limit"`
// Images Size, GiB limit
ImageSizeLimit int64 `json:"image_size_limit"`
// IPU Count limit
IpuCountLimit int64 `json:"ipu_count_limit"`
// LaaS Topics Count limit
LaasTopicCountLimit int64 `json:"laas_topic_count_limit"`
// Load Balancers Count limit
LoadbalancerCountLimit int64 `json:"loadbalancer_count_limit"`
// Networks Count limit
NetworkCountLimit int64 `json:"network_count_limit"`
// RAM Size, GiB limit
RamLimit int64 `json:"ram_limit"`
// Region ID
RegionID int64 `json:"region_id"`
// Registries count limit
RegistryCountLimit int64 `json:"registry_count_limit"`
// Registries volume usage, GiB limit
RegistryStorageLimit int64 `json:"registry_storage_limit"`
// Routers Count limit
RouterCountLimit int64 `json:"router_count_limit"`
// Secret Count limit
SecretCountLimit int64 `json:"secret_count_limit"`
// Placement Group Count limit
ServergroupCountLimit int64 `json:"servergroup_count_limit"`
// Shared file system Count limit
SfsCountLimit int64 `json:"sfs_count_limit"`
// Shared file system Size, GiB limit
SfsSizeLimit int64 `json:"sfs_size_limit"`
SharedVmCountLimit int64 `json:"shared_vm_count_limit"`
// Snapshot Schedules Count limit
SnapshotScheduleCountLimit int64 `json:"snapshot_schedule_count_limit"`
// Subnets Count limit
SubnetCountLimit int64 `json:"subnet_count_limit"`
// Instances Dedicated Count limit
VmCountLimit int64 `json:"vm_count_limit"`
// Volumes Count limit
VolumeCountLimit int64 `json:"volume_count_limit"`
// Volumes Size, GiB limit
VolumeSizeLimit int64 `json:"volume_size_limit"`
// Snapshots Count limit
VolumeSnapshotsCountLimit int64 `json:"volume_snapshots_count_limit"`
// Snapshots Size, GiB limit
VolumeSnapshotsSizeLimit int64 `json:"volume_snapshots_size_limit"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BaremetalBasicCountLimit respjson.Field
BaremetalGPUA100CountLimit respjson.Field
BaremetalGPUCountLimit respjson.Field
BaremetalGPUH100CountLimit respjson.Field
BaremetalGPUL40sCountLimit respjson.Field
BaremetalHfCountLimit respjson.Field
BaremetalInfrastructureCountLimit respjson.Field
BaremetalNetworkCountLimit respjson.Field
BaremetalStorageCountLimit respjson.Field
CaasContainerCountLimit respjson.Field
CaasCPUCountLimit respjson.Field
CaasGPUCountLimit respjson.Field
CaasRamSizeLimit respjson.Field
ClusterCountLimit respjson.Field
CPUCountLimit respjson.Field
DbaasPostgresClusterCountLimit respjson.Field
ExternalIPCountLimit respjson.Field
FaasCPUCountLimit respjson.Field
FaasFunctionCountLimit respjson.Field
FaasNamespaceCountLimit respjson.Field
FaasRamSizeLimit respjson.Field
FirewallCountLimit respjson.Field
FloatingCountLimit respjson.Field
GPUCountLimit respjson.Field
GPUVirtualA100CountLimit respjson.Field
GPUVirtualH100CountLimit respjson.Field
GPUVirtualL40sCountLimit respjson.Field
ImageCountLimit respjson.Field
ImageSizeLimit respjson.Field
IpuCountLimit respjson.Field
LaasTopicCountLimit respjson.Field
LoadbalancerCountLimit respjson.Field
NetworkCountLimit respjson.Field
RamLimit respjson.Field
RegionID respjson.Field
RegistryCountLimit respjson.Field
RegistryStorageLimit respjson.Field
RouterCountLimit respjson.Field
SecretCountLimit respjson.Field
ServergroupCountLimit respjson.Field
SfsCountLimit respjson.Field
SfsSizeLimit respjson.Field
SharedVmCountLimit respjson.Field
SnapshotScheduleCountLimit respjson.Field
SubnetCountLimit respjson.Field
VmCountLimit respjson.Field
VolumeCountLimit respjson.Field
VolumeSizeLimit respjson.Field
VolumeSnapshotsCountLimit respjson.Field
VolumeSnapshotsSizeLimit respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (QuotaRequestListResponseRequestedLimitsRegionalLimit) RawJSON ¶
func (r QuotaRequestListResponseRequestedLimitsRegionalLimit) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuotaRequestListResponseRequestedLimitsRegionalLimit) UnmarshalJSON ¶
func (r *QuotaRequestListResponseRequestedLimitsRegionalLimit) UnmarshalJSON(data []byte) error
type QuotaRequestNewParams ¶
type QuotaRequestNewParams struct {
// Describe the reason, in general terms.
Description string `json:"description,required"`
// Limits you want to increase.
RequestedLimits QuotaRequestNewParamsRequestedLimits `json:"requested_limits,omitzero,required"`
// Client ID that requests the limit increase.
ClientID param.Opt[int64] `json:"client_id,omitzero"`
// contains filtered or unexported fields
}
func (QuotaRequestNewParams) MarshalJSON ¶
func (r QuotaRequestNewParams) MarshalJSON() (data []byte, err error)
func (*QuotaRequestNewParams) UnmarshalJSON ¶
func (r *QuotaRequestNewParams) UnmarshalJSON(data []byte) error
type QuotaRequestNewParamsRequestedLimits ¶
type QuotaRequestNewParamsRequestedLimits struct {
// Global entity quota limits
GlobalLimits QuotaRequestNewParamsRequestedLimitsGlobalLimits `json:"global_limits,omitzero"`
// Regions and their quota limits
RegionalLimits []QuotaRequestNewParamsRequestedLimitsRegionalLimit `json:"regional_limits,omitzero"`
// contains filtered or unexported fields
}
Limits you want to increase.
func (QuotaRequestNewParamsRequestedLimits) MarshalJSON ¶
func (r QuotaRequestNewParamsRequestedLimits) MarshalJSON() (data []byte, err error)
func (*QuotaRequestNewParamsRequestedLimits) UnmarshalJSON ¶
func (r *QuotaRequestNewParamsRequestedLimits) UnmarshalJSON(data []byte) error
type QuotaRequestNewParamsRequestedLimitsGlobalLimits ¶
type QuotaRequestNewParamsRequestedLimitsGlobalLimits struct {
// Inference CPU millicore count limit
InferenceCPUMillicoreCountLimit param.Opt[int64] `json:"inference_cpu_millicore_count_limit,omitzero"`
// Inference GPU A100 Count limit
InferenceGPUA100CountLimit param.Opt[int64] `json:"inference_gpu_a100_count_limit,omitzero"`
// Inference GPU H100 Count limit
InferenceGPUH100CountLimit param.Opt[int64] `json:"inference_gpu_h100_count_limit,omitzero"`
// Inference GPU L40s Count limit
InferenceGPUL40sCountLimit param.Opt[int64] `json:"inference_gpu_l40s_count_limit,omitzero"`
// Inference instance count limit
InferenceInstanceCountLimit param.Opt[int64] `json:"inference_instance_count_limit,omitzero"`
// SSH Keys Count limit
KeypairCountLimit param.Opt[int64] `json:"keypair_count_limit,omitzero"`
// Projects Count limit
ProjectCountLimit param.Opt[int64] `json:"project_count_limit,omitzero"`
// contains filtered or unexported fields
}
Global entity quota limits
func (QuotaRequestNewParamsRequestedLimitsGlobalLimits) MarshalJSON ¶
func (r QuotaRequestNewParamsRequestedLimitsGlobalLimits) MarshalJSON() (data []byte, err error)
func (*QuotaRequestNewParamsRequestedLimitsGlobalLimits) UnmarshalJSON ¶
func (r *QuotaRequestNewParamsRequestedLimitsGlobalLimits) UnmarshalJSON(data []byte) error
type QuotaRequestNewParamsRequestedLimitsRegionalLimit ¶
type QuotaRequestNewParamsRequestedLimitsRegionalLimit struct {
// Basic bare metal servers count limit
BaremetalBasicCountLimit param.Opt[int64] `json:"baremetal_basic_count_limit,omitzero"`
// Baremetal A100 GPU card count limit
BaremetalGPUA100CountLimit param.Opt[int64] `json:"baremetal_gpu_a100_count_limit,omitzero"`
// AI GPU bare metal servers count limit
BaremetalGPUCountLimit param.Opt[int64] `json:"baremetal_gpu_count_limit,omitzero"`
// Baremetal H100 GPU card count limit
BaremetalGPUH100CountLimit param.Opt[int64] `json:"baremetal_gpu_h100_count_limit,omitzero"`
// Baremetal L40S GPU card count limit
BaremetalGPUL40sCountLimit param.Opt[int64] `json:"baremetal_gpu_l40s_count_limit,omitzero"`
// High-frequency bare metal servers count limit
BaremetalHfCountLimit param.Opt[int64] `json:"baremetal_hf_count_limit,omitzero"`
// Infrastructure bare metal servers count limit
BaremetalInfrastructureCountLimit param.Opt[int64] `json:"baremetal_infrastructure_count_limit,omitzero"`
// Bare metal Network Count limit
BaremetalNetworkCountLimit param.Opt[int64] `json:"baremetal_network_count_limit,omitzero"`
// Storage bare metal servers count limit
BaremetalStorageCountLimit param.Opt[int64] `json:"baremetal_storage_count_limit,omitzero"`
// Containers count limit
CaasContainerCountLimit param.Opt[int64] `json:"caas_container_count_limit,omitzero"`
// mCPU count for containers limit
CaasCPUCountLimit param.Opt[int64] `json:"caas_cpu_count_limit,omitzero"`
// Containers gpu count limit
CaasGPUCountLimit param.Opt[int64] `json:"caas_gpu_count_limit,omitzero"`
// MB memory count for containers limit
CaasRamSizeLimit param.Opt[int64] `json:"caas_ram_size_limit,omitzero"`
// K8s clusters count limit
ClusterCountLimit param.Opt[int64] `json:"cluster_count_limit,omitzero"`
// vCPU Count limit
CPUCountLimit param.Opt[int64] `json:"cpu_count_limit,omitzero"`
// DBaaS cluster count limit
DbaasPostgresClusterCountLimit param.Opt[int64] `json:"dbaas_postgres_cluster_count_limit,omitzero"`
// External IP Count limit
ExternalIPCountLimit param.Opt[int64] `json:"external_ip_count_limit,omitzero"`
// mCPU count for functions limit
FaasCPUCountLimit param.Opt[int64] `json:"faas_cpu_count_limit,omitzero"`
// Functions count limit
FaasFunctionCountLimit param.Opt[int64] `json:"faas_function_count_limit,omitzero"`
// Functions namespace count limit
FaasNamespaceCountLimit param.Opt[int64] `json:"faas_namespace_count_limit,omitzero"`
// MB memory count for functions limit
FaasRamSizeLimit param.Opt[int64] `json:"faas_ram_size_limit,omitzero"`
// Firewalls Count limit
FirewallCountLimit param.Opt[int64] `json:"firewall_count_limit,omitzero"`
// Floating IP Count limit
FloatingCountLimit param.Opt[int64] `json:"floating_count_limit,omitzero"`
// GPU Count limit
GPUCountLimit param.Opt[int64] `json:"gpu_count_limit,omitzero"`
// Virtual A100 GPU card count limit
GPUVirtualA100CountLimit param.Opt[int64] `json:"gpu_virtual_a100_count_limit,omitzero"`
// Virtual H100 GPU card count limit
GPUVirtualH100CountLimit param.Opt[int64] `json:"gpu_virtual_h100_count_limit,omitzero"`
// Virtual L40S GPU card count limit
GPUVirtualL40sCountLimit param.Opt[int64] `json:"gpu_virtual_l40s_count_limit,omitzero"`
// Images Count limit
ImageCountLimit param.Opt[int64] `json:"image_count_limit,omitzero"`
// Images Size, GiB limit
ImageSizeLimit param.Opt[int64] `json:"image_size_limit,omitzero"`
// IPU Count limit
IpuCountLimit param.Opt[int64] `json:"ipu_count_limit,omitzero"`
// LaaS Topics Count limit
LaasTopicCountLimit param.Opt[int64] `json:"laas_topic_count_limit,omitzero"`
// Load Balancers Count limit
LoadbalancerCountLimit param.Opt[int64] `json:"loadbalancer_count_limit,omitzero"`
// Networks Count limit
NetworkCountLimit param.Opt[int64] `json:"network_count_limit,omitzero"`
// RAM Size, GiB limit
RamLimit param.Opt[int64] `json:"ram_limit,omitzero"`
// Region ID
RegionID param.Opt[int64] `json:"region_id,omitzero"`
// Registries count limit
RegistryCountLimit param.Opt[int64] `json:"registry_count_limit,omitzero"`
// Registries volume usage, GiB limit
RegistryStorageLimit param.Opt[int64] `json:"registry_storage_limit,omitzero"`
// Routers Count limit
RouterCountLimit param.Opt[int64] `json:"router_count_limit,omitzero"`
// Secret Count limit
SecretCountLimit param.Opt[int64] `json:"secret_count_limit,omitzero"`
// Placement Group Count limit
ServergroupCountLimit param.Opt[int64] `json:"servergroup_count_limit,omitzero"`
// Shared file system Count limit
SfsCountLimit param.Opt[int64] `json:"sfs_count_limit,omitzero"`
// Shared file system Size, GiB limit
SfsSizeLimit param.Opt[int64] `json:"sfs_size_limit,omitzero"`
SharedVmCountLimit param.Opt[int64] `json:"shared_vm_count_limit,omitzero"`
// Snapshot Schedules Count limit
SnapshotScheduleCountLimit param.Opt[int64] `json:"snapshot_schedule_count_limit,omitzero"`
// Subnets Count limit
SubnetCountLimit param.Opt[int64] `json:"subnet_count_limit,omitzero"`
// Instances Dedicated Count limit
VmCountLimit param.Opt[int64] `json:"vm_count_limit,omitzero"`
// Volumes Count limit
VolumeCountLimit param.Opt[int64] `json:"volume_count_limit,omitzero"`
// Volumes Size, GiB limit
VolumeSizeLimit param.Opt[int64] `json:"volume_size_limit,omitzero"`
// Snapshots Count limit
VolumeSnapshotsCountLimit param.Opt[int64] `json:"volume_snapshots_count_limit,omitzero"`
// Snapshots Size, GiB limit
VolumeSnapshotsSizeLimit param.Opt[int64] `json:"volume_snapshots_size_limit,omitzero"`
// contains filtered or unexported fields
}
func (QuotaRequestNewParamsRequestedLimitsRegionalLimit) MarshalJSON ¶
func (r QuotaRequestNewParamsRequestedLimitsRegionalLimit) MarshalJSON() (data []byte, err error)
func (*QuotaRequestNewParamsRequestedLimitsRegionalLimit) UnmarshalJSON ¶
func (r *QuotaRequestNewParamsRequestedLimitsRegionalLimit) UnmarshalJSON(data []byte) error
type QuotaRequestService ¶
type QuotaRequestService struct {
Options []option.RequestOption
}
QuotaRequestService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewQuotaRequestService method instead.
func NewQuotaRequestService ¶
func NewQuotaRequestService(opts ...option.RequestOption) (r QuotaRequestService)
NewQuotaRequestService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*QuotaRequestService) Delete ¶
func (r *QuotaRequestService) Delete(ctx context.Context, requestID string, opts ...option.RequestOption) (err error)
Delete a specific quota limit request.
func (*QuotaRequestService) Get ¶
func (r *QuotaRequestService) Get(ctx context.Context, requestID string, opts ...option.RequestOption) (res *QuotaRequestGetResponse, err error)
Get detailed information about a specific quota limit request.
func (*QuotaRequestService) List ¶
func (r *QuotaRequestService) List(ctx context.Context, query QuotaRequestListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[QuotaRequestListResponse], err error)
Get a list of sent requests to change current quotas and their statuses.
func (*QuotaRequestService) ListAutoPaging ¶
func (r *QuotaRequestService) ListAutoPaging(ctx context.Context, query QuotaRequestListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[QuotaRequestListResponse]
Get a list of sent requests to change current quotas and their statuses.
func (*QuotaRequestService) New ¶
func (r *QuotaRequestService) New(ctx context.Context, body QuotaRequestNewParams, opts ...option.RequestOption) (err error)
Create a request to change current quotas.
type QuotaService ¶
type QuotaService struct {
Options []option.RequestOption
Requests QuotaRequestService
}
QuotaService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewQuotaService method instead.
func NewQuotaService ¶
func NewQuotaService(opts ...option.RequestOption) (r QuotaService)
NewQuotaService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*QuotaService) GetAll ¶
func (r *QuotaService) GetAll(ctx context.Context, opts ...option.RequestOption) (res *QuotaGetAllResponse, err error)
Get combined client quotas, including both regional and global quotas.
func (*QuotaService) GetByRegion ¶
func (r *QuotaService) GetByRegion(ctx context.Context, query QuotaGetByRegionParams, opts ...option.RequestOption) (res *QuotaGetByRegionResponse, err error)
Get quotas for a specific region and client.
func (*QuotaService) GetGlobal ¶
func (r *QuotaService) GetGlobal(ctx context.Context, clientID int64, opts ...option.RequestOption) (res *QuotaGetGlobalResponse, err error)
Get global quotas for a specific client.
type Region ¶
type Region struct {
// Region ID
ID int64 `json:"id,required"`
// The access level of the region.
//
// Any of "core", "edge".
AccessLevel RegionAccessLevel `json:"access_level,required"`
// AI service API endpoint ID
AIServiceEndpointID int64 `json:"ai_service_endpoint_id,required"`
// List of available volume types, 'standard', '`ssd_hiiops`', 'cold'].
AvailableVolumeTypes []string `json:"available_volume_types,required"`
// Coordinates of the region
Coordinates RegionCoordinates `json:"coordinates,required"`
// Country
Country string `json:"country,required"`
// Region creation date and time
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// This field is deprecated. Use `created_at` instead.
//
// Deprecated: deprecated
CreatedOn time.Time `json:"created_on,required" format:"date-time"`
// DDoS endpoint ID
DDOSEndpointID int64 `json:"ddos_endpoint_id,required"`
// Human-readable region name
DisplayName string `json:"display_name,required"`
// Endpoint type
//
// Any of "admin", "internal", "public".
EndpointType RegionEndpointType `json:"endpoint_type,required"`
// External network ID for Neutron
ExternalNetworkID string `json:"external_network_id,required"`
//
// Any of "standard", "vast".
FileShareTypes []string `json:"file_share_types,required"`
// Region has AI capability
HasAI bool `json:"has_ai,required"`
// Region has AI GPU capability
HasAIGPU bool `json:"has_ai_gpu,required"`
// Region has bare metal capability
HasBaremetal bool `json:"has_baremetal,required"`
// Region has basic vm capability
HasBasicVm bool `json:"has_basic_vm,required"`
// Region has DBAAS service
HasDbaas bool `json:"has_dbaas,required"`
// Region has managed kubernetes capability
HasK8s bool `json:"has_k8s,required"`
// Region has KVM virtualization capability
HasKvm bool `json:"has_kvm,required"`
// Region has SFS capability
HasSfs bool `json:"has_sfs,required"`
// Foreign key to Keystone entity
KeystoneID int64 `json:"keystone_id,required"`
// Technical region name
KeystoneName string `json:"keystone_name,required"`
// Foreign key to Metrics database entity
MetricsDatabaseID int64 `json:"metrics_database_id,required"`
// Region state
//
// Any of "ACTIVE", "DELETED", "DELETING", "DELETION_FAILED", "INACTIVE",
// "MAINTENANCE", "NEW".
State RegionState `json:"state,required"`
// This field is deprecated and can be ignored
//
// Deprecated: deprecated
TaskID string `json:"task_id,required"`
// Physical network name to create vlan networks
VlanPhysicalNetwork string `json:"vlan_physical_network,required"`
// Geographical zone
//
// Any of "AMERICAS", "APAC", "EMEA", "RUSSIA_AND_CIS".
Zone RegionZone `json:"zone,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AccessLevel respjson.Field
AIServiceEndpointID respjson.Field
AvailableVolumeTypes respjson.Field
Coordinates respjson.Field
Country respjson.Field
CreatedAt respjson.Field
CreatedOn respjson.Field
DDOSEndpointID respjson.Field
DisplayName respjson.Field
EndpointType respjson.Field
ExternalNetworkID respjson.Field
FileShareTypes respjson.Field
HasAI respjson.Field
HasAIGPU respjson.Field
HasBaremetal respjson.Field
HasBasicVm respjson.Field
HasDbaas respjson.Field
HasK8s respjson.Field
HasKvm respjson.Field
HasSfs respjson.Field
KeystoneID respjson.Field
KeystoneName respjson.Field
MetricsDatabaseID respjson.Field
State respjson.Field
TaskID respjson.Field
VlanPhysicalNetwork respjson.Field
Zone respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Region) UnmarshalJSON ¶
type RegionAccessLevel ¶
type RegionAccessLevel string
The access level of the region.
const ( RegionAccessLevelCore RegionAccessLevel = "core" RegionAccessLevelEdge RegionAccessLevel = "edge" )
type RegionCoordinates ¶
type RegionCoordinates struct {
Latitude float64 `json:"latitude,required"`
Longitude float64 `json:"longitude,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Latitude respjson.Field
Longitude respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Coordinates of the region
func (RegionCoordinates) RawJSON ¶
func (r RegionCoordinates) RawJSON() string
Returns the unmodified JSON received from the API
func (*RegionCoordinates) UnmarshalJSON ¶
func (r *RegionCoordinates) UnmarshalJSON(data []byte) error
type RegionEndpointType ¶
type RegionEndpointType string
Endpoint type
const ( RegionEndpointTypeAdmin RegionEndpointType = "admin" RegionEndpointTypeInternal RegionEndpointType = "internal" RegionEndpointTypePublic RegionEndpointType = "public" )
type RegionGetParams ¶
type RegionGetParams struct {
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// If true, null `available_volume_type` is replaced with a list of available
// volume types.
ShowVolumeTypes param.Opt[bool] `query:"show_volume_types,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (RegionGetParams) URLQuery ¶
func (r RegionGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes RegionGetParams's query parameters as `url.Values`.
type RegionListParams ¶
type RegionListParams struct {
// Limit the number of returned regions. Falls back to default of 100 if not
// specified. Limited by max limit value of 1000
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Offset value is used to exclude the first set of records from the result
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// If true, null `available_volume_type` is replaced with a list of available
// volume types.
ShowVolumeTypes param.Opt[bool] `query:"show_volume_types,omitzero" json:"-"`
// Order by field and direction.
//
// Any of "created_at.asc", "created_at.desc", "display_name.asc",
// "display_name.desc".
OrderBy RegionListParamsOrderBy `query:"order_by,omitzero" json:"-"`
// If defined then return only regions that support given product.
//
// Any of "containers", "inference".
Product RegionListParamsProduct `query:"product,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (RegionListParams) URLQuery ¶
func (r RegionListParams) URLQuery() (v url.Values, err error)
URLQuery serializes RegionListParams's query parameters as `url.Values`.
type RegionListParamsOrderBy ¶
type RegionListParamsOrderBy string
Order by field and direction.
const ( RegionListParamsOrderByCreatedAtAsc RegionListParamsOrderBy = "created_at.asc" RegionListParamsOrderByCreatedAtDesc RegionListParamsOrderBy = "created_at.desc" RegionListParamsOrderByDisplayNameAsc RegionListParamsOrderBy = "display_name.asc" RegionListParamsOrderByDisplayNameDesc RegionListParamsOrderBy = "display_name.desc" )
type RegionListParamsProduct ¶
type RegionListParamsProduct string
If defined then return only regions that support given product.
const ( RegionListParamsProductContainers RegionListParamsProduct = "containers" RegionListParamsProductInference RegionListParamsProduct = "inference" )
type RegionService ¶
type RegionService struct {
Options []option.RequestOption
}
RegionService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegionService method instead.
func NewRegionService ¶
func NewRegionService(opts ...option.RequestOption) (r RegionService)
NewRegionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RegionService) Get ¶
func (r *RegionService) Get(ctx context.Context, params RegionGetParams, opts ...option.RequestOption) (res *Region, err error)
Get region
func (*RegionService) List ¶
func (r *RegionService) List(ctx context.Context, query RegionListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[Region], err error)
List regions
func (*RegionService) ListAutoPaging ¶
func (r *RegionService) ListAutoPaging(ctx context.Context, query RegionListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[Region]
List regions
type RegionState ¶
type RegionState string
Region state
const ( RegionStateActive RegionState = "ACTIVE" RegionStateDeleted RegionState = "DELETED" RegionStateDeleting RegionState = "DELETING" RegionStateDeletionFailed RegionState = "DELETION_FAILED" RegionStateInactive RegionState = "INACTIVE" RegionStateMaintenance RegionState = "MAINTENANCE" RegionStateNew RegionState = "NEW" )
type RegionZone ¶
type RegionZone string
Geographical zone
const ( RegionZoneAmericas RegionZone = "AMERICAS" RegionZoneApac RegionZone = "APAC" RegionZoneEmea RegionZone = "EMEA" RegionZoneRussiaAndCis RegionZone = "RUSSIA_AND_CIS" )
type Registry ¶
type Registry struct {
// Registry ID
ID int64 `json:"id,required"`
// Registry creation date-time
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Registry name
Name string `json:"name,required"`
// Number of repositories in the registry
RepoCount int64 `json:"repo_count,required"`
// Registry storage limit, GiB
StorageLimit int64 `json:"storage_limit,required"`
// Registry storage used, bytes
StorageUsed int64 `json:"storage_used,required"`
// Registry modification date-time
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
// Registry url
URL string `json:"url,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Name respjson.Field
RepoCount respjson.Field
StorageLimit respjson.Field
StorageUsed respjson.Field
UpdatedAt respjson.Field
URL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Registry) UnmarshalJSON ¶
type RegistryArtifact ¶
type RegistryArtifact struct {
// Repository ID
ID int64 `json:"id,required"`
// Artifact digest
Digest string `json:"digest,required"`
// Artifact last pull date-time
PulledAt time.Time `json:"pulled_at,required" format:"date-time"`
// Artifact push date-time
PushedAt time.Time `json:"pushed_at,required" format:"date-time"`
// Artifact registry ID
RegistryID int64 `json:"registry_id,required"`
// Artifact repository ID
RepositoryID int64 `json:"repository_id,required"`
// Artifact size, bytes
Size int64 `json:"size,required"`
// Artifact tags
Tags []RegistryTag `json:"tags,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Digest respjson.Field
PulledAt respjson.Field
PushedAt respjson.Field
RegistryID respjson.Field
RepositoryID respjson.Field
Size respjson.Field
Tags respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RegistryArtifact) RawJSON ¶
func (r RegistryArtifact) RawJSON() string
Returns the unmodified JSON received from the API
func (*RegistryArtifact) UnmarshalJSON ¶
func (r *RegistryArtifact) UnmarshalJSON(data []byte) error
type RegistryArtifactDeleteParams ¶
type RegistryArtifactDeleteParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
RegistryID int64 `path:"registry_id,required" json:"-"`
RepositoryName string `path:"repository_name,required" json:"-"`
// contains filtered or unexported fields
}
type RegistryArtifactList ¶
type RegistryArtifactList struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []RegistryArtifact `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RegistryArtifactList) RawJSON ¶
func (r RegistryArtifactList) RawJSON() string
Returns the unmodified JSON received from the API
func (*RegistryArtifactList) UnmarshalJSON ¶
func (r *RegistryArtifactList) UnmarshalJSON(data []byte) error
type RegistryArtifactService ¶
type RegistryArtifactService struct {
Options []option.RequestOption
}
RegistryArtifactService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegistryArtifactService method instead.
func NewRegistryArtifactService ¶
func NewRegistryArtifactService(opts ...option.RequestOption) (r RegistryArtifactService)
NewRegistryArtifactService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RegistryArtifactService) Delete ¶
func (r *RegistryArtifactService) Delete(ctx context.Context, digest string, body RegistryArtifactDeleteParams, opts ...option.RequestOption) (err error)
Delete a specific artifact from a repository.
func (*RegistryArtifactService) List ¶
func (r *RegistryArtifactService) List(ctx context.Context, repositoryName string, query RegistryArtifactListParams, opts ...option.RequestOption) (res *RegistryArtifactList, err error)
List all artifacts in a specific repository.
type RegistryDeleteParams ¶
type RegistryGetParams ¶
type RegistryList ¶
type RegistryList struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []Registry `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RegistryList) RawJSON ¶
func (r RegistryList) RawJSON() string
Returns the unmodified JSON received from the API
func (*RegistryList) UnmarshalJSON ¶
func (r *RegistryList) UnmarshalJSON(data []byte) error
type RegistryListParams ¶
type RegistryNewParams ¶
type RegistryNewParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// A name for the container registry. Should be in lowercase, consisting only of
// numbers, letters and -, with maximum length of 24 characters
Name string `json:"name,required"`
// Registry storage limit, GiB
StorageLimit param.Opt[int64] `json:"storage_limit,omitzero"`
// contains filtered or unexported fields
}
func (RegistryNewParams) MarshalJSON ¶
func (r RegistryNewParams) MarshalJSON() (data []byte, err error)
func (*RegistryNewParams) UnmarshalJSON ¶
func (r *RegistryNewParams) UnmarshalJSON(data []byte) error
type RegistryRepository ¶
type RegistryRepository struct {
// Repository ID
ID int64 `json:"id,required"`
// Number of artifacts in the repository
ArtifactCount int64 `json:"artifact_count,required"`
// Repository creation date-time
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Repository name
Name string `json:"name,required"`
// Number of pools from the repository
PullCount int64 `json:"pull_count,required"`
// Repository registry ID
RegistryID int64 `json:"registry_id,required"`
// Repository modification date-time
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ArtifactCount respjson.Field
CreatedAt respjson.Field
Name respjson.Field
PullCount respjson.Field
RegistryID respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RegistryRepository) RawJSON ¶
func (r RegistryRepository) RawJSON() string
Returns the unmodified JSON received from the API
func (*RegistryRepository) UnmarshalJSON ¶
func (r *RegistryRepository) UnmarshalJSON(data []byte) error
type RegistryRepositoryList ¶
type RegistryRepositoryList struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []RegistryRepository `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RegistryRepositoryList) RawJSON ¶
func (r RegistryRepositoryList) RawJSON() string
Returns the unmodified JSON received from the API
func (*RegistryRepositoryList) UnmarshalJSON ¶
func (r *RegistryRepositoryList) UnmarshalJSON(data []byte) error
type RegistryRepositoryService ¶
type RegistryRepositoryService struct {
Options []option.RequestOption
}
RegistryRepositoryService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegistryRepositoryService method instead.
func NewRegistryRepositoryService ¶
func NewRegistryRepositoryService(opts ...option.RequestOption) (r RegistryRepositoryService)
NewRegistryRepositoryService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RegistryRepositoryService) Delete ¶
func (r *RegistryRepositoryService) Delete(ctx context.Context, repositoryName string, body RegistryRepositoryDeleteParams, opts ...option.RequestOption) (err error)
Delete a specific repository from the container registry.
func (*RegistryRepositoryService) List ¶
func (r *RegistryRepositoryService) List(ctx context.Context, registryID int64, query RegistryRepositoryListParams, opts ...option.RequestOption) (res *RegistryRepositoryList, err error)
List all repositories in the container registry.
type RegistryResizeParams ¶
type RegistryResizeParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Registry storage limit, GiB
StorageLimit param.Opt[int64] `json:"storage_limit,omitzero"`
// contains filtered or unexported fields
}
func (RegistryResizeParams) MarshalJSON ¶
func (r RegistryResizeParams) MarshalJSON() (data []byte, err error)
func (*RegistryResizeParams) UnmarshalJSON ¶
func (r *RegistryResizeParams) UnmarshalJSON(data []byte) error
type RegistryService ¶
type RegistryService struct {
Options []option.RequestOption
Repositories RegistryRepositoryService
Artifacts RegistryArtifactService
Tags RegistryTagService
Users RegistryUserService
}
RegistryService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegistryService method instead.
func NewRegistryService ¶
func NewRegistryService(opts ...option.RequestOption) (r RegistryService)
NewRegistryService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RegistryService) Delete ¶
func (r *RegistryService) Delete(ctx context.Context, registryID int64, body RegistryDeleteParams, opts ...option.RequestOption) (err error)
Delete a specific container registry and all its associated resources.
func (*RegistryService) Get ¶
func (r *RegistryService) Get(ctx context.Context, registryID int64, query RegistryGetParams, opts ...option.RequestOption) (res *Registry, err error)
Get detailed information about a specific container registry.
func (*RegistryService) List ¶
func (r *RegistryService) List(ctx context.Context, query RegistryListParams, opts ...option.RequestOption) (res *RegistryList, err error)
List all container registries in the specified project and region.
func (*RegistryService) New ¶
func (r *RegistryService) New(ctx context.Context, params RegistryNewParams, opts ...option.RequestOption) (res *Registry, err error)
Create a new container registry with the specified configuration.
func (*RegistryService) Resize ¶
func (r *RegistryService) Resize(ctx context.Context, registryID int64, params RegistryResizeParams, opts ...option.RequestOption) (res *Registry, err error)
Update the size of a container registry.
type RegistryTag ¶
type RegistryTag struct {
// Tag ID
ID int64 `json:"id,required"`
// Artifact ID
ArtifactID int64 `json:"artifact_id,required"`
// Tag name
Name string `json:"name,required"`
// Tag last pull date-time
PulledAt time.Time `json:"pulled_at,required" format:"date-time"`
// Tag push date-time
PushedAt time.Time `json:"pushed_at,required" format:"date-time"`
// Repository ID
RepositoryID int64 `json:"repository_id,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ArtifactID respjson.Field
Name respjson.Field
PulledAt respjson.Field
PushedAt respjson.Field
RepositoryID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RegistryTag) RawJSON ¶
func (r RegistryTag) RawJSON() string
Returns the unmodified JSON received from the API
func (*RegistryTag) UnmarshalJSON ¶
func (r *RegistryTag) UnmarshalJSON(data []byte) error
type RegistryTagDeleteParams ¶
type RegistryTagDeleteParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
RegistryID int64 `path:"registry_id,required" json:"-"`
RepositoryName string `path:"repository_name,required" json:"-"`
Digest string `path:"digest,required" json:"-"`
// contains filtered or unexported fields
}
type RegistryTagService ¶
type RegistryTagService struct {
Options []option.RequestOption
}
RegistryTagService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegistryTagService method instead.
func NewRegistryTagService ¶
func NewRegistryTagService(opts ...option.RequestOption) (r RegistryTagService)
NewRegistryTagService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RegistryTagService) Delete ¶
func (r *RegistryTagService) Delete(ctx context.Context, tagName string, body RegistryTagDeleteParams, opts ...option.RequestOption) (err error)
Delete a specific tag from an artifact.
type RegistryUser ¶
type RegistryUser struct {
// User ID
ID int64 `json:"id,required"`
// User creation date-time
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// User account operating time, days
Duration int64 `json:"duration,required"`
// User operation end date-time
ExpiresAt time.Time `json:"expires_at,required" format:"date-time"`
// User name
Name string `json:"name,required"`
// Read-only user
ReadOnly bool `json:"read_only"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Duration respjson.Field
ExpiresAt respjson.Field
Name respjson.Field
ReadOnly respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RegistryUser) RawJSON ¶
func (r RegistryUser) RawJSON() string
Returns the unmodified JSON received from the API
func (*RegistryUser) UnmarshalJSON ¶
func (r *RegistryUser) UnmarshalJSON(data []byte) error
type RegistryUserCreated ¶
type RegistryUserCreated struct {
// User ID
ID int64 `json:"id,required"`
// User creation date-time
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// User account operating time, days
Duration int64 `json:"duration,required"`
// User operation end date-time
ExpiresAt time.Time `json:"expires_at,required" format:"date-time"`
// User name
Name string `json:"name,required"`
// Read-only user
ReadOnly bool `json:"read_only"`
// User secret
Secret string `json:"secret"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Duration respjson.Field
ExpiresAt respjson.Field
Name respjson.Field
ReadOnly respjson.Field
Secret respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RegistryUserCreated) RawJSON ¶
func (r RegistryUserCreated) RawJSON() string
Returns the unmodified JSON received from the API
func (*RegistryUserCreated) UnmarshalJSON ¶
func (r *RegistryUserCreated) UnmarshalJSON(data []byte) error
type RegistryUserList ¶
type RegistryUserList struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []RegistryUser `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RegistryUserList) RawJSON ¶
func (r RegistryUserList) RawJSON() string
Returns the unmodified JSON received from the API
func (*RegistryUserList) UnmarshalJSON ¶
func (r *RegistryUserList) UnmarshalJSON(data []byte) error
type RegistryUserListParams ¶
type RegistryUserNewMultipleParams ¶
type RegistryUserNewMultipleParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Set of users
Users []RegistryUserNewMultipleParamsUser `json:"users,omitzero,required"`
// contains filtered or unexported fields
}
func (RegistryUserNewMultipleParams) MarshalJSON ¶
func (r RegistryUserNewMultipleParams) MarshalJSON() (data []byte, err error)
func (*RegistryUserNewMultipleParams) UnmarshalJSON ¶
func (r *RegistryUserNewMultipleParams) UnmarshalJSON(data []byte) error
type RegistryUserNewMultipleParamsUser ¶
type RegistryUserNewMultipleParamsUser struct {
// User account operating time, days
Duration int64 `json:"duration,required"`
// A name for the registry user. Should be in lowercase, consisting only of numbers
// and letters, with maximum length of 16 characters
Name string `json:"name,required"`
// Read-only user
ReadOnly param.Opt[bool] `json:"read_only,omitzero"`
// User secret
Secret param.Opt[string] `json:"secret,omitzero"`
// contains filtered or unexported fields
}
The properties Duration, Name are required.
func (RegistryUserNewMultipleParamsUser) MarshalJSON ¶
func (r RegistryUserNewMultipleParamsUser) MarshalJSON() (data []byte, err error)
func (*RegistryUserNewMultipleParamsUser) UnmarshalJSON ¶
func (r *RegistryUserNewMultipleParamsUser) UnmarshalJSON(data []byte) error
type RegistryUserNewParams ¶
type RegistryUserNewParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// User account operating time, days
Duration int64 `json:"duration,required"`
// A name for the registry user. Should be in lowercase, consisting only of numbers
// and letters, with maximum length of 16 characters
Name string `json:"name,required"`
// Read-only user
ReadOnly param.Opt[bool] `json:"read_only,omitzero"`
// User secret
Secret param.Opt[string] `json:"secret,omitzero"`
// contains filtered or unexported fields
}
func (RegistryUserNewParams) MarshalJSON ¶
func (r RegistryUserNewParams) MarshalJSON() (data []byte, err error)
func (*RegistryUserNewParams) UnmarshalJSON ¶
func (r *RegistryUserNewParams) UnmarshalJSON(data []byte) error
type RegistryUserRefreshSecretResponse ¶ added in v0.4.0
type RegistryUserRefreshSecretResponse struct {
// User ID
ID int64 `json:"id,required"`
// User creation date-time
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// User account operating time, days
Duration int64 `json:"duration,required"`
// User operation end date-time
ExpiresAt time.Time `json:"expires_at,required" format:"date-time"`
// User name
Name string `json:"name,required"`
// Read-only user
ReadOnly bool `json:"read_only"`
// User secret
Secret string `json:"secret"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Duration respjson.Field
ExpiresAt respjson.Field
Name respjson.Field
ReadOnly respjson.Field
Secret respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RegistryUserRefreshSecretResponse) RawJSON ¶ added in v0.4.0
func (r RegistryUserRefreshSecretResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*RegistryUserRefreshSecretResponse) UnmarshalJSON ¶ added in v0.4.0
func (r *RegistryUserRefreshSecretResponse) UnmarshalJSON(data []byte) error
type RegistryUserService ¶
type RegistryUserService struct {
Options []option.RequestOption
}
RegistryUserService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegistryUserService method instead.
func NewRegistryUserService ¶
func NewRegistryUserService(opts ...option.RequestOption) (r RegistryUserService)
NewRegistryUserService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RegistryUserService) Delete ¶
func (r *RegistryUserService) Delete(ctx context.Context, userID int64, body RegistryUserDeleteParams, opts ...option.RequestOption) (err error)
Delete a specific user from the container registry.
func (*RegistryUserService) List ¶
func (r *RegistryUserService) List(ctx context.Context, registryID int64, query RegistryUserListParams, opts ...option.RequestOption) (res *RegistryUserList, err error)
List all users with access to the container registry.
func (*RegistryUserService) New ¶
func (r *RegistryUserService) New(ctx context.Context, registryID int64, params RegistryUserNewParams, opts ...option.RequestOption) (res *RegistryUserCreated, err error)
Create a new user for accessing the container registry.
func (*RegistryUserService) NewMultiple ¶
func (r *RegistryUserService) NewMultiple(ctx context.Context, registryID int64, params RegistryUserNewMultipleParams, opts ...option.RequestOption) (res *RegistryUserCreated, err error)
Create multiple users for accessing the container registry in a single request.
func (*RegistryUserService) RefreshSecret ¶
func (r *RegistryUserService) RefreshSecret(ctx context.Context, userID int64, body RegistryUserRefreshSecretParams, opts ...option.RequestOption) (res *RegistryUserRefreshSecretResponse, err error)
Generate a new secret for a specific registry user.
func (*RegistryUserService) Update ¶
func (r *RegistryUserService) Update(ctx context.Context, userID int64, params RegistryUserUpdateParams, opts ...option.RequestOption) (res *RegistryUser, err error)
Update the configuration of a specific registry user.
type RegistryUserUpdateParams ¶
type RegistryUserUpdateParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
RegistryID int64 `path:"registry_id,required" json:"-"`
// User account operating time, days
Duration int64 `json:"duration,required"`
// Read-only user
ReadOnly param.Opt[bool] `json:"read_only,omitzero"`
// contains filtered or unexported fields
}
func (RegistryUserUpdateParams) MarshalJSON ¶
func (r RegistryUserUpdateParams) MarshalJSON() (data []byte, err error)
func (*RegistryUserUpdateParams) UnmarshalJSON ¶
func (r *RegistryUserUpdateParams) UnmarshalJSON(data []byte) error
type ReservedFixedIP ¶
type ReservedFixedIP struct {
// Group of subnet masks and/or IP addresses that share the current IP as VIP
AllowedAddressPairs []AllowedAddressPairs `json:"allowed_address_pairs,required"`
// Reserved fixed IP attachment entities
Attachments []ReservedFixedIPAttachment `json:"attachments,required"`
// Datetime when the reserved fixed IP was created
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// If reserved fixed IP belongs to a public network
IsExternal bool `json:"is_external,required"`
// If reserved fixed IP is a VIP
IsVip bool `json:"is_vip,required"`
// Reserved fixed IP name
Name string `json:"name,required"`
// Network details
Network Network `json:"network,required"`
// ID of the network the port is attached to
NetworkID string `json:"network_id,required" format:"uuid4"`
// ID of the port underlying the reserved fixed IP
PortID string `json:"port_id,required" format:"uuid4"`
// Region name
Region string `json:"region,required"`
// Region ID
RegionID int64 `json:"region_id,required"`
// Reserved fixed IP status with resource type and ID it is attached to
Reservation ReservedFixedIPReservation `json:"reservation,required"`
// Underlying port status
Status string `json:"status,required"`
// Datetime when the reserved fixed IP was last updated
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
// Task that created this entity
CreatorTaskID string `json:"creator_task_id,nullable" format:"uuid4"`
// IPv4 address of the reserved fixed IP
FixedIPAddress string `json:"fixed_ip_address,nullable" format:"ipv4"`
// IPv6 address of the reserved fixed IP
FixedIpv6Address string `json:"fixed_ipv6_address,nullable" format:"ipv6"`
// Project ID
ProjectID int64 `json:"project_id,nullable"`
// ID of the subnet that owns the IP address
SubnetID string `json:"subnet_id,nullable" format:"uuid4"`
// ID of the subnet that owns the IPv6 address
SubnetV6ID string `json:"subnet_v6_id,nullable" format:"uuid4"`
// The UUID of the active task that currently holds a lock on the resource. This
// lock prevents concurrent modifications to ensure consistency. If `null`, the
// resource is not locked.
TaskID string `json:"task_id,nullable" format:"uuid4"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AllowedAddressPairs respjson.Field
Attachments respjson.Field
CreatedAt respjson.Field
IsExternal respjson.Field
IsVip respjson.Field
Name respjson.Field
Network respjson.Field
NetworkID respjson.Field
PortID respjson.Field
Region respjson.Field
RegionID respjson.Field
Reservation respjson.Field
Status respjson.Field
UpdatedAt respjson.Field
CreatorTaskID respjson.Field
FixedIPAddress respjson.Field
FixedIpv6Address respjson.Field
ProjectID respjson.Field
SubnetID respjson.Field
SubnetV6ID respjson.Field
TaskID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ReservedFixedIP) RawJSON ¶
func (r ReservedFixedIP) RawJSON() string
Returns the unmodified JSON received from the API
func (*ReservedFixedIP) UnmarshalJSON ¶
func (r *ReservedFixedIP) UnmarshalJSON(data []byte) error
type ReservedFixedIPAttachment ¶
type ReservedFixedIPAttachment struct {
// Resource ID
ResourceID string `json:"resource_id,nullable"`
// Resource type
ResourceType string `json:"resource_type,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ResourceID respjson.Field
ResourceType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ReservedFixedIPAttachment) RawJSON ¶
func (r ReservedFixedIPAttachment) RawJSON() string
Returns the unmodified JSON received from the API
func (*ReservedFixedIPAttachment) UnmarshalJSON ¶
func (r *ReservedFixedIPAttachment) UnmarshalJSON(data []byte) error
type ReservedFixedIPListParams ¶
type ReservedFixedIPListParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Set to true if the response should only list IP addresses that are not attached
// to any instance
AvailableOnly param.Opt[bool] `query:"available_only,omitzero" json:"-"`
// Filter IPs by device ID it is attached to
DeviceID param.Opt[string] `query:"device_id,omitzero" json:"-"`
// Set to true if the response should only list public IP addresses
ExternalOnly param.Opt[bool] `query:"external_only,omitzero" json:"-"`
// Set to true if the response should only list private IP addresses
InternalOnly param.Opt[bool] `query:"internal_only,omitzero" json:"-"`
// An IPv4 address to filter results by. Regular expression allowed
IPAddress param.Opt[string] `query:"ip_address,omitzero" json:"-"`
// Limit the number of returned IPs
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Offset value is used to exclude the first set of records from the result
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Ordering reserved fixed IP list result by name, status, `updated_at`,
// `created_at` or `fixed_ip_address` fields and directions (status.asc), default
// is "`fixed_ip_address`.asc"
OrderBy param.Opt[string] `query:"order_by,omitzero" json:"-"`
// Set to true if the response should only list VIPs
VipOnly param.Opt[bool] `query:"vip_only,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ReservedFixedIPListParams) URLQuery ¶
func (r ReservedFixedIPListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ReservedFixedIPListParams's query parameters as `url.Values`.
type ReservedFixedIPNewParams ¶
type ReservedFixedIPNewParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// This field is a request body variant, only one variant field can be set.
OfExternal *ReservedFixedIPNewParamsBodyExternal `json:",inline"`
// This field is a request body variant, only one variant field can be set.
OfSubnet *ReservedFixedIPNewParamsBodySubnet `json:",inline"`
// This field is a request body variant, only one variant field can be set.
OfAnySubnet *ReservedFixedIPNewParamsBodyAnySubnet `json:",inline"`
// This field is a request body variant, only one variant field can be set.
OfIPAddress *ReservedFixedIPNewParamsBodyIPAddress `json:",inline"`
// This field is a request body variant, only one variant field can be set.
OfPort *ReservedFixedIPNewParamsBodyPort `json:",inline"`
// contains filtered or unexported fields
}
func (ReservedFixedIPNewParams) MarshalJSON ¶
func (u ReservedFixedIPNewParams) MarshalJSON() ([]byte, error)
func (*ReservedFixedIPNewParams) UnmarshalJSON ¶
func (r *ReservedFixedIPNewParams) UnmarshalJSON(data []byte) error
type ReservedFixedIPNewParamsBodyAnySubnet ¶
type ReservedFixedIPNewParamsBodyAnySubnet struct {
// Reserved fixed IP will be allocated in a subnet of this network
NetworkID string `json:"network_id,required" format:"uuid4"`
// If reserved fixed IP is a VIP
IsVip param.Opt[bool] `json:"is_vip,omitzero"`
// Which subnets should be selected: IPv4, IPv6 or use dual stack.
//
// Any of "dual", "ipv4", "ipv6".
IPFamily InterfaceIPFamily `json:"ip_family,omitzero"`
// Must be '`any_subnet`'.
//
// This field can be elided, and will marshal its zero value as "any_subnet".
Type constant.AnySubnet `json:"type,required"`
// contains filtered or unexported fields
}
The properties NetworkID, Type are required.
func (ReservedFixedIPNewParamsBodyAnySubnet) MarshalJSON ¶
func (r ReservedFixedIPNewParamsBodyAnySubnet) MarshalJSON() (data []byte, err error)
func (*ReservedFixedIPNewParamsBodyAnySubnet) UnmarshalJSON ¶
func (r *ReservedFixedIPNewParamsBodyAnySubnet) UnmarshalJSON(data []byte) error
type ReservedFixedIPNewParamsBodyExternal ¶
type ReservedFixedIPNewParamsBodyExternal struct {
// If reserved fixed IP is a VIP
IsVip param.Opt[bool] `json:"is_vip,omitzero"`
// Which subnets should be selected: IPv4, IPv6 or use dual stack.
//
// Any of "dual", "ipv4", "ipv6".
IPFamily InterfaceIPFamily `json:"ip_family,omitzero"`
// Must be 'external'
//
// This field can be elided, and will marshal its zero value as "external".
Type constant.External `json:"type,required"`
// contains filtered or unexported fields
}
The property Type is required.
func (ReservedFixedIPNewParamsBodyExternal) MarshalJSON ¶
func (r ReservedFixedIPNewParamsBodyExternal) MarshalJSON() (data []byte, err error)
func (*ReservedFixedIPNewParamsBodyExternal) UnmarshalJSON ¶
func (r *ReservedFixedIPNewParamsBodyExternal) UnmarshalJSON(data []byte) error
type ReservedFixedIPNewParamsBodyIPAddress ¶
type ReservedFixedIPNewParamsBodyIPAddress struct {
// Reserved fixed IP will be allocated the given IP address
IPAddress string `json:"ip_address,required" format:"ipvanyaddress"`
// Reserved fixed IP will be allocated in a subnet of this network
NetworkID string `json:"network_id,required" format:"uuid4"`
// If reserved fixed IP is a VIP
IsVip param.Opt[bool] `json:"is_vip,omitzero"`
// Must be '`ip_address`'.
//
// This field can be elided, and will marshal its zero value as "ip_address".
Type constant.IPAddress `json:"type,required"`
// contains filtered or unexported fields
}
The properties IPAddress, NetworkID, Type are required.
func (ReservedFixedIPNewParamsBodyIPAddress) MarshalJSON ¶
func (r ReservedFixedIPNewParamsBodyIPAddress) MarshalJSON() (data []byte, err error)
func (*ReservedFixedIPNewParamsBodyIPAddress) UnmarshalJSON ¶
func (r *ReservedFixedIPNewParamsBodyIPAddress) UnmarshalJSON(data []byte) error
type ReservedFixedIPNewParamsBodyPort ¶
type ReservedFixedIPNewParamsBodyPort struct {
// Port ID to make a reserved fixed IP (for example, `vip_port_id` of the Load
// Balancer entity).
PortID string `json:"port_id,required" format:"uuid4"`
// Must be 'port'.
//
// This field can be elided, and will marshal its zero value as "port".
Type constant.Port `json:"type,required"`
// contains filtered or unexported fields
}
The properties PortID, Type are required.
func (ReservedFixedIPNewParamsBodyPort) MarshalJSON ¶
func (r ReservedFixedIPNewParamsBodyPort) MarshalJSON() (data []byte, err error)
func (*ReservedFixedIPNewParamsBodyPort) UnmarshalJSON ¶
func (r *ReservedFixedIPNewParamsBodyPort) UnmarshalJSON(data []byte) error
type ReservedFixedIPNewParamsBodySubnet ¶
type ReservedFixedIPNewParamsBodySubnet struct {
// Reserved fixed IP will be allocated in this subnet
SubnetID string `json:"subnet_id,required" format:"uuid4"`
// If reserved fixed IP is a VIP
IsVip param.Opt[bool] `json:"is_vip,omitzero"`
// Must be 'subnet'.
//
// This field can be elided, and will marshal its zero value as "subnet".
Type constant.Subnet `json:"type,required"`
// contains filtered or unexported fields
}
The properties SubnetID, Type are required.
func (ReservedFixedIPNewParamsBodySubnet) MarshalJSON ¶
func (r ReservedFixedIPNewParamsBodySubnet) MarshalJSON() (data []byte, err error)
func (*ReservedFixedIPNewParamsBodySubnet) UnmarshalJSON ¶
func (r *ReservedFixedIPNewParamsBodySubnet) UnmarshalJSON(data []byte) error
type ReservedFixedIPReservation ¶
type ReservedFixedIPReservation struct {
// ID of the instance or load balancer the IP is attached to
ResourceID string `json:"resource_id,nullable" format:"uuid4"`
// Resource type of the resource the IP is attached to
ResourceType string `json:"resource_type,nullable"`
// IP reservation status
Status string `json:"status,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ResourceID respjson.Field
ResourceType respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Reserved fixed IP status with resource type and ID it is attached to
func (ReservedFixedIPReservation) RawJSON ¶
func (r ReservedFixedIPReservation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ReservedFixedIPReservation) UnmarshalJSON ¶
func (r *ReservedFixedIPReservation) UnmarshalJSON(data []byte) error
type ReservedFixedIPService ¶
type ReservedFixedIPService struct {
Options []option.RequestOption
Vip ReservedFixedIPVipService
// contains filtered or unexported fields
}
ReservedFixedIPService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewReservedFixedIPService method instead.
func NewReservedFixedIPService ¶
func NewReservedFixedIPService(opts ...option.RequestOption) (r ReservedFixedIPService)
NewReservedFixedIPService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ReservedFixedIPService) Delete ¶
func (r *ReservedFixedIPService) Delete(ctx context.Context, portID string, body ReservedFixedIPDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Delete a specific reserved fixed IP and all its associated resources.
func (*ReservedFixedIPService) Get ¶
func (r *ReservedFixedIPService) Get(ctx context.Context, portID string, query ReservedFixedIPGetParams, opts ...option.RequestOption) (res *ReservedFixedIP, err error)
Get detailed information about a specific reserved fixed IP.
func (*ReservedFixedIPService) List ¶
func (r *ReservedFixedIPService) List(ctx context.Context, params ReservedFixedIPListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[ReservedFixedIP], err error)
List all reserved fixed IPs in the specified project and region.
func (*ReservedFixedIPService) ListAutoPaging ¶
func (r *ReservedFixedIPService) ListAutoPaging(ctx context.Context, params ReservedFixedIPListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[ReservedFixedIP]
List all reserved fixed IPs in the specified project and region.
func (*ReservedFixedIPService) New ¶
func (r *ReservedFixedIPService) New(ctx context.Context, params ReservedFixedIPNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Create a new reserved fixed IP with the specified configuration.
func (*ReservedFixedIPService) NewAndPoll ¶
func (r *ReservedFixedIPService) NewAndPoll(ctx context.Context, params ReservedFixedIPNewParams, opts ...option.RequestOption) (v *ReservedFixedIP, err error)
Create reserved fixed IP and poll for the result
type ReservedFixedIPVipReplaceConnectedPortsParams ¶
type ReservedFixedIPVipReplaceConnectedPortsParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// List of port IDs that will share one VIP
PortIDs []string `json:"port_ids,omitzero" format:"uuid4"`
// contains filtered or unexported fields
}
func (ReservedFixedIPVipReplaceConnectedPortsParams) MarshalJSON ¶
func (r ReservedFixedIPVipReplaceConnectedPortsParams) MarshalJSON() (data []byte, err error)
func (*ReservedFixedIPVipReplaceConnectedPortsParams) UnmarshalJSON ¶
func (r *ReservedFixedIPVipReplaceConnectedPortsParams) UnmarshalJSON(data []byte) error
type ReservedFixedIPVipService ¶
type ReservedFixedIPVipService struct {
Options []option.RequestOption
}
ReservedFixedIPVipService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewReservedFixedIPVipService method instead.
func NewReservedFixedIPVipService ¶
func NewReservedFixedIPVipService(opts ...option.RequestOption) (r ReservedFixedIPVipService)
NewReservedFixedIPVipService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ReservedFixedIPVipService) ListCandidatePorts ¶
func (r *ReservedFixedIPVipService) ListCandidatePorts(ctx context.Context, portID string, query ReservedFixedIPVipListCandidatePortsParams, opts ...option.RequestOption) (res *CandidatePortList, err error)
List all instance ports that are available for connecting to a VIP.
func (*ReservedFixedIPVipService) ListConnectedPorts ¶
func (r *ReservedFixedIPVipService) ListConnectedPorts(ctx context.Context, portID string, query ReservedFixedIPVipListConnectedPortsParams, opts ...option.RequestOption) (res *ConnectedPortList, err error)
List all instance ports that share a VIP.
func (*ReservedFixedIPVipService) ReplaceConnectedPorts ¶
func (r *ReservedFixedIPVipService) ReplaceConnectedPorts(ctx context.Context, portID string, params ReservedFixedIPVipReplaceConnectedPortsParams, opts ...option.RequestOption) (res *ConnectedPortList, err error)
Replace the list of instance ports that share a VIP.
func (*ReservedFixedIPVipService) Toggle ¶
func (r *ReservedFixedIPVipService) Toggle(ctx context.Context, portID string, params ReservedFixedIPVipToggleParams, opts ...option.RequestOption) (res *ReservedFixedIP, err error)
Update the VIP status of a reserved fixed IP.
func (*ReservedFixedIPVipService) UpdateConnectedPorts ¶
func (r *ReservedFixedIPVipService) UpdateConnectedPorts(ctx context.Context, portID string, params ReservedFixedIPVipUpdateConnectedPortsParams, opts ...option.RequestOption) (res *ConnectedPortList, err error)
Add instance ports to share a VIP.
type ReservedFixedIPVipToggleParams ¶
type ReservedFixedIPVipToggleParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// If reserved fixed IP should be a VIP
IsVip bool `json:"is_vip,required"`
// contains filtered or unexported fields
}
func (ReservedFixedIPVipToggleParams) MarshalJSON ¶
func (r ReservedFixedIPVipToggleParams) MarshalJSON() (data []byte, err error)
func (*ReservedFixedIPVipToggleParams) UnmarshalJSON ¶
func (r *ReservedFixedIPVipToggleParams) UnmarshalJSON(data []byte) error
type ReservedFixedIPVipUpdateConnectedPortsParams ¶
type ReservedFixedIPVipUpdateConnectedPortsParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// List of port IDs that will share one VIP
PortIDs []string `json:"port_ids,omitzero" format:"uuid4"`
// contains filtered or unexported fields
}
func (ReservedFixedIPVipUpdateConnectedPortsParams) MarshalJSON ¶
func (r ReservedFixedIPVipUpdateConnectedPortsParams) MarshalJSON() (data []byte, err error)
func (*ReservedFixedIPVipUpdateConnectedPortsParams) UnmarshalJSON ¶
func (r *ReservedFixedIPVipUpdateConnectedPortsParams) UnmarshalJSON(data []byte) error
type RoleAssignment ¶
type RoleAssignment struct {
// Assignment ID
ID int64 `json:"id,required"`
AssignedBy int64 `json:"assigned_by,required"`
// Client ID
ClientID int64 `json:"client_id,required"`
// Created timestamp
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Project ID
ProjectID int64 `json:"project_id,required"`
// User role
Role string `json:"role,required"`
// Updated timestamp
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
// User ID
UserID int64 `json:"user_id,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AssignedBy respjson.Field
ClientID respjson.Field
CreatedAt respjson.Field
ProjectID respjson.Field
Role respjson.Field
UpdatedAt respjson.Field
UserID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RoleAssignment) RawJSON ¶
func (r RoleAssignment) RawJSON() string
Returns the unmodified JSON received from the API
func (*RoleAssignment) UnmarshalJSON ¶
func (r *RoleAssignment) UnmarshalJSON(data []byte) error
type RoleAssignmentUpdateDelete ¶
type RoleAssignmentUpdateDelete struct {
// Assignment ID
AssignmentID int64 `json:"assignment_id,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AssignmentID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RoleAssignmentUpdateDelete) RawJSON ¶
func (r RoleAssignmentUpdateDelete) RawJSON() string
Returns the unmodified JSON received from the API
func (*RoleAssignmentUpdateDelete) UnmarshalJSON ¶
func (r *RoleAssignmentUpdateDelete) UnmarshalJSON(data []byte) error
type Route ¶
type Route struct {
// CIDR of destination IPv4 subnet.
Destination string `json:"destination,required" format:"ipvanynetwork"`
// IPv4 address to forward traffic to if it's destination IP matches 'destination'
// CIDR.
Nexthop string `json:"nexthop,required" format:"ipvanyaddress"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Destination respjson.Field
Nexthop respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Route) UnmarshalJSON ¶
type Router ¶
type Router struct {
// Router ID
ID string `json:"id,required" format:"uuid4"`
// Datetime when the router was created
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the router is distributed or centralized.
Distributed bool `json:"distributed,required"`
// List of router interfaces.
Interfaces []RouterInterface `json:"interfaces,required"`
// Router name
Name string `json:"name,required"`
// Project ID
ProjectID int64 `json:"project_id,required"`
// Region name
Region string `json:"region,required"`
// Region ID
RegionID int64 `json:"region_id,required"`
// List of custom routes.
Routes []Route `json:"routes,required"`
// Status of the router.
Status string `json:"status,required"`
// The UUID of the active task that currently holds a lock on the resource. This
// lock prevents concurrent modifications to ensure consistency. If `null`, the
// resource is not locked.
TaskID string `json:"task_id,required" format:"uuid4"`
// Datetime when the router was last updated
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
// Task that created this entity
CreatorTaskID string `json:"creator_task_id,nullable" format:"uuid4"`
// State of this router's external gateway.
ExternalGatewayInfo RouterExternalGatewayInfo `json:"external_gateway_info,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Distributed respjson.Field
Interfaces respjson.Field
Name respjson.Field
ProjectID respjson.Field
Region respjson.Field
RegionID respjson.Field
Routes respjson.Field
Status respjson.Field
TaskID respjson.Field
UpdatedAt respjson.Field
CreatorTaskID respjson.Field
ExternalGatewayInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Router) UnmarshalJSON ¶
type RouterExternalGatewayInfo ¶
type RouterExternalGatewayInfo struct {
// Is SNAT enabled.
EnableSnat bool `json:"enable_snat,required"`
// List of external IPs that emit SNAT-ed traffic.
ExternalFixedIPs []IPAssignment `json:"external_fixed_ips,required"`
// Id of the external network.
NetworkID string `json:"network_id,required" format:"uuid4"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
EnableSnat respjson.Field
ExternalFixedIPs respjson.Field
NetworkID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
State of this router's external gateway.
func (RouterExternalGatewayInfo) RawJSON ¶
func (r RouterExternalGatewayInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*RouterExternalGatewayInfo) UnmarshalJSON ¶
func (r *RouterExternalGatewayInfo) UnmarshalJSON(data []byte) error
type RouterInterface ¶
type RouterInterface struct {
// IP addresses assigned to this port
IPAssignments []IPAssignment `json:"ip_assignments,required"`
// ID of the network the port is attached to
NetworkID string `json:"network_id,required" format:"uuid4"`
// ID of virtual ethernet port object
PortID string `json:"port_id,required" format:"uuid4"`
// MAC address of the virtual port
MacAddress string `json:"mac_address,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
IPAssignments respjson.Field
NetworkID respjson.Field
PortID respjson.Field
MacAddress respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RouterInterface) RawJSON ¶
func (r RouterInterface) RawJSON() string
Returns the unmodified JSON received from the API
func (*RouterInterface) UnmarshalJSON ¶
func (r *RouterInterface) UnmarshalJSON(data []byte) error
type RouterList ¶
type RouterList struct {
// Number of objects
Count int64 `json:"count,required"`
// Objects
Results []Router `json:"results,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RouterList) RawJSON ¶
func (r RouterList) RawJSON() string
Returns the unmodified JSON received from the API
func (*RouterList) UnmarshalJSON ¶
func (r *RouterList) UnmarshalJSON(data []byte) error
type SSHKey ¶
type SSHKey struct {
// SSH key ID
ID string `json:"id,required" format:"uuid4"`
// SSH key creation time
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Fingerprint
Fingerprint string `json:"fingerprint,required"`
// SSH key name
Name string `json:"name,required"`
// Project ID
ProjectID int64 `json:"project_id,required"`
// The public part of an SSH key is the shareable portion of an SSH key pair. It
// can be safely sent to servers or services to grant access. It does not contain
// sensitive information.
PublicKey string `json:"public_key,required"`
SharedInProject bool `json:"shared_in_project,required"`
// SSH key state
//
// Any of "ACTIVE", "DELETING".
State SSHKeyState `json:"state,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fingerprint respjson.Field
Name respjson.Field
ProjectID respjson.Field
PublicKey respjson.Field
SharedInProject respjson.Field
State respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*SSHKey) UnmarshalJSON ¶
type SSHKeyCreated ¶
type SSHKeyCreated struct {
// SSH key ID
ID string `json:"id,required" format:"uuid4"`
// SSH key creation time
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Fingerprint
Fingerprint string `json:"fingerprint,required"`
// SSH key name
Name string `json:"name,required"`
// The private part of an SSH key is the confidential portion of the key pair. It
// should never be shared or exposed. This key is used to prove your identity when
// connecting to a server. If you omit the `public_key`, the platform will generate
// a key for you. The `private_key` will be returned **once** in the API response.
// Be sure to save it securely, as it cannot be retrieved again later. Best
// practice: Save the private key to a secure location on your machine (e.g.,
// `~/.ssh/id_ed25519`) and set the file permissions to be readable only by you.
PrivateKey string `json:"private_key,required"`
// Project ID
ProjectID int64 `json:"project_id,required"`
// The public part of an SSH key is the shareable portion of an SSH key pair. It
// can be safely sent to servers or services to grant access. It does not contain
// sensitive information.
PublicKey string `json:"public_key,required"`
SharedInProject bool `json:"shared_in_project,required"`
// SSH key state
//
// Any of "ACTIVE", "DELETING".
State SSHKeyCreatedState `json:"state,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fingerprint respjson.Field
Name respjson.Field
PrivateKey respjson.Field
ProjectID respjson.Field
PublicKey respjson.Field
SharedInProject respjson.Field
State respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SSHKeyCreated) RawJSON ¶
func (r SSHKeyCreated) RawJSON() string
Returns the unmodified JSON received from the API
func (*SSHKeyCreated) UnmarshalJSON ¶
func (r *SSHKeyCreated) UnmarshalJSON(data []byte) error
type SSHKeyCreatedState ¶
type SSHKeyCreatedState string
SSH key state
const ( SSHKeyCreatedStateActive SSHKeyCreatedState = "ACTIVE" SSHKeyCreatedStateDeleting SSHKeyCreatedState = "DELETING" )
type SSHKeyDeleteParams ¶
type SSHKeyGetParams ¶
type SSHKeyListParams ¶
type SSHKeyListParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Maximum number of SSH keys to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Offset for pagination
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Sort order for the SSH keys
//
// Any of "created_at.asc", "created_at.desc", "name.asc", "name.desc".
OrderBy SSHKeyListParamsOrderBy `query:"order_by,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SSHKeyListParams) URLQuery ¶
func (r SSHKeyListParams) URLQuery() (v url.Values, err error)
URLQuery serializes SSHKeyListParams's query parameters as `url.Values`.
type SSHKeyListParamsOrderBy ¶
type SSHKeyListParamsOrderBy string
Sort order for the SSH keys
const ( SSHKeyListParamsOrderByCreatedAtAsc SSHKeyListParamsOrderBy = "created_at.asc" SSHKeyListParamsOrderByCreatedAtDesc SSHKeyListParamsOrderBy = "created_at.desc" SSHKeyListParamsOrderByNameAsc SSHKeyListParamsOrderBy = "name.asc" SSHKeyListParamsOrderByNameDesc SSHKeyListParamsOrderBy = "name.desc" )
type SSHKeyNewParams ¶
type SSHKeyNewParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// SSH key name
Name string `json:"name,required"`
// The public part of an SSH key is the shareable portion of an SSH key pair. It
// can be safely sent to servers or services to grant access. It does not contain
// sensitive information.
//
// - If you’re uploading your own key, provide the public part here (usually found
// in a file like `id_ed25519.pub`).
// - If you want the platform to generate an Ed25519 key pair for you, leave this
// field empty — the system will return the private key in the response **once
// only**.
PublicKey param.Opt[string] `json:"public_key,omitzero"`
SharedInProject param.Opt[bool] `json:"shared_in_project,omitzero"`
// contains filtered or unexported fields
}
func (SSHKeyNewParams) MarshalJSON ¶
func (r SSHKeyNewParams) MarshalJSON() (data []byte, err error)
func (*SSHKeyNewParams) UnmarshalJSON ¶
func (r *SSHKeyNewParams) UnmarshalJSON(data []byte) error
type SSHKeyService ¶
type SSHKeyService struct {
Options []option.RequestOption
}
SSHKeyService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSSHKeyService method instead.
func NewSSHKeyService ¶
func NewSSHKeyService(opts ...option.RequestOption) (r SSHKeyService)
NewSSHKeyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SSHKeyService) Delete ¶
func (r *SSHKeyService) Delete(ctx context.Context, sshKeyID string, body SSHKeyDeleteParams, opts ...option.RequestOption) (err error)
Delete SSH key
func (*SSHKeyService) Get ¶
func (r *SSHKeyService) Get(ctx context.Context, sshKeyID string, query SSHKeyGetParams, opts ...option.RequestOption) (res *SSHKey, err error)
Get SSH key
func (*SSHKeyService) List ¶
func (r *SSHKeyService) List(ctx context.Context, params SSHKeyListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[SSHKey], err error)
List SSH keys
func (*SSHKeyService) ListAutoPaging ¶
func (r *SSHKeyService) ListAutoPaging(ctx context.Context, params SSHKeyListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[SSHKey]
List SSH keys
func (*SSHKeyService) New ¶
func (r *SSHKeyService) New(ctx context.Context, params SSHKeyNewParams, opts ...option.RequestOption) (res *SSHKeyCreated, err error)
To generate a key, omit the `public_key` parameter from the request body
func (*SSHKeyService) Update ¶
func (r *SSHKeyService) Update(ctx context.Context, sshKeyID string, params SSHKeyUpdateParams, opts ...option.RequestOption) (res *SSHKey, err error)
Share or unshare SSH key with users
type SSHKeyState ¶
type SSHKeyState string
SSH key state
const ( SSHKeyStateActive SSHKeyState = "ACTIVE" SSHKeyStateDeleting SSHKeyState = "DELETING" )
type SSHKeyUpdateParams ¶
type SSHKeyUpdateParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
SharedInProject bool `json:"shared_in_project,required"`
// contains filtered or unexported fields
}
func (SSHKeyUpdateParams) MarshalJSON ¶
func (r SSHKeyUpdateParams) MarshalJSON() (data []byte, err error)
func (*SSHKeyUpdateParams) UnmarshalJSON ¶
func (r *SSHKeyUpdateParams) UnmarshalJSON(data []byte) error
type Secret ¶
type Secret struct {
// Secret uuid
ID string `json:"id,required"`
// Secret name
Name string `json:"name,required"`
// Secret type, base64 encoded. symmetric - Used for storing byte arrays such as
// keys suitable for symmetric encryption; public - Used for storing the public key
// of an asymmetric keypair; private - Used for storing the private key of an
// asymmetric keypair; passphrase - Used for storing plain text passphrases;
// certificate - Used for storing cryptographic certificates such as X.509
// certificates; opaque - Used for backwards compatibility with previous versions
// of the API
//
// Any of "certificate", "opaque", "passphrase", "private", "public", "symmetric".
SecretType SecretSecretType `json:"secret_type,required"`
// Status
Status string `json:"status,required"`
// Metadata provided by a user or system for informational purposes. Defaults to
// None
Algorithm string `json:"algorithm,nullable"`
// Metadata provided by a user or system for informational purposes. Value must be
// greater than zero. Defaults to None
BitLength int64 `json:"bit_length,nullable"`
// Describes the content-types that can be used to retrieve the payload. The
// content-type used with symmetric secrets is application/octet-stream
ContentTypes map[string]string `json:"content_types,nullable"`
// Datetime when the secret was created. The format is 2020-01-01T12:00:00+00:00
Created time.Time `json:"created,nullable" format:"date-time"`
// Datetime when the secret will expire. The format is 2020-01-01T12:00:00+00:00.
// Defaults to None
Expiration time.Time `json:"expiration,nullable" format:"date-time"`
// Metadata provided by a user or system for informational purposes. Defaults to
// None
Mode string `json:"mode,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
SecretType respjson.Field
Status respjson.Field
Algorithm respjson.Field
BitLength respjson.Field
ContentTypes respjson.Field
Created respjson.Field
Expiration respjson.Field
Mode respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Secret) UnmarshalJSON ¶
type SecretDeleteParams ¶
type SecretGetParams ¶
type SecretListParams ¶
type SecretListParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Optional. Limit the number of returned items
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Optional. Offset value is used to exclude the first set of records from the
// result
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SecretListParams) URLQuery ¶ added in v0.2.0
func (r SecretListParams) URLQuery() (v url.Values, err error)
URLQuery serializes SecretListParams's query parameters as `url.Values`.
type SecretSecretType ¶
type SecretSecretType string
Secret type, base64 encoded. symmetric - Used for storing byte arrays such as keys suitable for symmetric encryption; public - Used for storing the public key of an asymmetric keypair; private - Used for storing the private key of an asymmetric keypair; passphrase - Used for storing plain text passphrases; certificate - Used for storing cryptographic certificates such as X.509 certificates; opaque - Used for backwards compatibility with previous versions of the API
const ( SecretSecretTypeCertificate SecretSecretType = "certificate" SecretSecretTypeOpaque SecretSecretType = "opaque" SecretSecretTypePassphrase SecretSecretType = "passphrase" SecretSecretTypePrivate SecretSecretType = "private" SecretSecretTypePublic SecretSecretType = "public" SecretSecretTypeSymmetric SecretSecretType = "symmetric" )
type SecretService ¶
type SecretService struct {
Options []option.RequestOption
// contains filtered or unexported fields
}
SecretService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSecretService method instead.
func NewSecretService ¶
func NewSecretService(opts ...option.RequestOption) (r SecretService)
NewSecretService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SecretService) Delete ¶
func (r *SecretService) Delete(ctx context.Context, secretID string, body SecretDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Delete secret
func (*SecretService) Get ¶
func (r *SecretService) Get(ctx context.Context, secretID string, query SecretGetParams, opts ...option.RequestOption) (res *Secret, err error)
Get secret
func (*SecretService) List ¶
func (r *SecretService) List(ctx context.Context, params SecretListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[Secret], err error)
List secrets
func (*SecretService) ListAutoPaging ¶ added in v0.5.0
func (r *SecretService) ListAutoPaging(ctx context.Context, params SecretListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[Secret]
List secrets
func (*SecretService) UploadTlsCertificate ¶
func (r *SecretService) UploadTlsCertificate(ctx context.Context, params SecretUploadTlsCertificateParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Create secret
func (*SecretService) UploadTlsCertificateAndPoll ¶ added in v0.5.0
func (r *SecretService) UploadTlsCertificateAndPoll(ctx context.Context, params SecretUploadTlsCertificateParams, opts ...option.RequestOption) (v *Secret, err error)
Create secret and poll for the result
type SecretUploadTlsCertificateParams ¶
type SecretUploadTlsCertificateParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Secret name
Name string `json:"name,required"`
// Secret payload.
Payload SecretUploadTlsCertificateParamsPayload `json:"payload,omitzero,required"`
// Datetime when the secret will expire. Defaults to None
Expiration param.Opt[time.Time] `json:"expiration,omitzero" format:"date-time"`
// contains filtered or unexported fields
}
func (SecretUploadTlsCertificateParams) MarshalJSON ¶
func (r SecretUploadTlsCertificateParams) MarshalJSON() (data []byte, err error)
func (*SecretUploadTlsCertificateParams) UnmarshalJSON ¶
func (r *SecretUploadTlsCertificateParams) UnmarshalJSON(data []byte) error
type SecretUploadTlsCertificateParamsPayload ¶
type SecretUploadTlsCertificateParamsPayload struct {
// SSL certificate in PEM format.
Certificate string `json:"certificate,required" format:"password"`
// SSL certificate chain of intermediates and root certificates in PEM format.
CertificateChain string `json:"certificate_chain,required" format:"password"`
// SSL private key in PEM format.
PrivateKey string `json:"private_key,required" format:"password"`
// contains filtered or unexported fields
}
Secret payload.
The properties Certificate, CertificateChain, PrivateKey are required.
func (SecretUploadTlsCertificateParamsPayload) MarshalJSON ¶
func (r SecretUploadTlsCertificateParamsPayload) MarshalJSON() (data []byte, err error)
func (*SecretUploadTlsCertificateParamsPayload) UnmarshalJSON ¶
func (r *SecretUploadTlsCertificateParamsPayload) UnmarshalJSON(data []byte) error
type SecurityGroup ¶
type SecurityGroup struct {
// Security group ID
ID string `json:"id,required" format:"uuid4"`
// Datetime when the security group was created
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Security group name
Name string `json:"name,required"`
// Project ID
ProjectID int64 `json:"project_id,required"`
// Region name
Region string `json:"region,required"`
// Region ID
RegionID int64 `json:"region_id,required"`
// The number of revisions
RevisionNumber int64 `json:"revision_number,required"`
// Tags for a security group
TagsV2 []Tag `json:"tags_v2,required"`
// Datetime when the security group was last updated
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
// Security group description
Description string `json:"description,nullable"`
// Security group rules
SecurityGroupRules []SecurityGroupRule `json:"security_group_rules"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Name respjson.Field
ProjectID respjson.Field
Region respjson.Field
RegionID respjson.Field
RevisionNumber respjson.Field
TagsV2 respjson.Field
UpdatedAt respjson.Field
Description respjson.Field
SecurityGroupRules respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SecurityGroup) RawJSON ¶
func (r SecurityGroup) RawJSON() string
Returns the unmodified JSON received from the API
func (*SecurityGroup) UnmarshalJSON ¶
func (r *SecurityGroup) UnmarshalJSON(data []byte) error
type SecurityGroupCopyParams ¶
type SecurityGroupCopyParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Name.
Name string `json:"name,required"`
// contains filtered or unexported fields
}
func (SecurityGroupCopyParams) MarshalJSON ¶
func (r SecurityGroupCopyParams) MarshalJSON() (data []byte, err error)
func (*SecurityGroupCopyParams) UnmarshalJSON ¶
func (r *SecurityGroupCopyParams) UnmarshalJSON(data []byte) error
type SecurityGroupGetParams ¶
type SecurityGroupListParams ¶
type SecurityGroupListParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Limit the number of returned security groups
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Offset value is used to exclude the first set of records from the result
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Filter by tag key-value pairs. Must be a valid JSON string.
TagKeyValue param.Opt[string] `query:"tag_key_value,omitzero" json:"-"`
// Filter by tag keys.
TagKey []string `query:"tag_key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SecurityGroupListParams) URLQuery ¶
func (r SecurityGroupListParams) URLQuery() (v url.Values, err error)
URLQuery serializes SecurityGroupListParams's query parameters as `url.Values`.
type SecurityGroupNewParams ¶
type SecurityGroupNewParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Security group
SecurityGroup SecurityGroupNewParamsSecurityGroup `json:"security_group,omitzero,required"`
// List of instances
Instances []string `json:"instances,omitzero"`
// contains filtered or unexported fields
}
func (SecurityGroupNewParams) MarshalJSON ¶
func (r SecurityGroupNewParams) MarshalJSON() (data []byte, err error)
func (*SecurityGroupNewParams) UnmarshalJSON ¶
func (r *SecurityGroupNewParams) UnmarshalJSON(data []byte) error
type SecurityGroupNewParamsSecurityGroup ¶
type SecurityGroupNewParamsSecurityGroup struct {
// Security group name
Name string `json:"name,required"`
// Security group description
Description param.Opt[string] `json:"description,omitzero"`
// Security group rules
SecurityGroupRules []SecurityGroupNewParamsSecurityGroupSecurityGroupRule `json:"security_group_rules,omitzero"`
// Key-value tags to associate with the resource. A tag is a key-value pair that
// can be associated with a resource, enabling efficient filtering and grouping for
// better organization and management. Some tags are read-only and cannot be
// modified by the user. Tags are also integrated with cost reports, allowing cost
// data to be filtered based on tag keys or values.
Tags map[string]any `json:"tags,omitzero"`
// contains filtered or unexported fields
}
Security group
The property Name is required.
func (SecurityGroupNewParamsSecurityGroup) MarshalJSON ¶
func (r SecurityGroupNewParamsSecurityGroup) MarshalJSON() (data []byte, err error)
func (*SecurityGroupNewParamsSecurityGroup) UnmarshalJSON ¶
func (r *SecurityGroupNewParamsSecurityGroup) UnmarshalJSON(data []byte) error
type SecurityGroupNewParamsSecurityGroupSecurityGroupRule ¶
type SecurityGroupNewParamsSecurityGroupSecurityGroupRule struct {
// The maximum port number in the range that is matched by the security group rule
PortRangeMax param.Opt[int64] `json:"port_range_max,omitzero"`
// The minimum port number in the range that is matched by the security group rule
PortRangeMin param.Opt[int64] `json:"port_range_min,omitzero"`
// The remote IP prefix that is matched by this security group rule
RemoteIPPrefix param.Opt[string] `json:"remote_ip_prefix,omitzero" format:"ipvanynetwork"`
// Rule description
Description param.Opt[string] `json:"description,omitzero"`
// The remote group UUID to associate with this security group
RemoteGroupID param.Opt[string] `json:"remote_group_id,omitzero" format:"uuid4"`
// Ingress or egress, which is the direction in which the security group is applied
//
// Any of "egress", "ingress".
Direction string `json:"direction,omitzero"`
// Ether type
//
// Any of "IPv4", "IPv6".
Ethertype string `json:"ethertype,omitzero"`
// Protocol
//
// Any of "ah", "any", "dccp", "egp", "esp", "gre", "icmp", "igmp", "ipencap",
// "ipip", "ipv6-encap", "ipv6-frag", "ipv6-icmp", "ipv6-nonxt", "ipv6-opts",
// "ipv6-route", "ospf", "pgm", "rsvp", "sctp", "tcp", "udp", "udplite", "vrrp".
Protocol string `json:"protocol,omitzero"`
// contains filtered or unexported fields
}
func (SecurityGroupNewParamsSecurityGroupSecurityGroupRule) MarshalJSON ¶
func (r SecurityGroupNewParamsSecurityGroupSecurityGroupRule) MarshalJSON() (data []byte, err error)
func (*SecurityGroupNewParamsSecurityGroupSecurityGroupRule) UnmarshalJSON ¶
func (r *SecurityGroupNewParamsSecurityGroupSecurityGroupRule) UnmarshalJSON(data []byte) error
type SecurityGroupRule ¶
type SecurityGroupRule struct {
// The ID of the security group rule
ID string `json:"id,required" format:"uuid4"`
// Datetime when the rule was created
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Ingress or egress, which is the direction in which the security group rule is
// applied
//
// Any of "egress", "ingress".
Direction SecurityGroupRuleDirection `json:"direction,required"`
// The revision number of the resource
RevisionNumber int64 `json:"revision_number,required"`
// The security group ID to associate with this security group rule
SecurityGroupID string `json:"security_group_id,required" format:"uuid4"`
// Datetime when the rule was last updated
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
// Rule description
Description string `json:"description,nullable"`
// Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress
// or egress rules.
//
// Any of "IPv4", "IPv6".
Ethertype SecurityGroupRuleEthertype `json:"ethertype,nullable"`
// The maximum port number in the range that is matched by the security group rule
PortRangeMax int64 `json:"port_range_max,nullable"`
// The minimum port number in the range that is matched by the security group rule
PortRangeMin int64 `json:"port_range_min,nullable"`
// Protocol
//
// Any of "ah", "any", "dccp", "egp", "esp", "gre", "icmp", "igmp", "ipencap",
// "ipip", "ipv6-encap", "ipv6-frag", "ipv6-icmp", "ipv6-nonxt", "ipv6-opts",
// "ipv6-route", "ospf", "pgm", "rsvp", "sctp", "tcp", "udp", "udplite", "vrrp".
Protocol SecurityGroupRuleProtocol `json:"protocol,nullable"`
// The remote group UUID to associate with this security group rule
RemoteGroupID string `json:"remote_group_id,nullable" format:"uuid4"`
// The remote IP prefix that is matched by this security group rule
RemoteIPPrefix string `json:"remote_ip_prefix,nullable" format:"ipvanynetwork"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Direction respjson.Field
RevisionNumber respjson.Field
SecurityGroupID respjson.Field
UpdatedAt respjson.Field
Description respjson.Field
Ethertype respjson.Field
PortRangeMax respjson.Field
PortRangeMin respjson.Field
Protocol respjson.Field
RemoteGroupID respjson.Field
RemoteIPPrefix respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SecurityGroupRule) RawJSON ¶
func (r SecurityGroupRule) RawJSON() string
Returns the unmodified JSON received from the API
func (*SecurityGroupRule) UnmarshalJSON ¶
func (r *SecurityGroupRule) UnmarshalJSON(data []byte) error
type SecurityGroupRuleDirection ¶
type SecurityGroupRuleDirection string
Ingress or egress, which is the direction in which the security group rule is applied
const ( SecurityGroupRuleDirectionEgress SecurityGroupRuleDirection = "egress" SecurityGroupRuleDirectionIngress SecurityGroupRuleDirection = "ingress" )
type SecurityGroupRuleEthertype ¶
type SecurityGroupRuleEthertype string
Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules.
const ( SecurityGroupRuleEthertypeIPv4 SecurityGroupRuleEthertype = "IPv4" SecurityGroupRuleEthertypeIPv6 SecurityGroupRuleEthertype = "IPv6" )
type SecurityGroupRuleNewParams ¶
type SecurityGroupRuleNewParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// The maximum port number in the range that is matched by the security group rule
PortRangeMax param.Opt[int64] `json:"port_range_max,omitzero"`
// The minimum port number in the range that is matched by the security group rule
PortRangeMin param.Opt[int64] `json:"port_range_min,omitzero"`
// The remote IP prefix that is matched by this security group rule
RemoteIPPrefix param.Opt[string] `json:"remote_ip_prefix,omitzero" format:"ipvanynetwork"`
// Rule description
Description param.Opt[string] `json:"description,omitzero"`
// The remote group UUID to associate with this security group
RemoteGroupID param.Opt[string] `json:"remote_group_id,omitzero" format:"uuid4"`
// Ingress or egress, which is the direction in which the security group is applied
//
// Any of "egress", "ingress".
Direction SecurityGroupRuleNewParamsDirection `json:"direction,omitzero"`
// Ether type
//
// Any of "IPv4", "IPv6".
Ethertype SecurityGroupRuleNewParamsEthertype `json:"ethertype,omitzero"`
// Protocol
//
// Any of "ah", "any", "dccp", "egp", "esp", "gre", "icmp", "igmp", "ipencap",
// "ipip", "ipv6-encap", "ipv6-frag", "ipv6-icmp", "ipv6-nonxt", "ipv6-opts",
// "ipv6-route", "ospf", "pgm", "rsvp", "sctp", "tcp", "udp", "udplite", "vrrp".
Protocol SecurityGroupRuleNewParamsProtocol `json:"protocol,omitzero"`
// contains filtered or unexported fields
}
func (SecurityGroupRuleNewParams) MarshalJSON ¶
func (r SecurityGroupRuleNewParams) MarshalJSON() (data []byte, err error)
func (*SecurityGroupRuleNewParams) UnmarshalJSON ¶
func (r *SecurityGroupRuleNewParams) UnmarshalJSON(data []byte) error
type SecurityGroupRuleNewParamsDirection ¶
type SecurityGroupRuleNewParamsDirection string
Ingress or egress, which is the direction in which the security group is applied
const ( SecurityGroupRuleNewParamsDirectionEgress SecurityGroupRuleNewParamsDirection = "egress" SecurityGroupRuleNewParamsDirectionIngress SecurityGroupRuleNewParamsDirection = "ingress" )
type SecurityGroupRuleNewParamsEthertype ¶
type SecurityGroupRuleNewParamsEthertype string
Ether type
const ( SecurityGroupRuleNewParamsEthertypeIPv4 SecurityGroupRuleNewParamsEthertype = "IPv4" SecurityGroupRuleNewParamsEthertypeIPv6 SecurityGroupRuleNewParamsEthertype = "IPv6" )
type SecurityGroupRuleNewParamsProtocol ¶
type SecurityGroupRuleNewParamsProtocol string
Protocol
const ( SecurityGroupRuleNewParamsProtocolAh SecurityGroupRuleNewParamsProtocol = "ah" SecurityGroupRuleNewParamsProtocolAny SecurityGroupRuleNewParamsProtocol = "any" SecurityGroupRuleNewParamsProtocolDccp SecurityGroupRuleNewParamsProtocol = "dccp" SecurityGroupRuleNewParamsProtocolEgp SecurityGroupRuleNewParamsProtocol = "egp" SecurityGroupRuleNewParamsProtocolEsp SecurityGroupRuleNewParamsProtocol = "esp" SecurityGroupRuleNewParamsProtocolGre SecurityGroupRuleNewParamsProtocol = "gre" SecurityGroupRuleNewParamsProtocolIcmp SecurityGroupRuleNewParamsProtocol = "icmp" SecurityGroupRuleNewParamsProtocolIgmp SecurityGroupRuleNewParamsProtocol = "igmp" SecurityGroupRuleNewParamsProtocolIpencap SecurityGroupRuleNewParamsProtocol = "ipencap" SecurityGroupRuleNewParamsProtocolIpip SecurityGroupRuleNewParamsProtocol = "ipip" SecurityGroupRuleNewParamsProtocolIpv6Encap SecurityGroupRuleNewParamsProtocol = "ipv6-encap" SecurityGroupRuleNewParamsProtocolIpv6Frag SecurityGroupRuleNewParamsProtocol = "ipv6-frag" SecurityGroupRuleNewParamsProtocolIpv6Icmp SecurityGroupRuleNewParamsProtocol = "ipv6-icmp" SecurityGroupRuleNewParamsProtocolIpv6Nonxt SecurityGroupRuleNewParamsProtocol = "ipv6-nonxt" SecurityGroupRuleNewParamsProtocolIpv6Opts SecurityGroupRuleNewParamsProtocol = "ipv6-opts" SecurityGroupRuleNewParamsProtocolIpv6Route SecurityGroupRuleNewParamsProtocol = "ipv6-route" SecurityGroupRuleNewParamsProtocolOspf SecurityGroupRuleNewParamsProtocol = "ospf" SecurityGroupRuleNewParamsProtocolPgm SecurityGroupRuleNewParamsProtocol = "pgm" SecurityGroupRuleNewParamsProtocolRsvp SecurityGroupRuleNewParamsProtocol = "rsvp" SecurityGroupRuleNewParamsProtocolSctp SecurityGroupRuleNewParamsProtocol = "sctp" SecurityGroupRuleNewParamsProtocolTcp SecurityGroupRuleNewParamsProtocol = "tcp" SecurityGroupRuleNewParamsProtocolUdp SecurityGroupRuleNewParamsProtocol = "udp" SecurityGroupRuleNewParamsProtocolUdplite SecurityGroupRuleNewParamsProtocol = "udplite" SecurityGroupRuleNewParamsProtocolVrrp SecurityGroupRuleNewParamsProtocol = "vrrp" )
type SecurityGroupRuleProtocol ¶
type SecurityGroupRuleProtocol string
Protocol
const ( SecurityGroupRuleProtocolAh SecurityGroupRuleProtocol = "ah" SecurityGroupRuleProtocolAny SecurityGroupRuleProtocol = "any" SecurityGroupRuleProtocolDccp SecurityGroupRuleProtocol = "dccp" SecurityGroupRuleProtocolEgp SecurityGroupRuleProtocol = "egp" SecurityGroupRuleProtocolEsp SecurityGroupRuleProtocol = "esp" SecurityGroupRuleProtocolGre SecurityGroupRuleProtocol = "gre" SecurityGroupRuleProtocolIcmp SecurityGroupRuleProtocol = "icmp" SecurityGroupRuleProtocolIgmp SecurityGroupRuleProtocol = "igmp" SecurityGroupRuleProtocolIpencap SecurityGroupRuleProtocol = "ipencap" SecurityGroupRuleProtocolIpip SecurityGroupRuleProtocol = "ipip" SecurityGroupRuleProtocolIpv6Encap SecurityGroupRuleProtocol = "ipv6-encap" SecurityGroupRuleProtocolIpv6Frag SecurityGroupRuleProtocol = "ipv6-frag" SecurityGroupRuleProtocolIpv6Icmp SecurityGroupRuleProtocol = "ipv6-icmp" SecurityGroupRuleProtocolIpv6Nonxt SecurityGroupRuleProtocol = "ipv6-nonxt" SecurityGroupRuleProtocolIpv6Opts SecurityGroupRuleProtocol = "ipv6-opts" SecurityGroupRuleProtocolIpv6Route SecurityGroupRuleProtocol = "ipv6-route" SecurityGroupRuleProtocolOspf SecurityGroupRuleProtocol = "ospf" SecurityGroupRuleProtocolPgm SecurityGroupRuleProtocol = "pgm" SecurityGroupRuleProtocolRsvp SecurityGroupRuleProtocol = "rsvp" SecurityGroupRuleProtocolSctp SecurityGroupRuleProtocol = "sctp" SecurityGroupRuleProtocolTcp SecurityGroupRuleProtocol = "tcp" SecurityGroupRuleProtocolUdp SecurityGroupRuleProtocol = "udp" SecurityGroupRuleProtocolUdplite SecurityGroupRuleProtocol = "udplite" SecurityGroupRuleProtocolVrrp SecurityGroupRuleProtocol = "vrrp" )
type SecurityGroupRuleReplaceParams ¶
type SecurityGroupRuleReplaceParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Ingress or egress, which is the direction in which the security group rule is
// applied
//
// Any of "egress", "ingress".
Direction SecurityGroupRuleReplaceParamsDirection `json:"direction,omitzero,required"`
// Parent security group of this rule
SecurityGroupID string `json:"security_group_id,required" format:"uuid4"`
// The maximum port number in the range that is matched by the security group rule
PortRangeMax param.Opt[int64] `json:"port_range_max,omitzero"`
// The minimum port number in the range that is matched by the security group rule
PortRangeMin param.Opt[int64] `json:"port_range_min,omitzero"`
// The remote group UUID to associate with this security group rule
RemoteGroupID param.Opt[string] `json:"remote_group_id,omitzero" format:"uuid4"`
// The remote IP prefix that is matched by this security group rule
RemoteIPPrefix param.Opt[string] `json:"remote_ip_prefix,omitzero" format:"ipvanynetwork"`
// Rule description
Description param.Opt[string] `json:"description,omitzero"`
// Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress
// or egress rules.
//
// Any of "IPv4", "IPv6".
Ethertype SecurityGroupRuleReplaceParamsEthertype `json:"ethertype,omitzero"`
// Protocol
//
// Any of "ah", "any", "dccp", "egp", "esp", "gre", "icmp", "igmp", "ipencap",
// "ipip", "ipv6-encap", "ipv6-frag", "ipv6-icmp", "ipv6-nonxt", "ipv6-opts",
// "ipv6-route", "ospf", "pgm", "rsvp", "sctp", "tcp", "udp", "udplite", "vrrp".
Protocol SecurityGroupRuleReplaceParamsProtocol `json:"protocol,omitzero"`
// contains filtered or unexported fields
}
func (SecurityGroupRuleReplaceParams) MarshalJSON ¶
func (r SecurityGroupRuleReplaceParams) MarshalJSON() (data []byte, err error)
func (*SecurityGroupRuleReplaceParams) UnmarshalJSON ¶
func (r *SecurityGroupRuleReplaceParams) UnmarshalJSON(data []byte) error
type SecurityGroupRuleReplaceParamsDirection ¶
type SecurityGroupRuleReplaceParamsDirection string
Ingress or egress, which is the direction in which the security group rule is applied
const ( SecurityGroupRuleReplaceParamsDirectionEgress SecurityGroupRuleReplaceParamsDirection = "egress" SecurityGroupRuleReplaceParamsDirectionIngress SecurityGroupRuleReplaceParamsDirection = "ingress" )
type SecurityGroupRuleReplaceParamsEthertype ¶
type SecurityGroupRuleReplaceParamsEthertype string
Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules.
const ( SecurityGroupRuleReplaceParamsEthertypeIPv4 SecurityGroupRuleReplaceParamsEthertype = "IPv4" SecurityGroupRuleReplaceParamsEthertypeIPv6 SecurityGroupRuleReplaceParamsEthertype = "IPv6" )
type SecurityGroupRuleReplaceParamsProtocol ¶
type SecurityGroupRuleReplaceParamsProtocol string
Protocol
const ( SecurityGroupRuleReplaceParamsProtocolAh SecurityGroupRuleReplaceParamsProtocol = "ah" SecurityGroupRuleReplaceParamsProtocolAny SecurityGroupRuleReplaceParamsProtocol = "any" SecurityGroupRuleReplaceParamsProtocolDccp SecurityGroupRuleReplaceParamsProtocol = "dccp" SecurityGroupRuleReplaceParamsProtocolEgp SecurityGroupRuleReplaceParamsProtocol = "egp" SecurityGroupRuleReplaceParamsProtocolEsp SecurityGroupRuleReplaceParamsProtocol = "esp" SecurityGroupRuleReplaceParamsProtocolGre SecurityGroupRuleReplaceParamsProtocol = "gre" SecurityGroupRuleReplaceParamsProtocolIcmp SecurityGroupRuleReplaceParamsProtocol = "icmp" SecurityGroupRuleReplaceParamsProtocolIgmp SecurityGroupRuleReplaceParamsProtocol = "igmp" SecurityGroupRuleReplaceParamsProtocolIpencap SecurityGroupRuleReplaceParamsProtocol = "ipencap" SecurityGroupRuleReplaceParamsProtocolIpip SecurityGroupRuleReplaceParamsProtocol = "ipip" SecurityGroupRuleReplaceParamsProtocolIpv6Encap SecurityGroupRuleReplaceParamsProtocol = "ipv6-encap" SecurityGroupRuleReplaceParamsProtocolIpv6Frag SecurityGroupRuleReplaceParamsProtocol = "ipv6-frag" SecurityGroupRuleReplaceParamsProtocolIpv6Icmp SecurityGroupRuleReplaceParamsProtocol = "ipv6-icmp" SecurityGroupRuleReplaceParamsProtocolIpv6Nonxt SecurityGroupRuleReplaceParamsProtocol = "ipv6-nonxt" SecurityGroupRuleReplaceParamsProtocolIpv6Opts SecurityGroupRuleReplaceParamsProtocol = "ipv6-opts" SecurityGroupRuleReplaceParamsProtocolIpv6Route SecurityGroupRuleReplaceParamsProtocol = "ipv6-route" SecurityGroupRuleReplaceParamsProtocolOspf SecurityGroupRuleReplaceParamsProtocol = "ospf" SecurityGroupRuleReplaceParamsProtocolPgm SecurityGroupRuleReplaceParamsProtocol = "pgm" SecurityGroupRuleReplaceParamsProtocolRsvp SecurityGroupRuleReplaceParamsProtocol = "rsvp" SecurityGroupRuleReplaceParamsProtocolSctp SecurityGroupRuleReplaceParamsProtocol = "sctp" SecurityGroupRuleReplaceParamsProtocolTcp SecurityGroupRuleReplaceParamsProtocol = "tcp" SecurityGroupRuleReplaceParamsProtocolUdp SecurityGroupRuleReplaceParamsProtocol = "udp" SecurityGroupRuleReplaceParamsProtocolUdplite SecurityGroupRuleReplaceParamsProtocol = "udplite" SecurityGroupRuleReplaceParamsProtocolVrrp SecurityGroupRuleReplaceParamsProtocol = "vrrp" )
type SecurityGroupRuleService ¶
type SecurityGroupRuleService struct {
Options []option.RequestOption
}
SecurityGroupRuleService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSecurityGroupRuleService method instead.
func NewSecurityGroupRuleService ¶
func NewSecurityGroupRuleService(opts ...option.RequestOption) (r SecurityGroupRuleService)
NewSecurityGroupRuleService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SecurityGroupRuleService) Delete ¶
func (r *SecurityGroupRuleService) Delete(ctx context.Context, ruleID string, body SecurityGroupRuleDeleteParams, opts ...option.RequestOption) (err error)
Delete a specific rule from a security group.
func (*SecurityGroupRuleService) New ¶
func (r *SecurityGroupRuleService) New(ctx context.Context, groupID string, params SecurityGroupRuleNewParams, opts ...option.RequestOption) (res *SecurityGroupRule, err error)
Add a new rule to an existing security group.
func (*SecurityGroupRuleService) Replace ¶
func (r *SecurityGroupRuleService) Replace(ctx context.Context, ruleID string, params SecurityGroupRuleReplaceParams, opts ...option.RequestOption) (res *SecurityGroupRule, err error)
Update the configuration of an existing security group rule.
type SecurityGroupService ¶
type SecurityGroupService struct {
Options []option.RequestOption
Rules SecurityGroupRuleService
}
SecurityGroupService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSecurityGroupService method instead.
func NewSecurityGroupService ¶
func NewSecurityGroupService(opts ...option.RequestOption) (r SecurityGroupService)
NewSecurityGroupService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SecurityGroupService) Copy ¶
func (r *SecurityGroupService) Copy(ctx context.Context, groupID string, params SecurityGroupCopyParams, opts ...option.RequestOption) (res *SecurityGroup, err error)
Create a deep copy of an existing security group.
func (*SecurityGroupService) Delete ¶
func (r *SecurityGroupService) Delete(ctx context.Context, groupID string, body SecurityGroupDeleteParams, opts ...option.RequestOption) (err error)
Delete a specific security group and all its associated rules.
func (*SecurityGroupService) Get ¶
func (r *SecurityGroupService) Get(ctx context.Context, groupID string, query SecurityGroupGetParams, opts ...option.RequestOption) (res *SecurityGroup, err error)
Get detailed information about a specific security group.
func (*SecurityGroupService) List ¶
func (r *SecurityGroupService) List(ctx context.Context, params SecurityGroupListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[SecurityGroup], err error)
List all security groups in the specified project and region.
func (*SecurityGroupService) ListAutoPaging ¶
func (r *SecurityGroupService) ListAutoPaging(ctx context.Context, params SecurityGroupListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[SecurityGroup]
List all security groups in the specified project and region.
func (*SecurityGroupService) New ¶
func (r *SecurityGroupService) New(ctx context.Context, params SecurityGroupNewParams, opts ...option.RequestOption) (res *SecurityGroup, err error)
Create a new security group with the specified configuration.
func (*SecurityGroupService) RevertToDefault ¶
func (r *SecurityGroupService) RevertToDefault(ctx context.Context, groupID string, body SecurityGroupRevertToDefaultParams, opts ...option.RequestOption) (res *SecurityGroup, err error)
Revert a security group to its previous state.
func (*SecurityGroupService) Update ¶
func (r *SecurityGroupService) Update(ctx context.Context, groupID string, params SecurityGroupUpdateParams, opts ...option.RequestOption) (res *SecurityGroup, err error)
Update the configuration of an existing security group.
type SecurityGroupUpdateParams ¶
type SecurityGroupUpdateParams struct {
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Name
Name param.Opt[string] `json:"name,omitzero"`
// List of rules to create or delete
ChangedRules []SecurityGroupUpdateParamsChangedRule `json:"changed_rules,omitzero"`
// Update key-value tags using JSON Merge Patch semantics (RFC 7386). Provide
// key-value pairs to add or update tags. Set tag values to `null` to remove tags.
// Unspecified tags remain unchanged. Read-only tags are always preserved and
// cannot be modified. **Examples:**
//
// - **Add/update tags:**
// `{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
// updates existing ones.
// - **Delete tags:** `{'tags': {'`old_tag`': null}}` removes specific tags.
// - **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
// tags are preserved).
// - **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
// specified tags.
// - **Mixed operations:**
// `{'tags': {'environment': 'production', '`cost_center`': 'engineering', '`deprecated_tag`': null}}`
// adds/updates 'environment' and '`cost_center`' while removing
// '`deprecated_tag`', preserving other existing tags.
// - **Replace all:** first delete existing tags with null values, then add new
// ones in the same request.
Tags TagUpdateMap `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (SecurityGroupUpdateParams) MarshalJSON ¶
func (r SecurityGroupUpdateParams) MarshalJSON() (data []byte, err error)
func (*SecurityGroupUpdateParams) UnmarshalJSON ¶
func (r *SecurityGroupUpdateParams) UnmarshalJSON(data []byte) error
type SecurityGroupUpdateParamsChangedRule ¶
type SecurityGroupUpdateParamsChangedRule struct {
// Action for a rule
//
// Any of "create", "delete".
Action string `json:"action,omitzero,required"`
// The remote group UUID to associate with this security group rule
RemoteGroupID param.Opt[string] `json:"remote_group_id,omitzero" format:"uuid4"`
// The remote IP prefix that is matched by this security group rule
RemoteIPPrefix param.Opt[string] `json:"remote_ip_prefix,omitzero" format:"ipvanynetwork"`
// UUID of rule to be deleted. Required for action 'delete' only
SecurityGroupRuleID param.Opt[string] `json:"security_group_rule_id,omitzero" format:"uuid4"`
// Security grpup rule description
Description param.Opt[string] `json:"description,omitzero"`
// The maximum port number in the range that is matched by the security group rule
PortRangeMax param.Opt[int64] `json:"port_range_max,omitzero"`
// The minimum port number in the range that is matched by the security group rule
PortRangeMin param.Opt[int64] `json:"port_range_min,omitzero"`
// Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress
// or egress rules.
//
// Any of "IPv4", "IPv6".
Ethertype string `json:"ethertype,omitzero"`
// Ingress or egress, which is the direction in which the security group rule is
// applied
//
// Any of "egress", "ingress".
Direction string `json:"direction,omitzero"`
// Protocol
//
// Any of "ah", "any", "dccp", "egp", "esp", "gre", "icmp", "igmp", "ipencap",
// "ipip", "ipv6-encap", "ipv6-frag", "ipv6-icmp", "ipv6-nonxt", "ipv6-opts",
// "ipv6-route", "ospf", "pgm", "rsvp", "sctp", "tcp", "udp", "udplite", "vrrp".
Protocol string `json:"protocol,omitzero"`
// contains filtered or unexported fields
}
The property Action is required.
func (SecurityGroupUpdateParamsChangedRule) MarshalJSON ¶
func (r SecurityGroupUpdateParamsChangedRule) MarshalJSON() (data []byte, err error)
func (*SecurityGroupUpdateParamsChangedRule) UnmarshalJSON ¶
func (r *SecurityGroupUpdateParamsChangedRule) UnmarshalJSON(data []byte) error
type SessionPersistence ¶
type SessionPersistence struct {
// Session persistence type
//
// Any of "APP_COOKIE", "HTTP_COOKIE", "SOURCE_IP".
Type LbSessionPersistenceType `json:"type,required"`
// Should be set if app cookie or http cookie is used
CookieName string `json:"cookie_name,nullable"`
// Subnet mask if `source_ip` is used. For UDP ports only
PersistenceGranularity string `json:"persistence_granularity,nullable"`
// Session persistence timeout. For UDP ports only
PersistenceTimeout int64 `json:"persistence_timeout,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Type respjson.Field
CookieName respjson.Field
PersistenceGranularity respjson.Field
PersistenceTimeout respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SessionPersistence) RawJSON ¶
func (r SessionPersistence) RawJSON() string
Returns the unmodified JSON received from the API
func (*SessionPersistence) UnmarshalJSON ¶
func (r *SessionPersistence) UnmarshalJSON(data []byte) error
type Subnet ¶
type Subnet struct {
// CIDR
Cidr string `json:"cidr,required" format:"ipvanynetwork"`
// Datetime when the subnet was created
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// True if DHCP should be enabled
EnableDhcp bool `json:"enable_dhcp,required"`
// IP version
//
// Any of 4, 6.
IPVersion int64 `json:"ip_version,required"`
// Subnet name
Name string `json:"name,required"`
// Network ID
NetworkID string `json:"network_id,required" format:"uuid4"`
// Project ID
ProjectID int64 `json:"project_id,required"`
// Region name
Region string `json:"region,required"`
// Region ID
RegionID int64 `json:"region_id,required"`
// List of key-value tags associated with the resource. A tag is a key-value pair
// that can be associated with a resource, enabling efficient filtering and
// grouping for better organization and management. Some tags are read-only and
// cannot be modified by the user. Tags are also integrated with cost reports,
// allowing cost data to be filtered based on tag keys or values.
Tags []Tag `json:"tags,required"`
// Datetime when the subnet was last updated
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
// Subnet id.
ID string `json:"id,nullable" format:"uuid4"`
// Number of available ips in subnet
AvailableIPs int64 `json:"available_ips,nullable"`
// Task that created this entity
CreatorTaskID string `json:"creator_task_id,nullable" format:"uuid4"`
// List IP addresses of a DNS resolver reachable from the network
DNSNameservers []string `json:"dns_nameservers,nullable" format:"ipvanyaddress"`
// Default GW IPv4 address, advertised in DHCP routes of this subnet. If null, no
// gateway is advertised by this subnet.
GatewayIP string `json:"gateway_ip,nullable" format:"ipvanyaddress"`
// Subnet has router attached to it
HasRouter bool `json:"has_router"`
// List of custom static routes to advertise via DHCP.
HostRoutes []Route `json:"host_routes,nullable"`
// The UUID of the active task that currently holds a lock on the resource. This
// lock prevents concurrent modifications to ensure consistency. If `null`, the
// resource is not locked.
TaskID string `json:"task_id,nullable" format:"uuid4"`
// Total number of ips in subnet
TotalIPs int64 `json:"total_ips,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cidr respjson.Field
CreatedAt respjson.Field
EnableDhcp respjson.Field
IPVersion respjson.Field
Name respjson.Field
NetworkID respjson.Field
ProjectID respjson.Field
Region respjson.Field
RegionID respjson.Field
Tags respjson.Field
UpdatedAt respjson.Field
ID respjson.Field
AvailableIPs respjson.Field
CreatorTaskID respjson.Field
DNSNameservers respjson.Field
GatewayIP respjson.Field
HasRouter respjson.Field
HostRoutes respjson.Field
TaskID respjson.Field
TotalIPs respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Subnet) UnmarshalJSON ¶
type SubnetIDParam ¶
type SubnetIDParam struct {
// Target IP is identified by it's subnet
SubnetID string `json:"subnet_id,required" format:"uuid4"`
// contains filtered or unexported fields
}
The property SubnetID is required.
func (SubnetIDParam) MarshalJSON ¶
func (r SubnetIDParam) MarshalJSON() (data []byte, err error)
func (*SubnetIDParam) UnmarshalJSON ¶
func (r *SubnetIDParam) UnmarshalJSON(data []byte) error
type Tag ¶
type Tag struct {
// Tag key. The maximum size for a key is 255 bytes.
Key string `json:"key,required"`
// If true, the tag is read-only and cannot be modified by the user
ReadOnly bool `json:"read_only,required"`
// Tag value. The maximum size for a value is 1024 bytes.
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Key respjson.Field
ReadOnly respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
func (*Tag) UnmarshalJSON ¶
type TagUpdateMap ¶
type Task ¶
type Task struct {
// The task ID
ID string `json:"id,required"`
// Created timestamp
CreatedOn string `json:"created_on,required"`
// The task state
//
// Any of "ERROR", "FINISHED", "NEW", "RUNNING".
State TaskState `json:"state,required"`
// The task type
TaskType string `json:"task_type,required"`
// The user ID that initiated the task
UserID int64 `json:"user_id,required"`
// If task was acknowledged, this field stores acknowledge timestamp
AcknowledgedAt string `json:"acknowledged_at,nullable"`
// If task was acknowledged, this field stores `user_id` of the person
AcknowledgedBy int64 `json:"acknowledged_by,nullable"`
// The client ID
ClientID int64 `json:"client_id,nullable"`
// If the task creates resources, this field will contain their IDs
CreatedResources TaskCreatedResources `json:"created_resources,nullable"`
// Task parameters
Data any `json:"data"`
// Task detailed state that is more specific to task type
//
// Any of "CLUSTER_CLEAN_UP", "CLUSTER_RESIZE", "CLUSTER_RESUME",
// "CLUSTER_SUSPEND", "ERROR", "FINISHED", "IPU_SERVERS", "NETWORK",
// "POPLAR_SERVERS", "POST_DEPLOY_SETUP", "VIPU_CONTROLLER".
DetailedState TaskDetailedState `json:"detailed_state,nullable"`
// The error value
Error string `json:"error,nullable"`
// Finished timestamp
FinishedOn string `json:"finished_on,nullable"`
// Job ID
JobID string `json:"job_id,nullable"`
// Lifecycle policy ID
LifecyclePolicyID int64 `json:"lifecycle_policy_id,nullable"`
// The project ID
ProjectID int64 `json:"project_id,nullable"`
// The region ID
RegionID int64 `json:"region_id,nullable"`
// The request ID
RequestID string `json:"request_id,nullable"`
// Schedule ID
ScheduleID string `json:"schedule_id,nullable"`
// Last updated timestamp
UpdatedOn string `json:"updated_on,nullable"`
// Client, specified in user's JWT
UserClientID int64 `json:"user_client_id,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedOn respjson.Field
State respjson.Field
TaskType respjson.Field
UserID respjson.Field
AcknowledgedAt respjson.Field
AcknowledgedBy respjson.Field
ClientID respjson.Field
CreatedResources respjson.Field
Data respjson.Field
DetailedState respjson.Field
Error respjson.Field
FinishedOn respjson.Field
JobID respjson.Field
LifecyclePolicyID respjson.Field
ProjectID respjson.Field
RegionID respjson.Field
RequestID respjson.Field
ScheduleID respjson.Field
UpdatedOn respjson.Field
UserClientID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Task) UnmarshalJSON ¶
type TaskAcknowledgeAllParams ¶
type TaskAcknowledgeAllParams struct {
// Project ID
ProjectID param.Opt[int64] `query:"project_id,omitzero" json:"-"`
// Region ID
RegionID param.Opt[int64] `query:"region_id,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (TaskAcknowledgeAllParams) URLQuery ¶
func (r TaskAcknowledgeAllParams) URLQuery() (v url.Values, err error)
URLQuery serializes TaskAcknowledgeAllParams's query parameters as `url.Values`.
type TaskCreatedResources ¶
type TaskCreatedResources struct {
// IDs of created AI clusters
AIClusters []string `json:"ai_clusters"`
// IDs of created API keys
APIKeys []string `json:"api_keys"`
// IDs of created CaaS containers
CaasContainers []string `json:"caas_containers"`
// IDs of created ddos protection profiles
DDOSProfiles []int64 `json:"ddos_profiles"`
// IDs of created FaaS functions
FaasFunctions []string `json:"faas_functions"`
// IDs of created FaaS namespaces
FaasNamespaces []string `json:"faas_namespaces"`
FileShares []string `json:"file_shares"`
// IDs of created floating IPs
Floatingips []string `json:"floatingips"`
// IDs of created health monitors
Healthmonitors []string `json:"healthmonitors"`
// IDs of created images
Images []string `json:"images"`
// IDs of created inference instances
InferenceInstances []string `json:"inference_instances"`
// IDs of created instances
Instances []string `json:"instances"`
// IDs of created Kubernetes clusters
K8sClusters []string `json:"k8s_clusters"`
// IDs of created Kubernetes pools
K8sPools []string `json:"k8s_pools"`
// IDs of created L7 policies
L7polices []string `json:"l7polices"`
// IDs of created L7 rules
L7rules []string `json:"l7rules"`
// IDs of created LaaS topics
LaasTopic []string `json:"laas_topic"`
// IDs of created load balancer listeners
Listeners []string `json:"listeners"`
// IDs of created load balancers
Loadbalancers []string `json:"loadbalancers"`
// IDs of created pool members
Members []string `json:"members"`
// IDs of created networks
Networks []string `json:"networks"`
// IDs of created load balancer pools
Pools []string `json:"pools"`
// IDs of created ports
Ports []string `json:"ports"`
// IDs of created postgres clusters
PostgreSQLClusters []string `json:"postgresql_clusters"`
// IDs of created projects
Projects []int64 `json:"projects"`
// IDs of created registry registries
RegistryRegistries []string `json:"registry_registries"`
// IDs of created registry users
RegistryUsers []string `json:"registry_users"`
// IDs of created routers
Routers []string `json:"routers"`
// IDs of created secrets
Secrets []string `json:"secrets"`
// IDs of created server groups
Servergroups []string `json:"servergroups"`
// IDs of created volume snapshots
Snapshots []string `json:"snapshots"`
// IDs of created subnets
Subnets []string `json:"subnets"`
// IDs of created volumes
Volumes []string `json:"volumes"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AIClusters respjson.Field
APIKeys respjson.Field
CaasContainers respjson.Field
DDOSProfiles respjson.Field
FaasFunctions respjson.Field
FaasNamespaces respjson.Field
FileShares respjson.Field
Floatingips respjson.Field
Healthmonitors respjson.Field
Images respjson.Field
InferenceInstances respjson.Field
Instances respjson.Field
K8sClusters respjson.Field
K8sPools respjson.Field
L7polices respjson.Field
L7rules respjson.Field
LaasTopic respjson.Field
Listeners respjson.Field
Loadbalancers respjson.Field
Members respjson.Field
Networks respjson.Field
Pools respjson.Field
Ports respjson.Field
PostgreSQLClusters respjson.Field
Projects respjson.Field
RegistryRegistries respjson.Field
RegistryUsers respjson.Field
Routers respjson.Field
Secrets respjson.Field
Servergroups respjson.Field
Snapshots respjson.Field
Subnets respjson.Field
Volumes respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
If the task creates resources, this field will contain their IDs
func (TaskCreatedResources) RawJSON ¶
func (r TaskCreatedResources) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskCreatedResources) UnmarshalJSON ¶
func (r *TaskCreatedResources) UnmarshalJSON(data []byte) error
type TaskDetailedState ¶
type TaskDetailedState string
Task detailed state that is more specific to task type
const ( TaskDetailedStateClusterCleanUp TaskDetailedState = "CLUSTER_CLEAN_UP" TaskDetailedStateClusterResize TaskDetailedState = "CLUSTER_RESIZE" TaskDetailedStateClusterResume TaskDetailedState = "CLUSTER_RESUME" TaskDetailedStateClusterSuspend TaskDetailedState = "CLUSTER_SUSPEND" TaskDetailedStateError TaskDetailedState = "ERROR" TaskDetailedStateFinished TaskDetailedState = "FINISHED" TaskDetailedStateIpuServers TaskDetailedState = "IPU_SERVERS" TaskDetailedStateNetwork TaskDetailedState = "NETWORK" TaskDetailedStatePoplarServers TaskDetailedState = "POPLAR_SERVERS" TaskDetailedStatePostDeploySetup TaskDetailedState = "POST_DEPLOY_SETUP" TaskDetailedStateVipuController TaskDetailedState = "VIPU_CONTROLLER" )
type TaskIDList ¶
type TaskIDList struct {
// List of task IDs
Tasks []string `json:"tasks,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Tasks respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskIDList) RawJSON ¶
func (r TaskIDList) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskIDList) UnmarshalJSON ¶
func (r *TaskIDList) UnmarshalJSON(data []byte) error
type TaskListParams ¶
type TaskListParams struct {
// ISO formatted datetime string. Filter the tasks by creation date greater than or
// equal to `from_timestamp`
FromTimestamp param.Opt[time.Time] `query:"from_timestamp,omitzero" format:"date-time" json:"-"`
// Filter the tasks by their acknowledgement status
IsAcknowledged param.Opt[bool] `query:"is_acknowledged,omitzero" json:"-"`
// Filter the tasks by their type one of ['`activate_ddos_profile`',
// '`attach_bm_to_reserved_fixed_ip`', '`attach_vm_interface`',
// '`attach_vm_to_reserved_fixed_ip`', '`attach_volume`',
// '`create_ai_cluster_gpu`', '`create_bm`', '`create_caas_container`',
// '`create_dbaas_postgres_cluster`', '`create_ddos_profile`',
// '`create_faas_function`', '`create_faas_namespace`', '`create_fip`',
// '`create_gpu_virtual_cluster`', '`create_image`',
// '`create_inference_application`', '`create_inference_instance`',
// '`create_inference_instance_key`', '`create_k8s_cluster_pool_v2`',
// '`create_k8s_cluster_v2`', '`create_l7policy`', '`create_l7rule`',
// '`create_lblistener`', '`create_lbmember`', '`create_lbpool`',
// '`create_lbpool_health_monitor`', '`create_loadbalancer`', '`create_network`',
// '`create_reserved_fixed_ip`', '`create_router`', '`create_secret`',
// '`create_servergroup`', '`create_sfs`', '`create_snapshot`', '`create_subnet`',
// '`create_vm`', '`create_volume`', '`deactivate_ddos_profile`',
// '`delete_ai_cluster_gpu`', '`delete_caas_container`',
// '`delete_dbaas_postgres_cluster`', '`delete_ddos_profile`',
// '`delete_faas_function`', '`delete_faas_namespace`', '`delete_fip`',
// '`delete_gpu_virtual_cluster`', '`delete_gpu_virtual_server`', '`delete_image`',
// '`delete_inference_application`', '`delete_inference_instance`',
// '`delete_k8s_cluster_pool_v2`', '`delete_k8s_cluster_v2`', '`delete_l7policy`',
// '`delete_l7rule`', '`delete_lblistener`', '`delete_lbmember`',
// '`delete_lbmetadata`', '`delete_lbpool`', '`delete_loadbalancer`',
// '`delete_network`', '`delete_reserved_fixed_ip`', '`delete_router`',
// '`delete_secret`', '`delete_servergroup`', '`delete_sfs`', '`delete_snapshot`',
// '`delete_subnet`', '`delete_vm`', '`delete_volume`', '`detach_vm_interface`',
// '`detach_volume`', '`download_image`', '`downscale_ai_cluster_gpu`',
// '`downscale_gpu_virtual_cluster`', '`extend_sfs`', '`extend_volume`',
// '`failover_loadbalancer`', '`hard_reboot_gpu_baremetal_server`',
// '`hard_reboot_gpu_virtual_cluster`', '`hard_reboot_gpu_virtual_server`',
// '`hard_reboot_vm`', '`patch_caas_container`', '`patch_dbaas_postgres_cluster`',
// '`patch_faas_function`', '`patch_faas_namespace`', '`patch_lblistener`',
// '`patch_lbpool`', '`put_into_server_group`', '`put_l7policy`', '`put_l7rule`',
// '`rebuild_bm`', '`rebuild_gpu_baremetal_node`', '`remove_from_server_group`',
// '`replace_lbmetadata`', '`resize_k8s_cluster_v2`', '`resize_loadbalancer`',
// '`resize_vm`', '`resume_vm`', '`revert_volume`',
// '`soft_reboot_gpu_baremetal_server`', '`soft_reboot_gpu_virtual_cluster`',
// '`soft_reboot_gpu_virtual_server`', '`soft_reboot_vm`',
// '`start_gpu_baremetal_server`', '`start_gpu_virtual_cluster`',
// '`start_gpu_virtual_server`', '`start_vm`', '`stop_gpu_baremetal_server`',
// '`stop_gpu_virtual_cluster`', '`stop_gpu_virtual_server`', '`stop_vm`',
// '`suspend_vm`', '`sync_private_flavors`', '`update_ddos_profile`',
// '`update_inference_application`', '`update_inference_instance`',
// '`update_inference_instance_key`', '`update_k8s_cluster_v2`',
// '`update_lbmetadata`', '`update_port_allowed_address_pairs`',
// '`update_tags_gpu_virtual_cluster`', '`upgrade_k8s_cluster_v2`',
// '`upscale_ai_cluster_gpu`', '`upscale_gpu_virtual_cluster`']
TaskType param.Opt[string] `query:"task_type,omitzero" json:"-"`
// ISO formatted datetime string. Filter the tasks by creation date less than or
// equal to `to_timestamp`
ToTimestamp param.Opt[time.Time] `query:"to_timestamp,omitzero" format:"date-time" json:"-"`
// Limit the number of returned tasks. Falls back to default of 10 if not
// specified. Limited by max limit value of 1000
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Offset value is used to exclude the first set of records from the result
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// The project ID to filter the tasks by project. Supports multiple values of kind
// key=value1&key=value2
ProjectID []int64 `query:"project_id,omitzero" json:"-"`
// The region ID to filter the tasks by region. Supports multiple values of kind
// key=value1&key=value2
RegionID []int64 `query:"region_id,omitzero" json:"-"`
// Filter the tasks by state. Supports multiple values of kind
// key=value1&key=value2
//
// Any of "ERROR", "FINISHED", "NEW", "RUNNING".
State []string `query:"state,omitzero" json:"-"`
// Sorting by creation date. Oldest first, or most recent first
//
// Any of "asc", "desc".
OrderBy TaskListParamsOrderBy `query:"order_by,omitzero" json:"-"`
// (DEPRECATED Use '`order_by`' instead) Sorting by creation date. Oldest first, or
// most recent first
//
// Any of "asc", "desc".
Sorting TaskListParamsSorting `query:"sorting,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (TaskListParams) URLQuery ¶
func (r TaskListParams) URLQuery() (v url.Values, err error)
URLQuery serializes TaskListParams's query parameters as `url.Values`.
type TaskListParamsOrderBy ¶ added in v0.2.0
type TaskListParamsOrderBy string
Sorting by creation date. Oldest first, or most recent first
const ( TaskListParamsOrderByAsc TaskListParamsOrderBy = "asc" TaskListParamsOrderByDesc TaskListParamsOrderBy = "desc" )
type TaskListParamsSorting ¶
type TaskListParamsSorting string
(DEPRECATED Use '`order_by`' instead) Sorting by creation date. Oldest first, or most recent first
const ( TaskListParamsSortingAsc TaskListParamsSorting = "asc" TaskListParamsSortingDesc TaskListParamsSorting = "desc" )
type TaskService ¶
type TaskService struct {
Options []option.RequestOption
}
TaskService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTaskService method instead.
func NewTaskService ¶
func NewTaskService(opts ...option.RequestOption) (r TaskService)
NewTaskService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TaskService) AcknowledgeAll ¶
func (r *TaskService) AcknowledgeAll(ctx context.Context, body TaskAcknowledgeAllParams, opts ...option.RequestOption) (err error)
Acknowledge all tasks
func (*TaskService) AcknowledgeOne ¶
func (r *TaskService) AcknowledgeOne(ctx context.Context, taskID string, opts ...option.RequestOption) (res *Task, err error)
Acknowledge one task
func (*TaskService) Get ¶
func (r *TaskService) Get(ctx context.Context, taskID string, opts ...option.RequestOption) (res *Task, err error)
Get task
func (*TaskService) List ¶
func (r *TaskService) List(ctx context.Context, query TaskListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[Task], err error)
List tasks
func (*TaskService) ListAutoPaging ¶
func (r *TaskService) ListAutoPaging(ctx context.Context, query TaskListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[Task]
List tasks
func (*TaskService) Poll ¶
func (r *TaskService) Poll(ctx context.Context, taskID string, opts ...requestconfig.RequestOption) (*Task, error)
Poll for task status until it is finished, an error occurs, or the context is done. It uses a default polling interval of 1 second which can be overridden to values greater than 0 (otherwise the default value is used).
type UserRoleAssignmentListParams ¶
type UserRoleAssignmentListParams struct {
// Limit the number of returned items. Falls back to default of 1000 if not
// specified. Limited by max limit value of 1000
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Offset value is used to exclude the first set of records from the result
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Project ID
ProjectID param.Opt[int64] `query:"project_id,omitzero" json:"-"`
// User ID for filtering
UserID param.Opt[int64] `query:"user_id,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (UserRoleAssignmentListParams) URLQuery ¶
func (r UserRoleAssignmentListParams) URLQuery() (v url.Values, err error)
URLQuery serializes UserRoleAssignmentListParams's query parameters as `url.Values`.
type UserRoleAssignmentNewParams ¶
type UserRoleAssignmentNewParams struct {
// User role
Role string `json:"role,required"`
// User ID
UserID int64 `json:"user_id,required"`
// Client ID. Required if `project_id` is specified
ClientID param.Opt[int64] `json:"client_id,omitzero"`
// Project ID
ProjectID param.Opt[int64] `json:"project_id,omitzero"`
// contains filtered or unexported fields
}
func (UserRoleAssignmentNewParams) MarshalJSON ¶
func (r UserRoleAssignmentNewParams) MarshalJSON() (data []byte, err error)
func (*UserRoleAssignmentNewParams) UnmarshalJSON ¶
func (r *UserRoleAssignmentNewParams) UnmarshalJSON(data []byte) error
type UserRoleAssignmentService ¶
type UserRoleAssignmentService struct {
Options []option.RequestOption
}
UserRoleAssignmentService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserRoleAssignmentService method instead.
func NewUserRoleAssignmentService ¶
func NewUserRoleAssignmentService(opts ...option.RequestOption) (r UserRoleAssignmentService)
NewUserRoleAssignmentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*UserRoleAssignmentService) Delete ¶
func (r *UserRoleAssignmentService) Delete(ctx context.Context, assignmentID int64, opts ...option.RequestOption) (res *RoleAssignmentUpdateDelete, err error)
Delete an existing role assignment.
func (*UserRoleAssignmentService) List ¶
func (r *UserRoleAssignmentService) List(ctx context.Context, query UserRoleAssignmentListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[RoleAssignment], err error)
List all role assignments in the specified scope.
func (*UserRoleAssignmentService) ListAutoPaging ¶
func (r *UserRoleAssignmentService) ListAutoPaging(ctx context.Context, query UserRoleAssignmentListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[RoleAssignment]
List all role assignments in the specified scope.
func (*UserRoleAssignmentService) New ¶
func (r *UserRoleAssignmentService) New(ctx context.Context, body UserRoleAssignmentNewParams, opts ...option.RequestOption) (res *RoleAssignment, err error)
Assign a role to an existing user in the specified scope.
func (*UserRoleAssignmentService) Update ¶
func (r *UserRoleAssignmentService) Update(ctx context.Context, assignmentID int64, body UserRoleAssignmentUpdateParams, opts ...option.RequestOption) (res *RoleAssignmentUpdateDelete, err error)
Modify an existing role assignment for a user.
type UserRoleAssignmentUpdateParams ¶
type UserRoleAssignmentUpdateParams struct {
// User role
Role string `json:"role,required"`
// User ID
UserID int64 `json:"user_id,required"`
// Client ID. Required if `project_id` is specified
ClientID param.Opt[int64] `json:"client_id,omitzero"`
// Project ID
ProjectID param.Opt[int64] `json:"project_id,omitzero"`
// contains filtered or unexported fields
}
func (UserRoleAssignmentUpdateParams) MarshalJSON ¶
func (r UserRoleAssignmentUpdateParams) MarshalJSON() (data []byte, err error)
func (*UserRoleAssignmentUpdateParams) UnmarshalJSON ¶
func (r *UserRoleAssignmentUpdateParams) UnmarshalJSON(data []byte) error
type UserService ¶
type UserService struct {
Options []option.RequestOption
RoleAssignments UserRoleAssignmentService
}
UserService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserService method instead.
func NewUserService ¶
func NewUserService(opts ...option.RequestOption) (r UserService)
NewUserService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type Volume ¶
type Volume struct {
// The unique identifier of the volume.
ID string `json:"id,required"`
// Indicates whether the volume is bootable.
Bootable bool `json:"bootable,required"`
// The date and time when the volume was created.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Indicates whether this is a root volume.
IsRootVolume bool `json:"is_root_volume,required"`
// The name of the volume.
Name string `json:"name,required"`
// Project ID.
ProjectID int64 `json:"project_id,required"`
// The region where the volume is located.
Region string `json:"region,required"`
// The identifier of the region.
RegionID int64 `json:"region_id,required"`
// The size of the volume in gibibytes (GiB).
Size int64 `json:"size,required"`
// The current status of the volume.
//
// Any of "attaching", "available", "awaiting-transfer", "backing-up", "creating",
// "deleting", "detaching", "downloading", "error", "error_backing-up",
// "error_deleting", "error_extending", "error_restoring", "extending", "in-use",
// "maintenance", "reserved", "restoring-backup", "retyping", "reverting",
// "uploading".
Status VolumeStatus `json:"status,required"`
// List of key-value tags associated with the resource. A tag is a key-value pair
// that can be associated with a resource, enabling efficient filtering and
// grouping for better organization and management. Some tags are read-only and
// cannot be modified by the user. Tags are also integrated with cost reports,
// allowing cost data to be filtered based on tag keys or values.
Tags []Tag `json:"tags,required"`
// The type of volume storage.
VolumeType string `json:"volume_type,required"`
// List of attachments associated with the volume.
Attachments []VolumeAttachment `json:"attachments,nullable"`
// The ID of the task that created this volume.
CreatorTaskID string `json:"creator_task_id,nullable"`
// Schema representing the Quality of Service (QoS) parameters for a volume.
LimiterStats VolumeLimiterStats `json:"limiter_stats,nullable"`
// List of snapshot IDs associated with this volume.
SnapshotIDs []string `json:"snapshot_ids,nullable"`
// The UUID of the active task that currently holds a lock on the resource. This
// lock prevents concurrent modifications to ensure consistency. If `null`, the
// resource is not locked.
TaskID string `json:"task_id,nullable"`
// The date and time when the volume was last updated.
UpdatedAt time.Time `json:"updated_at,nullable" format:"date-time"`
// Image metadata for volumes created from an image.
VolumeImageMetadata map[string]string `json:"volume_image_metadata,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Bootable respjson.Field
CreatedAt respjson.Field
IsRootVolume respjson.Field
Name respjson.Field
ProjectID respjson.Field
Region respjson.Field
RegionID respjson.Field
Size respjson.Field
Status respjson.Field
Tags respjson.Field
VolumeType respjson.Field
Attachments respjson.Field
CreatorTaskID respjson.Field
LimiterStats respjson.Field
SnapshotIDs respjson.Field
TaskID respjson.Field
UpdatedAt respjson.Field
VolumeImageMetadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Volume) UnmarshalJSON ¶
type VolumeAttachToInstanceParams ¶
type VolumeAttachToInstanceParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Instance ID.
InstanceID string `json:"instance_id,required" format:"uuid4"`
// Block device attachment tag (not exposed in the normal tags).
AttachmentTag param.Opt[string] `json:"attachment_tag,omitzero"`
// contains filtered or unexported fields
}
func (VolumeAttachToInstanceParams) MarshalJSON ¶
func (r VolumeAttachToInstanceParams) MarshalJSON() (data []byte, err error)
func (*VolumeAttachToInstanceParams) UnmarshalJSON ¶
func (r *VolumeAttachToInstanceParams) UnmarshalJSON(data []byte) error
type VolumeAttachment ¶
type VolumeAttachment struct {
// The unique identifier of the attachment object.
AttachmentID string `json:"attachment_id,required"`
// The unique identifier of the attached volume.
VolumeID string `json:"volume_id,required"`
// The date and time when the attachment was created.
AttachedAt time.Time `json:"attached_at,nullable" format:"date-time"`
// The block device name inside the guest instance.
Device string `json:"device,nullable"`
// The flavor ID of the instance.
FlavorID string `json:"flavor_id,nullable"`
// The name of the instance if attached and the server name is known.
InstanceName string `json:"instance_name,nullable"`
// The unique identifier of the instance.
ServerID string `json:"server_id,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AttachmentID respjson.Field
VolumeID respjson.Field
AttachedAt respjson.Field
Device respjson.Field
FlavorID respjson.Field
InstanceName respjson.Field
ServerID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (VolumeAttachment) RawJSON ¶
func (r VolumeAttachment) RawJSON() string
Returns the unmodified JSON received from the API
func (*VolumeAttachment) UnmarshalJSON ¶
func (r *VolumeAttachment) UnmarshalJSON(data []byte) error
type VolumeChangeTypeParams ¶
type VolumeChangeTypeParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// New volume type name
//
// Any of "ssd_hiiops", "standard".
VolumeType VolumeChangeTypeParamsVolumeType `json:"volume_type,omitzero,required"`
// contains filtered or unexported fields
}
func (VolumeChangeTypeParams) MarshalJSON ¶
func (r VolumeChangeTypeParams) MarshalJSON() (data []byte, err error)
func (*VolumeChangeTypeParams) UnmarshalJSON ¶
func (r *VolumeChangeTypeParams) UnmarshalJSON(data []byte) error
type VolumeChangeTypeParamsVolumeType ¶
type VolumeChangeTypeParamsVolumeType string
New volume type name
const ( VolumeChangeTypeParamsVolumeTypeSsdHiiops VolumeChangeTypeParamsVolumeType = "ssd_hiiops" VolumeChangeTypeParamsVolumeTypeStandard VolumeChangeTypeParamsVolumeType = "standard" )
type VolumeDeleteParams ¶
type VolumeDeleteParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Comma separated list of snapshot IDs to be deleted with the volume.
Snapshots param.Opt[string] `query:"snapshots,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (VolumeDeleteParams) URLQuery ¶
func (r VolumeDeleteParams) URLQuery() (v url.Values, err error)
URLQuery serializes VolumeDeleteParams's query parameters as `url.Values`.
type VolumeDetachFromInstanceParams ¶
type VolumeDetachFromInstanceParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Instance ID
InstanceID string `json:"instance_id,required" format:"uuid4"`
// contains filtered or unexported fields
}
func (VolumeDetachFromInstanceParams) MarshalJSON ¶
func (r VolumeDetachFromInstanceParams) MarshalJSON() (data []byte, err error)
func (*VolumeDetachFromInstanceParams) UnmarshalJSON ¶
func (r *VolumeDetachFromInstanceParams) UnmarshalJSON(data []byte) error
type VolumeGetParams ¶
type VolumeLimiterStats ¶
type VolumeLimiterStats struct {
// The sustained IOPS (Input/Output Operations Per Second) limit.
IopsBaseLimit int64 `json:"iops_base_limit,required"`
// The burst IOPS limit.
IopsBurstLimit int64 `json:"iops_burst_limit,required"`
// The sustained bandwidth limit in megabytes per second (MBps).
MBpsBaseLimit int64 `json:"MBps_base_limit,required"`
// The burst bandwidth limit in megabytes per second (MBps).
MBpsBurstLimit int64 `json:"MBps_burst_limit,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
IopsBaseLimit respjson.Field
IopsBurstLimit respjson.Field
MBpsBaseLimit respjson.Field
MBpsBurstLimit respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Schema representing the Quality of Service (QoS) parameters for a volume.
func (VolumeLimiterStats) RawJSON ¶
func (r VolumeLimiterStats) RawJSON() string
Returns the unmodified JSON received from the API
func (*VolumeLimiterStats) UnmarshalJSON ¶
func (r *VolumeLimiterStats) UnmarshalJSON(data []byte) error
type VolumeListParams ¶
type VolumeListParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Filter by bootable field
Bootable param.Opt[bool] `query:"bootable,omitzero" json:"-"`
// Filter volumes by k8s cluster ID
ClusterID param.Opt[string] `query:"cluster_id,omitzero" json:"-"`
// Filter by the presence of attachments
HasAttachments param.Opt[bool] `query:"has_attachments,omitzero" json:"-"`
// Filter the volume list result by the ID part of the volume
IDPart param.Opt[string] `query:"id_part,omitzero" json:"-"`
// Filter volumes by instance ID
InstanceID param.Opt[string] `query:"instance_id,omitzero" format:"uuid4" json:"-"`
// Optional. Limit the number of returned items
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Filter volumes by `name_part` inclusion in volume name.Any substring can be used
// and volumes will be returned with names containing the substring.
NamePart param.Opt[string] `query:"name_part,omitzero" json:"-"`
// Optional. Offset value is used to exclude the first set of records from the
// result
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Optional. Filter by tag key-value pairs.
TagKeyValue param.Opt[string] `query:"tag_key_value,omitzero" json:"-"`
// Optional. Filter by tag keys. ?`tag_key`=key1&`tag_key`=key2
TagKey []string `query:"tag_key,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (VolumeListParams) URLQuery ¶
func (r VolumeListParams) URLQuery() (v url.Values, err error)
URLQuery serializes VolumeListParams's query parameters as `url.Values`.
type VolumeNewParams ¶
type VolumeNewParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// This field is a request body variant, only one variant field can be set.
OfImage *VolumeNewParamsBodyImage `json:",inline"`
// This field is a request body variant, only one variant field can be set.
OfSnapshot *VolumeNewParamsBodySnapshot `json:",inline"`
// This field is a request body variant, only one variant field can be set.
OfNewVolume *VolumeNewParamsBodyNewVolume `json:",inline"`
// contains filtered or unexported fields
}
func (VolumeNewParams) MarshalJSON ¶
func (u VolumeNewParams) MarshalJSON() ([]byte, error)
func (*VolumeNewParams) UnmarshalJSON ¶
func (r *VolumeNewParams) UnmarshalJSON(data []byte) error
type VolumeNewParamsBodyImage ¶
type VolumeNewParamsBodyImage struct {
// Image ID
ImageID string `json:"image_id,required" format:"uuid4"`
// Volume name
Name string `json:"name,required"`
// Volume size in GiB
Size int64 `json:"size,required"`
// Block device attachment tag (not exposed in the user tags). Only used in
// conjunction with `instance_id_to_attach_to`
AttachmentTag param.Opt[string] `json:"attachment_tag,omitzero"`
// `instance_id` to attach newly-created volume to
InstanceIDToAttachTo param.Opt[string] `json:"instance_id_to_attach_to,omitzero"`
// List of lifecycle policy IDs (snapshot creation schedules) to associate with the
// volume
LifecyclePolicyIDs []int64 `json:"lifecycle_policy_ids,omitzero"`
// Key-value tags to associate with the resource. A tag is a key-value pair that
// can be associated with a resource, enabling efficient filtering and grouping for
// better organization and management. Some tags are read-only and cannot be
// modified by the user. Tags are also integrated with cost reports, allowing cost
// data to be filtered based on tag keys or values.
Tags TagUpdateMap `json:"tags,omitzero"`
// Volume type. Defaults to `standard`. If not specified for source `snapshot`,
// volume type will be derived from the snapshot volume.
//
// Any of "cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra".
TypeName string `json:"type_name,omitzero"`
// Volume source type
//
// This field can be elided, and will marshal its zero value as "image".
Source constant.Image `json:"source,required"`
// contains filtered or unexported fields
}
The properties ImageID, Name, Size, Source are required.
func (VolumeNewParamsBodyImage) MarshalJSON ¶
func (r VolumeNewParamsBodyImage) MarshalJSON() (data []byte, err error)
func (*VolumeNewParamsBodyImage) UnmarshalJSON ¶
func (r *VolumeNewParamsBodyImage) UnmarshalJSON(data []byte) error
type VolumeNewParamsBodyNewVolume ¶
type VolumeNewParamsBodyNewVolume struct {
// Volume name
Name string `json:"name,required"`
// Volume size in GiB
Size int64 `json:"size,required"`
// Block device attachment tag (not exposed in the user tags). Only used in
// conjunction with `instance_id_to_attach_to`
AttachmentTag param.Opt[string] `json:"attachment_tag,omitzero"`
// `instance_id` to attach newly-created volume to
InstanceIDToAttachTo param.Opt[string] `json:"instance_id_to_attach_to,omitzero"`
// List of lifecycle policy IDs (snapshot creation schedules) to associate with the
// volume
LifecyclePolicyIDs []int64 `json:"lifecycle_policy_ids,omitzero"`
// Key-value tags to associate with the resource. A tag is a key-value pair that
// can be associated with a resource, enabling efficient filtering and grouping for
// better organization and management. Some tags are read-only and cannot be
// modified by the user. Tags are also integrated with cost reports, allowing cost
// data to be filtered based on tag keys or values.
Tags TagUpdateMap `json:"tags,omitzero"`
// Volume type. Defaults to `standard`. If not specified for source `snapshot`,
// volume type will be derived from the snapshot volume.
//
// Any of "cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra".
TypeName string `json:"type_name,omitzero"`
// Volume source type
//
// This field can be elided, and will marshal its zero value as "new-volume".
Source constant.NewVolume `json:"source,required"`
// contains filtered or unexported fields
}
The properties Name, Size, Source are required.
func (VolumeNewParamsBodyNewVolume) MarshalJSON ¶
func (r VolumeNewParamsBodyNewVolume) MarshalJSON() (data []byte, err error)
func (*VolumeNewParamsBodyNewVolume) UnmarshalJSON ¶
func (r *VolumeNewParamsBodyNewVolume) UnmarshalJSON(data []byte) error
type VolumeNewParamsBodySnapshot ¶
type VolumeNewParamsBodySnapshot struct {
// Volume name
Name string `json:"name,required"`
// Snapshot ID
SnapshotID string `json:"snapshot_id,required" format:"uuid4"`
// Block device attachment tag (not exposed in the user tags). Only used in
// conjunction with `instance_id_to_attach_to`
AttachmentTag param.Opt[string] `json:"attachment_tag,omitzero"`
// `instance_id` to attach newly-created volume to
InstanceIDToAttachTo param.Opt[string] `json:"instance_id_to_attach_to,omitzero"`
// Volume size in GiB. If specified, value must be equal to respective snapshot
// size
Size param.Opt[int64] `json:"size,omitzero"`
// List of lifecycle policy IDs (snapshot creation schedules) to associate with the
// volume
LifecyclePolicyIDs []int64 `json:"lifecycle_policy_ids,omitzero"`
// Key-value tags to associate with the resource. A tag is a key-value pair that
// can be associated with a resource, enabling efficient filtering and grouping for
// better organization and management. Some tags are read-only and cannot be
// modified by the user. Tags are also integrated with cost reports, allowing cost
// data to be filtered based on tag keys or values.
Tags TagUpdateMap `json:"tags,omitzero"`
// Volume type. Defaults to `standard`. If not specified for source `snapshot`,
// volume type will be derived from the snapshot volume.
//
// Any of "cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra".
TypeName string `json:"type_name,omitzero"`
// Volume source type
//
// This field can be elided, and will marshal its zero value as "snapshot".
Source constant.Snapshot `json:"source,required"`
// contains filtered or unexported fields
}
The properties Name, SnapshotID, Source are required.
func (VolumeNewParamsBodySnapshot) MarshalJSON ¶
func (r VolumeNewParamsBodySnapshot) MarshalJSON() (data []byte, err error)
func (*VolumeNewParamsBodySnapshot) UnmarshalJSON ¶
func (r *VolumeNewParamsBodySnapshot) UnmarshalJSON(data []byte) error
type VolumeResizeParams ¶
type VolumeResizeParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// New volume size in GiB
Size int64 `json:"size,required"`
// contains filtered or unexported fields
}
func (VolumeResizeParams) MarshalJSON ¶
func (r VolumeResizeParams) MarshalJSON() (data []byte, err error)
func (*VolumeResizeParams) UnmarshalJSON ¶
func (r *VolumeResizeParams) UnmarshalJSON(data []byte) error
type VolumeService ¶
type VolumeService struct {
Options []option.RequestOption
}
VolumeService contains methods and other services that help with interacting with the gcore API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVolumeService method instead.
func NewVolumeService ¶
func NewVolumeService(opts ...option.RequestOption) (r VolumeService)
NewVolumeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*VolumeService) AttachToInstance ¶
func (r *VolumeService) AttachToInstance(ctx context.Context, volumeID string, params VolumeAttachToInstanceParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Attach the volume to instance. Note: ultra volume can only be attached to an instance with shared flavor
func (*VolumeService) ChangeType ¶
func (r *VolumeService) ChangeType(ctx context.Context, volumeID string, params VolumeChangeTypeParams, opts ...option.RequestOption) (res *Volume, err error)
Change the type of a volume. The volume must not have any snapshots to change its type.
func (*VolumeService) Delete ¶
func (r *VolumeService) Delete(ctx context.Context, volumeID string, params VolumeDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Delete a volume and all its snapshots. The volume must be in an available state to be deleted.
func (*VolumeService) DetachFromInstance ¶
func (r *VolumeService) DetachFromInstance(ctx context.Context, volumeID string, params VolumeDetachFromInstanceParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Detach the volume from instance
func (*VolumeService) Get ¶
func (r *VolumeService) Get(ctx context.Context, volumeID string, query VolumeGetParams, opts ...option.RequestOption) (res *Volume, err error)
Retrieve detailed information about a specific volume.
func (*VolumeService) List ¶
func (r *VolumeService) List(ctx context.Context, params VolumeListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[Volume], err error)
Retrieve a list of volumes in the project and region. The list can be filtered by various parameters like bootable status, metadata/tags, attachments, instance ID, name, and ID.
func (*VolumeService) ListAutoPaging ¶
func (r *VolumeService) ListAutoPaging(ctx context.Context, params VolumeListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[Volume]
Retrieve a list of volumes in the project and region. The list can be filtered by various parameters like bootable status, metadata/tags, attachments, instance ID, name, and ID.
func (*VolumeService) New ¶
func (r *VolumeService) New(ctx context.Context, params VolumeNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Create a new volume in the project and region. The volume can be created from scratch, from an image, or from a snapshot. Optionally attach the volume to an instance during creation.
func (*VolumeService) Resize ¶
func (r *VolumeService) Resize(ctx context.Context, volumeID string, params VolumeResizeParams, opts ...option.RequestOption) (res *TaskIDList, err error)
Increase the size of a volume. The new size must be greater than the current size.
func (*VolumeService) RevertToLastSnapshot ¶
func (r *VolumeService) RevertToLastSnapshot(ctx context.Context, volumeID string, body VolumeRevertToLastSnapshotParams, opts ...option.RequestOption) (err error)
Revert a volume to its last snapshot. The volume must be in an available state to be reverted.
func (*VolumeService) Update ¶
func (r *VolumeService) Update(ctx context.Context, volumeID string, params VolumeUpdateParams, opts ...option.RequestOption) (res *Volume, err error)
Rename a volume or update tags
type VolumeStatus ¶
type VolumeStatus string
The current status of the volume.
const ( VolumeStatusAttaching VolumeStatus = "attaching" VolumeStatusAvailable VolumeStatus = "available" VolumeStatusAwaitingTransfer VolumeStatus = "awaiting-transfer" VolumeStatusBackingUp VolumeStatus = "backing-up" VolumeStatusCreating VolumeStatus = "creating" VolumeStatusDeleting VolumeStatus = "deleting" VolumeStatusDetaching VolumeStatus = "detaching" VolumeStatusDownloading VolumeStatus = "downloading" VolumeStatusError VolumeStatus = "error" VolumeStatusErrorBackingUp VolumeStatus = "error_backing-up" VolumeStatusErrorDeleting VolumeStatus = "error_deleting" VolumeStatusErrorExtending VolumeStatus = "error_extending" VolumeStatusErrorRestoring VolumeStatus = "error_restoring" VolumeStatusExtending VolumeStatus = "extending" VolumeStatusInUse VolumeStatus = "in-use" VolumeStatusMaintenance VolumeStatus = "maintenance" VolumeStatusReserved VolumeStatus = "reserved" VolumeStatusRestoringBackup VolumeStatus = "restoring-backup" VolumeStatusRetyping VolumeStatus = "retyping" VolumeStatusReverting VolumeStatus = "reverting" VolumeStatusUploading VolumeStatus = "uploading" )
type VolumeUpdateParams ¶
type VolumeUpdateParams struct {
// Project ID
ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
// Region ID
RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
// Name
Name param.Opt[string] `json:"name,omitzero"`
// Update key-value tags using JSON Merge Patch semantics (RFC 7386). Provide
// key-value pairs to add or update tags. Set tag values to `null` to remove tags.
// Unspecified tags remain unchanged. Read-only tags are always preserved and
// cannot be modified. **Examples:**
//
// - **Add/update tags:**
// `{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
// updates existing ones.
// - **Delete tags:** `{'tags': {'`old_tag`': null}}` removes specific tags.
// - **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
// tags are preserved).
// - **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
// specified tags.
// - **Mixed operations:**
// `{'tags': {'environment': 'production', '`cost_center`': 'engineering', '`deprecated_tag`': null}}`
// adds/updates 'environment' and '`cost_center`' while removing
// '`deprecated_tag`', preserving other existing tags.
// - **Replace all:** first delete existing tags with null values, then add new
// ones in the same request.
Tags TagUpdateMap `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (VolumeUpdateParams) MarshalJSON ¶
func (r VolumeUpdateParams) MarshalJSON() (data []byte, err error)
func (*VolumeUpdateParams) UnmarshalJSON ¶
func (r *VolumeUpdateParams) UnmarshalJSON(data []byte) error
Source Files
¶
- aliases.go
- baremetal.go
- baremetalflavor.go
- baremetalimage.go
- baremetalserver.go
- billingreservation.go
- cloud.go
- fileshare.go
- fileshareaccessrule.go
- floatingip.go
- gpubaremetalcluster.go
- gpubaremetalclusterflavor.go
- gpubaremetalclusterimage.go
- gpubaremetalclusterinterface.go
- gpubaremetalclusterserver.go
- inference.go
- inferencedeployment.go
- inferencedeploymentlog.go
- inferenceflavor.go
- inferencemodel.go
- inferenceregistrycredential.go
- inferencesecret.go
- instance.go
- instanceflavor.go
- instanceimage.go
- instanceinterface.go
- instancemetric.go
- iprange.go
- loadbalancer.go
- loadbalancerflavor.go
- loadbalancerl7policy.go
- loadbalancerl7policyrule.go
- loadbalancerlistener.go
- loadbalancermetric.go
- loadbalancerpool.go
- loadbalancerpoolhealthmonitor.go
- loadbalancerpoolmember.go
- loadbalancerstatus.go
- network.go
- networkrouter.go
- networksubnet.go
- placementgroup.go
- project.go
- quota.go
- quotarequest.go
- region.go
- registry.go
- registryartifact.go
- registryrepository.go
- registrytag.go
- registryuser.go
- reservedfixedip.go
- reservedfixedipvip.go
- secret.go
- securitygroup.go
- securitygrouprule.go
- sshkey.go
- task.go
- user.go
- userroleassignment.go
- volume.go