Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) CreatePurgeTask(request *CreatePurgeTaskRequest) (response *CreatePurgeTaskResponse, err error)
- func (c *Client) CreatePurgeTaskWithContext(ctx context.Context, request *CreatePurgeTaskRequest) (response *CreatePurgeTaskResponse, err error)
- func (c *Client) DescribePurgeTasks(request *DescribePurgeTasksRequest) (response *DescribePurgeTasksResponse, err error)
- func (c *Client) DescribePurgeTasksWithContext(ctx context.Context, request *DescribePurgeTasksRequest) (response *DescribePurgeTasksResponse, err error)
- func (c *Client) DescribeZones(request *DescribeZonesRequest) (response *DescribeZonesResponse, err error)
- func (c *Client) DescribeZonesWithContext(ctx context.Context, request *DescribeZonesRequest) (response *DescribeZonesResponse, err error)
- type CreatePurgeTaskRequest
- type CreatePurgeTaskResponse
- type DescribePurgeTasksRequest
- type DescribePurgeTasksResponse
- type DescribeZonesRequest
- type DescribeZonesResponse
- type FailReason
- type Task
- type Zone
- type ZoneFilter
Constants ¶
const ( // Internal error. INTERNALERROR = "InternalError" // Server error. INTERNALERROR_BACKENDERROR = "InternalError.BackendError" // Failed to get configuration INTERNALERROR_DOMAINCONFIG = "InternalError.DomainConfig" // Server error. INTERNALERROR_QUOTASYSTEM = "InternalError.QuotaSystem" // The domain name does not exist or not belong to this account. INVALIDPARAMETER_DOMAINNOTFOUND = "InvalidParameter.DomainNotFound" // Invalid parameter INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError" // Resource error INVALIDPARAMETER_TARGET = "InvalidParameter.Target" // Failed to create the task INVALIDPARAMETER_TASKNOTGENERATED = "InvalidParameter.TaskNotGenerated" // Invalid file upload link. INVALIDPARAMETER_UPLOADURL = "InvalidParameter.UploadUrl" // Reached the upper limit of resource number LIMITEXCEEDED_BATCHQUOTA = "LimitExceeded.BatchQuota" // Reached the daily upper limit of resource number LIMITEXCEEDED_DAILYQUOTA = "LimitExceeded.DailyQuota" // CAM is not authorized. UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized" // The sub-account is not authorized for the operation. Please add permissions first. UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission" )
const APIVersion = "2022-01-06"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewClient ¶
func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error)
func NewClientWithSecretId ¶
Deprecated
func (*Client) CreatePurgeTask ¶
func (c *Client) CreatePurgeTask(request *CreatePurgeTaskRequest) (response *CreatePurgeTaskResponse, err error)
CreatePurgeTask This API is used to create a cache purging task.
error code that may be returned:
INTERNALERROR_BACKENDERROR = "InternalError.BackendError" INTERNALERROR_DOMAINCONFIG = "InternalError.DomainConfig" INTERNALERROR_QUOTASYSTEM = "InternalError.QuotaSystem" INVALIDPARAMETER_DOMAINNOTFOUND = "InvalidParameter.DomainNotFound" INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError" INVALIDPARAMETER_TARGET = "InvalidParameter.Target" INVALIDPARAMETER_TASKNOTGENERATED = "InvalidParameter.TaskNotGenerated" INVALIDPARAMETER_UPLOADURL = "InvalidParameter.UploadUrl" LIMITEXCEEDED_BATCHQUOTA = "LimitExceeded.BatchQuota" LIMITEXCEEDED_DAILYQUOTA = "LimitExceeded.DailyQuota"
func (*Client) CreatePurgeTaskWithContext ¶
func (c *Client) CreatePurgeTaskWithContext(ctx context.Context, request *CreatePurgeTaskRequest) (response *CreatePurgeTaskResponse, err error)
CreatePurgeTask This API is used to create a cache purging task.
error code that may be returned:
INTERNALERROR_BACKENDERROR = "InternalError.BackendError" INTERNALERROR_DOMAINCONFIG = "InternalError.DomainConfig" INTERNALERROR_QUOTASYSTEM = "InternalError.QuotaSystem" INVALIDPARAMETER_DOMAINNOTFOUND = "InvalidParameter.DomainNotFound" INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError" INVALIDPARAMETER_TARGET = "InvalidParameter.Target" INVALIDPARAMETER_TASKNOTGENERATED = "InvalidParameter.TaskNotGenerated" INVALIDPARAMETER_UPLOADURL = "InvalidParameter.UploadUrl" LIMITEXCEEDED_BATCHQUOTA = "LimitExceeded.BatchQuota" LIMITEXCEEDED_DAILYQUOTA = "LimitExceeded.DailyQuota"
func (*Client) DescribePurgeTasks ¶
func (c *Client) DescribePurgeTasks(request *DescribePurgeTasksRequest) (response *DescribePurgeTasksResponse, err error)
DescribePurgeTasks This API is used to query the cache purging history.
error code that may be returned:
INTERNALERROR = "InternalError" INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
func (*Client) DescribePurgeTasksWithContext ¶
func (c *Client) DescribePurgeTasksWithContext(ctx context.Context, request *DescribePurgeTasksRequest) (response *DescribePurgeTasksResponse, err error)
DescribePurgeTasks This API is used to query the cache purging history.
error code that may be returned:
INTERNALERROR = "InternalError" INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
func (*Client) DescribeZones ¶
func (c *Client) DescribeZones(request *DescribeZonesRequest) (response *DescribeZonesResponse, err error)
DescribeZones This API is used to query the list of user sites.
error code that may be returned:
UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized" UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
func (*Client) DescribeZonesWithContext ¶
func (c *Client) DescribeZonesWithContext(ctx context.Context, request *DescribeZonesRequest) (response *DescribeZonesResponse, err error)
DescribeZones This API is used to query the list of user sites.
error code that may be returned:
UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized" UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
type CreatePurgeTaskRequest ¶
type CreatePurgeTaskRequest struct { *tchttp.BaseRequest // ID of the site ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"` // Type of the purging task. Values: // - `purge_url`: Purge by the URL // - `purge_prefix`: Purge by the prefix // - `purge_host`: Purge by the Hostname // - `purge_all`: Purge all cached contents Type *string `json:"Type,omitempty" name:"Type"` // The target resource to be purged. One target per line. Targets []*string `json:"Targets,omitempty" name:"Targets"` // Specifies whether to transcode non-ASCII URLs according to RFC3986. // Note that if it’s enabled, the purging is based on the converted URLs. EncodeUrl *bool `json:"EncodeUrl,omitempty" name:"EncodeUrl"` }
func NewCreatePurgeTaskRequest ¶
func NewCreatePurgeTaskRequest() (request *CreatePurgeTaskRequest)
func (*CreatePurgeTaskRequest) FromJsonString ¶
func (r *CreatePurgeTaskRequest) 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 (*CreatePurgeTaskRequest) ToJsonString ¶
func (r *CreatePurgeTaskRequest) ToJsonString() string
type CreatePurgeTaskResponse ¶
type CreatePurgeTaskResponse struct { *tchttp.BaseResponse Response *struct { // Task ID JobId *string `json:"JobId,omitempty" name:"JobId"` // List of failed tasks and reasons // Note: This field may return `null`, indicating that no valid value can be obtained. FailedList []*FailReason `json:"FailedList,omitempty" name:"FailedList"` // The unique request ID, which is returned for each request. RequestId is required for locating a problem. RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } `json:"Response"` }
func NewCreatePurgeTaskResponse ¶
func NewCreatePurgeTaskResponse() (response *CreatePurgeTaskResponse)
func (*CreatePurgeTaskResponse) FromJsonString ¶
func (r *CreatePurgeTaskResponse) 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 (*CreatePurgeTaskResponse) ToJsonString ¶
func (r *CreatePurgeTaskResponse) ToJsonString() string
type DescribePurgeTasksRequest ¶
type DescribePurgeTasksRequest struct { *tchttp.BaseRequest // Task ID JobId *string `json:"JobId,omitempty" name:"JobId"` // Type of the purging task Type *string `json:"Type,omitempty" name:"Type"` // Start time of the query StartTime *string `json:"StartTime,omitempty" name:"StartTime"` // End time of the query EndTime *string `json:"EndTime,omitempty" name:"EndTime"` // Offset of the query Offset *int64 `json:"Offset,omitempty" name:"Offset"` // Maximum number of results returned Limit *int64 `json:"Limit,omitempty" name:"Limit"` // Statuses of tasks to be queried. Values: // `processing`, `success`, `failed`, `timeout` and `invalid` Statuses []*string `json:"Statuses,omitempty" name:"Statuses"` // ID of the site ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"` // List of domain names queried Domains []*string `json:"Domains,omitempty" name:"Domains"` // Queries content Target *string `json:"Target,omitempty" name:"Target"` }
func NewDescribePurgeTasksRequest ¶
func NewDescribePurgeTasksRequest() (request *DescribePurgeTasksRequest)
func (*DescribePurgeTasksRequest) FromJsonString ¶
func (r *DescribePurgeTasksRequest) 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 (*DescribePurgeTasksRequest) ToJsonString ¶
func (r *DescribePurgeTasksRequest) ToJsonString() string
type DescribePurgeTasksResponse ¶
type DescribePurgeTasksResponse struct { *tchttp.BaseResponse Response *struct { // Total entries that match the specified query condition TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` // List of tasks returned Tasks []*Task `json:"Tasks,omitempty" name:"Tasks"` // The unique request ID, which is returned for each request. RequestId is required for locating a problem. RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } `json:"Response"` }
func NewDescribePurgeTasksResponse ¶
func NewDescribePurgeTasksResponse() (response *DescribePurgeTasksResponse)
func (*DescribePurgeTasksResponse) FromJsonString ¶
func (r *DescribePurgeTasksResponse) 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 (*DescribePurgeTasksResponse) ToJsonString ¶
func (r *DescribePurgeTasksResponse) ToJsonString() string
type DescribeZonesRequest ¶
type DescribeZonesRequest struct { *tchttp.BaseRequest // Pagination parameter, which specifies the offset. Offset *int64 `json:"Offset,omitempty" name:"Offset"` // Pagination parameter, which specifies the number of sites returned in each page. Limit *int64 `json:"Limit,omitempty" name:"Limit"` // Query condition filter, which supports complex type. Filters []*ZoneFilter `json:"Filters,omitempty" name:"Filters"` }
func NewDescribeZonesRequest ¶
func NewDescribeZonesRequest() (request *DescribeZonesRequest)
func (*DescribeZonesRequest) FromJsonString ¶
func (r *DescribeZonesRequest) 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 (*DescribeZonesRequest) ToJsonString ¶
func (r *DescribeZonesRequest) ToJsonString() string
type DescribeZonesResponse ¶
type DescribeZonesResponse struct { *tchttp.BaseResponse Response *struct { // Number of sites that match the specified conditions TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` // Details of sites // Note: This field may return `null`, indicating that no valid value can be obtained. Zones []*Zone `json:"Zones,omitempty" name:"Zones"` // The unique request ID, which is returned for each request. RequestId is required for locating a problem. RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } `json:"Response"` }
func NewDescribeZonesResponse ¶
func NewDescribeZonesResponse() (response *DescribeZonesResponse)
func (*DescribeZonesResponse) FromJsonString ¶
func (r *DescribeZonesResponse) 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 (*DescribeZonesResponse) ToJsonString ¶
func (r *DescribeZonesResponse) ToJsonString() string
type FailReason ¶
type Task ¶
type Task struct { // Task ID JobId *string `json:"JobId,omitempty" name:"JobId"` // Status of the task Status *string `json:"Status,omitempty" name:"Status"` // Resource Target *string `json:"Target,omitempty" name:"Target"` // Task type Type *string `json:"Type,omitempty" name:"Type"` // Task creation time CreateTime *string `json:"CreateTime,omitempty" name:"CreateTime"` // Task completion time UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"` }
type Zone ¶
type Zone struct { // Site ID Id *string `json:"Id,omitempty" name:"Id"` // Site name Name *string `json:"Name,omitempty" name:"Name"` // List of name servers used by the site OriginalNameServers []*string `json:"OriginalNameServers,omitempty" name:"OriginalNameServers"` // List of name servers assigned by Tencent Cloud NameServers []*string `json:"NameServers,omitempty" name:"NameServers"` // Site status // - `active`: The name server is switched. // - `pending`: The name server is not switched. // - `moved`: The name server is moved. // - `deactivated`: The name server is blocked. Status *string `json:"Status,omitempty" name:"Status"` // How the site is connected to EdgeOne. // - `full`: The site is connected via name server. // - `partial`: The site is connected via CNAME. Type *string `json:"Type,omitempty" name:"Type"` // Indicates whether the site is disabled Paused *bool `json:"Paused,omitempty" name:"Paused"` // Site creation date CreatedOn *string `json:"CreatedOn,omitempty" name:"CreatedOn"` // Site modification date ModifiedOn *string `json:"ModifiedOn,omitempty" name:"ModifiedOn"` }
type ZoneFilter ¶
type ZoneFilter struct { // Filters by the field name. Vaules: // - `name`: Site name. // - `status`: Site status. Name *string `json:"Name,omitempty" name:"Name"` // Filters by the field value Values []*string `json:"Values,omitempty" name:"Values"` // Specifies whether to enable fuzzy query. It’s only available when filter name is `name`. If it’s enabled, the length of `Values` must be 1. Fuzzy *bool `json:"Fuzzy,omitempty" name:"Fuzzy"` }