scf

package
v1.81.94 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SCF_FUNCTION_TYPE_EVENT = "Event"

	SCF_FUNCTION_STATUS_ACTIVE         = "Active"
	SCF_FUNCTION_STATUS_CREATING       = "Creating"
	SCF_FUNCTION_STATUS_CREATE_FAILED  = "CreateFailed"
	SCF_FUNCTION_STATUS_UPDATING       = "Updating"
	SCF_FUNCTION_STATUS_UPDATE_FAILED  = "UpdateFailed"
	SCF_FUNCTION_STATUS_PUBLISH_FAILED = "PublishFailed"

	SCF_SERVICE                  = "scf"
	SCF_FUNCTION_RESOURCE        = "lam"
	SCF_FUNCTION_RESOURCE_PREFIX = "namespace"

	SCF_TRIGGER_TYPE_COS         = "cos"
	SCF_TRIGGER_TYPE_CMQ         = "cmq"
	SCF_TRIGGER_TYPE_TIMER       = "timer"
	SCF_TRIGGER_TYPE_CKAFKA      = "ckafka"
	SCF_TRIGGER_TYPE_API_GATEWAY = "apigw"

	SCF_LOGS_ORDER_BY_FUNCTION_NAME = "function_name"
	SCF_LOGS_ORDER_BY_DERATION      = "duration"
	SCF_LOGS_ORDER_BY_MEM_USAGE     = "mem_usage"
	SCF_LOGS_ORDER_BY_START_TIME    = "start_time"

	SCF_LOGS_RET_CODE_NOT0                     = "not0"
	SCF_LOGS_RET_CODE_IS0                      = "is0"
	SCF_LOGS_RET_CODE_TIME_LIMIT_EXECEEDED     = "TimeLimitExceeded"
	SCF_LOGS_RET_CODE_RESOURCE_LIMIT_EXECEEDED = "ResourceLimitExceeded"
	SCF_LOGS_RET_CODE_USER_CODE_EXCEPTION      = "UserCodeException"

	SCF_LOGS_DESCRIBE_TIME_FORMAT = "2006-01-02 15:04:05"

	SCF_LOGS_ORDER_DESC = "desc"
	SCF_LOGS_ORDER_ASC  = "asc"

	SCF_FUNCTION_DESCRIBE_LIMIT  = 20
	SCF_NAMESPACE_DESCRIBE_LIMIT = 20

	SCF_FUNCTION_OPEN  = "TRUE"
	SCF_FUNCTION_CLOSE = "FALSE"
)

Variables

View Source
var (
	SCF_FUNCTIONS_NOT_FOUND_SET = []string{
		"ResourceNotFound.Function",
		"ResourceNotFound.FunctionName",
		"InvalidParameterValue.FunctionName",
		"ResourceNotFound.Namespace",
	}

	SCF_TRIGGER_TYPES = []string{
		SCF_TRIGGER_TYPE_COS,
		SCF_TRIGGER_TYPE_CMQ,
		SCF_TRIGGER_TYPE_TIMER,
		SCF_TRIGGER_TYPE_CKAFKA,
		SCF_TRIGGER_TYPE_API_GATEWAY,
	}

	SCF_LOGS_ORDERS = []string{
		SCF_LOGS_ORDER_DESC,
		SCF_LOGS_ORDER_ASC,
	}

	SCF_LOGS_ORDER_BY = []string{
		SCF_LOGS_ORDER_BY_FUNCTION_NAME,
		SCF_LOGS_ORDER_BY_DERATION,
		SCF_LOGS_ORDER_BY_MEM_USAGE,
		SCF_LOGS_ORDER_BY_START_TIME,
	}

	SCF_LOGS_RET_CODES = []string{
		SCF_LOGS_RET_CODE_NOT0,
		SCF_LOGS_RET_CODE_IS0,
		SCF_LOGS_RET_CODE_TIME_LIMIT_EXECEEDED,
		SCF_LOGS_RET_CODE_RESOURCE_LIMIT_EXECEEDED,
		SCF_LOGS_RET_CODE_USER_CODE_EXCEPTION,
	}
)

Functions

func DataSourceTencentCloudScfAccountInfo

func DataSourceTencentCloudScfAccountInfo() *schema.Resource

func DataSourceTencentCloudScfAsyncEventManagement

func DataSourceTencentCloudScfAsyncEventManagement() *schema.Resource

func DataSourceTencentCloudScfAsyncEventStatus

func DataSourceTencentCloudScfAsyncEventStatus() *schema.Resource

func DataSourceTencentCloudScfFunctionAddress

func DataSourceTencentCloudScfFunctionAddress() *schema.Resource

func DataSourceTencentCloudScfFunctionAliases

func DataSourceTencentCloudScfFunctionAliases() *schema.Resource

func DataSourceTencentCloudScfFunctionVersions

func DataSourceTencentCloudScfFunctionVersions() *schema.Resource

func DataSourceTencentCloudScfFunctions

func DataSourceTencentCloudScfFunctions() *schema.Resource

func DataSourceTencentCloudScfLayerVersions

func DataSourceTencentCloudScfLayerVersions() *schema.Resource

func DataSourceTencentCloudScfLayers

func DataSourceTencentCloudScfLayers() *schema.Resource

func DataSourceTencentCloudScfLogs

func DataSourceTencentCloudScfLogs() *schema.Resource

func DataSourceTencentCloudScfNamespaces

func DataSourceTencentCloudScfNamespaces() *schema.Resource

func DataSourceTencentCloudScfRequestStatus

func DataSourceTencentCloudScfRequestStatus() *schema.Resource

func DataSourceTencentCloudScfTriggers

func DataSourceTencentCloudScfTriggers() *schema.Resource

func LayerContent

func LayerContent() map[string]*schema.Schema

func ResourceTencentCloudScfFunction

func ResourceTencentCloudScfFunction() *schema.Resource

func ResourceTencentCloudScfFunctionAlias

func ResourceTencentCloudScfFunctionAlias() *schema.Resource

func ResourceTencentCloudScfFunctionEventInvokeConfig

func ResourceTencentCloudScfFunctionEventInvokeConfig() *schema.Resource

func ResourceTencentCloudScfFunctionVersion

func ResourceTencentCloudScfFunctionVersion() *schema.Resource

func ResourceTencentCloudScfInvokeFunction

func ResourceTencentCloudScfInvokeFunction() *schema.Resource

func ResourceTencentCloudScfLayer

func ResourceTencentCloudScfLayer() *schema.Resource

func ResourceTencentCloudScfNamespace

func ResourceTencentCloudScfNamespace() *schema.Resource

func ResourceTencentCloudScfProvisionedConcurrencyConfig

func ResourceTencentCloudScfProvisionedConcurrencyConfig() *schema.Resource

func ResourceTencentCloudScfReservedConcurrencyConfig

func ResourceTencentCloudScfReservedConcurrencyConfig() *schema.Resource

func ResourceTencentCloudScfSyncInvokeFunction

func ResourceTencentCloudScfSyncInvokeFunction() *schema.Resource

func ResourceTencentCloudScfTerminateAsyncEvent

func ResourceTencentCloudScfTerminateAsyncEvent() *schema.Resource

func ResourceTencentCloudScfTriggerConfig

func ResourceTencentCloudScfTriggerConfig() *schema.Resource

Types

type ScfService

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

func NewScfService

func NewScfService(client *connectivity.TencentCloudClient) ScfService

func (*ScfService) CreateFunction

func (me *ScfService) CreateFunction(ctx context.Context, info scfFunctionInfo) error

func (*ScfService) CreateNamespace

func (me *ScfService) CreateNamespace(ctx context.Context, namespace, desc string) error

func (*ScfService) CreateTriggers

func (me *ScfService) CreateTriggers(ctx context.Context, functionName, namespace string, triggers []scfTrigger) error

func (*ScfService) DeleteFunction

func (me *ScfService) DeleteFunction(ctx context.Context, name, namespace string) error

func (*ScfService) DeleteNamespace

func (me *ScfService) DeleteNamespace(ctx context.Context, namespace string) error

func (*ScfService) DeleteScfFunctionAliasById

func (me *ScfService) DeleteScfFunctionAliasById(ctx context.Context, namespace string, functionName string, name string) (errRet error)

func (*ScfService) DeleteScfFunctionVersionById

func (me *ScfService) DeleteScfFunctionVersionById(ctx context.Context, functionName string, namespace string, functionVersion string) (errRet error)

func (*ScfService) DeleteScfProvisionedConcurrencyConfigById

func (me *ScfService) DeleteScfProvisionedConcurrencyConfigById(ctx context.Context, functionName string, qualifier string, namespace string) (errRet error)

func (*ScfService) DeleteScfReservedConcurrencyConfigById

func (me *ScfService) DeleteScfReservedConcurrencyConfigById(ctx context.Context, namespace string, functionName string) (errRet error)

func (*ScfService) DeleteTriggers

func (me *ScfService) DeleteTriggers(ctx context.Context, functionName, namespace string, triggers []scfTrigger) error

func (*ScfService) DescribeFunction

func (me *ScfService) DescribeFunction(ctx context.Context, name, namespace string, functionId ...string) (resp *scf.GetFunctionResponse, err error)

func (*ScfService) DescribeFunctions

func (me *ScfService) DescribeFunctions(ctx context.Context, name, namespace, desc *string, tags map[string]string) (functions []*scf.Function, err error)

func (*ScfService) DescribeLogs

func (me *ScfService) DescribeLogs(
	ctx context.Context,
	fnName, namespace, order, orderBy string,
	offset, limit int,
	retCode, invokeRequestId, startTime, endTime *string,
) (logs []*scf.FunctionLog, err error)

func (*ScfService) DescribeNamespace

func (me *ScfService) DescribeNamespace(ctx context.Context, namespace string) (ns *scf.Namespace, err error)

func (*ScfService) DescribeNamespaces

func (me *ScfService) DescribeNamespaces(ctx context.Context) (nss []*scf.Namespace, err error)

func (*ScfService) DescribeScfAccountInfo

func (me *ScfService) DescribeScfAccountInfo(ctx context.Context) (accountInfo *scf.GetAccountResponseParams, errRet error)

func (*ScfService) DescribeScfAsyncEventManagementByFilter

func (me *ScfService) DescribeScfAsyncEventManagementByFilter(ctx context.Context, param map[string]interface{}) (AsyncEventManagement []*scf.AsyncEvent, errRet error)

func (*ScfService) DescribeScfAsyncEventStatus

func (me *ScfService) DescribeScfAsyncEventStatus(ctx context.Context, param map[string]interface{}) (asyncEventStatus *scf.AsyncEventStatus, errRet error)

func (*ScfService) DescribeScfFunctionAddress

func (me *ScfService) DescribeScfFunctionAddress(ctx context.Context, param map[string]interface{}) (functionAddress *scf.GetFunctionAddressResponseParams, errRet error)

func (*ScfService) DescribeScfFunctionAliasById

func (me *ScfService) DescribeScfFunctionAliasById(ctx context.Context, namespace string, functionName string, name string) (functionAlias *scf.GetAliasResponse, errRet error)

func (*ScfService) DescribeScfFunctionAliasesByFilter

func (me *ScfService) DescribeScfFunctionAliasesByFilter(ctx context.Context, param map[string]interface{}) (FunctionAliases []*scf.Alias, errRet error)

func (*ScfService) DescribeScfFunctionEventInvokeConfigById

func (me *ScfService) DescribeScfFunctionEventInvokeConfigById(ctx context.Context, namespace string, functionName string) (FunctionEventInvokeConfig *scf.AsyncTriggerConfig, errRet error)

func (*ScfService) DescribeScfFunctionVersionById

func (me *ScfService) DescribeScfFunctionVersionById(ctx context.Context, functionName string, namespace string, functionVersion string) (FunctionVersion *scf.GetFunctionResponse, errRet error)

func (*ScfService) DescribeScfFunctionVersionsByFilter

func (me *ScfService) DescribeScfFunctionVersionsByFilter(ctx context.Context, param map[string]interface{}) (functionVersions []*scf.FunctionVersion, errRet error)

func (*ScfService) DescribeScfLayerVersions

func (me *ScfService) DescribeScfLayerVersions(ctx context.Context, param map[string]interface{}) (layerVersions []*scf.LayerVersionInfo, errRet error)

func (*ScfService) DescribeScfLayersByFilter

func (me *ScfService) DescribeScfLayersByFilter(ctx context.Context, param map[string]interface{}) (layers []*scf.LayerVersionInfo, errRet error)

func (*ScfService) DescribeScfProvisionedConcurrencyConfigById

func (me *ScfService) DescribeScfProvisionedConcurrencyConfigById(ctx context.Context, functionName string, qualifier string, namespace string) (provisionedConcurrencyConfig *scf.VersionProvisionedConcurrencyInfo, errRet error)

func (*ScfService) DescribeScfRequestStatusByFilter

func (me *ScfService) DescribeScfRequestStatusByFilter(ctx context.Context, param map[string]interface{}) (requestStatus []*scf.RequestStatus, errRet error)

func (*ScfService) DescribeScfReservedConcurrencyConfigById

func (me *ScfService) DescribeScfReservedConcurrencyConfigById(ctx context.Context, namespace string, functionName string) (reservedConcurrencyConfig *scf.GetReservedConcurrencyConfigResponse, errRet error)

func (*ScfService) DescribeScfTriggerConfigById

func (me *ScfService) DescribeScfTriggerConfigById(ctx context.Context, functionName string, namespace string, triggerName string) (triggerConfig *scf.TriggerInfo, errRet error)

func (*ScfService) DescribeScfTriggersByFilter

func (me *ScfService) DescribeScfTriggersByFilter(ctx context.Context, param map[string]interface{}) (Triggers []*scf.TriggerInfo, errRet error)

func (*ScfService) ModifyFunctionCode

func (me *ScfService) ModifyFunctionCode(ctx context.Context, info scfFunctionInfo) error

func (*ScfService) ModifyFunctionConfig

func (me *ScfService) ModifyFunctionConfig(ctx context.Context, info scfFunctionInfo) error

func (*ScfService) ModifyNamespace

func (me *ScfService) ModifyNamespace(ctx context.Context, namespace, desc string) error

type TriggerDesc

type TriggerDesc struct {
	Cron string `json:"cron"`
}

Jump to

Keyboard shortcuts

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