Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Show all

Help Center/ Object Storage Service/ SDK Reference/ iOS/ Initialization/ Configuring an Instance of OBSClient

Configuring an Instance of OBSClient

Updated on 2024-12-09 GMT+08:00

You can use the OBSServiceConfiguration configuration class to configure an instance of OBSClient, including the proxy, connection timeout period, maximum number of retry attempts, and other parameters listed in the following table.

Table 1 Parameters for configuring a network request

Parameter

Description

Recommended Value

OBSServiceConfiguration.credentialProvider

User credential. For details, see Table 2.

N/A

OBSServiceConfiguration.proxyConfig

Proxy configuration. The default value is null. For details, see Table 3.

N/A

OBSServiceConfiguration.trustUnsafeCert

Whether to trust insecure certificates. The default value is NO.

Default value

OBSServiceConfiguration.maxConcurrentCommandRequestCount

Maximum number of concurrent command requests. The default value is 3.

Default value

OBSServiceConfiguration.maxConcurrentUploadRequestCount

Maximum number of concurrent upload requests. The default value is 3.

Default value

OBSServiceConfiguration.maxConcurrentDownloadRequestCount

Maximum number of concurrent download requests. The default value is 3.

Default value

OBSServiceConfiguration.defaultDomainMode

Domain name access mode. You can set this parameter to OBSDomainModeCustom to use a user-defined domain name. By default, the non-user-defined domain name access mode is used.

Default value

OBSServiceConfiguration.commandSessionConfiguration.HTTPMaximumConnectionsPerHost

Maximum number of command request connections that can be opened. The default value in iOS is 4.

N/A

OBSServiceConfiguration.uploadSessionConfiguration.HTTPMaximumConnectionsPerHost

Maximum number of upload request connections that can be opened. The default value in iOS is 4.

N/A

OBSServiceConfiguration.downloadSessionConfiguration.HTTPMaximumConnectionsPerHost

Maximum number of download request connections that can be opened. The default value in iOS is 4.

N/A

OBSServiceConfiguration.backgroundUploadSessionConfiguration.HTTPMaximumConnectionsPerHost

Maximum number of background upload request connections that can be opened. The default value in iOS is 4.

N/A

OBSServiceConfiguration.backgroundDownloadSessionConfiguration.HTTPMaximumConnectionsPerHost

Maximum number of background download request connections that can be opened. The default value in iOS is 4.

N/A

OBSServiceConfiguration.commandSessionConfiguration.timeoutIntervalForRequest

Timeout interval for a command request, in seconds.

60

OBSServiceConfiguration.uploadSessionConfiguration.timeoutIntervalForRequest

Timeout interval for an upload request, in seconds.

60

OBSServiceConfiguration.downloadSessionConfiguration.timeoutIntervalForRequest

Timeout interval for a download request, in seconds.

60

NOTE:

Set parameters with N/A as the recommended value based on your needs. For security purposes, you are advised to use HTTPS for endpoints.

The following table describes parameters involved in OBSStaticCredentialProvider:

Table 2 Server identification configurations

Parameter

Description

Method

accessKey

User's AK

credentialProvider.Access_Key = Access_Key

secretKey

User's SK

credentialProvider.Secret_Key = Secret_Key

securityToken

Temporary token

credentialProvider.securityToken = token

NOTE:

credentialProvider is an instance of OBSStaticCredentialProvider.

For details about how to obtain the value of securityToken, see Setting Up an OBS Environment.

The following table describes parameters involved in OBSHTTPProxyConfiguration:

Table 3 Proxy server configurations

Parameter

Description

Method

proxyType

Network access type (Possible values are enumerated).

To allow HTTP only:

proxyConfig.proxyType=OBSHTTPRroxyTypeHTTP

To allow HTTPS only:

proxyConfig.proxyType=OBSHTTPRroxyTypeHTTPS

To allow both HTTP and HTTPS:

proxyConfig.proxyType=OBSHTTPRroxyTypeHTTPAndHTTPS

proxyHost

Host address of the proxy server.

proxyConfig.proxyHost = @"host"

proxyPort

Port ID of the proxy server.

proxyConfig.proxyPort = @"port"

username

Username used for connecting to the proxy server.

proxyConfig.username = @"username"

password

Password used for connecting to the proxy server.

proxyConfig.password = @"password"

NOTE:

proxyConfig is an instance of OBSHTTPProxyConfiguration.

Kami menggunakan cookie untuk meningkatkan kualitas situs kami dan pengalaman Anda. Dengan melanjutkan penelusuran di situs kami berarti Anda menerima kebijakan cookie kami. Cari tahu selengkapnya

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback