

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

# UpdateEntity
<a name="API_UpdateEntity"></a>

Memperbarui entitas.

## Minta Sintaks
<a name="API_UpdateEntity_RequestSyntax"></a>

```
PUT /workspaces/workspaceId/entities/entityId HTTP/1.1
Content-type: application/json

{
   "componentUpdates": { 
      "string" : { 
         "componentTypeId": "string",
         "description": "string",
         "propertyGroupUpdates": { 
            "string" : { 
               "groupType": "string",
               "propertyNames": [ "string" ],
               "updateType": "string"
            }
         },
         "propertyUpdates": { 
            "string" : { 
               "definition": { 
                  "configuration": { 
                     "string" : "string" 
                  },
                  "dataType": { 
                     "allowedValues": [ 
                        { 
                           "booleanValue": boolean,
                           "doubleValue": number,
                           "expression": "string",
                           "integerValue": number,
                           "listValue": [ 
                              "DataValue"
                           ],
                           "longValue": number,
                           "mapValue": { 
                              "string" : "DataValue"
                           },
                           "relationshipValue": { 
                              "targetComponentName": "string",
                              "targetEntityId": "string"
                           },
                           "stringValue": "string"
                        }
                     ],
                     "nestedType": "DataType",
                     "relationship": { 
                        "relationshipType": "string",
                        "targetComponentTypeId": "string"
                     },
                     "type": "string",
                     "unitOfMeasure": "string"
                  },
                  "defaultValue": { 
                     "booleanValue": boolean,
                     "doubleValue": number,
                     "expression": "string",
                     "integerValue": number,
                     "listValue": [ 
                        "DataValue"
                     ],
                     "longValue": number,
                     "mapValue": { 
                        "string" : "DataValue"
                     },
                     "relationshipValue": { 
                        "targetComponentName": "string",
                        "targetEntityId": "string"
                     },
                     "stringValue": "string"
                  },
                  "displayName": "string",
                  "isExternalId": boolean,
                  "isRequiredInEntity": boolean,
                  "isStoredExternally": boolean,
                  "isTimeSeries": boolean
               },
               "updateType": "string",
               "value": { 
                  "booleanValue": boolean,
                  "doubleValue": number,
                  "expression": "string",
                  "integerValue": number,
                  "listValue": [ 
                     "DataValue"
                  ],
                  "longValue": number,
                  "mapValue": { 
                     "string" : "DataValue"
                  },
                  "relationshipValue": { 
                     "targetComponentName": "string",
                     "targetEntityId": "string"
                  },
                  "stringValue": "string"
               }
            }
         },
         "updateType": "string"
      }
   },
   "compositeComponentUpdates": { 
      "string" : { 
         "description": "string",
         "propertyGroupUpdates": { 
            "string" : { 
               "groupType": "string",
               "propertyNames": [ "string" ],
               "updateType": "string"
            }
         },
         "propertyUpdates": { 
            "string" : { 
               "definition": { 
                  "configuration": { 
                     "string" : "string" 
                  },
                  "dataType": { 
                     "allowedValues": [ 
                        { 
                           "booleanValue": boolean,
                           "doubleValue": number,
                           "expression": "string",
                           "integerValue": number,
                           "listValue": [ 
                              "DataValue"
                           ],
                           "longValue": number,
                           "mapValue": { 
                              "string" : "DataValue"
                           },
                           "relationshipValue": { 
                              "targetComponentName": "string",
                              "targetEntityId": "string"
                           },
                           "stringValue": "string"
                        }
                     ],
                     "nestedType": "DataType",
                     "relationship": { 
                        "relationshipType": "string",
                        "targetComponentTypeId": "string"
                     },
                     "type": "string",
                     "unitOfMeasure": "string"
                  },
                  "defaultValue": { 
                     "booleanValue": boolean,
                     "doubleValue": number,
                     "expression": "string",
                     "integerValue": number,
                     "listValue": [ 
                        "DataValue"
                     ],
                     "longValue": number,
                     "mapValue": { 
                        "string" : "DataValue"
                     },
                     "relationshipValue": { 
                        "targetComponentName": "string",
                        "targetEntityId": "string"
                     },
                     "stringValue": "string"
                  },
                  "displayName": "string",
                  "isExternalId": boolean,
                  "isRequiredInEntity": boolean,
                  "isStoredExternally": boolean,
                  "isTimeSeries": boolean
               },
               "updateType": "string",
               "value": { 
                  "booleanValue": boolean,
                  "doubleValue": number,
                  "expression": "string",
                  "integerValue": number,
                  "listValue": [ 
                     "DataValue"
                  ],
                  "longValue": number,
                  "mapValue": { 
                     "string" : "DataValue"
                  },
                  "relationshipValue": { 
                     "targetComponentName": "string",
                     "targetEntityId": "string"
                  },
                  "stringValue": "string"
               }
            }
         },
         "updateType": "string"
      }
   },
   "description": "string",
   "entityName": "string",
   "parentEntityUpdate": { 
      "parentEntityId": "string",
      "updateType": "string"
   }
}
```

## Parameter Permintaan URI
<a name="API_UpdateEntity_RequestParameters"></a>

Permintaan menggunakan parameter URI berikut.

 ** [entityId](#API_UpdateEntity_RequestSyntax) **   <a name="tm-UpdateEntity-request-uri-entityId"></a>
ID entitas.  
Batasan Panjang: Panjang minimum 1. Panjang maksimum 128.  
Pola: `[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|^[a-zA-Z0-9][a-zA-Z_\-0-9.:]*[a-zA-Z0-9]+`   
Wajib: Ya

 ** [workspaceId](#API_UpdateEntity_RequestSyntax) **   <a name="tm-UpdateEntity-request-uri-workspaceId"></a>
ID ruang kerja yang berisi entitas.  
Batasan Panjang: Panjang minimum 1. Panjang maksimum 128.  
Pola: `[a-zA-Z_0-9][a-zA-Z_\-0-9]*[a-zA-Z0-9]+`   
Wajib: Ya

## Isi Permintaan
<a name="API_UpdateEntity_RequestBody"></a>

Permintaan menerima data berikut dalam format JSON.

 ** [componentUpdates](#API_UpdateEntity_RequestSyntax) **   <a name="tm-UpdateEntity-request-componentUpdates"></a>
Objek yang memetakan string ke pembaruan komponen dalam permintaan. Setiap string dalam pemetaan harus unik untuk objek ini.  
Jenis: String ke peta [ComponentUpdateRequest](API_ComponentUpdateRequest.md) objek  
Batasan Panjang Kunci: Panjang minimum 1. Panjang maksimum 256.  
Pola Kunci: `[a-zA-Z_\-0-9]+`   
Wajib: Tidak

 ** [compositeComponentUpdates](#API_UpdateEntity_RequestSyntax) **   <a name="tm-UpdateEntity-request-compositeComponentUpdates"></a>
Ini adalah objek yang memetakan string ke `compositeComponent` pembaruan dalam permintaan. Setiap kunci peta mewakili `componentPath` dari`compositeComponent`.  
Jenis: String ke peta [CompositeComponentUpdateRequest](API_CompositeComponentUpdateRequest.md) objek  
Batasan Panjang Kunci: Panjang minimum 1. Panjang maksimum 2048.  
Pola Kunci: `[a-zA-Z_\-0-9/]+`   
Wajib: Tidak

 ** [description](#API_UpdateEntity_RequestSyntax) **   <a name="tm-UpdateEntity-request-description"></a>
Deskripsi entitas.  
Tipe: String  
Batasan Panjang: Panjang minimum sebesar 0. Panjang maksimum 2048.  
Pola: `.*`   
Wajib: Tidak

 ** [entityName](#API_UpdateEntity_RequestSyntax) **   <a name="tm-UpdateEntity-request-entityName"></a>
Nama entitas.  
Tipe: String  
Batasan Panjang: Panjang minimum 1. Panjang maksimum 256.  
Pola: `[^\u0000-\u001F\u007F]+`   
Wajib: Tidak

 ** [parentEntityUpdate](#API_UpdateEntity_RequestSyntax) **   <a name="tm-UpdateEntity-request-parentEntityUpdate"></a>
Objek yang menjelaskan permintaan pembaruan untuk entitas induk.  
Tipe: Objek [ParentEntityUpdateRequest](API_ParentEntityUpdateRequest.md)  
Wajib: Tidak

## Sintaksis Respons
<a name="API_UpdateEntity_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "state": "string",
   "updateDateTime": number
}
```

## Elemen Respons
<a name="API_UpdateEntity_ResponseElements"></a>

Jika tindakan berhasil, layanan mengirimkan kembali respons HTTP 200.

Layanan mengembalikan data berikut dalam format JSON.

 ** [state](#API_UpdateEntity_ResponseSyntax) **   <a name="tm-UpdateEntity-response-state"></a>
Status pembaruan entitas saat ini.  
Tipe: String  
Nilai yang Valid: `CREATING | UPDATING | DELETING | ACTIVE | ERROR` 

 ** [updateDateTime](#API_UpdateEntity_ResponseSyntax) **   <a name="tm-UpdateEntity-response-updateDateTime"></a>
Tanggal dan waktu ketika entitas terakhir diperbarui.  
Tipe: Timestamp

## Kesalahan
<a name="API_UpdateEntity_Errors"></a>

Untuk informasi tentang kesalahan yang umum untuk semua tindakan, lihat [Kesalahan Umum](CommonErrors.md).

 ** AccessDeniedException **   
Akses ditolak.  
Kode Status HTTP: 403

 ** ConflictException **   
Terjadi konflik.  
Kode Status HTTP: 409

 ** InternalServerException **   
Terjadi kesalahan tak terduga.  
Kode Status HTTP: 500

 ** ResourceNotFoundException **   
Sumber daya tidak ditemukan.  
Kode Status HTTP: 404

 ** ServiceQuotaExceededException **   
Kuota layanan terlampaui.  
Kode Status HTTP: 402

 ** ThrottlingException **   
Tarif melebihi batas.  
Kode Status HTTP: 429

 ** ValidationException **   
Gagal  
Kode Status HTTP: 400

## Lihat Juga
<a name="API_UpdateEntity_SeeAlso"></a>

Untuk informasi selengkapnya tentang penggunaan API ini di salah satu bahasa khusus AWS SDKs, lihat berikut ini:
+  [AWS Antarmuka Baris Perintah V2](https://docs.aws.amazon.com/goto/cli2/iottwinmaker-2021-11-29/UpdateEntity) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/iottwinmaker-2021-11-29/UpdateEntity) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/iottwinmaker-2021-11-29/UpdateEntity) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/iottwinmaker-2021-11-29/UpdateEntity) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/iottwinmaker-2021-11-29/UpdateEntity) 
+  [AWS SDK untuk V3 JavaScript ](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/iottwinmaker-2021-11-29/UpdateEntity) 
+  [AWS SDK para Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/iottwinmaker-2021-11-29/UpdateEntity) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/iottwinmaker-2021-11-29/UpdateEntity) 
+  [AWS SDK untuk Python](https://docs.aws.amazon.com/goto/boto3/iottwinmaker-2021-11-29/UpdateEntity) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/iottwinmaker-2021-11-29/UpdateEntity) 