Documentation
¶
Overview ¶
Package container provides methods and message types of the container v1beta1 API.
Index ¶
- Constants
- type API
- func (s *API) CreateContainer(req *CreateContainerRequest, opts ...scw.RequestOption) (*Container, error)
- func (s *API) CreateCron(req *CreateCronRequest, opts ...scw.RequestOption) (*Cron, error)
- func (s *API) CreateDomain(req *CreateDomainRequest, opts ...scw.RequestOption) (*Domain, error)
- func (s *API) CreateNamespace(req *CreateNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error)
- func (s *API) CreateToken(req *CreateTokenRequest, opts ...scw.RequestOption) (*Token, error)
- func (s *API) CreateTrigger(req *CreateTriggerRequest, opts ...scw.RequestOption) (*Trigger, error)
- func (s *API) DeleteContainer(req *DeleteContainerRequest, opts ...scw.RequestOption) (*Container, error)
- func (s *API) DeleteCron(req *DeleteCronRequest, opts ...scw.RequestOption) (*Cron, error)
- func (s *API) DeleteDomain(req *DeleteDomainRequest, opts ...scw.RequestOption) (*Domain, error)
- func (s *API) DeleteNamespace(req *DeleteNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error)
- func (s *API) DeleteToken(req *DeleteTokenRequest, opts ...scw.RequestOption) (*Token, error)
- func (s *API) DeleteTrigger(req *DeleteTriggerRequest, opts ...scw.RequestOption) (*Trigger, error)
- func (s *API) DeployContainer(req *DeployContainerRequest, opts ...scw.RequestOption) (*Container, error)
- func (s *API) GetContainer(req *GetContainerRequest, opts ...scw.RequestOption) (*Container, error)
- func (s *API) GetCron(req *GetCronRequest, opts ...scw.RequestOption) (*Cron, error)
- func (s *API) GetDomain(req *GetDomainRequest, opts ...scw.RequestOption) (*Domain, error)
- func (s *API) GetNamespace(req *GetNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error)
- func (s *API) GetToken(req *GetTokenRequest, opts ...scw.RequestOption) (*Token, error)
- func (s *API) GetTrigger(req *GetTriggerRequest, opts ...scw.RequestOption) (*Trigger, error)
- func (s *API) IssueJWT(req *IssueJWTRequest, opts ...scw.RequestOption) (*Token, error)deprecated
- func (s *API) ListContainers(req *ListContainersRequest, opts ...scw.RequestOption) (*ListContainersResponse, error)
- func (s *API) ListCrons(req *ListCronsRequest, opts ...scw.RequestOption) (*ListCronsResponse, error)
- func (s *API) ListDomains(req *ListDomainsRequest, opts ...scw.RequestOption) (*ListDomainsResponse, error)
- func (s *API) ListNamespaces(req *ListNamespacesRequest, opts ...scw.RequestOption) (*ListNamespacesResponse, error)
- func (s *API) ListTokens(req *ListTokensRequest, opts ...scw.RequestOption) (*ListTokensResponse, error)
- func (s *API) ListTriggers(req *ListTriggersRequest, opts ...scw.RequestOption) (*ListTriggersResponse, error)
- func (s *API) Regions() []scw.Region
- func (s *API) UpdateContainer(req *UpdateContainerRequest, opts ...scw.RequestOption) (*Container, error)
- func (s *API) UpdateCron(req *UpdateCronRequest, opts ...scw.RequestOption) (*Cron, error)
- func (s *API) UpdateNamespace(req *UpdateNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error)
- func (s *API) UpdateTrigger(req *UpdateTriggerRequest, opts ...scw.RequestOption) (*Trigger, error)
- func (s *API) WaitForContainer(req *WaitForContainerRequest, opts ...scw.RequestOption) (*Container, error)
- func (s *API) WaitForCron(req *WaitForCronRequest, opts ...scw.RequestOption) (*Cron, error)
- func (s *API) WaitForDomain(req *WaitForDomainRequest, opts ...scw.RequestOption) (*Domain, error)
- func (s *API) WaitForNamespace(req *WaitForNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error)
- func (s *API) WaitForTrigger(req *WaitForTriggerRequest, opts ...scw.RequestOption) (*Trigger, error)
- type Container
- type ContainerHTTPOption
- type ContainerPrivacy
- type ContainerProtocol
- type ContainerStatus
- type CreateContainerRequest
- type CreateCronRequest
- type CreateDomainRequest
- type CreateNamespaceRequest
- type CreateTokenRequest
- type CreateTriggerRequest
- type CreateTriggerRequestMnqNatsClientConfig
- type CreateTriggerRequestMnqSqsClientConfig
- type CreateTriggerRequestSqsClientConfig
- type Cron
- type CronStatus
- type DeleteContainerRequest
- type DeleteCronRequest
- type DeleteDomainRequest
- type DeleteNamespaceRequest
- type DeleteTokenRequest
- type DeleteTriggerRequest
- type DeployContainerRequest
- type Domain
- type DomainStatus
- type GetContainerRequest
- type GetCronRequest
- type GetDomainRequest
- type GetNamespaceRequest
- type GetTokenRequest
- type GetTriggerRequest
- type IssueJWTRequest
- type ListContainersRequest
- type ListContainersRequestOrderBy
- type ListContainersResponse
- type ListCronsRequest
- type ListCronsRequestOrderBy
- type ListCronsResponse
- type ListDomainsRequest
- type ListDomainsRequestOrderBy
- type ListDomainsResponse
- type ListNamespacesRequest
- type ListNamespacesRequestOrderBy
- type ListNamespacesResponse
- type ListTokensRequest
- type ListTokensRequestOrderBy
- type ListTokensResponse
- type ListTriggersRequest
- type ListTriggersRequestOrderBy
- type ListTriggersResponse
- type Namespace
- type NamespaceStatus
- type Secret
- type SecretHashedValue
- type Token
- type TokenStatus
- type Trigger
- type TriggerInputType
- type TriggerMnqNatsClientConfig
- type TriggerMnqSqsClientConfig
- type TriggerSqsClientConfig
- type TriggerStatus
- type UpdateContainerRequest
- type UpdateCronRequest
- type UpdateNamespaceRequest
- type UpdateTriggerRequest
- type UpdateTriggerRequestSqsClientConfig
- type WaitForContainerRequest
- type WaitForCronRequest
- type WaitForDomainRequest
- type WaitForNamespaceRequest
- type WaitForTriggerRequest
Constants ¶
const ( ContainerHTTPOptionUnknownHTTPOption = ContainerHTTPOption("unknown_http_option") ContainerHTTPOptionEnabled = ContainerHTTPOption("enabled") ContainerHTTPOptionRedirected = ContainerHTTPOption("redirected") )
const ( ContainerPrivacyUnknownPrivacy = ContainerPrivacy("unknown_privacy") ContainerPrivacyPublic = ContainerPrivacy("public") ContainerPrivacyPrivate = ContainerPrivacy("private") )
const ( ContainerProtocolUnknownProtocol = ContainerProtocol("unknown_protocol") ContainerProtocolHTTP1 = ContainerProtocol("http1") ContainerProtocolH2c = ContainerProtocol("h2c") )
const ( ContainerStatusUnknown = ContainerStatus("unknown") ContainerStatusReady = ContainerStatus("ready") ContainerStatusDeleting = ContainerStatus("deleting") ContainerStatusError = ContainerStatus("error") ContainerStatusLocked = ContainerStatus("locked") ContainerStatusCreating = ContainerStatus("creating") ContainerStatusPending = ContainerStatus("pending") ContainerStatusCreated = ContainerStatus("created") )
const ( CronStatusUnknown = CronStatus("unknown") CronStatusReady = CronStatus("ready") CronStatusDeleting = CronStatus("deleting") CronStatusError = CronStatus("error") CronStatusLocked = CronStatus("locked") CronStatusCreating = CronStatus("creating") CronStatusPending = CronStatus("pending") )
const ( DomainStatusUnknown = DomainStatus("unknown") DomainStatusReady = DomainStatus("ready") DomainStatusDeleting = DomainStatus("deleting") DomainStatusError = DomainStatus("error") DomainStatusCreating = DomainStatus("creating") DomainStatusPending = DomainStatus("pending") )
const ( ListContainersRequestOrderByCreatedAtAsc = ListContainersRequestOrderBy("created_at_asc") ListContainersRequestOrderByCreatedAtDesc = ListContainersRequestOrderBy("created_at_desc") ListContainersRequestOrderByNameAsc = ListContainersRequestOrderBy("name_asc") ListContainersRequestOrderByNameDesc = ListContainersRequestOrderBy("name_desc") )
const ( ListCronsRequestOrderByCreatedAtAsc = ListCronsRequestOrderBy("created_at_asc") ListCronsRequestOrderByCreatedAtDesc = ListCronsRequestOrderBy("created_at_desc") )
const ( ListDomainsRequestOrderByCreatedAtAsc = ListDomainsRequestOrderBy("created_at_asc") ListDomainsRequestOrderByCreatedAtDesc = ListDomainsRequestOrderBy("created_at_desc") ListDomainsRequestOrderByHostnameAsc = ListDomainsRequestOrderBy("hostname_asc") ListDomainsRequestOrderByHostnameDesc = ListDomainsRequestOrderBy("hostname_desc") )
const ( ListNamespacesRequestOrderByCreatedAtAsc = ListNamespacesRequestOrderBy("created_at_asc") ListNamespacesRequestOrderByCreatedAtDesc = ListNamespacesRequestOrderBy("created_at_desc") ListNamespacesRequestOrderByNameAsc = ListNamespacesRequestOrderBy("name_asc") ListNamespacesRequestOrderByNameDesc = ListNamespacesRequestOrderBy("name_desc") )
const ( ListTokensRequestOrderByCreatedAtAsc = ListTokensRequestOrderBy("created_at_asc") ListTokensRequestOrderByCreatedAtDesc = ListTokensRequestOrderBy("created_at_desc") )
const ( // Order by creation date ascending. ListTriggersRequestOrderByCreatedAtAsc = ListTriggersRequestOrderBy("created_at_asc") // Order by creation date descending. ListTriggersRequestOrderByCreatedAtDesc = ListTriggersRequestOrderBy("created_at_desc") )
const ( NamespaceStatusUnknown = NamespaceStatus("unknown") NamespaceStatusReady = NamespaceStatus("ready") NamespaceStatusDeleting = NamespaceStatus("deleting") NamespaceStatusError = NamespaceStatus("error") NamespaceStatusLocked = NamespaceStatus("locked") NamespaceStatusCreating = NamespaceStatus("creating") NamespaceStatusPending = NamespaceStatus("pending") )
const ( TokenStatusUnknown = TokenStatus("unknown") TokenStatusReady = TokenStatus("ready") TokenStatusDeleting = TokenStatus("deleting") TokenStatusError = TokenStatus("error") TokenStatusCreating = TokenStatus("creating") )
const ( // Unknown input type. TriggerInputTypeUnknownInputType = TriggerInputType("unknown_input_type") TriggerInputTypeSqs = TriggerInputType("sqs") // Scaleway Messaging and Queuing SQS queue. TriggerInputTypeScwSqs = TriggerInputType("scw_sqs") TriggerInputTypeNats = TriggerInputType("nats") // Scaleway Messaging and Queuing NATS subject. TriggerInputTypeScwNats = TriggerInputType("scw_nats") )
const ( // Unknown status. TriggerStatusUnknownStatus = TriggerStatus("unknown_status") // Ready status. TriggerStatusReady = TriggerStatus("ready") // Deleting status. TriggerStatusDeleting = TriggerStatus("deleting") // Error status. TriggerStatusError = TriggerStatus("error") // Creating status. TriggerStatusCreating = TriggerStatus("creating") // Pending status. TriggerStatusPending = TriggerStatus("pending") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
Serverless Containers API.
func (*API) CreateContainer ¶
func (s *API) CreateContainer(req *CreateContainerRequest, opts ...scw.RequestOption) (*Container, error)
CreateContainer: Create a new container in the specified region.
func (*API) CreateCron ¶
func (s *API) CreateCron(req *CreateCronRequest, opts ...scw.RequestOption) (*Cron, error)
CreateCron: Create a new cron.
func (*API) CreateDomain ¶
func (s *API) CreateDomain(req *CreateDomainRequest, opts ...scw.RequestOption) (*Domain, error)
CreateDomain: Create a domain name binding for the container with the specified ID.
func (*API) CreateNamespace ¶
func (s *API) CreateNamespace(req *CreateNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error)
CreateNamespace: Create a new namespace in a specified region.
func (*API) CreateToken ¶
func (s *API) CreateToken(req *CreateTokenRequest, opts ...scw.RequestOption) (*Token, error)
CreateToken: Create a new revocable token.
func (*API) CreateTrigger ¶
func (s *API) CreateTrigger(req *CreateTriggerRequest, opts ...scw.RequestOption) (*Trigger, error)
CreateTrigger: Create a new trigger for a specified container.
func (*API) DeleteContainer ¶
func (s *API) DeleteContainer(req *DeleteContainerRequest, opts ...scw.RequestOption) (*Container, error)
DeleteContainer: Delete the container associated with the specified ID.
func (*API) DeleteCron ¶
func (s *API) DeleteCron(req *DeleteCronRequest, opts ...scw.RequestOption) (*Cron, error)
DeleteCron: Delete the cron associated with the specified ID.
func (*API) DeleteDomain ¶
func (s *API) DeleteDomain(req *DeleteDomainRequest, opts ...scw.RequestOption) (*Domain, error)
DeleteDomain: Delete the domain name binding with the specific ID.
func (*API) DeleteNamespace ¶
func (s *API) DeleteNamespace(req *DeleteNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error)
DeleteNamespace: Delete the namespace associated with the specified ID.
func (*API) DeleteToken ¶
func (s *API) DeleteToken(req *DeleteTokenRequest, opts ...scw.RequestOption) (*Token, error)
DeleteToken: Delete a token with a specified ID.
func (*API) DeleteTrigger ¶
func (s *API) DeleteTrigger(req *DeleteTriggerRequest, opts ...scw.RequestOption) (*Trigger, error)
DeleteTrigger: Delete a trigger with a specified ID.
func (*API) DeployContainer ¶
func (s *API) DeployContainer(req *DeployContainerRequest, opts ...scw.RequestOption) (*Container, error)
DeployContainer: Deploy a container associated with the specified ID.
func (*API) GetContainer ¶
func (s *API) GetContainer(req *GetContainerRequest, opts ...scw.RequestOption) (*Container, error)
GetContainer: Get the container associated with the specified ID.
func (*API) GetCron ¶
func (s *API) GetCron(req *GetCronRequest, opts ...scw.RequestOption) (*Cron, error)
GetCron: Get the cron associated with the specified ID.
func (*API) GetDomain ¶
func (s *API) GetDomain(req *GetDomainRequest, opts ...scw.RequestOption) (*Domain, error)
GetDomain: Get a domain name binding for the container with the specified ID.
func (*API) GetNamespace ¶
func (s *API) GetNamespace(req *GetNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error)
GetNamespace: Get the namespace associated with the specified ID.
func (*API) GetToken ¶
func (s *API) GetToken(req *GetTokenRequest, opts ...scw.RequestOption) (*Token, error)
GetToken: Get a token with a specified ID.
func (*API) GetTrigger ¶
func (s *API) GetTrigger(req *GetTriggerRequest, opts ...scw.RequestOption) (*Trigger, error)
GetTrigger: Get a trigger with a specified ID.
func (*API) IssueJWT
deprecated
func (s *API) IssueJWT(req *IssueJWTRequest, opts ...scw.RequestOption) (*Token, error)
Deprecated: IssueJWT: Deprecated in favor of CreateToken.
func (*API) ListContainers ¶
func (s *API) ListContainers(req *ListContainersRequest, opts ...scw.RequestOption) (*ListContainersResponse, error)
ListContainers: List all containers for a specified region.
func (*API) ListCrons ¶
func (s *API) ListCrons(req *ListCronsRequest, opts ...scw.RequestOption) (*ListCronsResponse, error)
ListCrons: List all your crons.
func (*API) ListDomains ¶
func (s *API) ListDomains(req *ListDomainsRequest, opts ...scw.RequestOption) (*ListDomainsResponse, error)
ListDomains: List all domain name bindings in a specified region.
func (*API) ListNamespaces ¶
func (s *API) ListNamespaces(req *ListNamespacesRequest, opts ...scw.RequestOption) (*ListNamespacesResponse, error)
ListNamespaces: List all namespaces in a specified region.
func (*API) ListTokens ¶
func (s *API) ListTokens(req *ListTokensRequest, opts ...scw.RequestOption) (*ListTokensResponse, error)
ListTokens: List all tokens belonging to a specified Organization or Project.
func (*API) ListTriggers ¶
func (s *API) ListTriggers(req *ListTriggersRequest, opts ...scw.RequestOption) (*ListTriggersResponse, error)
ListTriggers: List all triggers belonging to a specified Organization or Project.
func (*API) UpdateContainer ¶
func (s *API) UpdateContainer(req *UpdateContainerRequest, opts ...scw.RequestOption) (*Container, error)
UpdateContainer: Update the container associated with the specified ID.
func (*API) UpdateCron ¶
func (s *API) UpdateCron(req *UpdateCronRequest, opts ...scw.RequestOption) (*Cron, error)
UpdateCron: Update the cron associated with the specified ID.
func (*API) UpdateNamespace ¶
func (s *API) UpdateNamespace(req *UpdateNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error)
UpdateNamespace: Update the space associated with the specified ID.
func (*API) UpdateTrigger ¶
func (s *API) UpdateTrigger(req *UpdateTriggerRequest, opts ...scw.RequestOption) (*Trigger, error)
UpdateTrigger: Update a trigger with a specified ID.
func (*API) WaitForContainer ¶
func (s *API) WaitForContainer(req *WaitForContainerRequest, opts ...scw.RequestOption) (*Container, error)
WaitForContainer waits for the Container to be in a ready state before returning.
func (*API) WaitForCron ¶
func (s *API) WaitForCron(req *WaitForCronRequest, opts ...scw.RequestOption) (*Cron, error)
WaitForCron waits for the Cron to be in a ready state before returning.
func (*API) WaitForDomain ¶
func (s *API) WaitForDomain(req *WaitForDomainRequest, opts ...scw.RequestOption) (*Domain, error)
WaitForDomain waits for the Domain to be in a ready state before returning.
func (*API) WaitForNamespace ¶
func (s *API) WaitForNamespace(req *WaitForNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error)
WaitForNamespace waits for the Namespace to be in a ready state before returning.
func (*API) WaitForTrigger ¶
func (s *API) WaitForTrigger(req *WaitForTriggerRequest, opts ...scw.RequestOption) (*Trigger, error)
WaitForTrigger waits for the Trigger to be in a ready state before returning.
type Container ¶
type Container struct {
// ID: UUID of the container.
ID string `json:"id"`
// Name: name of the container.
Name string `json:"name"`
// NamespaceID: UUID of the namespace the container belongs to.
NamespaceID string `json:"namespace_id"`
// Status: status of the container.
// Default value: unknown
Status ContainerStatus `json:"status"`
// EnvironmentVariables: environment variables of the container.
EnvironmentVariables map[string]string `json:"environment_variables"`
// MinScale: minimum number of instances to scale the container to.
MinScale uint32 `json:"min_scale"`
// MaxScale: maximum number of instances to scale the container to.
MaxScale uint32 `json:"max_scale"`
// MemoryLimit: memory limit of the container in MB.
MemoryLimit uint32 `json:"memory_limit"`
// CPULimit: CPU limit of the container in mvCPU.
CPULimit uint32 `json:"cpu_limit"`
// Timeout: processing time limit for the container.
Timeout *scw.Duration `json:"timeout"`
// ErrorMessage: last error message of the container.
ErrorMessage *string `json:"error_message"`
// Privacy: privacy setting of the container.
// Default value: unknown_privacy
Privacy ContainerPrivacy `json:"privacy"`
// Description: description of the container.
Description *string `json:"description"`
// RegistryImage: name of the registry image (e.g. "rg.fr-par.scw.cloud/something/image:tag").
RegistryImage string `json:"registry_image"`
// MaxConcurrency: number of maximum concurrent executions of the container.
MaxConcurrency uint32 `json:"max_concurrency"`
// DomainName: domain name attributed to the contaioner.
DomainName string `json:"domain_name"`
// Protocol: protocol the container uses.
// Default value: unknown_protocol
Protocol ContainerProtocol `json:"protocol"`
// Port: port the container listens on.
Port uint32 `json:"port"`
// SecretEnvironmentVariables: secret environment variables of the container.
SecretEnvironmentVariables []*SecretHashedValue `json:"secret_environment_variables"`
// HTTPOption: possible values:
// - redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
// - enabled: Serve both HTTP and HTTPS traffic.
// Default value: unknown_http_option
HTTPOption ContainerHTTPOption `json:"http_option"`
// Region: region in which the container will be deployed.
Region scw.Region `json:"region"`
}
Container: container.
type ContainerHTTPOption ¶
type ContainerHTTPOption string
func (ContainerHTTPOption) MarshalJSON ¶
func (enum ContainerHTTPOption) MarshalJSON() ([]byte, error)
func (ContainerHTTPOption) String ¶
func (enum ContainerHTTPOption) String() string
func (*ContainerHTTPOption) UnmarshalJSON ¶
func (enum *ContainerHTTPOption) UnmarshalJSON(data []byte) error
type ContainerPrivacy ¶
type ContainerPrivacy string
func (ContainerPrivacy) MarshalJSON ¶
func (enum ContainerPrivacy) MarshalJSON() ([]byte, error)
func (ContainerPrivacy) String ¶
func (enum ContainerPrivacy) String() string
func (*ContainerPrivacy) UnmarshalJSON ¶
func (enum *ContainerPrivacy) UnmarshalJSON(data []byte) error
type ContainerProtocol ¶
type ContainerProtocol string
func (ContainerProtocol) MarshalJSON ¶
func (enum ContainerProtocol) MarshalJSON() ([]byte, error)
func (ContainerProtocol) String ¶
func (enum ContainerProtocol) String() string
func (*ContainerProtocol) UnmarshalJSON ¶
func (enum *ContainerProtocol) UnmarshalJSON(data []byte) error
type ContainerStatus ¶
type ContainerStatus string
func (ContainerStatus) MarshalJSON ¶
func (enum ContainerStatus) MarshalJSON() ([]byte, error)
func (ContainerStatus) String ¶
func (enum ContainerStatus) String() string
func (*ContainerStatus) UnmarshalJSON ¶
func (enum *ContainerStatus) UnmarshalJSON(data []byte) error
type CreateContainerRequest ¶
type CreateContainerRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// NamespaceID: UUID of the namespace the container belongs to.
NamespaceID string `json:"namespace_id"`
// Name: name of the container.
Name string `json:"name"`
// EnvironmentVariables: environment variables of the container.
EnvironmentVariables *map[string]string `json:"environment_variables,omitempty"`
// MinScale: minimum number of instances to scale the container to.
MinScale *uint32 `json:"min_scale,omitempty"`
// MaxScale: maximum number of instances to scale the container to.
MaxScale *uint32 `json:"max_scale,omitempty"`
// MemoryLimit: memory limit of the container in MB.
MemoryLimit *uint32 `json:"memory_limit,omitempty"`
// CPULimit: CPU limit of the container in mvCPU.
CPULimit *uint32 `json:"cpu_limit,omitempty"`
// Timeout: processing time limit for the container.
Timeout *scw.Duration `json:"timeout,omitempty"`
// Privacy: privacy setting of the container.
// Default value: unknown_privacy
Privacy ContainerPrivacy `json:"privacy"`
// Description: description of the container.
Description *string `json:"description,omitempty"`
// RegistryImage: name of the registry image (e.g. "rg.fr-par.scw.cloud/something/image:tag").
RegistryImage *string `json:"registry_image,omitempty"`
// MaxConcurrency: number of maximum concurrent executions of the container.
MaxConcurrency *uint32 `json:"max_concurrency,omitempty"`
// Protocol: protocol the container uses.
// Default value: unknown_protocol
Protocol ContainerProtocol `json:"protocol"`
// Port: port the container listens on.
Port *uint32 `json:"port,omitempty"`
// SecretEnvironmentVariables: secret environment variables of the container.
SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"`
// HTTPOption: possible values:
// - redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
// - enabled: Serve both HTTP and HTTPS traffic.
// Default value: unknown_http_option
HTTPOption ContainerHTTPOption `json:"http_option"`
}
CreateContainerRequest: create container request.
type CreateCronRequest ¶
type CreateCronRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// ContainerID: UUID of the container to invoke by the cron.
ContainerID string `json:"container_id"`
// Schedule: uNIX cron shedule.
Schedule string `json:"schedule"`
// Args: arguments to pass with the cron.
Args *scw.JSONObject `json:"args,omitempty"`
// Name: name of the cron to create.
Name *string `json:"name,omitempty"`
}
CreateCronRequest: create cron request.
type CreateDomainRequest ¶
type CreateDomainRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// Hostname: domain to assign.
Hostname string `json:"hostname"`
// ContainerID: UUID of the container to assign the domain to.
ContainerID string `json:"container_id"`
}
CreateDomainRequest: create domain request.
type CreateNamespaceRequest ¶
type CreateNamespaceRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// Name: name of the namespace to create.
Name string `json:"name"`
// EnvironmentVariables: environment variables of the namespace to create.
EnvironmentVariables *map[string]string `json:"environment_variables,omitempty"`
// ProjectID: UUID of the Project in which the namespace will be created.
ProjectID string `json:"project_id"`
// Description: description of the namespace to create.
Description *string `json:"description,omitempty"`
// SecretEnvironmentVariables: secret environment variables of the namespace to create.
SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"`
}
CreateNamespaceRequest: create namespace request.
type CreateTokenRequest ¶
type CreateTokenRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// ContainerID: UUID of the container to create the token for.
// Precisely one of ContainerID, NamespaceID must be set.
ContainerID *string `json:"container_id,omitempty"`
// NamespaceID: UUID of the namespace to create the token for.
// Precisely one of ContainerID, NamespaceID must be set.
NamespaceID *string `json:"namespace_id,omitempty"`
// Description: description of the token.
Description *string `json:"description,omitempty"`
// ExpiresAt: expiry date of the token.
ExpiresAt *time.Time `json:"expires_at,omitempty"`
}
CreateTokenRequest: create token request.
type CreateTriggerRequest ¶
type CreateTriggerRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// Name: name of the trigger.
Name string `json:"name"`
// ContainerID: ID of the container to trigger.
ContainerID string `json:"container_id"`
// Description: description of the trigger.
Description *string `json:"description,omitempty"`
// ScwSqsConfig: configuration for a Scaleway Messaging and Queuing SQS queue.
// Precisely one of ScwSqsConfig, ScwNatsConfig, SqsConfig must be set.
ScwSqsConfig *CreateTriggerRequestMnqSqsClientConfig `json:"scw_sqs_config,omitempty"`
// ScwNatsConfig: configuration for a Scaleway Messaging and Queuing NATS subject.
// Precisely one of ScwSqsConfig, ScwNatsConfig, SqsConfig must be set.
ScwNatsConfig *CreateTriggerRequestMnqNatsClientConfig `json:"scw_nats_config,omitempty"`
// SqsConfig: configuration for an AWS SQS queue.
// Precisely one of ScwSqsConfig, ScwNatsConfig, SqsConfig must be set.
SqsConfig *CreateTriggerRequestSqsClientConfig `json:"sqs_config,omitempty"`
}
CreateTriggerRequest: create trigger request.
type CreateTriggerRequestMnqNatsClientConfig ¶
type CreateTriggerRequestMnqNatsClientConfig struct {
// Subject: name of the NATS subject the trigger should listen to.
Subject string `json:"subject"`
// MnqNatsAccountID: ID of the Messaging and Queuing NATS account.
MnqNatsAccountID string `json:"mnq_nats_account_id"`
// MnqProjectID: ID of the Messaging and Queuing project.
MnqProjectID string `json:"mnq_project_id"`
// MnqRegion: currently, only the `fr-par` and `nl-ams` regions are available.
MnqRegion string `json:"mnq_region"`
}
CreateTriggerRequestMnqNatsClientConfig: create trigger request mnq nats client config.
type CreateTriggerRequestMnqSqsClientConfig ¶
type CreateTriggerRequestMnqSqsClientConfig struct {
// Queue: name of the SQS queue the trigger should listen to.
Queue string `json:"queue"`
// MnqProjectID: you must have activated SQS on this project.
MnqProjectID string `json:"mnq_project_id"`
// MnqRegion: currently, only the `fr-par` and `nl-ams` regions are available.
MnqRegion string `json:"mnq_region"`
}
CreateTriggerRequestMnqSqsClientConfig: create trigger request mnq sqs client config.
type CreateTriggerRequestSqsClientConfig ¶
type CreateTriggerRequestSqsClientConfig struct {
Endpoint string `json:"endpoint"`
QueueURL string `json:"queue_url"`
AccessKey string `json:"access_key"`
SecretKey string `json:"secret_key"`
}
CreateTriggerRequestSqsClientConfig: create trigger request sqs client config.
type Cron ¶
type Cron struct {
// ID: UUID of the cron.
ID string `json:"id"`
// ContainerID: UUID of the container invoked by this cron.
ContainerID string `json:"container_id"`
// Schedule: uNIX cron shedule.
Schedule string `json:"schedule"`
// Args: arguments to pass with the cron.
Args *scw.JSONObject `json:"args"`
// Status: status of the cron.
// Default value: unknown
Status CronStatus `json:"status"`
// Name: name of the cron.
Name string `json:"name"`
}
Cron: cron.
type CronStatus ¶
type CronStatus string
func (CronStatus) MarshalJSON ¶
func (enum CronStatus) MarshalJSON() ([]byte, error)
func (CronStatus) String ¶
func (enum CronStatus) String() string
func (*CronStatus) UnmarshalJSON ¶
func (enum *CronStatus) UnmarshalJSON(data []byte) error
type DeleteContainerRequest ¶
type DeleteContainerRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// ContainerID: UUID of the container to delete.
ContainerID string `json:"-"`
}
DeleteContainerRequest: delete container request.
type DeleteCronRequest ¶
type DeleteCronRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// CronID: UUID of the cron to delete.
CronID string `json:"-"`
}
DeleteCronRequest: delete cron request.
type DeleteDomainRequest ¶
type DeleteDomainRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// DomainID: UUID of the domain to delete.
DomainID string `json:"-"`
}
DeleteDomainRequest: delete domain request.
type DeleteNamespaceRequest ¶
type DeleteNamespaceRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// NamespaceID: UUID of the namespace to delete.
NamespaceID string `json:"-"`
}
DeleteNamespaceRequest: delete namespace request.
type DeleteTokenRequest ¶
type DeleteTokenRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// TokenID: UUID of the token to delete.
TokenID string `json:"-"`
}
DeleteTokenRequest: delete token request.
type DeleteTriggerRequest ¶
type DeleteTriggerRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// TriggerID: ID of the trigger to delete.
TriggerID string `json:"-"`
}
DeleteTriggerRequest: delete trigger request.
type DeployContainerRequest ¶
type DeployContainerRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// ContainerID: UUID of the container to deploy.
ContainerID string `json:"-"`
}
DeployContainerRequest: deploy container request.
type Domain ¶
type Domain struct {
// ID: UUID of the domain.
ID string `json:"id"`
// Hostname: domain assigned to the container.
Hostname string `json:"hostname"`
// ContainerID: UUID of the container.
ContainerID string `json:"container_id"`
// URL: URL (TBD).
URL string `json:"url"`
// Status: status of the domain.
// Default value: unknown
Status DomainStatus `json:"status"`
// ErrorMessage: last error message of the domain.
ErrorMessage *string `json:"error_message"`
}
Domain: domain.
type DomainStatus ¶
type DomainStatus string
func (DomainStatus) MarshalJSON ¶
func (enum DomainStatus) MarshalJSON() ([]byte, error)
func (DomainStatus) String ¶
func (enum DomainStatus) String() string
func (*DomainStatus) UnmarshalJSON ¶
func (enum *DomainStatus) UnmarshalJSON(data []byte) error
type GetContainerRequest ¶
type GetContainerRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// ContainerID: UUID of the container to get.
ContainerID string `json:"-"`
}
GetContainerRequest: get container request.
type GetCronRequest ¶
type GetCronRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// CronID: UUID of the cron to get.
CronID string `json:"-"`
}
GetCronRequest: get cron request.
type GetDomainRequest ¶
type GetDomainRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// DomainID: UUID of the domain to get.
DomainID string `json:"-"`
}
GetDomainRequest: get domain request.
type GetNamespaceRequest ¶
type GetNamespaceRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// NamespaceID: UUID of the namespace to get.
NamespaceID string `json:"-"`
}
GetNamespaceRequest: get namespace request.
type GetTokenRequest ¶
type GetTokenRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// TokenID: UUID of the token to get.
TokenID string `json:"-"`
}
GetTokenRequest: get token request.
type GetTriggerRequest ¶
type GetTriggerRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// TriggerID: ID of the trigger to get.
TriggerID string `json:"-"`
}
GetTriggerRequest: get trigger request.
type IssueJWTRequest ¶
type IssueJWTRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// Precisely one of ContainerID, NamespaceID must be set.
ContainerID *string `json:"container_id,omitempty"`
// Precisely one of ContainerID, NamespaceID must be set.
NamespaceID *string `json:"namespace_id,omitempty"`
ExpiresAt *time.Time `json:"-"`
}
IssueJWTRequest: issue jwt request.
type ListContainersRequest ¶
type ListContainersRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// Page: page number.
Page *int32 `json:"-"`
// PageSize: number of containers per page.
PageSize *uint32 `json:"-"`
// OrderBy: order of the containers.
// Default value: created_at_asc
OrderBy ListContainersRequestOrderBy `json:"-"`
// NamespaceID: UUID of the namespace the container belongs to.
NamespaceID string `json:"-"`
// Name: name of the container.
Name *string `json:"-"`
// OrganizationID: UUID of the Organization the container belongs to.
OrganizationID *string `json:"-"`
// ProjectID: UUID of the Project the container belongs to.
ProjectID *string `json:"-"`
}
ListContainersRequest: list containers request.
type ListContainersRequestOrderBy ¶
type ListContainersRequestOrderBy string
func (ListContainersRequestOrderBy) MarshalJSON ¶
func (enum ListContainersRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListContainersRequestOrderBy) String ¶
func (enum ListContainersRequestOrderBy) String() string
func (*ListContainersRequestOrderBy) UnmarshalJSON ¶
func (enum *ListContainersRequestOrderBy) UnmarshalJSON(data []byte) error
type ListContainersResponse ¶
type ListContainersResponse struct {
// Containers: array of containers.
Containers []*Container `json:"containers"`
// TotalCount: total number of containers.
TotalCount uint32 `json:"total_count"`
}
ListContainersResponse: list containers response.
func (*ListContainersResponse) UnsafeAppend ¶
func (r *ListContainersResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListContainersResponse) UnsafeGetTotalCount ¶
func (r *ListContainersResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListCronsRequest ¶
type ListCronsRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// Page: page number.
Page *int32 `json:"-"`
// PageSize: number of crons per page.
PageSize *uint32 `json:"-"`
// OrderBy: order of the crons.
// Default value: created_at_asc
OrderBy ListCronsRequestOrderBy `json:"-"`
// ContainerID: UUID of the container invoked by the cron.
ContainerID string `json:"-"`
}
ListCronsRequest: list crons request.
type ListCronsRequestOrderBy ¶
type ListCronsRequestOrderBy string
func (ListCronsRequestOrderBy) MarshalJSON ¶
func (enum ListCronsRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListCronsRequestOrderBy) String ¶
func (enum ListCronsRequestOrderBy) String() string
func (*ListCronsRequestOrderBy) UnmarshalJSON ¶
func (enum *ListCronsRequestOrderBy) UnmarshalJSON(data []byte) error
type ListCronsResponse ¶
type ListCronsResponse struct {
// Crons: array of crons.
Crons []*Cron `json:"crons"`
// TotalCount: total number of crons.
TotalCount uint32 `json:"total_count"`
}
ListCronsResponse: list crons response.
func (*ListCronsResponse) UnsafeAppend ¶
func (r *ListCronsResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListCronsResponse) UnsafeGetTotalCount ¶
func (r *ListCronsResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListDomainsRequest ¶
type ListDomainsRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// Page: page number.
Page *int32 `json:"-"`
// PageSize: number of domains per page.
PageSize *uint32 `json:"-"`
// OrderBy: order of the domains.
// Default value: created_at_asc
OrderBy ListDomainsRequestOrderBy `json:"-"`
// ContainerID: UUID of the container the domain belongs to.
ContainerID string `json:"-"`
}
ListDomainsRequest: list domains request.
type ListDomainsRequestOrderBy ¶
type ListDomainsRequestOrderBy string
func (ListDomainsRequestOrderBy) MarshalJSON ¶
func (enum ListDomainsRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListDomainsRequestOrderBy) String ¶
func (enum ListDomainsRequestOrderBy) String() string
func (*ListDomainsRequestOrderBy) UnmarshalJSON ¶
func (enum *ListDomainsRequestOrderBy) UnmarshalJSON(data []byte) error
type ListDomainsResponse ¶
type ListDomainsResponse struct {
// Domains: array of domains.
Domains []*Domain `json:"domains"`
// TotalCount: total number of domains.
TotalCount uint32 `json:"total_count"`
}
ListDomainsResponse: list domains response.
func (*ListDomainsResponse) UnsafeAppend ¶
func (r *ListDomainsResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListDomainsResponse) UnsafeGetTotalCount ¶
func (r *ListDomainsResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListNamespacesRequest ¶
type ListNamespacesRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// Page: page number.
Page *int32 `json:"-"`
// PageSize: number of namespaces per page.
PageSize *uint32 `json:"-"`
// OrderBy: order of the namespaces.
// Default value: created_at_asc
OrderBy ListNamespacesRequestOrderBy `json:"-"`
// Name: name of the namespaces.
Name *string `json:"-"`
// OrganizationID: UUID of the Organization the namespace belongs to.
OrganizationID *string `json:"-"`
// ProjectID: UUID of the Project the namespace belongs to.
ProjectID *string `json:"-"`
}
ListNamespacesRequest: list namespaces request.
type ListNamespacesRequestOrderBy ¶
type ListNamespacesRequestOrderBy string
func (ListNamespacesRequestOrderBy) MarshalJSON ¶
func (enum ListNamespacesRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListNamespacesRequestOrderBy) String ¶
func (enum ListNamespacesRequestOrderBy) String() string
func (*ListNamespacesRequestOrderBy) UnmarshalJSON ¶
func (enum *ListNamespacesRequestOrderBy) UnmarshalJSON(data []byte) error
type ListNamespacesResponse ¶
type ListNamespacesResponse struct {
// Namespaces: array of the namespaces.
Namespaces []*Namespace `json:"namespaces"`
// TotalCount: total number of namespaces.
TotalCount uint32 `json:"total_count"`
}
ListNamespacesResponse: list namespaces response.
func (*ListNamespacesResponse) UnsafeAppend ¶
func (r *ListNamespacesResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListNamespacesResponse) UnsafeGetTotalCount ¶
func (r *ListNamespacesResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListTokensRequest ¶
type ListTokensRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// Page: page number.
Page *int32 `json:"-"`
// PageSize: number of tokens per page.
PageSize *uint32 `json:"-"`
// OrderBy: order of the tokens.
// Default value: created_at_asc
OrderBy ListTokensRequestOrderBy `json:"-"`
// ContainerID: UUID of the container the token belongs to.
ContainerID *string `json:"-"`
// NamespaceID: UUID of the namespace the token belongs to.
NamespaceID *string `json:"-"`
}
ListTokensRequest: list tokens request.
type ListTokensRequestOrderBy ¶
type ListTokensRequestOrderBy string
func (ListTokensRequestOrderBy) MarshalJSON ¶
func (enum ListTokensRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListTokensRequestOrderBy) String ¶
func (enum ListTokensRequestOrderBy) String() string
func (*ListTokensRequestOrderBy) UnmarshalJSON ¶
func (enum *ListTokensRequestOrderBy) UnmarshalJSON(data []byte) error
type ListTokensResponse ¶
type ListTokensResponse struct {
Tokens []*Token `json:"tokens"`
TotalCount uint32 `json:"total_count"`
}
ListTokensResponse: list tokens response.
func (*ListTokensResponse) UnsafeAppend ¶
func (r *ListTokensResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListTokensResponse) UnsafeGetTotalCount ¶
func (r *ListTokensResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListTriggersRequest ¶
type ListTriggersRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// Page: page number to return.
Page *int32 `json:"-"`
// PageSize: maximum number of triggers to return per page.
PageSize *uint32 `json:"-"`
// OrderBy: order in which to return results.
// Default value: created_at_asc
OrderBy ListTriggersRequestOrderBy `json:"-"`
// ContainerID: ID of the container the triggers belongs to.
// Precisely one of ContainerID, NamespaceID, ProjectID must be set.
ContainerID *string `json:"container_id,omitempty"`
// NamespaceID: ID of the namespace the triggers belongs to.
// Precisely one of ContainerID, NamespaceID, ProjectID must be set.
NamespaceID *string `json:"namespace_id,omitempty"`
// ProjectID: ID of the project the triggers belongs to.
// Precisely one of ContainerID, NamespaceID, ProjectID must be set.
ProjectID *string `json:"project_id,omitempty"`
}
ListTriggersRequest: list triggers request.
type ListTriggersRequestOrderBy ¶
type ListTriggersRequestOrderBy string
func (ListTriggersRequestOrderBy) MarshalJSON ¶
func (enum ListTriggersRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListTriggersRequestOrderBy) String ¶
func (enum ListTriggersRequestOrderBy) String() string
func (*ListTriggersRequestOrderBy) UnmarshalJSON ¶
func (enum *ListTriggersRequestOrderBy) UnmarshalJSON(data []byte) error
type ListTriggersResponse ¶
type ListTriggersResponse struct {
// TotalCount: total count of existing triggers (matching any filters specified).
TotalCount uint32 `json:"total_count"`
// Triggers: triggers on this page.
Triggers []*Trigger `json:"triggers"`
}
ListTriggersResponse: list triggers response.
func (*ListTriggersResponse) UnsafeAppend ¶
func (r *ListTriggersResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListTriggersResponse) UnsafeGetTotalCount ¶
func (r *ListTriggersResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type Namespace ¶
type Namespace struct {
// ID: UUID of the namespace.
ID string `json:"id"`
// Name: name of the namespace.
Name string `json:"name"`
// EnvironmentVariables: environment variables of the namespace.
EnvironmentVariables map[string]string `json:"environment_variables"`
// OrganizationID: UUID of the Organization the namespace belongs to.
OrganizationID string `json:"organization_id"`
// ProjectID: UUID of the Project the namespace belongs to.
ProjectID string `json:"project_id"`
// Status: status of the namespace.
// Default value: unknown
Status NamespaceStatus `json:"status"`
// RegistryNamespaceID: UUID of the registry namespace.
RegistryNamespaceID string `json:"registry_namespace_id"`
// ErrorMessage: last error message of the namesace.
ErrorMessage *string `json:"error_message"`
// RegistryEndpoint: registry endpoint of the namespace.
RegistryEndpoint string `json:"registry_endpoint"`
// Description: description of the endpoint.
Description *string `json:"description"`
// SecretEnvironmentVariables: secret environment variables of the namespace.
SecretEnvironmentVariables []*SecretHashedValue `json:"secret_environment_variables"`
// Region: region in which the namespace will be created.
Region scw.Region `json:"region"`
}
Namespace: namespace.
type NamespaceStatus ¶
type NamespaceStatus string
func (NamespaceStatus) MarshalJSON ¶
func (enum NamespaceStatus) MarshalJSON() ([]byte, error)
func (NamespaceStatus) String ¶
func (enum NamespaceStatus) String() string
func (*NamespaceStatus) UnmarshalJSON ¶
func (enum *NamespaceStatus) UnmarshalJSON(data []byte) error
type SecretHashedValue ¶
SecretHashedValue: secret hashed value.
type Token ¶
type Token struct {
// ID: UUID of the token.
ID string `json:"id"`
// Token: identifier of the token.
Token string `json:"token"`
// ContainerID: UUID of the container the token belongs to.
// Precisely one of ContainerID, NamespaceID must be set.
ContainerID *string `json:"container_id,omitempty"`
// NamespaceID: UUID of the namespace the token belongs to.
// Precisely one of ContainerID, NamespaceID must be set.
NamespaceID *string `json:"namespace_id,omitempty"`
// Deprecated: PublicKey: public key of the token.
PublicKey *string `json:"public_key,omitempty"`
// Status: status of the token.
// Default value: unknown
Status TokenStatus `json:"status"`
// Description: description of the token.
Description *string `json:"description"`
// ExpiresAt: expiry date of the token.
ExpiresAt *time.Time `json:"expires_at"`
}
Token: token.
type TokenStatus ¶
type TokenStatus string
func (TokenStatus) MarshalJSON ¶
func (enum TokenStatus) MarshalJSON() ([]byte, error)
func (TokenStatus) String ¶
func (enum TokenStatus) String() string
func (*TokenStatus) UnmarshalJSON ¶
func (enum *TokenStatus) UnmarshalJSON(data []byte) error
type Trigger ¶
type Trigger struct {
// ID: ID of the trigger.
ID string `json:"id"`
// Name: name of the trigger.
Name string `json:"name"`
// Description: description of the trigger.
Description string `json:"description"`
// ContainerID: ID of the container to trigger.
ContainerID string `json:"container_id"`
// InputType: type of the input.
// Default value: unknown_input_type
InputType TriggerInputType `json:"input_type"`
// Status: status of the trigger.
// Default value: unknown_status
Status TriggerStatus `json:"status"`
// ErrorMessage: error message of the trigger.
ErrorMessage *string `json:"error_message"`
// ScwSqsConfig: configuration for a Scaleway Messaging and Queuing SQS queue.
// Precisely one of ScwSqsConfig, ScwNatsConfig, SqsConfig must be set.
ScwSqsConfig *TriggerMnqSqsClientConfig `json:"scw_sqs_config,omitempty"`
// ScwNatsConfig: configuration for a Scaleway Messaging and Queuing NATS subject.
// Precisely one of ScwSqsConfig, ScwNatsConfig, SqsConfig must be set.
ScwNatsConfig *TriggerMnqNatsClientConfig `json:"scw_nats_config,omitempty"`
// SqsConfig: configuration for an AWS SQS queue.
// Precisely one of ScwSqsConfig, ScwNatsConfig, SqsConfig must be set.
SqsConfig *TriggerSqsClientConfig `json:"sqs_config,omitempty"`
}
Trigger: trigger.
type TriggerInputType ¶
type TriggerInputType string
func (TriggerInputType) MarshalJSON ¶
func (enum TriggerInputType) MarshalJSON() ([]byte, error)
func (TriggerInputType) String ¶
func (enum TriggerInputType) String() string
func (*TriggerInputType) UnmarshalJSON ¶
func (enum *TriggerInputType) UnmarshalJSON(data []byte) error
type TriggerMnqNatsClientConfig ¶
type TriggerMnqNatsClientConfig struct {
// Subject: name of the NATS subject the trigger listens to.
Subject string `json:"subject"`
// MnqNatsAccountID: ID of the Messaging and Queuing NATS account.
MnqNatsAccountID string `json:"mnq_nats_account_id"`
// MnqProjectID: ID of the Messaging and Queuing project.
MnqProjectID string `json:"mnq_project_id"`
// MnqRegion: currently, only the `fr-par` and `nl-ams` regions are available.
MnqRegion string `json:"mnq_region"`
// MnqCredentialID: ID of the Messaging and Queuing credentials used to subscribe to the NATS subject.
MnqCredentialID *string `json:"mnq_credential_id"`
}
TriggerMnqNatsClientConfig: trigger mnq nats client config.
type TriggerMnqSqsClientConfig ¶
type TriggerMnqSqsClientConfig struct {
// Queue: name of the SQS queue the trigger listens to.
Queue string `json:"queue"`
// MnqProjectID: ID of the Messaging and Queuing project.
MnqProjectID string `json:"mnq_project_id"`
// MnqRegion: currently, only the `fr-par` and `nl-ams` regions are available.
MnqRegion string `json:"mnq_region"`
// MnqCredentialID: ID of the Messaging and Queuing credentials used to read from the SQS queue.
MnqCredentialID *string `json:"mnq_credential_id"`
}
TriggerMnqSqsClientConfig: trigger mnq sqs client config.
type TriggerSqsClientConfig ¶
type TriggerSqsClientConfig struct {
Endpoint string `json:"endpoint"`
QueueURL string `json:"queue_url"`
AccessKey string `json:"access_key"`
SecretKey string `json:"secret_key"`
}
TriggerSqsClientConfig: trigger sqs client config.
type TriggerStatus ¶
type TriggerStatus string
func (TriggerStatus) MarshalJSON ¶
func (enum TriggerStatus) MarshalJSON() ([]byte, error)
func (TriggerStatus) String ¶
func (enum TriggerStatus) String() string
func (*TriggerStatus) UnmarshalJSON ¶
func (enum *TriggerStatus) UnmarshalJSON(data []byte) error
type UpdateContainerRequest ¶
type UpdateContainerRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// ContainerID: UUID of the container to update.
ContainerID string `json:"-"`
// EnvironmentVariables: environment variables of the container.
EnvironmentVariables *map[string]string `json:"environment_variables,omitempty"`
// MinScale: minimum number of instances to scale the container to.
MinScale *uint32 `json:"min_scale,omitempty"`
// MaxScale: maximum number of instances to scale the container to.
MaxScale *uint32 `json:"max_scale,omitempty"`
// MemoryLimit: memory limit of the container in MB.
MemoryLimit *uint32 `json:"memory_limit,omitempty"`
// CPULimit: CPU limit of the container in mvCPU.
CPULimit *uint32 `json:"cpu_limit,omitempty"`
// Timeout: processing time limit for the container.
Timeout *scw.Duration `json:"timeout,omitempty"`
// Redeploy: defines whether to redeploy failed containers.
Redeploy *bool `json:"redeploy,omitempty"`
// Privacy: privacy settings of the container.
// Default value: unknown_privacy
Privacy ContainerPrivacy `json:"privacy"`
// Description: description of the container.
Description *string `json:"description,omitempty"`
// RegistryImage: name of the registry image (e.g. "rg.fr-par.scw.cloud/something/image:tag").
RegistryImage *string `json:"registry_image,omitempty"`
// MaxConcurrency: number of maximum concurrent executions of the container.
MaxConcurrency *uint32 `json:"max_concurrency,omitempty"`
// Protocol: default value: unknown_protocol
Protocol ContainerProtocol `json:"protocol"`
Port *uint32 `json:"port,omitempty"`
SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"`
// HTTPOption: possible values:
// - redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
// - enabled: Serve both HTTP and HTTPS traffic.
// Default value: unknown_http_option
HTTPOption ContainerHTTPOption `json:"http_option"`
}
UpdateContainerRequest: update container request.
type UpdateCronRequest ¶
type UpdateCronRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// CronID: UUID of the cron to update.
CronID string `json:"-"`
// ContainerID: UUID of the container invoked by the cron.
ContainerID *string `json:"container_id,omitempty"`
// Schedule: uNIX cron schedule.
Schedule *string `json:"schedule,omitempty"`
// Args: arguments to pass with the cron.
Args *scw.JSONObject `json:"args,omitempty"`
// Name: name of the cron.
Name *string `json:"name,omitempty"`
}
UpdateCronRequest: update cron request.
type UpdateNamespaceRequest ¶
type UpdateNamespaceRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// NamespaceID: UUID of the namespace to update.
NamespaceID string `json:"-"`
// EnvironmentVariables: environment variables of the namespace to update.
EnvironmentVariables *map[string]string `json:"environment_variables,omitempty"`
// Description: description of the namespace to update.
Description *string `json:"description,omitempty"`
// SecretEnvironmentVariables: secret environment variables of the namespace to update.
SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"`
}
UpdateNamespaceRequest: update namespace request.
type UpdateTriggerRequest ¶
type UpdateTriggerRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// TriggerID: ID of the trigger to update.
TriggerID string `json:"-"`
// Name: name of the trigger.
Name *string `json:"name,omitempty"`
// Description: description of the trigger.
Description *string `json:"description,omitempty"`
// SqsConfig: configuration for an AWS SQS queue.
// Precisely one of SqsConfig must be set.
SqsConfig *UpdateTriggerRequestSqsClientConfig `json:"sqs_config,omitempty"`
}
UpdateTriggerRequest: update trigger request.
type UpdateTriggerRequestSqsClientConfig ¶
type UpdateTriggerRequestSqsClientConfig struct {
AccessKey *string `json:"access_key"`
SecretKey *string `json:"secret_key"`
}
UpdateTriggerRequestSqsClientConfig: update trigger request sqs client config.
type WaitForContainerRequest ¶
type WaitForContainerRequest struct {
ContainerID string
Region scw.Region
Timeout *time.Duration
RetryInterval *time.Duration
}
WaitForContainerRequest is used by WaitForNamespace method.
type WaitForCronRequest ¶
type WaitForCronRequest struct {
CronID string
Region scw.Region
Timeout *time.Duration
RetryInterval *time.Duration
}
WaitForCronRequest is used by WaitForNamespace method.
type WaitForDomainRequest ¶
type WaitForDomainRequest struct {
DomainID string
Region scw.Region
Timeout *time.Duration
RetryInterval *time.Duration
}
WaitForDomainRequest waits for the Domain to be in a ready state before returning.