LogoLogo
Our ServiceOther service
English
English
  • 🇬🇧VNG Cloud Help Center
  • Overview
    • About VNG Cloud
    • Product Updates (All)
      • 2024
  • vServer
    • Compute
      • What is vServer?
      • Announcements and updates
        • 2024
        • 2023
      • Getting started
        • UserData
      • Quota Limit
      • Instance
        • Connect to virtual server
          • Connecting a Windows Server by Remote Desktop (RDP)
          • Connecting to a Linux server by SSH Client
        • Flavor
        • Instance Lifecycle
        • Create an instance by using the wizard
        • Resize Instance
        • Restart Instance
        • Compute Encryption Volume
          • Using Compute Encryption Volume
      • Placement Group
      • Image
      • Network
        • Virtual Private Cloud (VPC)
        • DHCP Options Sets
          • DNS Server IP Address
        • Instance IP Address
        • Floating IP
        • External Interface
        • Virtual IP
        • Route Table
        • Peering
        • Test Internet Speed
        • Network ACL
        • Bandwidth
          • Package Bandwidth VNG Dedicated
          • Package Bandwidth Pay As You Go
          • Package Bandwidth Share
          • Package Bandwidth Dedicated
          • Payment Methods
      • Interconnect
        • Starts with Interconnect
        • Interconnect Features
        • Location connect and Bandwidth
        • Multicloud-Connection
        • Connections
          • Create a Dedicated Connection
          • View connection information
          • Update Connection
          • Delete Connection
        • UseCase
          • Multicloud Interconnect
          • Hybrid Interconnect
          • VPN Interconnect
          • Using a combination of Interconnect connection methods
      • Volume
        • Extend volume with Linux OS
        • Extend Volume with Windows OS
        • Volume Types
        • Check the IOPS performance
        • Convert Volume Type
      • Snapshot
        • Activate Snapshot
        • Create Snapshots
        • View Snapshot Information
        • Roll back VM by using a snapshot
        • Roll back a disk by using a snapshot
        • Delete Snapshot
        • How to calculate a Snapshot Service Charges
        • Disable Snapshot Service
        • UseCase Snapshot
          • Disaster Recovery
          • Develop and testing
          • Backup and restore the system periodically
          • Migrate data and applications between environments
          • Resist attacks from Hackers or malware infections
        • Share Snapshots
      • Security
        • SSH Key (Key pairs)
        • Security Groups
      • vBackup
        • Create backups for VM with policy
        • Create backups immediately (Back now)
        • Automatic Backup
        • Changing the backup policy
        • Restore Backup
        • Delete Backup
        • Backup Policies
          • Create, edit, delete backup policies
          • Schedule Structure of the Policy
      • Load Balancer
        • Deployment mode
        • Feature Comparison
        • Application Load Balancer
          • How it works (ALB)
          • Getting Started
          • Manage Load balancer
          • Listener
            • Add a HTTP listener
            • Add a HTTPS listener
            • Update & Delete a Listener
            • Listener Policies
            • Client Certificate Authentication
            • Config IP whitelist to load balancer
            • Config timeout
          • Certificate
            • Upload a certificate
          • Pool
            • Add & Update a Pool
            • Pool Members
              • Attach pool members
            • Config health check setting
            • Enable sticky session
            • Enable TLS encryption
            • Pool's algorithm
        • Network Load Balancer
          • How it works (NLB)
          • Getting Started (NLB)
          • Manage Load Balancer (NLB)
          • Listener (NLB)
            • Add a TCP Listener
            • Add a UDP Listener
            • Update & Delete Listener (NLB)
            • Config IP whitelist to load balancer
            • Config timeout
          • Pool
            • Add & Update a Pool
            • Pool Members
              • Attach pool members
            • Config health check setting (NLB)
            • Pool's algorithm
          • Common use cases
            • Config protocol Proxy with member Nginx
        • Monitor your load balancers
          • Metrics
          • Logs
        • Security
      • APIs & IaC
      • Terraform
        • Install Terraform
        • Manage vServer with Terraform
        • Manage vLB with Terraform
        • Reference Document
        • Argument Intergration with Terraform
      • Identity and Access Management (IAM) for vServer
        • Actions, resources, and required conditions for vServer Access Decentralization
        • Use Cases IAM
      • Pricing
    • vMarketplace
      • Third-party integration
      • Application Software Installation
        • Create & Install App
      • Network Software Installation
        • Juniper vSRX on HCM03
          • Create Juniper vSRX
          • Routing IP Range within VPC
        • Pfsense on HCM03
          • Create Pfsense App
          • Routing IP Range within VPC
          • VPN Client to Server
          • VPN Site to Site
            • Pfsense - AWS Cloud
          • Troublehooting - Disconnect network
          • Notice & Limitation
          • MTU & “DF flag” best practice on VNG Cloud
  • vStorage
    • Object storage
      • Object storage (HCM03, HAN01)
        • What is vStorage?
          • What is Region?
          • What is Farm?
          • Unit of Measurement
        • Announcements and Updates
        • Getting Started with vStorage
          • Step 1: Create a project
          • Step 2: Create a container
          • Step 3: Upload an object
          • Step 4: Download an object
          • Step 5: Copy Object to a Directory
          • Step 6: Delete the object and container
        • Features of vStorage
          • Working with projects
            • Projects overview
            • Project naming rules
            • Create a project
            • Viewing project properties
            • Resize a project
            • Renew a project
            • Auto-renew a project
            • Delete a project
            • Restore a project
            • IP Range ACLs for a project
          • Working with containers
            • Containers overview
            • Containers naming rule
            • Create a container
            • Viewing container properties
            • Search containers
            • Versioning container
            • Make container public
            • Make container private
            • ACLs for a container
            • CORS for a container
            • Container lifecycle
            • Delete a container
            • IP Range ACLs for a container
          • Working with directories and objects
            • Objects overview
            • Objects naming rule
            • Upload objects
            • Viewing directory and object properties
            • Search directories and objects
            • Share objects
            • Move objects
            • Copy objects
            • Rename an object
            • Set tags for objects
            • Set metadatas for objects
            • Download objects
            • Delete objects
            • Working with directories
          • Working with report
            • View summary reports across all regions
            • View summary reports on a specific region
            • View summary reports on a specific project
          • Working with trial project
          • Working with POC project
          • Working with vBackup project
          • Working with Archive project
        • Identity and Access Management
          • Managing vStorage access account
            • Root User Account
            • IAM User Account
              • Create an IAM User Account
              • Create Policies for IAM User Account
              • Attach Policies with IAM User Account
              • Delete an IAM User Account
            • Service Account
              • Create a Service Account
              • Create Policies for Service Account
              • Attach Policies with Service Account
              • vStorage Credentials
                • Create a S3 key
                • Create a Swift user
                • Attach S3 Keys and Swift Users to the Service Account
                • Delete S3 key, Swift user
              • Delete a Service Account
          • Managing Access to vStorage Resources
            • Access Permissions and Working Through vStorage
            • Access Permissions and Working Through IAM
            • Features, vStorage Resources, and Access Permissions
            • Access Permissions and Working Through Root User Account
            • Access Permissions and Working Through IAM User Account
            • Access Permissions and Working Through Service Account
        • 3rd Party Softwares
          • S3cmd
            • Integrating S3cmd with vStorage
            • Using S3cmd
          • Cyberduck
            • Integrating Cyberduck with vStorage
            • Using Cyberduck
          • Rclone
            • Integrating Rclone with vStorage
            • Using Rclone
          • Swift Client
            • Integrating SwiftClient with vStorage
            • Using SwiftClient
          • S3 SDK
            • Integrating S3 SDK with vStorage
            • Using S3 SDK
          • MinIO Client (MC)
            • Integrating MinIO Client with vStorage
            • Using MinIO Client
          • S3 Browser
            • Integrating S3 Browser with vStorage
            • Using S3 Browser
          • AWS CLI
            • Integrating AWS CLI with vStorage
            • Using AWS CLI
        • Resource Quota
        • Feature Limitations
        • Charging Fee
          • Charging for prepaid users
          • Charging for postpaid user
        • Monitoring vStorage
          • Monitoring vStorage Through Metrics
          • Monitoring vStorage Through Logs
        • Security
          • Access Control
          • Data in Transit Security
          • Data Security stored on vStorage
        • Usecase
          • Migrate data
            • [Rclone] Mount vStorage as Local Drive on Linux
            • [Rclone] Mount vStorage to Window server
            • [Rclone] Sync data from AWS S3 to vStorage
          • Optimize performance
        • API developers
          • vStorage API
            • Integrating vStorage API
            • Using vStorage API
          • vStorage Swift REST API
            • Integrating Swift REST API
            • Using Swift REST API
        • Storage gateway
          • Create and Use Storage Gateway
          • Replacing Fileserver with Gateway Application
      • Object storage (HCM04)
        • Getting Started with Object storage
          • Step 1: Create a project
          • Step 2: Create a bucket
          • Step 3: Upload/ Download objects
          • Step 4: Create a S3 Key
          • Step 5: Integrate 3rd party softwares with vStorage
          • Step 6: Use 3rd party softwares to action on vStorage
        • Features of Object Storage
          • Working with project
          • Working with bucket
            • Working with buckets via vStorage Portal
              • Bucket Versioning
              • Object Lock
              • Bucket Policy
              • Bucket ACLs
              • Bucket CORS
              • Bucket Event Notification
              • Bucket Lifecycle
            • Working with buckets via 3rd party software
          • Working with objects and directories
            • Working with objects and directories via vStorage Portal
            • Working with objects and directories via 3rd party software
          • Working with reports
        • Resource Quota
        • Access Management
          • Working with Root User Account
          • Working with IAM User Account
          • Working with Service Account
          • Working with S3 Keys
          • Limitation
        • API Developers
        • 3rd party softwares
          • S3cmd
            • Integrate S3cmd with vStorage
            • Using S3cmd
          • Cyberduck
            • Integrate Cyberduck with vStorage
            • Using Cyberduck
          • Rclone
            • Integrate Rclone with vStorage
            • Using Rclone
          • S3 SDK
            • Integrate S3 SDK with vStorage
            • Using S3 SDK
          • S3 Browser
            • Integrate S3 Browser with vStorage
            • Using S3 Browser
        • Use case
          • Migrate data
            • [Rclone] Mount vStorage on Window server
            • [Rclone] Mount vStorage as Local Drive on Linux
            • [Rclone] Sync data from AWS S3 to vStorage
        • Charging Fee
    • Filestorage
      • What is FileStorage?
      • Announcements and Updates
      • Getting Started with FileStorage
        • Create a Public NFS File Storage
        • Create a Private NFS File Storage
        • Create a Private SMB File Storage
          • Create a Private SMB File Storage without Active Directory
          • Create a Private SMB File Storage with Active Directory
          • Create a Private SMB File Storage without Active Directory
          • Create a Private SMB File Storage with Active Directory
      • Features of FileStorage
        • Create a File Storage
          • Create a NFS File Storage
          • Create a SMB File Storage without AD
          • Create a SMB File Storage with AD
        • Edit a File Storage
        • Resize a File Storage
        • Delete a File Storage
      • Specifications
      • Access Management
        • File Storage features, resources, and access
      • Resource Quota
      • Charging Fee
    • Backup with Veeam
      • Getting started with Veeam
        • Step 1: Install Veeam Backup & Replication
        • Step 2: Initialize Repository
        • Bước 3: Create Job backup
        • Step 4: Data Recovery on Veeam
      • Features of Veeam
      • Access Management
      • Charging Fee
      • Monitoring Service
      • Security
      • Use case
      • Glossary
  • Backup Center
    • Announcements and Updates
    • Cloud Backup
      • Get Started with Backup Server
      • Backup Location
        • Create and Manage backup locations
      • Backup Server
        • Create Backup Plan (Backup Server)
        • Create Backup Server Point
        • Backup Server Point Management
        • Restore resources
        • Change backup policy
        • Change backup location
      • Backup Policy
      • Pricing
      • Use case
        • Migrate backup server from vStorage to Vault (backup location)
    • Disaster Recovery Center (DRC)
      • Operating model
      • Server Disaster Recovery (SDR)
        • Getting Started with SDR
        • SDR Management
          • Automatically activate Snapshot
          • Attach a Server
          • Start Replication
          • Periodic Backup and Recovery Point
          • Test Failover
          • Failover
          • Stop & Resume Replication
          • Restart Replication
          • Recovery Point Retention
        • Pricing
        • Access Management
        • Security
        • Monitoring
        • Service Limits
  • vMonitor Platform
    • What is vMonitor Platform?
      • What is vMonitor Platform Metric?
        • Metric Quota Class
      • What is vMonitor Platform Log?
        • Log Project Class
      • What is vMonitor Platform Synthetic?
        • Synthetic Test Quota Class
    • Announcements and Updates
      • Announcement and Instructions on Switching Packages on the vMonitor Platform
    • Getting Start with vMonitor Platform
      • Getting Start with Metrics
      • Getting Start with Logs
      • Getting Start with Synthetic
    • Features of vMonitor Platform
      • Dashboard
        • Widget
          • Line
          • Bar
          • Stack area
          • Pie
          • Number
          • Table
          • Log search
        • Query
          • Metric query
          • Log query
        • Variable, Save Querying and View
      • Notification
        • Working with SMS Notification Quota
        • Working with Email Notification Quota
        • Working with Notification
          • SMS
          • Email
          • Slack
          • Teams
          • Telegram
          • Webhook
      • Alarm
        • Metric Alarm
        • Log Alarm
      • Metrics
        • Working with Metric Quota
        • Working with Metric Agent
          • Installing Metric Agent on Server
            • Linux OS
            • Linux OS has internet connection limitations
            • Window OS
        • Working with Metric Information
        • Working with Product Metric
          • Working with vServer-Metric
          • Working with vLB-Metric
          • Working with vDB-Metric
          • Working with vStorage-Metric
        • Applications support integration
          • Kubernetes
        • Supported Metrics List
          • List Host's metrics
          • List vServer's metric
          • List vLB's metrics
          • List vDB's metrics
          • List vStorage's metrics
      • Logs
        • Working with Log Project Quota
        • Working with Log Agent
          • Prepare to initiate log push connection
          • Create a Certificate
          • Install Log Agent on OS
            • CentOS
            • Debian/ Ubuntu
            • Windows
          • Install Log Agent on Docker
          • Install Log Agent on Kubernetes
        • Working with Log Project
          • Archive
          • Refill
          • Log mapping
          • Field mapping
        • Working with Log search
          • Search logs
          • Export logs
        • Working with Log pipeline
          • Processor Groups
          • Processor
            • Grok Parser
              • Grok Patterns
            • JSON Parser
            • CSV Parser
            • Field Remapper
            • Date Parser
            • GEO IP Parser
            • User-agent Parser
        • Working with Log2metric
        • Working with Product Logs
          • Working with vLB-Log
          • Working with vStorage-Log
          • Working with vCDN-Log
      • Synthetics
        • Working with Synthetic Test Quota
        • Working with Synthetic API Test
          • API Test with HTTP(s)
          • API Test with Ping
          • API Test with TCP
        • Working with Location
          • Public location
          • Private location
    • Identity and Access Management
    • Resource Quota
    • Pricing
    • Security
      • Access Permissions Security
      • Data Security During Transmission
  • VKS
    • What is VKS?
    • How VKS works?
    • Announcements and Updates
      • Release notes
    • Getting Started with VKS
      • Instructions for installing and configuring the kubectl in Kubenetes
      • Create a Public Cluster
        • Create a Public Cluster with Public Node Group
        • Create a Public Cluster with Private Node Group
          • Palo Alto as a NAT Gateway
          • Pfsense as a NAT Gateway
      • Create a Private Cluster
      • Expose a service through vLB Layer4
      • Expose a service through vLB Layer7
        • Automatically manage Certificates in VKS with Nginx Ingress Controller, Cert-Manager, and Let's Encr
      • Preserve Source IP when using NLB and Nginx LoadBalancer Controller
      • Integrate with Container Storage Interface (CSI)
      • Upgrading Control Plane Version
      • Upgrading Node Group Version
      • Use Terraform to create a Cluster and Node Group
      • Working with NVIDIA GPU Node Group
    • Clusters
      • Public Cluster and Private Cluster
      • Upgrading Control Plane Version
      • Whitelist
      • Stop POC
    • Node Groups
      • Auto Healing
      • Auto Scaling
      • Upgrading Node Group Version
      • Lable and Taint
    • Network
      • Working with Application Load Balancer (ALB)
        • Ingress for an Application Load Balancer
        • Configure for an Application Load Balancer
        • ALB Limitation
      • Working with Network load balancing (NLB)
        • Integrate with Network Load Balancer
        • Configure for a Network Load Balancer
        • NLB Limitation
      • CNI
        • Using CNI Calico Overlay
        • Using CNI Cilium Overlay
        • Using CNI Cilium VPC Native Routing
      • Load Balancer
        • Using Network Load Balancer
        • Using Application Load Balancer
      • Auto Scaling
      • Fleet Management
    • Storage
      • Working with Container Storage Interface (CSI)
        • Integrate with Container Storage Interface (CSI)
        • CSI Limitation
    • Security Group
    • Migration
      • Migrate Cluster from VKS to VKS
      • Migration Cluster from vContainer to VKS
      • Migrate Cluster from another platform to VKS
      • Migrate Limitation
    • Working VKS with Terraform
    • Monitoring
      • Metrics
    • Charging Fee
    • Reference
      • Kubernetes versions
      • Node Flavors
      • System Image
  • vDB
    • Relational Database Service (RDS)
      • Create a RDS Instance
      • Connect to RDS Instance
        • Connect to an RDS Instance via SSH Tunnel
      • Managing RDS Instance Information
      • Backing Up RDS Instance
      • Restoring RDS Instance
      • Managing Configuration Group in RDS Instance
      • Extend the usage period RDS Instance
      • Monitoring vDB with vMonitor Platform
      • Import Data into RDS Instance (MySQL/MariaDB) using mysqldump
      • Creating Read Replicas
      • Promote Read Relica to Standalone
      • vDB PostgreSQL - Supported Extensions
      • Configuring Replication with RDS (MySQL/MariaDB)
      • Attention & Limitations
    • MemoryStore Database Service (MDS)
      • Create MDS Instance
      • Connect MDS Instance
      • Manage MDS Instance
      • Manage MDS Config Group
      • Backup MDS Instance
    • Security (Bảo mật)
  • vCDN
    • Overview
      • What is CDN?
      • Overview Architecture
        • Network Architecture
        • Load Coordination Mechanism
        • Data Distribution Mechanism
          • PULL
          • PUSH
    • Getting Started with vCDN
      • Live Streaming
      • Video On Demand Streaming
      • Object Download
      • Web Accelerator
      • Transcoding and advanced features
        • Operating Model
        • Install Sigma Media Server
        • Use cases
          • Create Live Transcode Channel
          • Live Transcode combines recordings for later VOD playback
          • Create Simultaneous Restream Channels to Multiple Platforms (RTMP)
          • Transcode video files (MP4)
        • Sigma API developers
      • Using OBS Studio to Push Live Stream
    • Feature details
      • Security Link
      • CNAME
      • Cache Time
      • Development Mode
      • Origin
        • HTTP Origin
        • Object Storage S3
        • Host Origin
      • Optimize File Size
      • Cryptography
      • Caching
      • Automatically Redirect from HTTP to HTTPS
      • CDN Purge Cache
      • Page Rule
    • Access Management
    • Pricing
    • API Developers
    • Monitoring
    • Report
    • Security
      • Certificate Management
  • vCloudstack
    • Get Started with vCloudStack
      • Overview of features
      • Initialize VM on vCloudStack
      • Network Configuration
      • Load Balancer in vCloudStack
        • Create Application LB in vCloudStack
          • Listener for Application LB
          • Pool in vCloudstack
          • Certificate in vCloudstack
        • Create Network LB in vCloudStack
          • Listener for Network LB
          • Pool (NLB) in vCloudStack
        • Advanced Features
      • Volumes in vCloudStack
      • Backup in vCloudStack
      • Snapshots in vCloudStack
    • Get start with Admin Site
      • User Management
      • Access Management
      • Track resource usage information
      • Physical Infrastructure Monitoring
  • vContainer Registry
    • Getting Started
    • Repository
      • Create a repository
      • Edit quota limit
      • Manage image
      • Repository History
    • Repository user
      • Create repository user
      • Edit user information
      • Edit user permission
      • Refresh secret key
      • Change user status
  • vColocation
    • Accessing the vColo Customer Portal
    • Dashboard
    • Space list
      • View rack layout
      • View rack detail
      • Filter list
    • Ticket request
      • Open a ticket
      • Ticket list
  • DataSync
    • What is DataSync?
    • Announcements and Updates
    • Getting Start with DataSync
    • Features of DataSync
      • Create a Transfer Job
      • Run a Transfer Job
        • Run one time
        • Run schedule
      • Monitor Transfer Job Results
      • Stop a Transfer Job
      • Edit a Transfer Job
      • Xóa Transfer Job
      • Retry a Transfer Job
    • Identity and Access Management
      • Managing DataSync access account
        • Root User Account
        • IAM User Account
          • Create an IAM User Account
          • Create Policies for IAM User Account
          • Attach Policies with IAM User Account
          • Delete an IAM User Account
      • Managing Access to DataSync Resources
        • Features, DataSync Resources, and Access Permissions
        • Access Permissions and Working Through IAM
        • Access Permissions and Working Through Root User Account
    • Resoure Quota
    • Charging Fee
    • Monitoring
      • Monitoring DataSync Through Metrics
      • Monitoring DataSync Through Logs
    • Security
      • Data in Transit Security
      • Access Control
      • Data Security stored on vStorage
    • Usecase
      • Transfer data from Amazon S3 to vStorage
      • Transfer data from vStorage to vStorage cross account
      • Transfer data from vStorage to vStorage same account
  • vNetwork
    • Endpoint
      • Create Endpoint
      • Rename Endpoint
      • Delete Endpoint
      • View List of Endpoints
    • Public NAT Instance
      • Create NAT
      • Rename NAT
      • Delete NAT
      • Add/ Remove NAT Port
    • Cross Connect
      • Create Cross Connect
      • Create a VPC Connection
      • Delete Cross Connect
      • Resize Bandwidth
      • Bandwidth Packages
      • VPC Connection Conditions
      • UseCase
    • VPN (Virtual Private Network) Site To Site
      • Create VPN Site-to-Site
        • VPN Connect Condition
        • Add/Update/Delete more Site And Tunnel
        • Support IPSEC Configuration
      • Change VPN Bandwidth
      • VPN Packages
      • Delete VPN
      • Demo Site-to-Site VPN
      • FAQ
  • Key Management System
    • Customer Managed Key
    • VNG Cloud Managed Key
  • Service Health
  • Veka.ai
  • Identity and Access Management (IAM)
    • Getting Start with IAM
    • Common Usecases
      • Access control by job function
      • Access control to specific resources
      • Managing Resources with Terraform and Service Account
      • Use Deny permission to deny access
      • Authorization for access between root user accounts with Service Account Impersonate feature
    • IAM for VNG Cloud's Services
      • IAM for vServer
      • IAM for vStorage
      • IAM for vMonitor
      • IAM for DataSync
    • Types of IAM Identifiers
      • User Accounts
        • How to login to VNG Cloud
      • User Groups
      • Service accounts
      • vStorage Credential
      • Identity Providers
    • IAM Access Management
      • Access Management via Policy
      • VNG Managed Policy
    • Audit Logs Management
    • Limitation
    • Security for IAM
  • Billing & Payment
    • vConsole – Management channel for billing and resources
      • What is vConsole
      • Getting Started
    • What's Billing & Payment
    • Experience with Billing & Payment
      • Prepaid & Postpaid Users
      • Resource lifecycle management
        • Create resource
        • Resize resource configuration
        • Renew resource
        • Auto-renew resources - policy & terms
        • Recover resource
        • Delete resource
        • Resource POC
          • Converting resource from POC to Prepaid
      • Payment
        • Online payment
        • Payment of POC resources
        • Credit hold
        • Automatic invoice payment
        • Apply coupon at payment step
      • Invoice management
  • vCalculator - Service estimated tool
  • Partner Portal user guide
    • Partner Portal Overview
    • Partner Registration
    • Registration of Partner Discount
    • Registration of Partner's Customer
    • Set Up Discounts for Customers
    • Top up Credit for Customer
    • View Report on Partner Portal
    • DEAL Registration
    • View List of DEAL
    • View Detail Deal Information
    • Update Deal Stage
    • View Partner Discount by Deal
    • View Customer Discount by Deal
  • Getting start with VNG Cloud account
    • Register
    • Update Profile
    • Two-Factor Authentication (2FA)
    • Change Password Guide
    • Remove Account Guide
    • Change Phone Number Guide
  • FAQ
    • vServer
    • vStorage
    • vNetwork
    • vCDN
    • vDB
    • NTP server
    • DDoS
Powered by GitBook
LogoLogo

Address

  • VNG Corporation

Contact us

  • support@vngcloud.vn
  • 1900 1549

About us

  • About VNG Cloud
  • Get started our cloud
On this page
  1. vStorage
  2. Object storage
  3. Object storage (HCM03, HAN01)
  4. API developers
  5. vStorage Swift REST API

Using Swift REST API

PreviousIntegrating Swift REST APINextStorage gateway

Last updated 10 months ago

To use Swift Rest API, you need at least 1 Swift user. To create a Swift user, please refer to Initializing Swift user. You can use this Swift user to create (or delete) multiple containers, where each container serves as a storage unit (similar to a folder). In each container, users can upload, get, and delete multiple corresponding objects (objects here are understood as files or subfolders within the container).

Basic process: Authentication -> Create Container -> Upload Object

Below is a list of Swift Rest APIs that we provide, along with instructions on how to operate with POSTMAN or CURL.

1. Get token

Input: username, password, projectId, authentication url

Url
/auth/tokens

Method

POST

Header

Content-Type: application/json

Body

{ "auth": { "identity": { "methods": [ "password" ], "password": { "user": { "domain": { "name": "default" }, "name": "{username}", "password": "{password}" } } }, "scope": { "project": { "domain": { "name": "default" }, "id": "{projectId}" } } } }

Output:

Response trả về

"url: " với public interface trong catalog có type "object-store", đây là link dùng cho những request sau này. Trong đó, " AUTH_d6f0078021f4417989d6ba8ae4320dea" tương ứng với một account trong object storage.

Header trả về

"x-subject-token: gAAAAABdAhsbpeT0CLQiUvTgX3TcVua8c7RLFIY074FlLvDWpGp06EV8SRCbuLGzSL5Q2AnfYogSWydNeZc5dWpRbTKxiwGXuP-wAoPPmIGvBctSkkwnhMF8UQXLBmwlIT43Mudc9ZuHgRLqlW1BT3OmhN9ugKTQHyzgCuzBmHqVgtXp6dRJYr0", đây là thông tin token dùng để xác thực cho những request sau.

Chú ý:

  • Token luôn có expired, nếu hết expired vui lòng get token mới

Get token dùng CURL thông qua RESTful API

curl -i -X POST -H 'Content-Type: application/json; charset=utf-8' <authentication_url>/v3/auth/tokens -d <auth_body>

curl -i -X POST "" \

-H 'Content-Type: application/json; charset=utf-8' \

-d $'{

"auth": {

"scope": {

"project": {

"id": "6e89e27c18824e70b84a02487a93c69f",

"domain": {

"name": "default"

}

}

},

"identity": {

"methods": [

"password"

],

"password": {

"user": {

"name": "${username}",

"password": "${password},

"domain": {

"name": "default"

}

}

}

}

}

}'

2. Create a container

Url
/v1/{account}/{container_name}

Method

PUT

Header

X-Auth-Token

Body

(Không bắt buộc)

  • In which :

+ Value của header "X-Auth-Token" chính là value của "x-subject-token" được lấy từ mục 3.1 (Get Token).

+ "container_name" là tên của container, bạn có thể đặt tùy ý. Tuy nhiên để tương thích với tất cả các client tools cũng như tránh các lỗi liên quan đến việc xử lý ký tự đặc biệt hoặc unicode thì tên container chỉ nên chứa các ký tự (a-z, A-Z) hoặc số (0-9). Tên container không nên chứa các ký tự đặc biệt như @, #, $, %, ^, &, *, ., /, \, {, }, [, ], |, ), ( …

Warning:

  • Some client tools may encounter errors if the container name contains special characters.

  • When working with containers (buckets) using the S3 protocol, the names of these containers must contain lowercase letters and numbers, without uppercase letters, special characters, or spaces.

  • If the request returns a status code of 201, you have successfully created a container (in the example above, the container is successfully created with the name 'container_name').

  • Within each container, you can upload multiple objects for storage (objects here could be, for example, images, any files, or folders).

Create a container using CURL through RESTful API

curl -i -X PUT -H "X-Auth-Token: <token>" <storage url>/mycontainer

curl -v -i -X PUT -H "X-Auth-Token: gAAAAABdQQ8uIM6CWmA85hKi6MtOvuGP1qok8OJzp0-h74QAn9ptncjT16sg0pxxilUSCPgFeb9NKpNfmkD9kDLYRAPkymOB9wlNWNTkiz20m2uZpCeTIDUpPMO110rSXBMaE8Gszq9BLiKFyuHVmTEKeyoQ3qEFxitXilEwIg201IRtbJFiCa0" \

3. Upload an object (object size < 5GB)

Url
/v1/{account}/{container}/{name_object}

Method

PUT

Header

X-Auth-Token

Token được lấy từ "x-subject-token"

Content-Type

Chọn content-type phù hợp với object upload (Ví dụ: Content-Type: image/jpeg với file hình có định dạng jpg).

Body

Binary file: choose file

Ví dụ cụ thể:

Url

fileName.png là tên của object, object này sẽ được lưu trong container "nameContainer"

Method

PUT

Header

X-Auth-Token: gAAAAABdAhsbpeT0CLQiUvTgX3TcVua8c7RLFIY074FlLvDWpGp06EV8SRCbuLGzSL5Q2AnfYogSWydNeZc5dWpRbTKxiwGXuP-wAoPPmIGvBctSkkwnhMF8UQXLBmwlIT43Mudc9ZuHgRLqlW1BT3OmhN9ugKTQHyzgCuzBmHqVgtXp6dRJYr0

Content-Type: image/png

Với hình ảnh có định dạng file png tương ứng Content-Type: image/png

Body

Binary file: choose file

Ví dụ trong postman: chọn body binary, rồi chọn file tương ứng với máy tính local.

Upload an object using CURL through RESTful API

curl -i -T myobject -X PUT -H "X-Auth-Token: <token>" <storage url>/mycontainer/myobject

curl -v -i --data-binary 50GB -X PUT -H "Content-Type:application/octet-stream" -H "X-Auth-Token: gAAAAABdQQ8uIM6CWmA85hKi6MtOvuGP1qok8OJzp0-h74QAn9ptncjT16sg0pxxilUSCPgFeb9NKpNfmkD9kDLYRAPkymOB9wlNWNTkiz20m2uZpCeTIDUpPMO110rSXBMaE8Gszq9BLiKFyuHVmTEKeyoQ3qEFxitXilEwIg201IRtbJFiCa0" \

4. Upload large object (object size > 5GB)

Url
/v1/{account}/{container}/{name_object}/{segment_object_name}

Method

POST

Header

X-Auth-Token

Body

(Optional)

  • Trong đó:

+ "container" là tên container.

+ "name_object" tên của object muốn lấy nằm trong container.

Upload an object using CURL through RESTful API

Với các object có kích thước lớn (kích thước > 5GB) thì vStorage không hỗ trợ upload theo flow bình thường. Để có thể tải lên được những object này, cần phải thực hiện các bước sau:

  • Bước 1: Tạo segments container

vStorage dùng container segments để lưu trữ danh sách tất cả các segment objects của mỗi large object. Do đó, trước khi upload một large cần phải tạo container nếu nó chưa tồn tại, nếu nó đã tồn tại trước đó, không cần phải tạo lại thêm lần nữa.

Tên container này có pattern <container_segments>

Ví dụ: container bạn muốn lưu trữ large object có tên là: <mycontainer> thì segments container của nó sẽ có tên là <mycontainer_segments>.

Để tạo container, vui lòng tham chiếu đến mục <Create container>

  • Bước 2: Chia một large object thành những phần nhỏ hơn (segment a large object into segment objects)

Việc chia một large object thành những phần riêng biệt có thể dùng command line, client tool hoặc library.

Ví dụ: Upload object myobject (10 GB), segment object myobject này các segment objects:

    • 00000001 (2GB)

    • 00000002 (2GB)

    • 00000003 (2GB)

    • 00000004 (2GB)

    • 00000005 (2GB)

  • Bước 3: Upload các phần này lên vStorage dùng RESTful API (uploads the segment objects using RESTful API)

Việc upload các segment objects như upload các small objects dùng Postman, CURL hay bất kỳ client tool, library nào hỗ trợ upload file thông qua HTTP. Sau khi upload từng segment object lên vStorage, response trả về sẽ gồm giá trị Etag, giá trị này được dùng tạo nội dung Json cho manifest.

Ví dụ: Upload các segment objects của Object myobject dùng CURL:

curl -X PUT -H 'X-Auth-Token: <token>'

http://<storage_url>/container/myobject/00000001 --data-binary '00000001'

=> ETAG: etagoftheobjectsegment1

curl -X PUT -H 'X-Auth-Token: <token>' http://<storage_url>/container/myobject/00000002 --data-binary '00000002'

=> ETAG: etagoftheobjectsegment2

curl -X PUT -H 'X-Auth-Token: <token>' http://<storage_url>/container/myobject/00000003 --data-binary '00000003'

=> ETAG: etagoftheobjectsegment3

curl -X PUT -H 'X-Auth-Token: <token>' http://<storage_url>/container/myobject/00000004 --data-binary '00000004'

=> ETAG: etagoftheobjectsegment4

curl -X PUT -H 'X-Auth-Token: <token>' http://<storage_url>/container/myobject/00000005 --data-binary '00000005'

=> ETAG: etagoftheobjectsegment5

  • Bước 4: Tạo nội dung Json cho manifest (build manifest content)

Nội dung của manifest là một chuỗi Json với các keys sau:

Key

Description

path

Đường dẫn lưu trữ của segment (the path to the segment object (not including account) /container/object_name)

etag

Giá trị checksum của segment object, được trả về sau khi upload thành công 1 segment object lên vStorage (the ETag given back when the segment object was PUT)

size_bytes

Kích thước của mỗi segment object với đơn vị bytes (the size of the complete segment object in bytes)

Ví dụ: Tạo nội dung Json cho manifest cho object myobject:

[{"path": "/container/myobject/00000001", "etag": "etagoftheobjectsegment1", "size_bytes": 2000000000}, {"path": /container/myobject/00000001", "etag": "etagoftheobjectsegment2", "size_bytes": 2000000000},{"path": /container/myobject/00000003", "etag": "etagoftheobjectsegment3", "size_bytes": 2000000000},{"path": /container/myobject/00000004", "etag": "etagoftheobjectsegment4", "size_bytes": 2000000000},{"path": /container/myobject/00000005", "etag": "etagoftheobjectsegment5", "size_bytes": 2000000000}]

  • Bước 5: Upload nội dung Json của manifest lên vStorage (upload the manifest content in Json form)

Việc upload nội dung manifest như upload bất kỳ một textjson content nào khác lên vStorage dùng Postman, CURL hay bất kỳ client tool, library.

curl -i -X PUT -H "X-Auth-Token: ${<token>}" ${<storage url>}/mybigfilescontainer/file?multipart-manifest=put -d '[{"path": "/container/myobject/00000001", "etag": "etagoftheobjectsegment1", "size_bytes": 2000000000}, {"path": /container/myobject/00000001", "etag": "etagoftheobjectsegment2", "size_bytes": 2000000000},{"path": /container/myobject/00000003", "etag": "etagoftheobjectsegment3", "size_bytes": 2000000000},{"path": /container/myobject/00000004", "etag": "etagoftheobjectsegment4", "size_bytes": 2000000000},{"path": /container/myobject/00000005", "etag": "etagoftheobjectsegment5", "size_bytes": 2000000000}]'

Ví dụ thực tế về upload một large object:

Upload một large object có kích thước là 10 GB với đường dẫn sau </home/hientt5/large_file/largefile> đến container <mybigfilecontainer>

  • Bước 1: Tạo segments container

curl -i -X PUT -H "x-auth-token: ${<token>}" ${<storage url>}/mybigfilescontainer_segments

  • Bước 2: Chia </home/hientt5/large_file/largefile> thành nhiều segment objects dùng command line split

split -b 40000 /home/hientt5/large_file/largefile

Lệnh split sẽ segment file </home/hientt5/large_file/largefile> thành những segment objects sau:

-rw-r--r-- 1 ron ron 100000000 apr 24 18:21 file

-rw-r--r-- 1 ron ron 40000000 apr 24 18:39 xaa

-rw-r--r-- 1 ron ron 40000000 apr 24 18:39 xab

-rw-r--r-- 1 ron ron 20000000 apr 24 18:39 xac

  • Bước 3: Upload những segment objects trên lên vStorage

curl -i -X PUT -H "x-auth-token: ${<token>}" ${<storage url>}/mybigfilescontainer_segments/xaa --data-binary @xaa

=> ETAG: 48e9a108a3ec623652e7988af2f88867

curl -i -X PUT -H "x-auth-token: ${<token>}" ${<storage url>}/mybigfilescontainer_segments/xab --data-binary @xab

=> ETAG: 48e9a108a3ec623652e7988af2f88867

curl -i -X PUT -H "x-auth-token: ${<token>}" ${<storage url>}/mybigfilescontainer_segments/xac --data-binary @xac

=> ETAG: 10e4462c9d0b08e7f0b304c4fbfeafa3

  • Bước 4: Tạo nội dung Json cho manifest

Tạo nội dung Json của manifest như sau:

[{"path":"/mybigfilescontainer_segments/xaa",

"etag":"48e9a108a3ec623652e7988af2f88867",

"size_bytes":4000000000},

{"path":"/mybigfilescontainer_segments/xab",

"etag":"48e9a108a3ec623652e7988af2f88867",

"size_bytes":4000000000},

{"path":"/mybigfilescontainer_segments/xac",

"etag":"10e4462c9d0b08e7f0b304c4fbfeafa3",

"size_bytes":2000000000}]

  • Bước 5: Upload nội dung Json của manifest lên vStorage

curl -i -X PUT -H "X-Auth-Token: ${<token>}" ${<storage url>}/mybigfilescontainer/file?multipart-manifest=put -d '[{"path":"/mybigfilescontainer_segments/xaa",

"etag":"48e9a108a3ec623652e7988af2f88867",

"size_bytes":4000000000},

{"path":"/mybigfilescontainer_segments/xab",

"etag":"48e9a108a3ec623652e7988af2f88867",

"size_bytes":4000000000},

{"path":"/mybigfilescontainer_segments/xac",

"etag":"10e4462c9d0b08e7f0b304c4fbfeafa3",

"size_bytes":2000000000}]'

  • Upload large object dùng Swift client tool

Việc upload một large object dùng Swift client tool rất đơn giản, về cơ bản, client tool này sẽ hỗ trợ tất cả các bước trên, người dùng chỉ cần truyền vào thông tin token để chứng thực, đường dẫn large object và kích thước của từng segment object.

--os-project-name project1 --os-project-domain-name domain1 \

--os-username user --os-user-domain-name domain1 \

--os-password password upload test_container -S 1073741824 large_file

5. Download an object

Url
/v1/{account}/{container}/{name_object}

Method

Get

Header

X-Auth-Token

Body

(Optional)

  • Trong đó:

+ "container" là tên container.

+ "name_object" tên của object muốn lấy nằm trong container.

Download an object using CURL through RESTful API

curl -i -X GET -H "X-Auth-Token: <token>" <storage url>/mycontainer/myobject

curl -v -i -X GET -H "X-Auth-Token: gAAAAABdQQ8uIM6CWmA85hKi6MtOvuGP1qok8OJzp0-h74QAn9ptncjT16sg0pxxilUSCPgFeb9NKpNfmkD9kDLYRAPkymOB9wlNWNTkiz20m2uZpCeTIDUpPMO110rSXBMaE8Gszq9BLiKFyuHVmTEKeyoQ3qEFxitXilEwIg201IRtbJFiCa0" \

6. Download a large object

Url
/v1/{account}/{container}/{name_object}

Method

Get

Header

X-Auth-Token

Body

(Optional)

  • Trong đó:

+ "container" là tên container.

+ "name_object" tên của object muốn lấy nằm trong container.

Upload an object using CURL through RESTful API

curl -i -X GET -H "X-Auth-Token: <token>" <storage url>/mycontainer/myobject?multipart-manifest=get

curl -v -i -X GET -H "X-Auth-Token: gAAAAABdQQ8uIM6CWmA85hKi6MtOvuGP1qok8OJzp0-h74QAn9ptncjT16sg0pxxilUSCPgFeb9NKpNfmkD9kDLYRAPkymOB9wlNWNTkiz20m2uZpCeTIDUpPMO110rSXBMaE8Gszq9BLiKFyuHVmTEKeyoQ3qEFxitXilEwIg201IRtbJFiCa0" \

7. Delete a large object

Url
/v1/{account}/{container}/{name_object}?multipart-manifest=delete

Method

Delete

Header

X-Auth-Token

Body

(Optional)

  • Trong đó:

+ "container" là tên container.

+ "name_object" tên của object muốn lấy nằm trong container.

Delete a large object using CURL through RESTful API

curl -i -X DELETE -H "X-Auth-Token: <token>" <storage url>/mycontainer/myobject?multipart-manifest=delete

curl -v -i -X GET -H "X-Auth-Token: gAAAAABdQQ8uIM6CWmA85hKi6MtOvuGP1qok8OJzp0-h74QAn9ptncjT16sg0pxxilUSCPgFeb9NKpNfmkD9kDLYRAPkymOB9wlNWNTkiz20m2uZpCeTIDUpPMO110rSXBMaE8Gszq9BLiKFyuHVmTEKeyoQ3qEFxitXilEwIg201IRtbJFiCa0" \

8. Delete an object

Url
/v1/{account}/{container}/{name_object}

Method

Delete

Header

X-Auth-Token

Body

(Optional)

  • Trong đó:

+ "container" là tên container.

+ "name_object" tên của object muốn xóa nằm trong container.

Delete an object using CURL through RESTful API

curl -i -X DELETE -H "X-Auth-Token: <token>" <storage url>/mycontainer/myobject

curl -v -i -X DELETE -H "X-Auth-Token: gAAAAABdQQ8uIM6CWmA85hKi6MtOvuGP1qok8OJzp0-h74QAn9ptncjT16sg0pxxilUSCPgFeb9NKpNfmkD9kDLYRAPkymOB9wlNWNTkiz20m2uZpCeTIDUpPMO110rSXBMaE8Gszq9BLiKFyuHVmTEKeyoQ3qEFxitXilEwIg201IRtbJFiCa0" \

9. Copy an object

Url
/v1/{account}/{container}/{name_object}

Method

COPY

Header

X-Auth-Token

Destination

{dest_container}/{name_object}

Body

(Optional)

  • Trong đó:

+ "container" là tên container.

+ "name_object" tên của object muốn copy nằm trong container.

+ “dest_container” tên của destination container

Copy an object using CURL through RESTful API

curl -i -X COPY -H "X-Auth-Token: <token>" -H "Destination: anothercontainer/myobject" <storage url>/mycontainer/myobject

curl -v -i -X COPY -H "Destination: lifecycle/test.txt" -H "X-Auth-Token: gAAAAABdQQ8uIM6CWmA85hKi6MtOvuGP1qok8OJzp0-h74QAn9ptncjT16sg0pxxilUSCPgFeb9NKpNfmkD9kDLYRAPkymOB9wlNWNTkiz20m2uZpCeTIDUpPMO110rSXBMaE8Gszq9BLiKFyuHVmTEKeyoQ3qEFxitXilEwIg201IRtbJFiCa0" \

10. Delete a container

Url
/v1/{account}/{container}

Method

Delete

Header

X-Auth-Token

Body

(Optional)

  • Trong đó:

+ "container" là tên container cần được xóa.

Delete a container using CURL through RESTful API

curl -s -S -X DELETE -H "X-Auth-Token: <token>" <storage url>/mycontainer

curl -v -i -X DELETE -H "X-Auth-Token: gAAAAABdQQ8uIM6CWmA85hKi6MtOvuGP1qok8OJzp0-h74QAn9ptncjT16sg0pxxilUSCPgFeb9NKpNfmkD9kDLYRAPkymOB9wlNWNTkiz20m2uZpCeTIDUpPMO110rSXBMaE8Gszq9BLiKFyuHVmTEKeyoQ3qEFxitXilEwIg201IRtbJFiCa0" \

11. Rename an object

Url
/v1/{account}/{container}/{name_object}

Method

COPY and DELETE

Header

X-Auth-Token

Body

(Optional)

  • Trong đó:

+ "container" là tên container chứa đối tượng cần rename.

+ “name_object” là tên của đối tượng cần được rename.

  • Để rename một object, cần thực hiện hai bước sau:

+ Copy object đó với tên mới

+ Xóa object cũ

Rename an object using CURL through RESTful API

curl -i -X COPY -H "X-Auth-Token: <token>" -H "Destination: anothercontainer/new_myobject" <storage url>/mycontainer/myobject

curl -i -X DELETE -H "X-Auth-Token: <token>" <storage url>/mycontainer/myobject

curl -v -i -X COPY -H "Destination: lifecycle/new_test.txt" -H "X-Auth-Token: gAAAAABdQQ8uIM6CWmA85hKi6MtOvuGP1qok8OJzp0-h74QAn9ptncjT16sg0pxxilUSCPgFeb9NKpNfmkD9kDLYRAPkymOB9wlNWNTkiz20m2uZpCeTIDUpPMO110rSXBMaE8Gszq9BLiKFyuHVmTEKeyoQ3qEFxitXilEwIg201IRtbJFiCa0" \

curl -v -i -X DELETE -H "X-Auth-Token: gAAAAABdQQ8uIM6CWmA85hKi6MtOvuGP1qok8OJzp0-h74QAn9ptncjT16sg0pxxilUSCPgFeb9NKpNfmkD9kDLYRAPkymOB9wlNWNTkiz20m2uZpCeTIDUpPMO110rSXBMaE8Gszq9BLiKFyuHVmTEKeyoQ3qEFxitXilEwIg201IRtbJFiCa0" \

12. List all containers

Url
/v1/{account}

Method

GET

Header

X-Auth-Token

Body

(Optional)

  • Trong đó:

+ "account" là tên hoặc ID của account cần liệt kê danh sách containers.

List all container using CURL through RESTful API

curl -s -S -X GET -H "X-Auth-Token: <token>" <storage url>

curl -v -i -X GET -H "X-Auth-Token: gAAAAABdQQ8uIM6CWmA85hKi6MtOvuGP1qok8OJzp0-h74QAn9ptncjT16sg0pxxilUSCPgFeb9NKpNfmkD9kDLYRAPkymOB9wlNWNTkiz20m2uZpCeTIDUpPMO110rSXBMaE8Gszq9BLiKFyuHVmTEKeyoQ3qEFxitXilEwIg201IRtbJFiCa0" \

13. List content of a container

Url
/v1/{account}/{container}

Method

GET

Header

X-Auth-Token

Body

(Optional)

  • Trong đó:

+ "account" là tên hoặc ID của account cần liệt kê danh sách containers.

+ "container" là tên của container cần liệt kê nội dung.

List contents of a container using CURL through RESTful API

curl -s -S -X GET -H "X-Auth-Token: <token>" <storage url>/mycontainer

curl -v -i -X GET -H "X-Auth-Token: gAAAAABdQQ8uIM6CWmA85hKi6MtOvuGP1qok8OJzp0-h74QAn9ptncjT16sg0pxxilUSCPgFeb9NKpNfmkD9kDLYRAPkymOB9wlNWNTkiz20m2uZpCeTIDUpPMO110rSXBMaE8Gszq9BLiKFyuHVmTEKeyoQ3qEFxitXilEwIg201IRtbJFiCa0" \

14. Get tempURL of an object

Url
/v1/{account}/{container}/{name_object}

Method

GET

Header

X-Auth-Token

Body

(Optional)

  • Trong đó:

+ "account" là tên hoặc ID của account cần liệt kê danh sách containers.

+ "container" là tên của container cần liệt kê nội dung.

+ “name_object” là tên đối tượng cần tạo tempurl.

  • Để tạo một tempurl của một object, cần thực hiện các bước sau:

+ Lấy về secret key của container chứa object đó.

+ Tạo tempurl dựa trên secret key đó.

Get secret key từ giá trị của field _X-Account-Meta-Temp-URL-Key_** của meta-data của container dùng CURL thông qua RESTful API**

curl -s -S -X GET -H "X-Auth-Token: <token>" <storage url>/mycontainer

curl -v -i -X GET -H "X-Auth-Token: gAAAAABdQQ8uIM6CWmA85hKi6MtOvuGP1qok8OJzp0-h74QAn9ptncjT16sg0pxxilUSCPgFeb9NKpNfmkD9kDLYRAPkymOB9wlNWNTkiz20m2uZpCeTIDUpPMO110rSXBMaE8Gszq9BLiKFyuHVmTEKeyoQ3qEFxitXilEwIg201IRtbJFiCa0" \

Get tempurl use script sau

#!/bin/bash

seconds=<number of seconds until url expires>

method=GET

expires=$(( $(date '+%s') + $seconds ))

path='<container>/<object>'

fullpath=`echo $OS_STORAGE_URL | sed 's/http.*\/v1/\/v1/'`"/"$path

key=${secret_key}

sig=`printf '%s\n%s\n%s' $method $expires $fullpath | openssl sha1 -hmac $key | awk '{print $2}'`

# print the URL

echo "${OS_STORAGE_URL}/${path}?temp_url_sig=${sig}&temp_url_expires=$

{expires}"

15. Create a folder

Url
/v1/{account}/{container}/{new_folder}

Method

PUT

Header

X-Auth-Token

Body

(Optional)

  • Trong đó:

+ "account" là tên hoặc ID của account cần liệt kê danh sách containers.

+ "container" là tên của container cần liệt kê nội dung.

+ “new_folder” là tên của thư mục mới cần tạo.

Create a folder using CURL through RESTful API

curl -s -S -X PUT -H "X-Auth-Token: <token>" -H “Content-Length: 0” -H “Content-Type: application/directory” <storage url>/mycontainer/newfolder

Ví dụ: swift --os-auth-url --auth-version 3\

curl -X PUT -i -H "Content-Length:0" -H "Content-Type:application/directory" -H "X-Auth-Token: gAAAAABfKhbKq-9EVUhbSjPMJEMiPh7yJ0fXCZ33__J1dIQJaN58UPWKg96mAx9VGp3X7H-LyJhT0S5bN4dqKOCPERRQ8zw2Mo0zVRxlOG861vEWGKR1vkMbykAWTETa8cMnrXK6W2LYXkCpefJw75Q62UDIt1dmjT7WidpnICowW26FKp7B9WM"

https://vos-ss-lab-hcm-sw.vinadata.vn/v1/AUTH_d6f0078021f4417989d6ba8ae4320dea
https://sw-auth-1.vinadata.vn/v3/auth/tokens
https://<vStorage endpoint>/v1/AUTH_a5bf65ca71594d85a60dc73cf9fc8399/new_container
https://<vStorage endpoint>/v1/AUTH_a5bf65ca71594d85a60dc73cf9fc8399/test_lifecycle/test.txt
https://api.example.com/v3
https://<vStorage endpoint>/v1/AUTH_a5bf65ca71594d85a60dc73cf9fc8399/test_lifecycle/test.txt
https://<vStorage endpoint>/v1/AUTH_a5bf65ca71594d85a60dc73cf9fc8399/test_lifecycle/test.txt?multipart-manifest=get
https://<vStorage endpoint>/v1/AUTH_a5bf65ca71594d85a60dc73cf9fc8399/test_lifecycle/test.txt?multipart-manifest=delete
https://<vStorage endpoint>/v1/AUTH_a5bf65ca71594d85a60dc73cf9fc8399/test_lifecycle/test.txt
https://<vStorage endpoint>/v1/AUTH_a5bf65ca71594d85a60dc73cf9fc8399/test_lifecycle/test.txt
https://<vStorage endpoint>/v1/AUTH_a5bf65ca71594d85a60dc73cf9fc8399/test_lifecycle
https://<vStorage endpoint>/v1/AUTH_a5bf65ca71594d85a60dc73cf9fc8399/test_lifecycle/test.txt
https://<vStorage endpoint>/v1/AUTH_a5bf65ca71594d85a60dc73cf9fc8399/test_lifecycle/test.txt
https://<vStorage endpoint>/v1/AUTH_a5bf65ca71594d85a60dc73cf9fc8399
https://<vStorage endpoint>/v1/AUTH_a5bf65ca71594d85a60dc73cf9fc8399/test_lifecycle
https://<vStorage endpoint>/v1/AUTH_a5bf65ca71594d85a60dc73cf9fc8399/test_lifecycle
https://<vStorage endpoint>/v1/AUTH_f0a1d142185e4f8dae22ae67764d099b/syncdata1/newfolder/
https://vos-ss-lab-hcm-sw.vinadata.vn/v1/AUTH_d6f0078021f4417989d6ba8ae4320dea/nameContainer/fileName.png