mnq

package
v1.0.0-beta.27 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Overview

Package mnq provides methods and message types of the mnq v1beta1 API.

Index

Constants

View Source
const (
	// Order by creation date (ascending chronological order).
	ListNatsAccountsRequestOrderByCreatedAtAsc = ListNatsAccountsRequestOrderBy("created_at_asc")
	// Order by creation date (descending chronological order).
	ListNatsAccountsRequestOrderByCreatedAtDesc = ListNatsAccountsRequestOrderBy("created_at_desc")
	// Order by last update date (ascending chronological order).
	ListNatsAccountsRequestOrderByUpdatedAtAsc = ListNatsAccountsRequestOrderBy("updated_at_asc")
	// Order by last update date (descending chronological order).
	ListNatsAccountsRequestOrderByUpdatedAtDesc = ListNatsAccountsRequestOrderBy("updated_at_desc")
	// Order by name (ascending alphabetical order).
	ListNatsAccountsRequestOrderByNameAsc = ListNatsAccountsRequestOrderBy("name_asc")
	// Order by name (descending alphabetical order).
	ListNatsAccountsRequestOrderByNameDesc = ListNatsAccountsRequestOrderBy("name_desc")
)
View Source
const (
	// Order by creation date (ascending chronological order).
	ListNatsCredentialsRequestOrderByCreatedAtAsc = ListNatsCredentialsRequestOrderBy("created_at_asc")
	// Order by creation date (descending chronological order).
	ListNatsCredentialsRequestOrderByCreatedAtDesc = ListNatsCredentialsRequestOrderBy("created_at_desc")
	// Order by last update date (ascending chronological order).
	ListNatsCredentialsRequestOrderByUpdatedAtAsc = ListNatsCredentialsRequestOrderBy("updated_at_asc")
	// Order by last update date (descending chronological order).
	ListNatsCredentialsRequestOrderByUpdatedAtDesc = ListNatsCredentialsRequestOrderBy("updated_at_desc")
	// Order by name (ascending alphabetical order).
	ListNatsCredentialsRequestOrderByNameAsc = ListNatsCredentialsRequestOrderBy("name_asc")
	// Order by name (descending alphabetical order).
	ListNatsCredentialsRequestOrderByNameDesc = ListNatsCredentialsRequestOrderBy("name_desc")
)
View Source
const (
	// Order by creation date (ascending chronological order).
	ListSnsCredentialsRequestOrderByCreatedAtAsc = ListSnsCredentialsRequestOrderBy("created_at_asc")
	// Order by creation date (descending chronological order).
	ListSnsCredentialsRequestOrderByCreatedAtDesc = ListSnsCredentialsRequestOrderBy("created_at_desc")
	// Order by last update date (ascending chronological order).
	ListSnsCredentialsRequestOrderByUpdatedAtAsc = ListSnsCredentialsRequestOrderBy("updated_at_asc")
	// Order by last update date (descending chronological order).
	ListSnsCredentialsRequestOrderByUpdatedAtDesc = ListSnsCredentialsRequestOrderBy("updated_at_desc")
	// Order by name (ascending alphabetical order).
	ListSnsCredentialsRequestOrderByNameAsc = ListSnsCredentialsRequestOrderBy("name_asc")
	// Order by name (descending alphabetical order).
	ListSnsCredentialsRequestOrderByNameDesc = ListSnsCredentialsRequestOrderBy("name_desc")
)
View Source
const (
	// Order by creation date (ascending chronological order).
	ListSqsCredentialsRequestOrderByCreatedAtAsc = ListSqsCredentialsRequestOrderBy("created_at_asc")
	// Order by creation date (descending chronological order).
	ListSqsCredentialsRequestOrderByCreatedAtDesc = ListSqsCredentialsRequestOrderBy("created_at_desc")
	// Order by last update date (ascending chronological order).
	ListSqsCredentialsRequestOrderByUpdatedAtAsc = ListSqsCredentialsRequestOrderBy("updated_at_asc")
	// Order by last update date (descending chronological order).
	ListSqsCredentialsRequestOrderByUpdatedAtDesc = ListSqsCredentialsRequestOrderBy("updated_at_desc")
	// Order by name (ascending alphabetical order).
	ListSqsCredentialsRequestOrderByNameAsc = ListSqsCredentialsRequestOrderBy("name_asc")
	// Order by name (descending alphabetical order).
	ListSqsCredentialsRequestOrderByNameDesc = ListSqsCredentialsRequestOrderBy("name_desc")
)
View Source
const (
	// Unknown status.
	SnsInfoStatusUnknownStatus = SnsInfoStatus("unknown_status")
	// Enabled status.
	SnsInfoStatusEnabled = SnsInfoStatus("enabled")
	// Disabled status.
	SnsInfoStatusDisabled = SnsInfoStatus("disabled")
)
View Source
const (
	// Unknown status.
	SqsInfoStatusUnknownStatus = SqsInfoStatus("unknown_status")
	// Enabled status.
	SqsInfoStatusEnabled = SqsInfoStatus("enabled")
	// Disabled status.
	SqsInfoStatusDisabled = SqsInfoStatus("disabled")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	// Name: file name.
	Name string `json:"name"`

	// Content: file content.
	Content string `json:"content"`
}

File: file.

type ListNatsAccountsRequestOrderBy

type ListNatsAccountsRequestOrderBy string

func (ListNatsAccountsRequestOrderBy) MarshalJSON

func (enum ListNatsAccountsRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListNatsAccountsRequestOrderBy) String

func (enum ListNatsAccountsRequestOrderBy) String() string

func (*ListNatsAccountsRequestOrderBy) UnmarshalJSON

func (enum *ListNatsAccountsRequestOrderBy) UnmarshalJSON(data []byte) error

type ListNatsAccountsResponse

type ListNatsAccountsResponse struct {
	// TotalCount: total count of existing NATS accounts (matching any filters specified).
	TotalCount uint64 `json:"total_count"`

	// NatsAccounts: nATS accounts on this page.
	NatsAccounts []*NatsAccount `json:"nats_accounts"`
}

ListNatsAccountsResponse: list nats accounts response.

func (*ListNatsAccountsResponse) UnsafeAppend

func (r *ListNatsAccountsResponse) UnsafeAppend(res interface{}) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListNatsAccountsResponse) UnsafeGetTotalCount

func (r *ListNatsAccountsResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type ListNatsCredentialsRequestOrderBy

type ListNatsCredentialsRequestOrderBy string

func (ListNatsCredentialsRequestOrderBy) MarshalJSON

func (enum ListNatsCredentialsRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListNatsCredentialsRequestOrderBy) String

func (*ListNatsCredentialsRequestOrderBy) UnmarshalJSON

func (enum *ListNatsCredentialsRequestOrderBy) UnmarshalJSON(data []byte) error

type ListNatsCredentialsResponse

type ListNatsCredentialsResponse struct {
	// TotalCount: total count of existing credentials (matching any filters specified).
	TotalCount uint64 `json:"total_count"`

	// NatsCredentials: credentials on this page.
	NatsCredentials []*NatsCredentials `json:"nats_credentials"`
}

ListNatsCredentialsResponse: list nats credentials response.

func (*ListNatsCredentialsResponse) UnsafeAppend

func (r *ListNatsCredentialsResponse) UnsafeAppend(res interface{}) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListNatsCredentialsResponse) UnsafeGetTotalCount

func (r *ListNatsCredentialsResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type ListSnsCredentialsRequestOrderBy

type ListSnsCredentialsRequestOrderBy string

func (ListSnsCredentialsRequestOrderBy) MarshalJSON

func (enum ListSnsCredentialsRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListSnsCredentialsRequestOrderBy) String

func (*ListSnsCredentialsRequestOrderBy) UnmarshalJSON

func (enum *ListSnsCredentialsRequestOrderBy) UnmarshalJSON(data []byte) error

type ListSnsCredentialsResponse

type ListSnsCredentialsResponse struct {
	// TotalCount: total count of existing credentials (matching any filters specified).
	TotalCount uint64 `json:"total_count"`

	// SnsCredentials: sNS credentials on this page.
	SnsCredentials []*SnsCredentials `json:"sns_credentials"`
}

ListSnsCredentialsResponse: list sns credentials response.

func (*ListSnsCredentialsResponse) UnsafeAppend

func (r *ListSnsCredentialsResponse) UnsafeAppend(res interface{}) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListSnsCredentialsResponse) UnsafeGetTotalCount

func (r *ListSnsCredentialsResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type ListSqsCredentialsRequestOrderBy

type ListSqsCredentialsRequestOrderBy string

func (ListSqsCredentialsRequestOrderBy) MarshalJSON

func (enum ListSqsCredentialsRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListSqsCredentialsRequestOrderBy) String

func (*ListSqsCredentialsRequestOrderBy) UnmarshalJSON

func (enum *ListSqsCredentialsRequestOrderBy) UnmarshalJSON(data []byte) error

type ListSqsCredentialsResponse

type ListSqsCredentialsResponse struct {
	// TotalCount: total count of existing credentials (matching any filters specified).
	TotalCount uint64 `json:"total_count"`

	// SqsCredentials: sQS credentials on this page.
	SqsCredentials []*SqsCredentials `json:"sqs_credentials"`
}

ListSqsCredentialsResponse: list sqs credentials response.

func (*ListSqsCredentialsResponse) UnsafeAppend

func (r *ListSqsCredentialsResponse) UnsafeAppend(res interface{}) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListSqsCredentialsResponse) UnsafeGetTotalCount

func (r *ListSqsCredentialsResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type NatsAPI

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

This API allows you to manage Scaleway Messaging and Queuing NATS accounts.

func NewNatsAPI

func NewNatsAPI(client *scw.Client) *NatsAPI

NewNatsAPI returns a NatsAPI object from a Scaleway client.

func (*NatsAPI) CreateNatsAccount

func (s *NatsAPI) CreateNatsAccount(req *NatsAPICreateNatsAccountRequest, opts ...scw.RequestOption) (*NatsAccount, error)

CreateNatsAccount: Create a NATS account associated with a Project.

func (*NatsAPI) CreateNatsCredentials

func (s *NatsAPI) CreateNatsCredentials(req *NatsAPICreateNatsCredentialsRequest, opts ...scw.RequestOption) (*NatsCredentials, error)

CreateNatsCredentials: Create a set of credentials for a NATS account, specified by its NATS account ID.

func (*NatsAPI) DeleteNatsAccount

func (s *NatsAPI) DeleteNatsAccount(req *NatsAPIDeleteNatsAccountRequest, opts ...scw.RequestOption) error

DeleteNatsAccount: Delete a NATS account, specified by its NATS account ID. Note that deleting a NATS account is irreversible, and any credentials, streams, consumer and stored messages belonging to this NATS account will also be deleted.

func (*NatsAPI) DeleteNatsCredentials

func (s *NatsAPI) DeleteNatsCredentials(req *NatsAPIDeleteNatsCredentialsRequest, opts ...scw.RequestOption) error

DeleteNatsCredentials: Delete a set of credentials, specified by their credentials ID. Deleting credentials is irreversible and cannot be undone. The credentials can no longer be used to access the NATS account, and active connections using this credentials will be closed.

func (*NatsAPI) GetNatsAccount

func (s *NatsAPI) GetNatsAccount(req *NatsAPIGetNatsAccountRequest, opts ...scw.RequestOption) (*NatsAccount, error)

GetNatsAccount: Retrieve information about an existing NATS account identified by its NATS account ID. Its full details, including name and endpoint, are returned in the response.

func (*NatsAPI) GetNatsCredentials

func (s *NatsAPI) GetNatsCredentials(req *NatsAPIGetNatsCredentialsRequest, opts ...scw.RequestOption) (*NatsCredentials, error)

GetNatsCredentials: Retrieve an existing set of credentials, identified by the `nats_credentials_id`. The credentials themselves are NOT returned, only their metadata (NATS account ID, credentials name, etc), are returned in the response.

func (*NatsAPI) ListNatsAccounts

ListNatsAccounts: List all NATS accounts in the specified region, for a Scaleway Organization or Project. By default, the NATS accounts returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.

func (*NatsAPI) ListNatsCredentials

ListNatsCredentials: List existing credentials in the specified NATS account. The response contains only the metadata for the credentials, not the credentials themselves, which are only returned after a **Create Credentials** call.

func (*NatsAPI) Regions

func (s *NatsAPI) Regions() []scw.Region

func (*NatsAPI) UpdateNatsAccount

func (s *NatsAPI) UpdateNatsAccount(req *NatsAPIUpdateNatsAccountRequest, opts ...scw.RequestOption) (*NatsAccount, error)

UpdateNatsAccount: Update the name of a NATS account, specified by its NATS account ID.

type NatsAPICreateNatsAccountRequest

type NatsAPICreateNatsAccountRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// Name: nATS account name.
	Name string `json:"name"`

	// ProjectID: project containing the NATS account.
	ProjectID string `json:"project_id"`
}

NatsAPICreateNatsAccountRequest: nats api create nats account request.

type NatsAPICreateNatsCredentialsRequest

type NatsAPICreateNatsCredentialsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// NatsAccountID: nATS account containing the credentials.
	NatsAccountID string `json:"nats_account_id"`

	// Name: name of the credentials.
	Name string `json:"name"`
}

NatsAPICreateNatsCredentialsRequest: nats api create nats credentials request.

type NatsAPIDeleteNatsAccountRequest

type NatsAPIDeleteNatsAccountRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// NatsAccountID: ID of the NATS account to delete.
	NatsAccountID string `json:"-"`
}

NatsAPIDeleteNatsAccountRequest: nats api delete nats account request.

type NatsAPIDeleteNatsCredentialsRequest

type NatsAPIDeleteNatsCredentialsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// NatsCredentialsID: ID of the credentials to delete.
	NatsCredentialsID string `json:"-"`
}

NatsAPIDeleteNatsCredentialsRequest: nats api delete nats credentials request.

type NatsAPIGetNatsAccountRequest

type NatsAPIGetNatsAccountRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// NatsAccountID: ID of the NATS account to get.
	NatsAccountID string `json:"-"`
}

NatsAPIGetNatsAccountRequest: nats api get nats account request.

type NatsAPIGetNatsCredentialsRequest

type NatsAPIGetNatsCredentialsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// NatsCredentialsID: ID of the credentials to get.
	NatsCredentialsID string `json:"-"`
}

NatsAPIGetNatsCredentialsRequest: nats api get nats credentials request.

type NatsAPIListNatsAccountsRequest

type NatsAPIListNatsAccountsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ProjectID: include only NATS accounts in this Project.
	ProjectID *string `json:"-"`

	// Page: page number to return.
	Page *int32 `json:"-"`

	// PageSize: maximum number of NATS accounts to return per page.
	PageSize *uint32 `json:"-"`

	// OrderBy: order in which to return results.
	// Default value: created_at_asc
	OrderBy ListNatsAccountsRequestOrderBy `json:"-"`
}

NatsAPIListNatsAccountsRequest: nats api list nats accounts request.

type NatsAPIListNatsCredentialsRequest

type NatsAPIListNatsCredentialsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// NatsAccountID: include only credentials for this NATS account.
	NatsAccountID *string `json:"-"`

	// Page: page number to return.
	Page *int32 `json:"-"`

	// PageSize: maximum number of credentials to return per page.
	PageSize *uint32 `json:"-"`

	// OrderBy: order in which to return results.
	// Default value: created_at_asc
	OrderBy ListNatsCredentialsRequestOrderBy `json:"-"`
}

NatsAPIListNatsCredentialsRequest: nats api list nats credentials request.

type NatsAPIUpdateNatsAccountRequest

type NatsAPIUpdateNatsAccountRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// NatsAccountID: ID of the NATS account to update.
	NatsAccountID string `json:"-"`

	// Name: nATS account name.
	Name *string `json:"name,omitempty"`
}

NatsAPIUpdateNatsAccountRequest: nats api update nats account request.

type NatsAccount

type NatsAccount struct {
	// ID: nATS account ID.
	ID string `json:"id"`

	// Name: nATS account name.
	Name string `json:"name"`

	// Endpoint: endpoint of the NATS service for this account.
	Endpoint string `json:"endpoint"`

	// ProjectID: project ID of the Project containing the NATS account.
	ProjectID string `json:"project_id"`

	// Region: region where the NATS account is deployed.
	Region scw.Region `json:"region"`

	// CreatedAt: nATS account creation date.
	CreatedAt *time.Time `json:"created_at"`

	// UpdatedAt: nATS account last modification date.
	UpdatedAt *time.Time `json:"updated_at"`
}

NatsAccount: nats account.

type NatsCredentials

type NatsCredentials struct {
	// ID: ID of the credentials.
	ID string `json:"id"`

	// Name: name of the credentials.
	Name string `json:"name"`

	// NatsAccountID: nATS account containing the credentials.
	NatsAccountID string `json:"nats_account_id"`

	// CreatedAt: nATS credentials creation date.
	CreatedAt *time.Time `json:"created_at"`

	// UpdatedAt: nATS credentials last modification date.
	UpdatedAt *time.Time `json:"updated_at"`

	// Credentials: object containing the credentials file (Only returned by **Create Nats Credentials** call).
	Credentials *File `json:"credentials"`

	// Checksum: checksum of the credentials file.
	Checksum string `json:"checksum"`
}

NatsCredentials: nats credentials.

type SnsAPI

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

This API allows you to manage your Scaleway Messaging and Queuing SNS brokers.

func NewSnsAPI

func NewSnsAPI(client *scw.Client) *SnsAPI

NewSnsAPI returns a SnsAPI object from a Scaleway client.

func (*SnsAPI) ActivateSns

func (s *SnsAPI) ActivateSns(req *SnsAPIActivateSnsRequest, opts ...scw.RequestOption) (*SnsInfo, error)

ActivateSns: Activate SNS for the specified Project ID. SNS must be activated before any usage. Activating SNS does not trigger any billing, and you can deactivate at any time.

func (*SnsAPI) CreateSnsCredentials

func (s *SnsAPI) CreateSnsCredentials(req *SnsAPICreateSnsCredentialsRequest, opts ...scw.RequestOption) (*SnsCredentials, error)

CreateSnsCredentials: Create a set of credentials for SNS, specified by a Project ID. Credentials give the bearer access to topics, and the level of permissions can be defined granularly.

func (*SnsAPI) DeactivateSns

func (s *SnsAPI) DeactivateSns(req *SnsAPIDeactivateSnsRequest, opts ...scw.RequestOption) (*SnsInfo, error)

DeactivateSns: Deactivate SNS for the specified Project ID.You must delete all topics and credentials before this call or you need to set the force_delete parameter.

func (*SnsAPI) DeleteSnsCredentials

func (s *SnsAPI) DeleteSnsCredentials(req *SnsAPIDeleteSnsCredentialsRequest, opts ...scw.RequestOption) error

DeleteSnsCredentials: Delete a set of SNS credentials, specified by their credentials ID. Deleting credentials is irreversible and cannot be undone. The credentials can then no longer be used to access SNS.

func (*SnsAPI) GetSnsCredentials

func (s *SnsAPI) GetSnsCredentials(req *SnsAPIGetSnsCredentialsRequest, opts ...scw.RequestOption) (*SnsCredentials, error)

GetSnsCredentials: Retrieve an existing set of credentials, identified by the `credentials_id`. The credentials themselves, as well as their metadata (name, project ID etc), are returned in the response.

func (*SnsAPI) GetSnsInfo

func (s *SnsAPI) GetSnsInfo(req *SnsAPIGetSnsInfoRequest, opts ...scw.RequestOption) (*SnsInfo, error)

GetSnsInfo: Retrieve the SNS information of the specified Project ID. Informations include the activation status and the SNS API endpoint URL.

func (*SnsAPI) ListSnsCredentials

ListSnsCredentials: List existing SNS credentials in the specified region. The response contains only the metadata for the credentials, not the credentials themselves.

func (*SnsAPI) Regions

func (s *SnsAPI) Regions() []scw.Region

func (*SnsAPI) UpdateSnsCredentials

func (s *SnsAPI) UpdateSnsCredentials(req *SnsAPIUpdateSnsCredentialsRequest, opts ...scw.RequestOption) (*SnsCredentials, error)

UpdateSnsCredentials: Update a set of SNS credentials. You can update the credentials' name, or their permissions.

type SnsAPIActivateSnsRequest

type SnsAPIActivateSnsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ProjectID: project on which to activate the SNS service.
	ProjectID string `json:"project_id"`
}

SnsAPIActivateSnsRequest: sns api activate sns request.

type SnsAPICreateSnsCredentialsRequest

type SnsAPICreateSnsCredentialsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ProjectID: project containing the SNS credentials.
	ProjectID string `json:"project_id"`

	// Name: name of the credentials.
	Name string `json:"name"`

	// Permissions: permissions associated with these credentials.
	Permissions *SnsPermissions `json:"permissions,omitempty"`
}

SnsAPICreateSnsCredentialsRequest: sns api create sns credentials request.

type SnsAPIDeactivateSnsRequest

type SnsAPIDeactivateSnsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ProjectID: project on which to deactivate the SNS service.
	ProjectID string `json:"project_id"`
}

SnsAPIDeactivateSnsRequest: sns api deactivate sns request.

type SnsAPIDeleteSnsCredentialsRequest

type SnsAPIDeleteSnsCredentialsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// SnsCredentialsID: ID of the credentials to delete.
	SnsCredentialsID string `json:"-"`
}

SnsAPIDeleteSnsCredentialsRequest: sns api delete sns credentials request.

type SnsAPIGetSnsCredentialsRequest

type SnsAPIGetSnsCredentialsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// SnsCredentialsID: ID of the SNS credentials to get.
	SnsCredentialsID string `json:"-"`
}

SnsAPIGetSnsCredentialsRequest: sns api get sns credentials request.

type SnsAPIGetSnsInfoRequest

type SnsAPIGetSnsInfoRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ProjectID: project to retrieve SNS info from.
	ProjectID string `json:"project_id"`
}

SnsAPIGetSnsInfoRequest: sns api get sns info request.

type SnsAPIListSnsCredentialsRequest

type SnsAPIListSnsCredentialsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ProjectID: include only SNS credentials in this Project.
	ProjectID *string `json:"-"`

	// Page: page number to return.
	Page *int32 `json:"-"`

	// PageSize: maximum number of credentials to return per page.
	PageSize *uint32 `json:"-"`

	// OrderBy: order in which to return results.
	// Default value: created_at_asc
	OrderBy ListSnsCredentialsRequestOrderBy `json:"-"`
}

SnsAPIListSnsCredentialsRequest: sns api list sns credentials request.

type SnsAPIUpdateSnsCredentialsRequest

type SnsAPIUpdateSnsCredentialsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// SnsCredentialsID: ID of the SNS credentials to update.
	SnsCredentialsID string `json:"-"`

	// Name: name of the credentials.
	Name *string `json:"name,omitempty"`

	// Permissions: permissions associated with these credentials.
	Permissions *SnsPermissions `json:"permissions,omitempty"`
}

SnsAPIUpdateSnsCredentialsRequest: sns api update sns credentials request.

type SnsCredentials

type SnsCredentials struct {
	// ID: ID of the credentials.
	ID string `json:"id"`

	// Name: name of the credentials.
	Name string `json:"name"`

	// ProjectID: project ID of the Project containing the credentials.
	ProjectID string `json:"project_id"`

	// Region: region where the credentials exists.
	Region scw.Region `json:"region"`

	// CreatedAt: credentials creation date.
	CreatedAt *time.Time `json:"created_at"`

	// UpdatedAt: credentials last modification date.
	UpdatedAt *time.Time `json:"updated_at"`

	// AccessKey: access key ID.
	AccessKey string `json:"access_key"`

	// SecretKey: secret key ID (Only returned by **Create SNS Credentials** call).
	SecretKey string `json:"secret_key"`

	// SecretChecksum: checksum of the Secret key.
	SecretChecksum string `json:"secret_checksum"`

	// Permissions: permissions associated with these credentials.
	Permissions *SnsPermissions `json:"permissions"`
}

SnsCredentials: sns credentials.

type SnsInfo

type SnsInfo struct {
	// ProjectID: project ID of the Project containing the service.
	ProjectID string `json:"project_id"`

	// Region: region of the service.
	Region scw.Region `json:"region"`

	// CreatedAt: sNS creation date.
	CreatedAt *time.Time `json:"created_at"`

	// UpdatedAt: sNS last modification date.
	UpdatedAt *time.Time `json:"updated_at"`

	// Status: sNS activation status.
	// Default value: unknown_status
	Status SnsInfoStatus `json:"status"`

	// SnsEndpointURL: endpoint of the SNS service for this region and project.
	SnsEndpointURL string `json:"sns_endpoint_url"`
}

SnsInfo: sns info.

type SnsInfoStatus

type SnsInfoStatus string

func (SnsInfoStatus) MarshalJSON

func (enum SnsInfoStatus) MarshalJSON() ([]byte, error)

func (SnsInfoStatus) String

func (enum SnsInfoStatus) String() string

func (*SnsInfoStatus) UnmarshalJSON

func (enum *SnsInfoStatus) UnmarshalJSON(data []byte) error

type SnsPermissions

type SnsPermissions struct {
	// CanPublish: defines whether the credentials bearer can publish messages to the service (publish to SNS topics).
	CanPublish *bool `json:"can_publish"`

	// CanReceive: defines whether the credentials bearer can receive messages from the service (configure subscriptions).
	CanReceive *bool `json:"can_receive"`

	// CanManage: defines whether the credentials bearer can manage the associated SNS topics or subscriptions.
	CanManage *bool `json:"can_manage"`
}

SnsPermissions: sns permissions.

type SqsAPI

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

This API allows you to manage your Scaleway Messaging and Queuing SQS brokers.

func NewSqsAPI

func NewSqsAPI(client *scw.Client) *SqsAPI

NewSqsAPI returns a SqsAPI object from a Scaleway client.

func (*SqsAPI) ActivateSqs

func (s *SqsAPI) ActivateSqs(req *SqsAPIActivateSqsRequest, opts ...scw.RequestOption) (*SqsInfo, error)

ActivateSqs: Activate SQS for the specified Project ID. SQS must be activated before any usage such as creating credentials and queues. Activating SQS does not trigger any billing, and you can deactivate at any time.

func (*SqsAPI) CreateSqsCredentials

func (s *SqsAPI) CreateSqsCredentials(req *SqsAPICreateSqsCredentialsRequest, opts ...scw.RequestOption) (*SqsCredentials, error)

CreateSqsCredentials: Create a set of credentials for SQS, specified by a Project ID. Credentials give the bearer access to queues, and the level of permissions can be defined granularly.

func (*SqsAPI) DeactivateSqs

func (s *SqsAPI) DeactivateSqs(req *SqsAPIDeactivateSqsRequest, opts ...scw.RequestOption) (*SqsInfo, error)

DeactivateSqs: Deactivate SQS for the specified Project ID. You must delete all queues and credentials before this call or you need to set the force_delete parameter.

func (*SqsAPI) DeleteSqsCredentials

func (s *SqsAPI) DeleteSqsCredentials(req *SqsAPIDeleteSqsCredentialsRequest, opts ...scw.RequestOption) error

DeleteSqsCredentials: Delete a set of SQS credentials, specified by their credentials ID. Deleting credentials is irreversible and cannot be undone. The credentials can then no longer be used to access SQS.

func (*SqsAPI) GetSqsCredentials

func (s *SqsAPI) GetSqsCredentials(req *SqsAPIGetSqsCredentialsRequest, opts ...scw.RequestOption) (*SqsCredentials, error)

GetSqsCredentials: Retrieve an existing set of credentials, identified by the `credentials_id`. The credentials themselves, as well as their metadata (name, project ID etc), are returned in the response.

func (*SqsAPI) GetSqsInfo

func (s *SqsAPI) GetSqsInfo(req *SqsAPIGetSqsInfoRequest, opts ...scw.RequestOption) (*SqsInfo, error)

GetSqsInfo: Retrieve the SQS information of the specified Project ID. Informations include the activation status and the SQS API endpoint URL.

func (*SqsAPI) ListSqsCredentials

ListSqsCredentials: List existing SQS credentials in the specified region. The response contains only the metadata for the credentials, not the credentials themselves.

func (*SqsAPI) Regions

func (s *SqsAPI) Regions() []scw.Region

func (*SqsAPI) UpdateSqsCredentials

func (s *SqsAPI) UpdateSqsCredentials(req *SqsAPIUpdateSqsCredentialsRequest, opts ...scw.RequestOption) (*SqsCredentials, error)

UpdateSqsCredentials: Update a set of SQS credentials. You can update the credentials' name, or their permissions.

type SqsAPIActivateSqsRequest

type SqsAPIActivateSqsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ProjectID: project on which to activate the SQS service.
	ProjectID string `json:"project_id"`
}

SqsAPIActivateSqsRequest: sqs api activate sqs request.

type SqsAPICreateSqsCredentialsRequest

type SqsAPICreateSqsCredentialsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ProjectID: project containing the SQS credentials.
	ProjectID string `json:"project_id"`

	// Name: name of the credentials.
	Name string `json:"name"`

	// Permissions: permissions associated with these credentials.
	Permissions *SqsPermissions `json:"permissions,omitempty"`
}

SqsAPICreateSqsCredentialsRequest: sqs api create sqs credentials request.

type SqsAPIDeactivateSqsRequest

type SqsAPIDeactivateSqsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ProjectID: project on which to deactivate the SQS service.
	ProjectID string `json:"project_id"`
}

SqsAPIDeactivateSqsRequest: sqs api deactivate sqs request.

type SqsAPIDeleteSqsCredentialsRequest

type SqsAPIDeleteSqsCredentialsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// SqsCredentialsID: ID of the credentials to delete.
	SqsCredentialsID string `json:"-"`
}

SqsAPIDeleteSqsCredentialsRequest: sqs api delete sqs credentials request.

type SqsAPIGetSqsCredentialsRequest

type SqsAPIGetSqsCredentialsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// SqsCredentialsID: ID of the SQS credentials to get.
	SqsCredentialsID string `json:"-"`
}

SqsAPIGetSqsCredentialsRequest: sqs api get sqs credentials request.

type SqsAPIGetSqsInfoRequest

type SqsAPIGetSqsInfoRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ProjectID: project to retrieve SQS info from.
	ProjectID string `json:"project_id"`
}

SqsAPIGetSqsInfoRequest: sqs api get sqs info request.

type SqsAPIListSqsCredentialsRequest

type SqsAPIListSqsCredentialsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ProjectID: include only SQS credentials in this Project.
	ProjectID *string `json:"-"`

	// Page: page number to return.
	Page *int32 `json:"-"`

	// PageSize: maximum number of credentials to return per page.
	PageSize *uint32 `json:"-"`

	// OrderBy: order in which to return results.
	// Default value: created_at_asc
	OrderBy ListSqsCredentialsRequestOrderBy `json:"-"`
}

SqsAPIListSqsCredentialsRequest: sqs api list sqs credentials request.

type SqsAPIUpdateSqsCredentialsRequest

type SqsAPIUpdateSqsCredentialsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// SqsCredentialsID: ID of the SQS credentials to update.
	SqsCredentialsID string `json:"-"`

	// Name: name of the credentials.
	Name *string `json:"name,omitempty"`

	// Permissions: permissions associated with these credentials.
	Permissions *SqsPermissions `json:"permissions,omitempty"`
}

SqsAPIUpdateSqsCredentialsRequest: sqs api update sqs credentials request.

type SqsCredentials

type SqsCredentials struct {
	// ID: ID of the credentials.
	ID string `json:"id"`

	// Name: name of the credentials.
	Name string `json:"name"`

	// ProjectID: project ID of the Project containing the credentials.
	ProjectID string `json:"project_id"`

	// Region: region where the credentials exists.
	Region scw.Region `json:"region"`

	// CreatedAt: credentials creation date.
	CreatedAt *time.Time `json:"created_at"`

	// UpdatedAt: credentials last modification date.
	UpdatedAt *time.Time `json:"updated_at"`

	// AccessKey: access key ID.
	AccessKey string `json:"access_key"`

	// SecretKey: secret key ID (Only returned by **Create SQS Credentials** call).
	SecretKey string `json:"secret_key"`

	// SecretChecksum: checksum of the Secret key.
	SecretChecksum string `json:"secret_checksum"`

	// Permissions: permissions associated with these credentials.
	Permissions *SqsPermissions `json:"permissions"`
}

SqsCredentials: sqs credentials.

type SqsInfo

type SqsInfo struct {
	// ProjectID: project ID of the Project containing the service.
	ProjectID string `json:"project_id"`

	// Region: region of the service.
	Region scw.Region `json:"region"`

	// CreatedAt: sQS creation date.
	CreatedAt *time.Time `json:"created_at"`

	// UpdatedAt: sQS last modification date.
	UpdatedAt *time.Time `json:"updated_at"`

	// Status: sQS activation status.
	// Default value: unknown_status
	Status SqsInfoStatus `json:"status"`

	// SqsEndpointURL: endpoint of the SQS service for this region and project.
	SqsEndpointURL string `json:"sqs_endpoint_url"`
}

SqsInfo: sqs info.

type SqsInfoStatus

type SqsInfoStatus string

func (SqsInfoStatus) MarshalJSON

func (enum SqsInfoStatus) MarshalJSON() ([]byte, error)

func (SqsInfoStatus) String

func (enum SqsInfoStatus) String() string

func (*SqsInfoStatus) UnmarshalJSON

func (enum *SqsInfoStatus) UnmarshalJSON(data []byte) error

type SqsPermissions

type SqsPermissions struct {
	// CanPublish: defines whether the credentials bearer can publish messages to the service (send messages to SQS queues).
	CanPublish *bool `json:"can_publish"`

	// CanReceive: defines whether the credentials bearer can receive messages from SQS queues.
	CanReceive *bool `json:"can_receive"`

	// CanManage: defines whether the credentials bearer can manage the associated SQS queues.
	CanManage *bool `json:"can_manage"`
}

SqsPermissions: sqs permissions.

Jump to

Keyboard shortcuts

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