v20200819

package
v3.0.696+incompatible Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// COS exception.
	INTERNALERROR_INTERNALCOSERROR = "InternalError.InternalCOSError"

	// Database service exception.
	INTERNALERROR_INTERNALDBERROR = "InternalError.InternalDBError"

	// Encryption service exception.
	INTERNALERROR_INTERNALENCRYPTERROR = "InternalError.InternalEncryptError"

	// Format of the sender name is incorrect.
	INVALIDPARAMETER_INVALIDFROMNAMEMALFORMED = "InvalidParameter.InvalidFromNameMalformed"

	// Format of the HTML email body is incorrect.
	INVALIDPARAMETER_INVALIDHTMLCONTENTMALFORMED = "InvalidParameter.InvalidHtmlContentMalformed"

	// Format of the email address is incorrect.
	INVALIDPARAMETER_INVALIDMAILADDRESSNAMEMALFORMED = "InvalidParameter.InvalidMailAddressNameMalformed"

	// Format of the email body is incorrect.
	INVALIDPARAMETER_INVALIDMAILCONTENTMALFORMED = "InvalidParameter.InvalidMailContentMalformed"

	// Format of the recipient address is incorrect.
	INVALIDPARAMETER_INVALIDRECEIVERNAMEMALFORMED = "InvalidParameter.InvalidReceiverNameMalformed"

	// Format of the summary is incorrect.
	INVALIDPARAMETER_INVALIDSUBJECTMALFORMED = "InvalidParameter.InvalidSubjectMalformed"

	// Format of the email task name is incorrect.
	INVALIDPARAMETER_INVALIDTASKNAMEMALFORMED = "InvalidParameter.InvalidTaskNameMalformed"

	// Format of the email body set in the template is incorrect.
	INVALIDPARAMETER_INVALIDTEMPLATECONTENTMALFORMED = "InvalidParameter.InvalidTemplateContentMalformed"

	// Format of the template name is incorrect.
	INVALIDPARAMETER_INVALIDTEMPLATENAMEMALFORMED = "InvalidParameter.InvalidTemplateNameMalformed"

	// Format of the template variable values is incorrect.
	INVALIDPARAMETER_INVALIDTEMPLATEVALUEMALFORMED = "InvalidParameter.InvalidTemplateValueMalformed"

	// Format of the plain-text email body is incorrect.
	INVALIDPARAMETER_INVALIDTEXTCONTENTMALFORMED = "InvalidParameter.InvalidTextContentMalformed"

	// The email task name already exists.
	RESOURCEINUSE_INVALIDTASKNAMEDUPLICATE = "ResourceInUse.InvalidTaskNameDuplicate"

	// The email address does not exist.
	RESOURCENOTFOUND_INVALIDMAILADDRESSNOTFOUND = "ResourceNotFound.InvalidMailAddressNotFound"

	// The recipient address does not exist.
	RESOURCENOTFOUND_INVALIDRECEIVERNOTFOUND = "ResourceNotFound.InvalidReceiverNotFound"

	// The reply-to address does not exist.
	RESOURCENOTFOUND_INVALIDREPLYNOTFOUND = "ResourceNotFound.InvalidReplyNotFound"

	// The email task does not exist.
	RESOURCENOTFOUND_INVALIDTASKNAMENOTFOUND = "ResourceNotFound.InvalidTaskNameNotFound"

	// The template does not exist.
	RESOURCENOTFOUND_INVALIDTEMPLATENOTFOUND = "ResourceNotFound.InvalidTemplateNotFound"
)
View Source
const APIVersion = "2020-08-19"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	common.Client
}

func NewClient

func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error)

func NewClientWithSecretId

func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error)

Deprecated

func (*Client) SendEmail

func (c *Client) SendEmail(request *SendEmailRequest) (response *SendEmailResponse, err error)

SendEmail This API is used to send regular emails.

error code that may be returned:

INTERNALERROR_INTERNALCOSERROR = "InternalError.InternalCOSError"
INTERNALERROR_INTERNALDBERROR = "InternalError.InternalDBError"
INTERNALERROR_INTERNALENCRYPTERROR = "InternalError.InternalEncryptError"
INVALIDPARAMETER_INVALIDFROMNAMEMALFORMED = "InvalidParameter.InvalidFromNameMalformed"
INVALIDPARAMETER_INVALIDHTMLCONTENTMALFORMED = "InvalidParameter.InvalidHtmlContentMalformed"
INVALIDPARAMETER_INVALIDMAILADDRESSNAMEMALFORMED = "InvalidParameter.InvalidMailAddressNameMalformed"
INVALIDPARAMETER_INVALIDMAILCONTENTMALFORMED = "InvalidParameter.InvalidMailContentMalformed"
INVALIDPARAMETER_INVALIDRECEIVERNAMEMALFORMED = "InvalidParameter.InvalidReceiverNameMalformed"
INVALIDPARAMETER_INVALIDSUBJECTMALFORMED = "InvalidParameter.InvalidSubjectMalformed"
INVALIDPARAMETER_INVALIDTASKNAMEMALFORMED = "InvalidParameter.InvalidTaskNameMalformed"
INVALIDPARAMETER_INVALIDTEXTCONTENTMALFORMED = "InvalidParameter.InvalidTextContentMalformed"
RESOURCEINUSE_INVALIDTASKNAMEDUPLICATE = "ResourceInUse.InvalidTaskNameDuplicate"
RESOURCENOTFOUND_INVALIDMAILADDRESSNOTFOUND = "ResourceNotFound.InvalidMailAddressNotFound"
RESOURCENOTFOUND_INVALIDRECEIVERNOTFOUND = "ResourceNotFound.InvalidReceiverNotFound"
RESOURCENOTFOUND_INVALIDREPLYNOTFOUND = "ResourceNotFound.InvalidReplyNotFound"
RESOURCENOTFOUND_INVALIDTASKNAMENOTFOUND = "ResourceNotFound.InvalidTaskNameNotFound"

func (*Client) SendEmailWithContext

func (c *Client) SendEmailWithContext(ctx context.Context, request *SendEmailRequest) (response *SendEmailResponse, err error)

SendEmail This API is used to send regular emails.

error code that may be returned:

INTERNALERROR_INTERNALCOSERROR = "InternalError.InternalCOSError"
INTERNALERROR_INTERNALDBERROR = "InternalError.InternalDBError"
INTERNALERROR_INTERNALENCRYPTERROR = "InternalError.InternalEncryptError"
INVALIDPARAMETER_INVALIDFROMNAMEMALFORMED = "InvalidParameter.InvalidFromNameMalformed"
INVALIDPARAMETER_INVALIDHTMLCONTENTMALFORMED = "InvalidParameter.InvalidHtmlContentMalformed"
INVALIDPARAMETER_INVALIDMAILADDRESSNAMEMALFORMED = "InvalidParameter.InvalidMailAddressNameMalformed"
INVALIDPARAMETER_INVALIDMAILCONTENTMALFORMED = "InvalidParameter.InvalidMailContentMalformed"
INVALIDPARAMETER_INVALIDRECEIVERNAMEMALFORMED = "InvalidParameter.InvalidReceiverNameMalformed"
INVALIDPARAMETER_INVALIDSUBJECTMALFORMED = "InvalidParameter.InvalidSubjectMalformed"
INVALIDPARAMETER_INVALIDTASKNAMEMALFORMED = "InvalidParameter.InvalidTaskNameMalformed"
INVALIDPARAMETER_INVALIDTEXTCONTENTMALFORMED = "InvalidParameter.InvalidTextContentMalformed"
RESOURCEINUSE_INVALIDTASKNAMEDUPLICATE = "ResourceInUse.InvalidTaskNameDuplicate"
RESOURCENOTFOUND_INVALIDMAILADDRESSNOTFOUND = "ResourceNotFound.InvalidMailAddressNotFound"
RESOURCENOTFOUND_INVALIDRECEIVERNOTFOUND = "ResourceNotFound.InvalidReceiverNotFound"
RESOURCENOTFOUND_INVALIDREPLYNOTFOUND = "ResourceNotFound.InvalidReplyNotFound"
RESOURCENOTFOUND_INVALIDTASKNAMENOTFOUND = "ResourceNotFound.InvalidTaskNameNotFound"

func (*Client) SendTemplatedEmail

func (c *Client) SendTemplatedEmail(request *SendTemplatedEmailRequest) (response *SendTemplatedEmailResponse, err error)

SendTemplatedEmail This API is used to send template emails.

error code that may be returned:

INTERNALERROR_INTERNALCOSERROR = "InternalError.InternalCOSError"
INTERNALERROR_INTERNALDBERROR = "InternalError.InternalDBError"
INTERNALERROR_INTERNALENCRYPTERROR = "InternalError.InternalEncryptError"
INVALIDPARAMETER_INVALIDFROMNAMEMALFORMED = "InvalidParameter.InvalidFromNameMalformed"
INVALIDPARAMETER_INVALIDHTMLCONTENTMALFORMED = "InvalidParameter.InvalidHtmlContentMalformed"
INVALIDPARAMETER_INVALIDMAILADDRESSNAMEMALFORMED = "InvalidParameter.InvalidMailAddressNameMalformed"
INVALIDPARAMETER_INVALIDMAILCONTENTMALFORMED = "InvalidParameter.InvalidMailContentMalformed"
INVALIDPARAMETER_INVALIDRECEIVERNAMEMALFORMED = "InvalidParameter.InvalidReceiverNameMalformed"
INVALIDPARAMETER_INVALIDSUBJECTMALFORMED = "InvalidParameter.InvalidSubjectMalformed"
INVALIDPARAMETER_INVALIDTASKNAMEMALFORMED = "InvalidParameter.InvalidTaskNameMalformed"
INVALIDPARAMETER_INVALIDTEMPLATECONTENTMALFORMED = "InvalidParameter.InvalidTemplateContentMalformed"
INVALIDPARAMETER_INVALIDTEMPLATENAMEMALFORMED = "InvalidParameter.InvalidTemplateNameMalformed"
INVALIDPARAMETER_INVALIDTEMPLATEVALUEMALFORMED = "InvalidParameter.InvalidTemplateValueMalformed"
INVALIDPARAMETER_INVALIDTEXTCONTENTMALFORMED = "InvalidParameter.InvalidTextContentMalformed"
RESOURCEINUSE_INVALIDTASKNAMEDUPLICATE = "ResourceInUse.InvalidTaskNameDuplicate"
RESOURCENOTFOUND_INVALIDMAILADDRESSNOTFOUND = "ResourceNotFound.InvalidMailAddressNotFound"
RESOURCENOTFOUND_INVALIDRECEIVERNOTFOUND = "ResourceNotFound.InvalidReceiverNotFound"
RESOURCENOTFOUND_INVALIDREPLYNOTFOUND = "ResourceNotFound.InvalidReplyNotFound"
RESOURCENOTFOUND_INVALIDTASKNAMENOTFOUND = "ResourceNotFound.InvalidTaskNameNotFound"
RESOURCENOTFOUND_INVALIDTEMPLATENOTFOUND = "ResourceNotFound.InvalidTemplateNotFound"

func (*Client) SendTemplatedEmailWithContext

func (c *Client) SendTemplatedEmailWithContext(ctx context.Context, request *SendTemplatedEmailRequest) (response *SendTemplatedEmailResponse, err error)

SendTemplatedEmail This API is used to send template emails.

error code that may be returned:

INTERNALERROR_INTERNALCOSERROR = "InternalError.InternalCOSError"
INTERNALERROR_INTERNALDBERROR = "InternalError.InternalDBError"
INTERNALERROR_INTERNALENCRYPTERROR = "InternalError.InternalEncryptError"
INVALIDPARAMETER_INVALIDFROMNAMEMALFORMED = "InvalidParameter.InvalidFromNameMalformed"
INVALIDPARAMETER_INVALIDHTMLCONTENTMALFORMED = "InvalidParameter.InvalidHtmlContentMalformed"
INVALIDPARAMETER_INVALIDMAILADDRESSNAMEMALFORMED = "InvalidParameter.InvalidMailAddressNameMalformed"
INVALIDPARAMETER_INVALIDMAILCONTENTMALFORMED = "InvalidParameter.InvalidMailContentMalformed"
INVALIDPARAMETER_INVALIDRECEIVERNAMEMALFORMED = "InvalidParameter.InvalidReceiverNameMalformed"
INVALIDPARAMETER_INVALIDSUBJECTMALFORMED = "InvalidParameter.InvalidSubjectMalformed"
INVALIDPARAMETER_INVALIDTASKNAMEMALFORMED = "InvalidParameter.InvalidTaskNameMalformed"
INVALIDPARAMETER_INVALIDTEMPLATECONTENTMALFORMED = "InvalidParameter.InvalidTemplateContentMalformed"
INVALIDPARAMETER_INVALIDTEMPLATENAMEMALFORMED = "InvalidParameter.InvalidTemplateNameMalformed"
INVALIDPARAMETER_INVALIDTEMPLATEVALUEMALFORMED = "InvalidParameter.InvalidTemplateValueMalformed"
INVALIDPARAMETER_INVALIDTEXTCONTENTMALFORMED = "InvalidParameter.InvalidTextContentMalformed"
RESOURCEINUSE_INVALIDTASKNAMEDUPLICATE = "ResourceInUse.InvalidTaskNameDuplicate"
RESOURCENOTFOUND_INVALIDMAILADDRESSNOTFOUND = "ResourceNotFound.InvalidMailAddressNotFound"
RESOURCENOTFOUND_INVALIDRECEIVERNOTFOUND = "ResourceNotFound.InvalidReceiverNotFound"
RESOURCENOTFOUND_INVALIDREPLYNOTFOUND = "ResourceNotFound.InvalidReplyNotFound"
RESOURCENOTFOUND_INVALIDTASKNAMENOTFOUND = "ResourceNotFound.InvalidTaskNameNotFound"
RESOURCENOTFOUND_INVALIDTEMPLATENOTFOUND = "ResourceNotFound.InvalidTemplateNotFound"

type SendEmailRequest

type SendEmailRequest struct {
	*tchttp.BaseRequest

	// Sender
	FromAddress *string `json:"FromAddress,omitempty" name:"FromAddress"`

	// Recipient
	ToAddress *string `json:"ToAddress,omitempty" name:"ToAddress"`

	// Email summary
	Subject *string `json:"Subject,omitempty" name:"Subject"`

	// Sender name
	FromName *string `json:"FromName,omitempty" name:"FromName"`

	// Reply-to address
	ReplyAddress *string `json:"ReplyAddress,omitempty" name:"ReplyAddress"`

	// The body of an HTML email
	HtmlContent *string `json:"HtmlContent,omitempty" name:"HtmlContent"`

	// The body of a plain-text email
	TextContent *string `json:"TextContent,omitempty" name:"TextContent"`
}

func NewSendEmailRequest

func NewSendEmailRequest() (request *SendEmailRequest)

func (*SendEmailRequest) FromJsonString

func (r *SendEmailRequest) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*SendEmailRequest) ToJsonString

func (r *SendEmailRequest) ToJsonString() string

type SendEmailRequestParams

type SendEmailRequestParams struct {
	// Sender
	FromAddress *string `json:"FromAddress,omitempty" name:"FromAddress"`

	// Recipient
	ToAddress *string `json:"ToAddress,omitempty" name:"ToAddress"`

	// Email summary
	Subject *string `json:"Subject,omitempty" name:"Subject"`

	// Sender name
	FromName *string `json:"FromName,omitempty" name:"FromName"`

	// Reply-to address
	ReplyAddress *string `json:"ReplyAddress,omitempty" name:"ReplyAddress"`

	// The body of an HTML email
	HtmlContent *string `json:"HtmlContent,omitempty" name:"HtmlContent"`

	// The body of a plain-text email
	TextContent *string `json:"TextContent,omitempty" name:"TextContent"`
}

Predefined struct for user

type SendEmailResponse

type SendEmailResponse struct {
	*tchttp.BaseResponse
	Response *SendEmailResponseParams `json:"Response"`
}

func NewSendEmailResponse

func NewSendEmailResponse() (response *SendEmailResponse)

func (*SendEmailResponse) FromJsonString

func (r *SendEmailResponse) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*SendEmailResponse) ToJsonString

func (r *SendEmailResponse) ToJsonString() string

type SendEmailResponseParams

type SendEmailResponseParams struct {
	// The result of creating an email task
	Result *bool `json:"Result,omitempty" name:"Result"`

	// The unique request ID, which is returned for each request. RequestId is required for locating a problem.
	RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}

Predefined struct for user

type SendTemplatedEmailRequest

type SendTemplatedEmailRequest struct {
	*tchttp.BaseRequest

	// Sender address.
	FromAddress *string `json:"FromAddress,omitempty" name:"FromAddress"`

	// Recipient address. Up to 100 recipient addresses are supported. Multiple addresses should be separated by semicolons (;).
	ToAddress *string `json:"ToAddress,omitempty" name:"ToAddress"`

	// The name of the template created in advance.
	TemplateName *string `json:"TemplateName,omitempty" name:"TemplateName"`

	// Template variable value, which is a JSON string.
	TemplateValue *string `json:"TemplateValue,omitempty" name:"TemplateValue"`

	// Sender name.
	FromName *string `json:"FromName,omitempty" name:"FromName"`

	// Reply-to address.
	ReplyAddress *string `json:"ReplyAddress,omitempty" name:"ReplyAddress"`
}

func NewSendTemplatedEmailRequest

func NewSendTemplatedEmailRequest() (request *SendTemplatedEmailRequest)

func (*SendTemplatedEmailRequest) FromJsonString

func (r *SendTemplatedEmailRequest) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*SendTemplatedEmailRequest) ToJsonString

func (r *SendTemplatedEmailRequest) ToJsonString() string

type SendTemplatedEmailRequestParams

type SendTemplatedEmailRequestParams struct {
	// Sender address.
	FromAddress *string `json:"FromAddress,omitempty" name:"FromAddress"`

	// Recipient address. Up to 100 recipient addresses are supported. Multiple addresses should be separated by semicolons (;).
	ToAddress *string `json:"ToAddress,omitempty" name:"ToAddress"`

	// The name of the template created in advance.
	TemplateName *string `json:"TemplateName,omitempty" name:"TemplateName"`

	// Template variable value, which is a JSON string.
	TemplateValue *string `json:"TemplateValue,omitempty" name:"TemplateValue"`

	// Sender name.
	FromName *string `json:"FromName,omitempty" name:"FromName"`

	// Reply-to address.
	ReplyAddress *string `json:"ReplyAddress,omitempty" name:"ReplyAddress"`
}

Predefined struct for user

type SendTemplatedEmailResponse

type SendTemplatedEmailResponse struct {
	*tchttp.BaseResponse
	Response *SendTemplatedEmailResponseParams `json:"Response"`
}

func NewSendTemplatedEmailResponse

func NewSendTemplatedEmailResponse() (response *SendTemplatedEmailResponse)

func (*SendTemplatedEmailResponse) FromJsonString

func (r *SendTemplatedEmailResponse) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*SendTemplatedEmailResponse) ToJsonString

func (r *SendTemplatedEmailResponse) ToJsonString() string

type SendTemplatedEmailResponseParams

type SendTemplatedEmailResponseParams struct {
	// The result of creating a template email task
	Result *bool `json:"Result,omitempty" name:"Result"`

	// The unique request ID, which is returned for each request. RequestId is required for locating a problem.
	RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}

Predefined struct for user

Jump to

Keyboard shortcuts

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