update_agreement
¶
update_agreement(
agreement_id: AgreementId,
server_id: ServerId,
*,
config_overrides: Optional[TransferClientConfig] = None,
description: Optional[Description] = None,
status: Optional[AgreementStatusType] = None,
local_profile_id: Optional[ProfileId] = None,
partner_profile_id: Optional[ProfileId] = None,
base_directory: Optional[HomeDirectory] = None,
access_role: Optional[Role] = None,
preserve_filename: Optional[PreserveFilenameType] = None,
enforce_message_signing: Optional[EnforceMessageSigningType] = None,
custom_directories: Optional[CustomDirectoriesType] = None,
) -> UpdateAgreementResponse
Updates some of the parameters for an existing agreement. Provide the AgreementId and the ServerId for the agreement that you want to update, along with the new values for the parameters to update.
Specify either BaseDirectory or CustomDirectories, but not both. Specifying both causes the command to fail.
If you update an agreement from using base directory to custom directories, the base directory is no longer used. Similarly, if you change from custom directories to a base directory, the custom directories are no longer used.
Parameters:
-
agreement_id(AgreementId) –A unique identifier for the agreement. This identifier is returned when you create an agreement.
-
server_id(ServerId) –A system-assigned unique identifier for a server instance. This is the specific server that the agreement uses.
-
description(Optional[Description], default:None) –To replace the existing description, provide a short description for the agreement.
-
status(Optional[AgreementStatusType], default:None) –You can update the status for the agreement, either activating an inactive agreement or the reverse.
-
local_profile_id(Optional[ProfileId], default:None) –A unique identifier for the AS2 local profile.
To change the local profile identifier, provide a new value here.
-
partner_profile_id(Optional[ProfileId], default:None) –A unique identifier for the partner profile. To change the partner profile identifier, provide a new value here.
-
base_directory(Optional[HomeDirectory], default:None) –To change the landing directory (folder) for files that are transferred, provide the bucket folder that you want to use; for example,
/amzn-s3-demo-bucket/home/mydirectory. -
access_role(Optional[Role], default:None) –Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the Amazon Resource Name (ARN) of the Identity and Access Management role to use.
For AS2 connectors
With AS2, you can send files by calling
StartFileTransferand specifying the file paths in the request parameter,SendFilePaths. We use the file’s parent directory (for example, for--send-file-paths /bucket/dir/file.txt, parent directory is/bucket/dir/) to temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a final JSON file containing relevant metadata of the transmission. So, theAccessRoleneeds to provide read and write access to the parent directory of the file location used in theStartFileTransferrequest. Additionally, you need to provide read and write access to the parent directory of the files that you intend to send withStartFileTransfer.If you are using Basic authentication for your AS2 connector, the access role requires the
secretsmanager:GetSecretValuepermission for the secret. If the secret is encrypted using a customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also needs thekms:Decryptpermission for that key.For SFTP connectors
Make sure that the access role provides read and write access to the parent directory of the file location that's used in the
StartFileTransferrequest. Additionally, make sure that the role providessecretsmanager:GetSecretValuepermission to Secrets Manager. -
preserve_filename(Optional[PreserveFilenameType], default:None) –Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.
-
ENABLED: the filename provided by your trading parter is preserved when the file is saved. -
DISABLED(default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.
-
-
enforce_message_signing(Optional[EnforceMessageSigningType], default:None) –Determines whether or not unsigned messages from your trading partners will be accepted.
-
ENABLED: Transfer Family rejects unsigned messages from your trading partner. -
DISABLED(default value): Transfer Family accepts unsigned messages from your trading partner.
-
-
custom_directories(Optional[CustomDirectoriesType], default:None) –A
CustomDirectoriesTypestructure. This structure specifies custom directories for storing various AS2 message files. You can specify directories for the following types of files.-
Failed files
-
MDN files
-
Payload files
-
Status files
-
Temporary files
-
Raises:
-
InternalServiceError–This exception is thrown when an error occurs in the Transfer Family service.
-
InvalidRequestException–This exception is thrown when the client submits a malformed request.
-
ResourceExistsException–The requested resource does not exist, or exists in a region other than the one specified for the command.
-
ResourceNotFoundException–This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
-
ServiceUnavailableException–The request has failed because the Amazon Web ServicesTransfer Family service is not available.
-
ThrottlingException–The request was denied due to request throttling.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_transfer/_services/transfer.py
2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 | |