Tüm Ürünler
Search
Belge Merkezi

:CreateFile

Son Güncelleme:Oct 02, 2026

Bir dizin veya dosya oluşturur.

Operation description

  • Bu işlem yalnızca belirli kullanıcılar tarafından kullanılabilir.

  • Yalnızca SMB Protokol Türünü kullanan ve erişim denetimi etkinleştirilmiş Genel Amaçlı NAS dosya sistemleri desteklenir. Ayrıca Alibaba Cloud Anahtar Yönetim Hizmeti (KMS) etkinleştirilmiş olmalıdır.

Ön koşullar

Bir dosya oluşturmak için bu API'yi çağırmadan önce aşağıdaki dört adımı tamamlayın:

  1. SMB Genel Amaçlı NAS dosya sistemi oluşturma: SMB protokolünü destekleyen bir Genel Amaçlı NAS dosya sistemi oluşturmak için ProtocolType parametresi SMB olarak ayarlanmış CreateFileSystem işlemini çağırın.

  2. KMS'yi etkinleştirme: Aşağıdaki yöntemlerden birini kullanarak KMS'yi etkinleştirin:

  3. SMB ACL'yi etkinleştirme: SMB ACL özelliğini etkinleştirmek için EnableSmbAcl işlemini çağırın. Önerilen yapılandırma:

    • AuthMethod=NTLM

    • AuthCenter=EDS

    • Bu yapılandırma bir AD etki alanı Keytab dosyası gerektirmez ve kullanımı daha kolaydır.

  4. CreateFile'ı çağırma: Önceki adımları tamamladıktan sonra, bir dizin veya dosya oluşturmak için bu işlemi çağırın.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

nas:CreateFile

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

FileSystemId

string

Yes

Dosya sistemi kimliği.

1ca404****

Path

string

Yes

Dizin veya dosyanın mutlak yolu.

  • Yol, eğik çizgi (/) ile başlamalı ve bitmelidir.

  • Yolun uzunluğu 1 ila 1.023 karakter arasında olmalıdır.

  • Yol UTF-8 olarak kodlanmalıdır.

/test/

Type

string

Yes

Nesne türü. Geçerli değerler:

  • File: dosya.

  • Directory: dizin.

File

Owner

string

No

Taşınabilir hesap kimliği. Kısıtlama: Değer, rakamları ve küçük harfleri destekleyen 16 karakterlik bir dizedir.

378cc7630f26****

OwnerAccessInheritable

boolean

No

Dizin izinlerinin paylaşılıp paylaşılmayacağını belirtir. Geçerli değerler:

  • false (varsayılan): dizin izinlerini paylaşmaz.

  • true: dizin izinlerini paylaşır.

Not
  • Bu parametre yalnızca Type parametresi Directory olarak ayarlandığında ve Owner boş olmadığında etkili olur.

  • Dizin, devralınabilir Owner izinlerine sahiptir. Owner, bu dizin altında oluşturulan alt dizinler ve dosyalar üzerinde, başka kullanıcılar tarafından oluşturulsalar bile okuma ve yazma izinlerine sahiptir.

false

Response elements

Element

Type

Description

Example

object

Yanıt şeması.

RequestId

string

İstek kimliği.

2D69A58F-345C-4FDE-88E4-BF518948****

Examples

Success response

JSON format

{
  "RequestId": "2D69A58F-345C-4FDE-88E4-BF518948****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.