- What's New
- Function Overview
- Product Bulletin
- Technology Poster
- Service Overview
- Billing
- Getting Started
-
User Guide
- Using IAM to Grant Access to HSS
- Purchasing and Accessing HSS
- Checking the Dashboard
- Asset Management
- Risk Management
- Server Protection
- Container Protection
- Detection and Response
- Security Operations
- Installation and Configuration on Servers
- Installation and Configuration on Containers
- Alarm Configuration
- Account Management
- Authorization
- Plug-in Settings
- Monitoring and Auditing
- Enterprise Project Management
-
Best Practices
- HSS Best Practices You May Need
-
Suggestions on How to Fix Official Disclosed Vulnerabilities Provided by HSS
- Git Credential Disclosure Vulnerability (CVE-2020-5260)
- SaltStack Remote Command Execution Vulnerabilities (CVE-2020-11651 and CVE-2020-11652)
- OpenSSL High-risk Vulnerability (CVE-2020-1967)
- Adobe Font Manager Library Remote Code Execution Vulnerability (CVE-2020-1020/CVE-2020-0938)
- Windows Kernel Elevation of Privilege Vulnerability (CVE-2020-1027)
- Windows CryptoAPI Spoofing Vulnerability (CVE-2020-0601)
- Third-Party Servers Accessing HSS Through a Direct Connect and Proxy Servers
- Connecting Third-Party Servers to HSS Through Direct Connect and VPC Endpoint
- Installing the HSS Agent Using CBH
- Using HSS to Improve Server Login Security
- Using HSS and CBR to Defend Against Ransomware
- Combining WAF and HSS to Improve Web Page Tampering Protection
- Using HSS to Scan for and Fix Vulnerabilities
- Using HSS to Prevent Weak Passwords
- Using HSS to Scan for Trojans
- Using HSS to Handle Mining Attacks
- Using HSS to Monitor the Integrity of Linux Server Files
- Using the Whitelist to Reduce False Alarms
- HSS Security Best Practices
-
API Reference
- Before You Start
- Calling APIs
-
API Description
-
Asset Management
- Querying the Number of Assets
- Querying the Account List
- Querying Open Port Statistics
- Querying the Description of a Port
- Querying Process Statistics
- Querying the Software List
- Querying Automatic Startup Item Information
- Querying the Server List of an Account
- Querying the Open Port List of a Single Server
- Querying the Server List of the Software
- Querying the Service List of Auto-Started Items
- Obtaining the Account Change History
- Obtaining the Historical Change Records of Software Information
- Obtaining the Historical Change Records of Auto-started Items
- Querying the List of Servers with a Specified Process
- Querying the List of Servers with a Specified Open Port
- Querying the Server List of a Specified Middleware
- Querying the Middleware List
- Querying the Status of a Global Asset Scan Task
- Creating a Global Asset Scan Task
- Querying the List of Servers with a Specified Kernel Module
- Querying the List of Servers with a Specified Web Framework
- Querying the List of Servers with a Specified Website
- Querying the Asset Fingerprint Collection Status of a Single Server
- Collecting Asset Fingerprints of a Single Server
- Querying Kernel Module Statistics
- Querying Web Framework Statistics
- Querying Website Statistics
- Querying Statistics About Web Services, Web Applications, and Databases
- Querying the Server List of a Web Service, Web Application, or Database
- Asset Management - Overview - Asset Status - Server Agent Status
- Asset Management - Overview - Asset Status - Container Node Protection Status
- Asset Management - Overview - Asset Status - Agent Status
- Asset Management - Overview - Asset Status - OS Statistics
- Asset Management - Overview - Asset Status - Protection Quota Statistics
- Querying the Middleware Information of a Server
- Querying the Kernel Module Information of a Server
- Querying the Web Framework Information of a Server
- Querying the Website Information of a Server
- Exporting Asset Fingerprint Information
- Asset Management - Overview - Top Accounts
- Asset Management - Overview - Top Auto-started Items
- Asset Management - Overview - Top JAR Packages
- Asset Management - Overview - Top Kernel Modules
- Asset Management - Overview - Top Ports
- Asset Management - Overview - Top Processes
- Asset Management - Overview - Software Top
- Asset Management - Overview - WebAppAndServiceTop
- Asset Management - Overview - Web Framework Top
- Asset Management - Overview - Top Websites
-
Ransomware Prevention
- Querying the Backup Vault List
- Querying the Ransomware Protection Server List 2.0
- Adding a Protection Policy
- Deleting a Protection Policy
- Switching the Ransomware Protection Policy
- Querying the Backup and Restoration Task List
- Querying Information About a Backup Policy
- Querying the Backup Policy Bound to HSS Protection Vault
- Modifying the Backup Policy Bound to Vault
- Enabling Ransomware Protection 2.0 in Batches
- Disabling Ransomware Prevention
- Enabling Ransomware Prevention
- Querying the Protection Policy List of Ransomware
- Modifying Ransomware Protection Policies
- Querying the Servers Protected Against Ransomware
- Baseline Checks
- Baseline Policies
- Quota Management
-
Container Management
- Querying Basic Container Information List
- Querying the Container Node List
- Querying the List of Commands Running in a Container
- Creating a Container Export Task
- Querying the Container Log List
- Querying the Protection Overview Data of a Container Node
- Changing Protection Status
- Querying the Kubernetes Cluster List
- Querying Container Details
- Querying Kubernetes Endpoint Details
- Querying the Kubernetes Endpoint List
- Querying the Basic Pod Information List
- Synchronizing Cluster Information
- Querying Kubernetes Service Details
- Querying the Kubernetes Service List
- Querying Pod Details
-
Event Management
- Querying the Attack Identifier Distribution Statistics List
- Querying the Statistics of ATT&CK Phases
- Deleting Isolated Files
- Downloading Export Files
- Querying the List of Blocked IP Addresses
- Unblocking a Blocked IP Address
- Querying the List of Isolated Files
- Restoring Isolated Files
- Querying Export Tasks
- Querying Export Task Information Based on Query Conditions
- Intrusion Detection
-
Server Management
- Querying Server Groups
- Creating a Server Group
- Editing a Server Group
- Deleting a Server Group
- Querying ECSs
- Querying the Server Policy List
- Changing the Protection Status
- Querying the Status of the Automatic Quota Binding Switch
- Enabling or Disabling the Automatic Quota Binding Function
- ECS Risk Status
- Collecting Server Statistics
- Policy Management
-
Vulnerability Management
- Querying the Vulnerability List
- Obtaining the Number of Unread Vulnerability Tasks
- Exporting Information About Vulnerabilities and Their Affected Servers
- Querying Information About Containers Affected by a Vulnerability
- Querying Container Application Information Affected by a Vulnerability
- Querying the Servers Affected by a Vulnerability
- Changing the Status of a Vulnerability
- Querying Vulnerability Information About a Server
- Creating a Vulnerability Scan Task
- Querying a Vulnerability Scan Policy
- Modifying a Vulnerability Scan Policy
- Querying the Vulnerability Scan Tasks
- Querying the List of Servers Corresponding to a Vulnerability Scan Task
- Querying Details About Affected Servers - Process List
- Querying Vulnerability Management Statistics
- Viewing Handled Vulnerabilities
- Querying Details About Affected Servers - Software List
- Recording the Last Time When a User Viewed the Vulnerability Task Management Page
- Creating a Task for Exporting Handled Vulnerabilities
- Creating a Task for Exporting Vulnerability Handling Records
- Querying the Backup Statistics of the Servers Where Vulnerabilities Were Handled
- Querying the List of Server Vaults Corresponding to Vulnerability Handling
- Querying the List of Backups That Can Be Rolled Back
- Performing a Rollback Using a Backup
- Vulnerability Management - Server View - Server List - Export Report
- Viewing the Handling History of Image Vulnerabilities
- Viewing the Vulnerabilities of All Types of Images
-
Web Tamper Protection
- Querying the WTP list
- Querying Dynamic WTP Events
- Enabling or Disabling Dynamic WTP
- Querying Static WTP Events
- Enabling or Disabling WTP
- Querying the List of Servers for Where WTP Can Be Enabled
- This API is used to enable web tamper protection for servers in batches.
- Viewing Web Tamper Protection Policies
- Editing a Web Tamper Protection Policy
- Querying the Tomcat Bin Directory Configured for Dynamic Web Tamper Protection
- Modifying the Tomcat bin Directory for Dynamic Web Tamper Protection
- Exporting the List of Protected WTP Directories
- Querying Remote Backup Server Information
- Enabling or Disabling Remote Backup
- Querying the Remote Backup Server List
- Adding or Modifying a Remote Backup Server
- Deleting a Remote Backup Server
- Suspending or Resuming a Protected Directory
- Collecting Protection Data Statistics
- Tag Management
-
Antivirus
- This API is used to query the list of servers available for virus scan.
- Deleting a Custom Scan Policy
- Creating a Custom Scan Policy
- Querying a Custom Scan Policy List
- Editing a Custom Scan Policy
- Exporting the Virus Scan Result List
- This API is used to handle virus scan results.
- Querying the Virus Scan Result List
- Querying Virus Scan Statistics
- Creating a Virus Scan Task
- Viewing the Virus Scan Task List
- Canceling a Scan Task
- Querying the Status of the Pay-per-use Billing Switch for Virus Scan
- Changing the Status of the Pay-per-use Billing Switch for Virus Scan
- This API is used to query the number of free virus scans.
- This API is used to query the server list of paid virus scans.
- This API is used to create a paid virus scan task.
-
Application Protection
- Querying the Application Protection Event List
- Querying the Protection Policy List
- Querying Protection Policy Details
- Querying the Detection Rule List
- Querying Java Applications of a Protected Server
- Querying the List of Protected Servers
- Protection Data Statistics
- Querying the Status of Application Protection
- Deleting a Protection Policy
- Adding a Protection Policy
- Modifying a Protection Policy
- Enable/Disable application protection and update the protection port.
-
Application Process Control
- Querying Process Whitelist Policies
- Creating a Whitelist Policy
- Modifying a Whitelist Policy
- Deleting a Whitelist Policy
- Querying Details About a Process Whitelist Policy
- Managing the Learning Status of a Process Whitelist Policy
- Querying the Servers Associated with a Process Whitelist Policy
- Applying a Whitelist Policy
- Adding a Server to a Whitelist Policy
- Deleting a Server from a Whitelist Policy
- Querying the Servers Available for the Process Whitelist
- Querying the Processes Identified by the Process Whitelist Policy
- Adding a Process to the Whitelist Policy
- Marking a Process Identified by the Process Whitelist Policy
- Querying the Extended Process List of the Process Whitelist Policy
- Counting Servers with Unmatched Agent Versions
- Querying Suspicious Processes in the Process Whitelist
-
Whitelist Management
- Querying the Alarm Whitelist
- Querying the Login Whitelist
- Adding a Login Whitelist
- Deleting Whitelisted Login Items
- Querying the System User Whitelist
- Adding an Item to the System User Whitelist
- Modifying System User Whitelist
- Removing an Item from the System User Whitelist
- Deleting an Alarm Whitelist
- File Integrity Monitoring
-
Container Installation and Configuration
- Obtaining Information About the Repository Associated with an Image Synchronization Task
- Deleting a Cluster Daemonset
- Updating a Cluster Daemonset
- Obtaining Cluster Daemonset Information
- Creating a Cluster Daemonset
- Querying the CI/CD Configuration List
- Adding a CI/CD Configuration
- Querying CI/CD Configuration
- Modifying CI/CD Configuration
- Deleting CI/CD Configuration
- Generating a CI/CD Access Configuration Command
- Querying the CI/CD Image List
- Creating a Task to Export All or Multiple Image Security Reports
- Uninstalling daemonset in batches
- Upgrading Cluster Daemonset in Batches
- Querying a Multi-cloud Cluster
- Creating a Multi-cloud Cluster
- Synchronizing the Access Status of a Multi-cloud Cluster
- Deleting a Multi-cloud Cluster
- Updating a Multi-cloud Cluster
- Obtaining the Agent Installation Script of a Multi-Cloud Cluster
- Parsing the Configuration File of a Multi-cloud Cluster
- Obtaining the Image Upload Command of a Multi-Cloud Cluster
- Obtaining the Deployment Template
- Obtaining the Account Permissions of a Multi-cloud Cluster
- Obtaining the Image Upload Command of the Scan Component
- Adding an Image Repository
- Obtaining the Image Repository List
- Querying the Statistics of an Image Repository
- Editing Image Repository Access Information
- Deleting Image Repository Access Information
- Deleting Image Repository Access Information in Batches
- Obtaining Cluster Node Tags
-
Dynamic Port Honeypot
- Switching the Dynamic Port Honeypot Policy of a Server
- Disabling the Dynamic Port Honeypot Policy of a Server
- Viewing a Dynamic Port Honeypot Policy
- Editing Dynamic Port Honeypot Policy
- Viewing Dynamic Port Honeypot Policy Details
- Deleting a Dynamic Port Honeypot Policy
- Adding a Dynamic Port Honeypot Policy
- Checking Whether Auto-protection Is Enabled for New Servers by Default
- Enabling Protection for New Servers by Default
- Viewing the List of Protected Servers
-
Installation and Configuration
- Querying the Multi-Account List
- Deleting an Account
- Adding Accounts in Batches
- Querying an Account Organization
- Querying the Plug-in List
- Obtaining the Prompt Information Configuration
- Configuring Prompt Information
- Querying the Status of the Sample Collection Configuration Switch for Malware Cloud Scans
- Enabling or Disabling Malware Sample Collection for Cloud Scan
- Obtaining the Docker Plug-in Installation Script
- Querying the Agent Installation Script
- Obtaining Notifications on a Page
-
Cluster Management
- Obtaining Cluster Configurations
- Creating a CCE Integrated Protection Configuration
- Querying the Number of Cluster Assets
- Obtaining Some Prompt Information
- Synchronizing Cluster Protection Events
- Querying the Cluster Component Protection Policy Templates
- Querying a Cluster Component Protection Policy Template
- Querying the Audit Log List of the Kubernetes Cluster
- Querying the Kubernetes Cluster Event List
- Obtaining Container Cluster Risk Information in Batches
- Cluster Risks
-
Server Installation and Configuration
- Querying Common Login IP Addresses
- Adding, Editing, or Deleting a Common Login IP Address
- Querying Common Login Locations
- Adding, Editing, or Deleting a Common Login Location
- This API is used to query the SSH login IP address whitelist.
- Configuring Two-Factor Login
- Querying the Two-Factor Server List
- Querying the Global Switch of a Specified Policy
- Modifying the Global Switch of a Policy (to Enable/Disable the Policy for All Associated Servers)
- Obtaining the Dictionary List
- Querying the Status of the Automatic Agent Upgrade Function
- Enabling or Disabling the Automatic Agent Upgrade Function
- Querying the Automatic Isolation and Killing Status of a Program
- Enabling or Disabling Automatic Isolation and Killing of Malicious Programs
- Query the Agent Version List
- Querying Alarm Configuration
- Configuring Alarms
- Downloading a Script File
- Obtaining the Configuration Switch Status
- Modifying the Configuration Switch Status
- Querying the System Configuration List
- Common Modules
- IaC Risks
- Common Service Modules
-
Container Images
- Querying the Mirror Configuration Check Report
- Querying the Check Item List of a Specified Security Configuration Item of an Image
- Querying the List of Image Security Configuration Detection Results
- Scanning Images in the Image Repository in Batches
- Querying the Local Image List
- Querying the Image List of the SWR Image Repository (Deprecated)
- Synchronizing the Image List from SWR
- CVE Information Corresponding to the Vulnerability
- Querying Image Vulnerability Information
- Viewing the List of Images Affected by the Vulnerability
- Handling Image Vulnerabilities
- Querying Container Image Operation Logs
- Querying the Container Image List
- Container Assets - Image Statistics
- Querying the Image Whitelist
- Adding an Image to the Whitelist
- Deleting an Image from the Whitelist
- Querying Details About an Image Whitelist
- Modifying the Image Whitelist Configuration
- Querying the List of Vulnerabilities Affected by Image Vulnerability Handling Operations
- Query the Image Software List
- Viewing the Software of the Images Affected by a Vulnerability
- Viewing the Containers Associated with the Images Affected by a Vulnerability
- Querying Basic Image Information
- Querying the Image File List
- Querying Image File Statistics
- Image Scan Task
- Repository image
-
Security Operations
- Querying the List of Historical Alarm Records
- Viewing Vulnerability Handling History
- Querying the List of Historical Virus Scan Records
- Querying the Security Check Report of a Specified Server
- Querying the Security Check Report List of a Cluster
- Querying the Security Check Report Information of a Cluster
- Query the Scheduled Configuration of a Security Check
- Modify the Scheduled Configuration of a Security Check
- Manually Start a Health Check
- Cancelling a Manual Health Check
- Querying the Status and Progress of a Manual Health Check
-
Dashboard
- Querying the Details of a Monthly Operations Report
- Querying the Information in the News and Promotions Area of a Monthly Operations Report
- Querying the Monthly Operations Report List
- Querying the Status of a User's Monthly Operations Dialog Box
- Changing the Status of a User's Monthly Operations Dialog Box
- Querying the Risk Score
- Querying the Number of Agents
- Hot News
- Querying the Protection Period, Virus Database Update Time, Vulnerability Database Update Time, and Accumulated Number of Records of Each Module
- Querying the Security Risk List
-
Cluster Protection
- Querying Cluster Protection Information
- Obtaining the List of Default Cluster Protection Policies
- Obtaining Alarm Events in All Clusters
- Modifying the Alarm Status
- Cluster Protection Overview
- Deleting a Cluster Protection Policy
- Obtaining the Cluster Protection Policies
- Creating a Cluster Protection Policy
- Modifying a Cluster Protection Policy
- Viewing Details About a Specified Policies
- Obtaining All the Protection Items of a Cluster
- Performing Operations on Cluster Protection
-
Baseline Management
- Ignoring, Unignoring, Repairing, or Verifying the Failed Configuration Check Items
- Querying the Report of a Check Item in a Security Configuration Check
- Querying the Password Complexity Policy Detection Report
- Querying the Checklist of a Security Configuration Item
- Querying the Check Result of a Security Configuration Item
- Querying the List of Affected Servers of a Security Configuration Item
- Querying the Result List of Server Security Configuration Check
- Querying the Weak Password Detection Result List
- Ignoring or Unignoring Servers that Fail the Password Complexity Check
- Querying Manual Baseline Scan Results
- Querying the Baseline Whitelist
- Added baseline whitelists.
- Deleting a Baseline Whitelist
- Modifying the Baseline Whitelist
- Querying a Single Baseline Whitelist
- Exporting Configuration Check Reports Based on Query Results
- Container Assets
-
Container Network Isolation Information
- Querying Clusters Protected by Container Security
- Querying the Network Information of a Container Cluster
- Querying the List of Container Cluster Network Policies
- Delete The Container Cluster Network Configuration Policy
- Container Cluster Network Update Configuration Policy
- Configuration Policy for Adding a Network to a Container Cluster
- Synchronizing the Latest Container Network Policies from a Cluster
- Synchronizing the latest data of a container cluster
- Synchronizing the Latest Data of Network Nodes in a Cluster
- Cluster Network Policy Overview
- Obtaining Namespaces in a Cluster
- Querying the Node List of a Container Cluster VPC Network
- Synchronizing the Latest Security Group Policies in a Cluster
- Querying the Security Group Policies Configured for Clusters Using Cloud Native Network Mode 2.0
- Creating a Security Group Policy
- Updating a Security Group Policy
- Deleting a Security Group Policy
- Querying All Security Groups in an Enterprise Project
- Querying the Workloads in a Namespace in a Cluster
-
Asset Management
- Appendixes
- SDK Reference
-
FAQs
-
About HSS
- What Is Host Security?
- What Is Container Security?
- What Is Web Tamper Protection?
- What Are the Relationships Between Images, Containers, and Applications?
- How Do I Use HSS?
- Can HSS Protect Local IDC Servers?
- Is HSS in Conflict with Any Other Security Software?
- What Are the Differences Between HSS and WAF?
- Can HSS Be Used Across Accounts?
- What Is the HSS Agent?
- Can HSS Be Used Across Clouds?
- Does HSS Support Version Upgrade?
- Can HSS Automatically Detect and Remove Viruses?
-
Agent
- Do I Need to Install the HSS Agent After Purchasing HSS?
- Is the Agent in Conflict with Any Other Security Software?
- How Do I Uninstall the Agent?
- What Should I Do If Agent Installation Failed?
- How Do I Fix an Abnormal Agent?
- What Is the Default Agent Installation Path?
- How Many CPU, Memory, and Disk Resources Are Occupied When the Agent Is Running?
- Do Different HSS Editions Share the Same Agent?
- How Do I View Servers Where No Agents Have Been Installed?
- How Do I Upgrade the Agent?
- What Do I Do If the HSS Upgrade Fails?
- What Resources Will Be Accessed by the Agent After It Is Installed on a Server?
- How Do I Use Images to Install Agents in Batches?
- What Do I Do If I Cannot Access the Download Link of the Windows Or Linux Agent?
- What Do I Do If Agent Upgrade Fails and the Message "File replacement failed" Is Displayed?
- What Can I Do If Agents Failed to Be Installed in Batches and a Message Is Displayed Indicating that the Network Is Disconnected?
- How Do I Verify the Connection Between My Server and the HSS Server?
- Protection
-
Vulnerability Management
- How Do I Fix Vulnerabilities?
- What Do I Do If an Alarm Still Exists After I Fixed a Vulnerability?
- Why a Server Displayed in Vulnerability Information Does Not Exist?
- Do I Need to Restart a Server After Its Vulnerabilities Are Fixed?
- Can I Check the Vulnerability and Baseline Fix History on HSS?
- What Do I Do If Vulnerability Fix Failed?
- Why Can't I Select a Server During Manual Vulnerability Scanning or Batch Vulnerability Fixing?
- What Do I Do If a Vulnerability Scan Failed?
- Do I Need to Subscribe to Ubuntu Pro to Fix Ubuntu Vulnerabilities?
-
Detection & Response
- How Do I View and Handle HSS Alarm Notifications?
- What Do I Do If My Servers Are Subjected to a Mining Attack?
- Why a Process Is Still Isolated After It Was Whitelisted?
- Why an Attack Is Not Detected by HSS?
- Can I Unblock an IP Address Blocked by HSS, and How?
- Why a Blocked IP Address Is Automatically Unblocked?
- How Often Is Malware Scan and Removal?
- How Often Are the HSS Virus Database and Vulnerability Database Updated?
- What Do I Do If an IP Address Is Blocked by HSS?
- How Do I Defend Against Ransomware Attacks?
- Why Can't I Receive Alarms After the HSS Is Upgraded?
- How Do I Add High-risk Command Execution Alarms to the Whitelist?
- Why Doesn't HSS Generate Alarms for Some Web Shell Files?
- Abnormal Logins
-
Brute-force Attack Defense
- How Does HSS Intercept Brute Force Attacks?
- How Do I Handle a Brute-force Attack Alarm?
- How Do I Defend Against Brute-force Attacks?
- How Do I Unblock an IP Address?
- What Do I Do If HSS Frequently Reports Brute-force Alarms?
- What Do I Do If a Huawei Cloud IP Address Trigger a Brute-force Attack Alarm?
- What Do I Do If the Port in Brute-force Attack Records Is Not Updated?
-
Baseline Inspection
- Why Are Weak Password Alarms Generated After the Weak Password Detection Policy Is Disabled?
- How Do I Install a PAM and Set a Proper Password Complexity Policy in a Linux OS?
- How Do I Set a Proper Password Complexity Policy in a Windows OS?
- How Do I Handle Unsafe Settings?
- How Do I View Configuration Check Reports?
- How Do I Handle a Weak Password Alarm?
- How Do I Set a Secure Password?
- Web Tamper Protection
-
Container Security
- How Do I Disable Node Protection?
- How Do I Switch from CGS to HSS?
- How Do I Enable Node Protection?
- How Do I Enable the API Server Audit for an On-Premises Kubernetes Container?
- What Do I Do If the Container Cluster Protection Plug-in Fails to Be Uninstalled?
- What Do I Do If the Cluster Connection Component (ANP-Agent) Failed to Be Deployed?
- What Do I Do If Cluster Permissions Are Abnormal?
- Failed to Upload the Image to the Private Image Repository
- What Do I Do If I Failed to Enable Protection for a CCE Cluster?
- What Do I Do If a Repository Image Scan Failed?
- Ransomware Prevention
- Region and AZ
-
Security Configurations
- How Do I Clear the SSH Login IP Address Whitelist Configured in HSS?
- What Can I Do If I Cannot Remotely Log In to a Server via SSH?
- How Do I Use 2FA?
- What Do I Do If I Cannot Enable 2FA?
- Why Can't I Receive a Verification Code After 2FA Is Enabled?
- Why Does My Login Fail After I Enable 2FA?
- How Do I Add a Mobile Number or Email Address for 2FA?
- Do I Use a Fixed Verification Code for 2FA?
- Will I Be Billed for Alarm Notifications and SMS?
- How Do I Modify Alarm Notification Recipients?
- Why No Topics Are Available for Me to Choose When I Configure Alarm Notifications?
- Can I Disable HSS Alarm Notifications?
- How Do I Modify Alarm Notification Items?
- How Do I Disable the SELinux Firewall?
-
Protection Quota
- How Do I Extend the Validity Period of HSS Quotas?
- How Do I Filter Unprotected Servers?
- Why Can't I Find the Servers I Purchased on the Console?
- What Do I Do If My Quotas Are Insufficient and I Failed to Enable Protection?
- How Do I Allocate My Quota?
- If I Change the OS of a Protected Server, Does It Affect My HSS Quota?
- Why Doesn't an HSS Edition Take Effect After Purchase?
- How Do I Change the Protection Quota Edition Bound to a Server?
- Can I Bind a Server to an HSS Quota If They Are in Different Enterprise Projects?
- When an ECS or CCE Cluster Node Is Deleted, Will They Be Unbound from Their Protection Quotas?
-
Others
- How Do I Use the Windows Remote Desktop Connection Tool to Connect to a Windows Server?
- How Do I Check HSS Log Files?
- How Do I Enable Logging for Login Failures?
- Why Can't I View All Projects in the Enterprise Project Drop-down List?
- How Do I Enable or Disable the Agent Self-protection Policy?
- What Do I Do If Windows Self-Protection Cannot Be Disabled?
- Why Is a Deleted Server Still Displayed in the HSS Server List?
-
About HSS
- Videos
-
More Documents
-
User Guide (Ankara Region)
- Introduction
- Enabling HSS
- Server Security Dashboard
- Asset Management
- Risk Prevention
- Prevention
- Intrusion Detection
- Security Operations
- Security Report
- Installation & Configuration
- Permissions Management
-
FAQs
-
About HSS
- What Is HSS?
- What Is Container Security Service?
- What Is Web Tamper Protection?
- What Are the Relationships Between Images, Containers, and Applications?
- How Do I Use HSS?
- Can HSS Protect Local IDC Servers?
- Is HSS in Conflict with Any Other Security Software?
- What Are the Differences Between HSS and WAF?
- What Is the HSS Agent?
-
Agent FAQs
- Is the Agent in Conflict with Any Other Security Software?
- How Do I Install the Agent?
- How Do I Uninstall the Agent?
- What Should I Do If Agent Installation Failed?
- How Do I Fix an Abnormal Agent?
- What Is the Default Agent Installation Path?
- How Many CPU and Memory Resources Are Occupied by the Agent When It Performs Scans?
- Do WTP and HSS Use the Same Agent?
- How Do I View Servers Where No Agents Have Been Installed?
-
Brute-force Attack Defense
- How Does HSS Intercept Brute Force Attacks?
- How Do I Handle a Brute-force Attack Alarm?
- How Do I Defend Against Brute-force Attacks?
- How Do I Do If the Account Cracking Prevention Function Does Not Take Effect on Some Linux Accounts?
- How Do I Unblock an IP Address?
- What Do I Do If HSS Frequently Reports Brute-force Alarms?
- What Do I Do If My Remote Server Port Is Not Updated in Brute-force Attack Records?
- Weak Passwords and Unsafe Accounts
-
Intrusions
- What Do I Do If My Servers Are Subjected to a Mining Attack?
- Why a Process Is Still Isolated After It Was Whitelisted?
- What Do I Do If a Mining Process Is Detected on a Server?
- Why Some Attacks on Servers Are Not Detected?
- Can I Unblock an IP Address Blocked by HSS, and How?
- Why a Blocked IP Address Is Automatically Unblocked?
- How Often Does HSS Detect, Isolate, and Kill Malicious Programs?
- What Do I Do If an IP Address Is Blocked by HSS?
- How Do I Defend Against Ransomware Attacks?
- Abnormal Logins
- Unsafe Settings
- Vulnerability Management
-
Web Tamper Protection
- Why Do I Need to Add a Protected Directory?
- How Do I Modify a Protected Directory?
- What Should I Do If WTP Cannot Be Enabled?
- How Do I Modify a File After WTP Is Enabled?
- What Can I Do If I Enabled Dynamic WTP But Its Status Is Enabled but not in effect?
- What Are the Differences Between the Web Tamper Protection Functions of HSS and WAF?
- Container Guard Service
- Ransomware Protection
-
Security Configurations
- How Do I Clear the SSH Login IP Address Whitelist Configured in HSS?
- What Can I Do If I Cannot Remotely Log In to a Server via SSH?
- How Do I Use 2FA?
- What Do I Do If I Cannot Enable 2FA?
- Why Can't I Receive a Verification Code After 2FA Is Enabled?
- Why Does My Login Fail After I Enable 2FA?
- How Do I Add a Mobile Phone Number or Email Address for Receiving 2FA Verification Notifications?
- If I Choose to Use Verification Code for 2FA, How Do I Get the Code?
- How Do I Disable the SELinux Firewall?
- Quotas
-
Others
- How Do I Use the Windows Remote Desktop Connection Tool to Connect to a Server?
- How Do I Check HSS Log Files?
- How Do I Enable Logging for Login Failures?
- How Do I Clear an Alarm on Critical File Changes?
- Is HSS Available as Offline Software?
- How Do I Enable HSS Self-Protection?
- What Do I Do If HSS Self-Protection Cannot Be Disabled?
-
About HSS
- Change History
-
User Guide (ME-Abu Dhabi Region)
- Introduction
- Enabling HSS
- Server Security Dashboard
- Asset Management
- Risk Prevention
-
Prevention
- Application Protection
- WTP
- Ransomware Prevention
- File Integrity Monitoring
-
Container Firewalls
- Container Firewall Overview
- Creating a Policy (for a Cluster Using the Container Tunnel Network Model)
- Creating a Policy (for a Cluster Using the VPC Network Model)
- Managing Policies (for a Cluster Using the Container Tunnel Network Model)
- Managing Policies (for a Cluster Using the VPC Network Model)
- Intrusion Detection
- Security Operations
- Security Report
- Installation & Configuration
- Audit
- Permissions Management
- Manually Upgrading HSS
-
FAQs
- About HSS
-
Agent FAQs
- Is the Agent in Conflict with Any Other Security Software?
- How Do I Uninstall the Agent?
- What Should I Do If Agent Installation Failed?
- How Do I Fix an Abnormal Agent?
- What Is the Default Agent Installation Path?
- How Many CPU and Memory Resources Are Occupied by the Agent When It Performs Scans?
- Do WTP and HSS Use the Same Agent?
- How Do I View Servers Where No Agents Have Been Installed?
- What Can I Do If the Agent Status Is Still "Not installed" After Installation?
- What Do I Do If the HSS Upgrade Fails?
-
Brute-force Attack Defense
- How Does HSS Intercept Brute Force Attacks?
- How Do I Handle a Brute-force Attack Alarm?
- How Do I Defend Against Brute-force Attacks?
- What Do I Do If the Account Cracking Prevention Function Does Not Take Effect on Some Accounts for Linux Servers?
- How Do I Unblock an IP Address?
- What Do I Do If HSS Frequently Reports Brute-force Alarms?
- What Do I Do If My Remote Server Port Is Not Updated in Brute-force Attack Records?
- Weak Passwords and Unsafe Accounts
-
Intrusions
- What Do I Do If My Servers Are Subjected to a Mining Attack?
- Why a Process Is Still Isolated After It Was Whitelisted?
- What Do I Do If a Mining Process Is Detected on a Server?
- Why Some Attacks on Servers Are Not Detected?
- Can I Unblock an IP Address Blocked by HSS, and How?
- Why a Blocked IP Address Is Automatically Unblocked?
- How Often Does HSS Detect, Isolate, and Kill Malicious Programs?
- What Do I Do If an IP Address Is Blocked by HSS?
- How Do I Defend Against Ransomware Attacks?
- Abnormal Logins
- Unsafe Settings
- Vulnerability Management
-
Web Tamper Protection
- Why Do I Need to Add a Protected Directory?
- How Do I Modify a Protected Directory?
- What Should I Do If WTP Cannot Be Enabled?
- How Do I Modify a File After WTP Is Enabled?
- What Can I Do If I Enabled Dynamic WTP But Its Status Is Enabled but not in effect?
- What Are the Differences Between the Web Tamper Protection Functions of HSS and WAF?
- Container Guard Service
-
Security Configurations
- What Can I Do If I Cannot Remotely Log In to a Server via SSH?
- How Do I Use 2FA?
- Why Can't I Receive a Verification Code After 2FA Is Enabled?
- Why Does My Login Fail After I Enable 2FA?
- How Do I Add a Mobile Phone Number or Email Address for Receiving 2FA Verification Notifications?
- How Do I Disable the SELinux Firewall?
- Others
- Change History
-
User Guide (Paris)
- Introduction
- Enabling HSS
- Server Security Dashboard
-
Asset Management
- Asset Management
- Server Fingerprints
- Container Fingerprints
- Server Management
- Container Management
- Risk Prevention
-
Prevention
- WTP
- Ransomware Prevention
- File Integrity Monitoring
-
Container Firewalls
- Container Firewall Overview
- Creating a Policy (for a Cluster Using the Container Tunnel Network Model)
- Creating a Policy (for a Cluster Using the VPC Network Model)
- Managing Policies (for a Cluster Using the Container Tunnel Network Model)
- Managing Policies (for a Cluster Using the VPC Network Model)
- Intrusion Detection
- Security Operations
- Security Report
- Installation & Configuration
- Audit
- Permissions Management
- Manually Upgrading HSS
-
FAQs
- About HSS
-
Agent FAQs
- Is the Agent in Conflict with Any Other Security Software?
- How Do I Uninstall the Agent?
- What Should I Do If Agent Installation Failed?
- How Do I Fix an Abnormal Agent?
- What Is the Default Agent Installation Path?
- How Many CPU and Memory Resources Are Occupied by the Agent When It Performs Scans?
- Do WTP and HSS Use the Same Agent?
- How Do I View Servers Where No Agents Have Been Installed?
- What Can I Do If the Agent Status Is Still "Not installed" After Installation?
- What Addresses Do ECSs Access After the Agent Is Installed?
-
Brute-force Attack Defense
- How Does HSS Intercept Brute Force Attacks?
- How Do I Handle a Brute-force Attack Alarm?
- How Do I Defend Against Brute-force Attacks?
- What Do I Do If the Account Cracking Prevention Function Does Not Take Effect on Some Accounts for Linux Servers?
- How Do I Unblock an IP Address?
- What Do I Do If HSS Frequently Reports Brute-force Alarms?
- What Do I Do If My Remote Server Port Is Not Updated in Brute-force Attack Records?
- Weak Passwords and Unsafe Accounts
-
Intrusions
- What Do I Do If My Servers Are Subjected to a Mining Attack?
- Why a Process Is Still Isolated After It Was Whitelisted?
- What Do I Do If a Mining Process Is Detected on a Server?
- Why Some Attacks on Servers Are Not Detected?
- Can I Unblock an IP Address Blocked by HSS, and How?
- Why a Blocked IP Address Is Automatically Unblocked?
- How Often Does HSS Detect, Isolate, and Kill Malicious Programs?
- What Do I Do If an IP Address Is Blocked by HSS?
- How Do I Defend Against Ransomware Attacks?
- Abnormal Logins
- Unsafe Settings
-
Vulnerability Management
- How Do I Fix Vulnerabilities?
- What Do I Do If an Alarm Still Exists After I Fixed a Vulnerability?
- Why a Server Displayed in Vulnerability Information Does Not Exist?
- Do I Need to Restart a Server After Fixing its Vulnerabilities?
- Can I Check the Vulnerability and Baseline Fix History on HSS?
- What Do I Do If Vulnerability Fix Failed?
- Why Can't I Select a Server During Manual Vulnerability Scanning or Batch Vulnerability Fixing?
-
Web Tamper Protection
- Why Do I Need to Add a Protected Directory?
- How Do I Modify a Protected Directory?
- What Should I Do If WTP Cannot Be Enabled?
- How Do I Modify a File After WTP Is Enabled?
- What Can I Do If I Enabled Dynamic WTP But Its Status Is Enabled but not in effect?
- What Are the Differences Between the Web Tamper Protection Functions of HSS and WAF?
- Container Guard Service
-
Security Configurations
- How Do I Clear the SSH Login IP Address Whitelist Configured in HSS?
- What Can I Do If I Cannot Remotely Log In to a Server via SSH?
- How Do I Use 2FA?
- What Do I Do If I Cannot Enable 2FA?
- Why Can't I Receive a Verification Code After 2FA Is Enabled?
- Why Does My Login Fail After I Enable 2FA?
- How Do I Add a Mobile Phone Number or Email Address for Receiving 2FA Verification Notifications?
- If I Choose to Use Verification Code for 2FA, How Do I Get the Code?
- How Do I Modify Alarm Notification Recipients?
- Why No Topics Are Available for Me to Choose When I Configure Alarm Notifications?
- Can I Disable HSS Alarm Notifications?
- How Do I Modify Alarm Notification Items?
- How Do I Disable the SELinux Firewall?
-
Others
- How Do I Use the Windows Remote Desktop Connection Tool to Connect to a Server?
- How Do I Check HSS Log Files?
- How Do I Enable Logging for Login Failures?
- How Do I Clear an Alarm on Critical File Changes?
- Is HSS Available as Offline Software?
- Why Is a Deleted ECS Still Displayed in the HSS Server List?
- Change History
-
API Reference (Kuala Lumpur Region)
- Before You Start
- Calling APIs
-
API Description
- Intrusion Detection
- Ransomware Prevention
-
Baseline Management
- Querying the Weak Password Detection Result List
- Querying the Password Complexity Policy Detection Report
- Querying the Result List of Server Security Configuration Check
- Querying the Check Result of a Security Configuration Item
- Querying the Checklist of a Security Configuration Item
- Querying the List of Affected Servers of a Security Configuration Item
- Querying the Report of a Check Item in a Security Configuration Check
- Ignoring, Unignoring, Repairing, or Verifying the Failed Configuration Check Items
-
Vulnerability Management
- Querying the Vulnerability List
- Querying the Servers Affected by a Vulnerability
- Changing the Status of a Vulnerability
- Querying Vulnerability Information About a Server
- Creating a Vulnerability Scan Task
- Querying a Vulnerability Scan Policy
- Modifying a Vulnerability Scan Policy
- Querying the Vulnerability Scan Tasks
- Querying the List of Servers Corresponding to a Vulnerability Scan Task
- Querying Vulnerability Management Statistics
- Tag Management
- Quota Management
- Policy Management
- Event Management
-
Asset Management
- Collecting Asset Statistics, Including Accounts, Ports, and Processes
- Querying the Account List
- Querying Open Port Statistics
- Querying the Process List
- Querying the Software List
- Querying Automatic Startup Item Information
- Querying the Server List of an Account
- Querying the Open Port List of a Single Server
- Querying the Server List of the Software
- Querying the Service List of Auto-Started Items
- Obtaining the Account Change History
- Obtaining the Historical Change Records of Software Information
- Obtaining the Historical Change Records of Auto-started Items
- Asset Fingerprints - Process - Server List
- Asset Fingerprints - Port - Server List
- Querying the Middleware List
- Querying the Server List of a Specified Middleware
- Web Tamper Protection
- Server Management
- Container Management
-
Container Image
- Querying the Image List in the SWR Image Repository
- Scanning Images in the Image Repository in Batches
- Querying Image Vulnerability Information
- CVE Information Corresponding to the Vulnerability
- Synchronizing the Image List from SWR
- Querying the List of Image Security Configuration Detection Results
- Querying the Check Item List of a Specified Security Configuration Item of an Image
- Querying the Mirror Configuration Check Report
- Appendixes
- Change History
-
User Guide (Ankara Region)
- General Reference
Copied.
Querying All Tags Used in the Current Project of a Tenant
Function
Query all used tags in the current project of a tenant.
Calling Method
For details, see Calling APIs.
URI
GET /v5/{project_id}/{resource_type}/tags
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
The project ID. |
resource_type |
Yes |
String |
Definition Resource type. Constraints N/A Range
Default Value hss |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
tags |
Array of MultiValueTagInfo objects |
Tag information. |
Example Requests
None
Example Responses
Status code: 200
Request succeeded.
{
"tags" : [ {
"key" : "The tag key.",
"values" : [ "Label value 1", "Label value 2" ]
} ]
}
SDK Sample Code
The SDK sample code is as follows.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
package com.huaweicloud.sdk.test;
import com.huaweicloud.sdk.core.auth.ICredential;
import com.huaweicloud.sdk.core.auth.BasicCredentials;
import com.huaweicloud.sdk.core.exception.ConnectionException;
import com.huaweicloud.sdk.core.exception.RequestTimeoutException;
import com.huaweicloud.sdk.core.exception.ServiceResponseException;
import com.huaweicloud.sdk.hss.v5.region.HssRegion;
import com.huaweicloud.sdk.hss.v5.*;
import com.huaweicloud.sdk.hss.v5.model.*;
public class ListProjectTagsSolution {
public static void main(String[] args) {
// The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
// In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
String ak = System.getenv("CLOUD_SDK_AK");
String sk = System.getenv("CLOUD_SDK_SK");
String projectId = "{project_id}";
ICredential auth = new BasicCredentials()
.withProjectId(projectId)
.withAk(ak)
.withSk(sk);
HssClient client = HssClient.newBuilder()
.withCredential(auth)
.withRegion(HssRegion.valueOf("<YOUR REGION>"))
.build();
ListProjectTagsRequest request = new ListProjectTagsRequest();
request.withResourceType("{resource_type}");
try {
ListProjectTagsResponse response = client.listProjectTags(request);
System.out.println(response.toString());
} catch (ConnectionException e) {
e.printStackTrace();
} catch (RequestTimeoutException e) {
e.printStackTrace();
} catch (ServiceResponseException e) {
e.printStackTrace();
System.out.println(e.getHttpStatusCode());
System.out.println(e.getRequestId());
System.out.println(e.getErrorCode());
System.out.println(e.getErrorMsg());
}
}
}
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# coding: utf-8
import os
from huaweicloudsdkcore.auth.credentials import BasicCredentials
from huaweicloudsdkhss.v5.region.hss_region import HssRegion
from huaweicloudsdkcore.exceptions import exceptions
from huaweicloudsdkhss.v5 import *
if __name__ == "__main__":
# The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
# In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
ak = os.environ["CLOUD_SDK_AK"]
sk = os.environ["CLOUD_SDK_SK"]
projectId = "{project_id}"
credentials = BasicCredentials(ak, sk, projectId)
client = HssClient.new_builder() \
.with_credentials(credentials) \
.with_region(HssRegion.value_of("<YOUR REGION>")) \
.build()
try:
request = ListProjectTagsRequest()
request.resource_type = "{resource_type}"
response = client.list_project_tags(request)
print(response)
except exceptions.ClientRequestException as e:
print(e.status_code)
print(e.request_id)
print(e.error_code)
print(e.error_msg)
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
package main
import (
"fmt"
"github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic"
hss "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/hss/v5"
"github.com/huaweicloud/huaweicloud-sdk-go-v3/services/hss/v5/model"
region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/hss/v5/region"
)
func main() {
// The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
// In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
ak := os.Getenv("CLOUD_SDK_AK")
sk := os.Getenv("CLOUD_SDK_SK")
projectId := "{project_id}"
auth := basic.NewCredentialsBuilder().
WithAk(ak).
WithSk(sk).
WithProjectId(projectId).
Build()
client := hss.NewHssClient(
hss.HssClientBuilder().
WithRegion(region.ValueOf("<YOUR REGION>")).
WithCredential(auth).
Build())
request := &model.ListProjectTagsRequest{}
request.ResourceType = "{resource_type}"
response, err := client.ListProjectTags(request)
if err == nil {
fmt.Printf("%+v\n", response)
} else {
fmt.Println(err)
}
}
|
For SDK sample code of more programming languages, see the Sample Code tab in API Explorer. SDK sample code can be automatically generated.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
package com.huaweicloud.sdk.test;
import com.huaweicloud.sdk.core.auth.ICredential;
import com.huaweicloud.sdk.core.auth.BasicCredentials;
import com.huaweicloud.sdk.core.exception.ConnectionException;
import com.huaweicloud.sdk.core.exception.RequestTimeoutException;
import com.huaweicloud.sdk.core.exception.ServiceResponseException;
import com.huaweicloud.sdk.hss.v5.region.HssRegion;
import com.huaweicloud.sdk.hss.v5.*;
import com.huaweicloud.sdk.hss.v5.model.*;
public class ListProjectTagsSolution {
public static void main(String[] args) {
// The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
// In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
String ak = System.getenv("CLOUD_SDK_AK");
String sk = System.getenv("CLOUD_SDK_SK");
String projectId = "{project_id}";
ICredential auth = new BasicCredentials()
.withProjectId(projectId)
.withAk(ak)
.withSk(sk);
HssClient client = HssClient.newBuilder()
.withCredential(auth)
.withRegion(HssRegion.valueOf("<YOUR REGION>"))
.build();
ListProjectTagsRequest request = new ListProjectTagsRequest();
request.withResourceType("{resource_type}");
try {
ListProjectTagsResponse response = client.listProjectTags(request);
System.out.println(response.toString());
} catch (ConnectionException e) {
e.printStackTrace();
} catch (RequestTimeoutException e) {
e.printStackTrace();
} catch (ServiceResponseException e) {
e.printStackTrace();
System.out.println(e.getHttpStatusCode());
System.out.println(e.getRequestId());
System.out.println(e.getErrorCode());
System.out.println(e.getErrorMsg());
}
}
}
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# coding: utf-8
import os
from huaweicloudsdkcore.auth.credentials import BasicCredentials
from huaweicloudsdkhss.v5.region.hss_region import HssRegion
from huaweicloudsdkcore.exceptions import exceptions
from huaweicloudsdkhss.v5 import *
if __name__ == "__main__":
# The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
# In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
ak = os.environ["CLOUD_SDK_AK"]
sk = os.environ["CLOUD_SDK_SK"]
projectId = "{project_id}"
credentials = BasicCredentials(ak, sk, projectId)
client = HssClient.new_builder() \
.with_credentials(credentials) \
.with_region(HssRegion.value_of("<YOUR REGION>")) \
.build()
try:
request = ListProjectTagsRequest()
request.resource_type = "{resource_type}"
response = client.list_project_tags(request)
print(response)
except exceptions.ClientRequestException as e:
print(e.status_code)
print(e.request_id)
print(e.error_code)
print(e.error_msg)
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
package main
import (
"fmt"
"github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic"
hss "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/hss/v5"
"github.com/huaweicloud/huaweicloud-sdk-go-v3/services/hss/v5/model"
region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/hss/v5/region"
)
func main() {
// The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
// In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
ak := os.Getenv("CLOUD_SDK_AK")
sk := os.Getenv("CLOUD_SDK_SK")
projectId := "{project_id}"
auth := basic.NewCredentialsBuilder().
WithAk(ak).
WithSk(sk).
WithProjectId(projectId).
Build()
client := hss.NewHssClient(
hss.HssClientBuilder().
WithRegion(region.ValueOf("<YOUR REGION>")).
WithCredential(auth).
Build())
request := &model.ListProjectTagsRequest{}
request.ResourceType = "{resource_type}"
response, err := client.ListProjectTags(request)
if err == nil {
fmt.Printf("%+v\n", response)
} else {
fmt.Println(err)
}
}
|
For SDK sample code of more programming languages, see the Sample Code tab in API Explorer. SDK sample code can be automatically generated.
Status Codes
Status Code |
Description |
---|---|
200 |
Request succeeded. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot