Documentation
¶
Index ¶
- func DeleteDomainNameGroup(client *golangsdk.ServiceClient, groupId, firewallId string) error
- func DeleteDomainNames(client *golangsdk.ServiceClient, groupId, firewallId string, ...) error
- type AddDomainNameListOpts
- type CommonDomainNameGroupDataResponse
- type CreateDomainNameGroupOpts
- type DeleteDomainNameGroupQueryParams
- type DeleteDomainNameListOpts
- type DeleteDomainNameListQueryParams
- type DomainInfo
- type DomainSetInfoDto
- type DomainSetResponseData
- func AddDomainNames(client *golangsdk.ServiceClient, groupId string, opts AddDomainNameListOpts) (*DomainSetResponseData, error)
- func CreateDomainNameGroup(client *golangsdk.ServiceClient, opts CreateDomainNameGroupOpts) (*DomainSetResponseData, error)
- func UpdateDomainNameGroup(client *golangsdk.ServiceClient, groupId, firewallId string, opts UpdateOpts) (*DomainSetResponseData, error)
- type DomainSetVO
- type GetDomainNameGroupDataResponse
- type GetDomainNameGroupListQueryParams
- type GetDomainNameListQueryParams
- type GetDomainNamesDataResponse
- type ListDomainResponseData
- type ListDomainSetsResponseData
- type UpdateOpts
- type UpdateQueryParams
- type UseRuleVO
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteDomainNameGroup ¶
func DeleteDomainNameGroup(client *golangsdk.ServiceClient, groupId, firewallId string) error
This function is used to delete a Domain Name Group. groupId: Domain name group ID. It is the same as ID retuned while creating a Domain Name Group. firewallId: Firewall Instance ID.
func DeleteDomainNames ¶
func DeleteDomainNames(client *golangsdk.ServiceClient, groupId, firewallId string, opts DeleteDomainNameListOpts) error
This function is used to delete list of domain names from a domain name group. groupId: Domain name group ID. It is the same as ID retuned while creating a Domain Name Group. firewallId: Firewall Instance ID.
Types ¶
type AddDomainNameListOpts ¶
type AddDomainNameListOpts struct {
// Firewall ID.
FwInstanceID string `json:"fw_instance_id" required:"true"`
// Protected object ID, which is used to distinguish between Internet border protection and VPC border protection
// after a cloud firewall is created. You can obtain the ID by calling the Get function in management package.
// In the return value, find the ID in ProtectObjects[n].ObjectID.
// If the value of type is 0, the protected object ID belongs to the Internet border.
// If the value of type is 1, the protected object ID belongs to the VPC border.
ObjectID string `json:"object_id" required:"true"`
// Domain name information list.
DomainNames []DomainSetInfoDto `json:"domain_names" required:"true"`
}
type CommonDomainNameGroupDataResponse ¶
type CommonDomainNameGroupDataResponse struct {
// Returned data for adding a domain name group.
Data DomainSetResponseData `json:"data"`
}
type CreateDomainNameGroupOpts ¶
type CreateDomainNameGroupOpts struct {
// Firewall ID.
FwInstanceID string `json:"fw_instance_id" required:"true"`
// Protected object ID, which is used to distinguish between Internet border protection and VPC border protection
// after a cloud firewall is created. You can obtain the ID by calling the Get function in management package.
// In the return value, find the ID in ProtectObjects[n].ObjectID.
// If the value of type is 0, the protected object ID belongs to the Internet border.
// If the value of type is 1, the protected object ID belongs to the VPC border.
ObjectID string `json:"object_id" required:"true"`
// Domain name group name.
Name string `json:"name" required:"true"`
// Domain name group description.
Description string `json:"description,omitempty"`
// Domain name information list.
DomainNames []DomainSetInfoDto `json:"domain_names" required:"true"`
// Domain name group type:
// 0 - Application domain name group
// 1 - Network domain name group
DomainSetType int `json:"domain_set_type,omitempty"`
}
type DeleteDomainNameGroupQueryParams ¶
type DeleteDomainNameGroupQueryParams struct {
// Firewall ID.
FwInstanceID string `q:"fw_instance_id" required:"true"`
}
type DeleteDomainNameListOpts ¶
type DeleteDomainNameListOpts struct {
// Protected object ID, which is used to distinguish between Internet border protection and VPC border protection
// after a cloud firewall is created. You can obtain the ID by calling the Get function in management package.
// In the return value, find the ID in ProtectObjects[n].ObjectID.
// If the value of type is 0, the protected object ID belongs to the Internet border.
// If the value of type is 1, the protected object ID belongs to the VPC border.
ObjectID string `json:"object_id" required:"true"`
// Domain name ID list. It can be obtained by using the function ListDomainNames OR GetDomainNameInfo.
DomainAddressIDs []string `json:"domain_address_ids" required:"true"`
}
type DeleteDomainNameListQueryParams ¶
type DeleteDomainNameListQueryParams struct {
// Firewall ID.
FwInstanceID string `json:"fw_instance_id" required:"true"`
}
type DomainInfo ¶
type DomainInfo struct {
// Domain name ID.
DomainAddressID string `json:"domain_address_id"`
// Domain name, for example, www.test.com.
DomainName string `json:"domain_name"`
// Domain name description.
Description string `json:"description"`
}
func GetDomainNameInfo ¶
func GetDomainNameInfo(client *golangsdk.ServiceClient, domainName, groupId, firewallId string) (*DomainInfo, error)
This function is used to obtain the info of a domain name in a domain name group. domainName: Domain name, for example, www.test.com. groupId: Domain name group ID. It is the same as ID retuned while creating a Domain Name Group. firewallId: Firewall Instance ID.
func ListDomainNames ¶
func ListDomainNames(client *golangsdk.ServiceClient, groupId, firewallId string) ([]DomainInfo, error)
This function is used to obtain the list of domain names in a domain name group. groupId: Domain name group ID. It is the same as ID retuned while creating a Domain Name Group. firewallId: Firewall Instance ID.
type DomainSetInfoDto ¶
type DomainSetResponseData ¶
type DomainSetResponseData struct {
// Domain name group ID.
Id string `json:"id"`
// Domain name group name.
Name string `json:"name"`
}
func AddDomainNames ¶
func AddDomainNames(client *golangsdk.ServiceClient, groupId string, opts AddDomainNameListOpts) (*DomainSetResponseData, error)
This function is used to add a list of domain names to a domain name group. groupId: Domain name group ID. It is the same as ID retuned while creating a Domain Name Group.
func CreateDomainNameGroup ¶
func CreateDomainNameGroup(client *golangsdk.ServiceClient, opts CreateDomainNameGroupOpts) (*DomainSetResponseData, error)
This function is used to add domain name group.
func UpdateDomainNameGroup ¶
func UpdateDomainNameGroup(client *golangsdk.ServiceClient, groupId, firewallId string, opts UpdateOpts) (*DomainSetResponseData, error)
This function is used to update domain name group information. groupId: Domain name group ID. It is the same as ID retuned while creating an address group. firewallId: Firewall Instance ID.
type DomainSetVO ¶
type DomainSetVO struct {
// Domain name group ID.
SetID string `json:"set_id"`
// Domain name group name.
Name string `json:"name"`
// Domain name group description.
Description string `json:"description"`
// Number of times a domain name group is referenced by rules.
RefCount int `json:"ref_count"`
// Domain name group type:
// 0 - application domain name group,
// 1 - network domain name group.
DomainSetType int `json:"domain_set_type"`
// Configuration status:
// -1 - unconfigured,
// 0 - configuration failed,
// 1 - configuration succeeded,
// 2 - configuring,
// 3 - normal,
// 4 - abnormal.
ConfigStatus int `json:"config_status"`
// Used rule ID list.
Rules []UseRuleVO `json:"rules"`
}
func GetDomainNameGroup ¶
func GetDomainNameGroup(client *golangsdk.ServiceClient, groupName, firewallId, objectID string) (*DomainSetVO, error)
This function is used to obtain the list of domain name groups. firewallId: Firewall Instance ID. groupName: Name of Domain Name Group objectId: Protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. You can obtain the ID by calling the Get function in management package. In the return value, find the ID in ProtectObjects[n].ObjectID. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
func ListDomainNameGroups ¶
func ListDomainNameGroups(client *golangsdk.ServiceClient, firewallId, objectId string) ([]DomainSetVO, error)
This function is used to obtain the list of domain name groups. firewallId: Firewall Instance ID. objectId: Protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. You can obtain the ID by calling the Get function in management package. In the return value, find the ID in ProtectObjects[n].ObjectID. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
type GetDomainNameGroupDataResponse ¶
type GetDomainNameGroupDataResponse struct {
//Returned data for querying the domain name group list.
Data ListDomainSetsResponseData `json:"data"`
}
type GetDomainNameGroupListQueryParams ¶
type GetDomainNameGroupListQueryParams struct {
// Firewall ID.
FwInstanceID string `q:"fw_instance_id" required:"true"`
// Protected object ID, which is used to distinguish between Internet border protection and VPC border protection
// after a cloud firewall is created. You can obtain the ID by calling the Get function in management package.
// In the return value, find the ID in ProtectObjects[n].ObjectID.
// If the value of type is 0, the protected object ID belongs to the Internet border.
// If the value of type is 1, the protected object ID belongs to the VPC border.
ObjectID string `q:"object_id" required:"true"`
// Offset, which specifies the start position of the record to be returned. The value must be a number no less than 0. The default value is 0.
Offset string `q:"offset" required:"true"`
// Number of records displayed on each page. The value ranges from 1 to 1024.
Limit int `q:"limit" required:"true"`
// Keyword, which can be the domain name group name or description.
Keyword string `q:"key_word,omitempty"`
}
type GetDomainNameListQueryParams ¶
type GetDomainNameListQueryParams struct {
// Firewall ID.
FwInstanceID string `q:"fw_instance_id" required:"true"`
// Offset, which specifies the start position of the record to be returned. The value must be a number no less than 0. The default value is 0.
Offset string `q:"offset" required:"true"`
// Number of records displayed on each page. The value ranges from 1 to 1024.
Limit int `q:"limit" required:"true"`
// Domain name, for example, www.test.com.
DomainName string `q:"domain_name,omitempty"`
}
type GetDomainNamesDataResponse ¶
type GetDomainNamesDataResponse struct {
// ListDomainResponseData represents the response data for listing domain names in domain name group.
Data ListDomainResponseData `json:"data"`
}
type ListDomainResponseData ¶
type ListDomainResponseData struct {
// Number of records displayed on each page. The value ranges from 1 to 1024.
Limit int `json:"limit"`
// Offset, which specifies the start position of the record to be returned.
// The value must be a number no less than 0. The default value is 0.
Offset int `json:"offset"`
// Project ID.
ProjectID string `json:"project_id"`
// Domain name information list.
Records []DomainInfo `json:"records"`
// Domain name group ID.
SetID string `json:"set_id"`
// Total number of domain names.
Total int `json:"total"`
}
type ListDomainSetsResponseData ¶
type ListDomainSetsResponseData struct {
// Number of records displayed on each page. The value ranges from 1 to 1024.
Limit int `json:"limit"`
// Offset, which specifies the start position of the record to be returned.
// The value must be a number no less than 0. The default value is 0.
Offset int `json:"offset"`
// Total number of domain names.
Total int `json:"total"`
// Domain name information list.
Records []DomainSetVO `json:"records"`
}
type UpdateOpts ¶
type UpdateQueryParams ¶
type UpdateQueryParams struct {
// Firewall ID.
FwInstanceID string `q:"fw_instance_id" required:"true"`
}