DevOpsAgentService / Client / get_asset_file
get_asset_file¶
- DevOpsAgentService.Client.get_asset_file(**kwargs)¶
Gets a file from an asset
See also: AWS API Documentation
Request Syntax
response = client.get_asset_file( agentSpaceId='string', assetId='string', path='string', assetVersion=123 )
- Parameters:
agentSpaceId (string) –
[REQUIRED]
The unique identifier for the agent space containing the asset
assetId (string) –
[REQUIRED]
The unique identifier of the asset containing the file
path (string) –
[REQUIRED]
The path of the file within the asset to retrieve
assetVersion (integer) – The specific asset version to retrieve the file from. If omitted, the latest version is returned.
- Return type:
dict
- Returns:
Response Syntax
{ 'file': { 'path': 'string', 'content': { 'bytes': b'bytes', 'text': 'string' }, 'metadata': {...}|[...]|123|123.4|'string'|True|None, 'version': 123, 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1) } }
Response Structure
(dict) –
Response structure for getting an asset file
file (dict) –
The asset file object
path (string) –
The path of this file within the asset
content (dict) –
The content of this file
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
bytes,text. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBERis as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
bytes (bytes) –
Binary file content
text (string) –
Text file content
metadata (document) –
The metadata for this file
version (integer) –
The asset version this file belongs to
createdAt (datetime) –
Timestamp when this file was created
updatedAt (datetime) –
Timestamp when this file was last updated
Exceptions
DevOpsAgentService.Client.exceptions.ValidationExceptionDevOpsAgentService.Client.exceptions.ContentSizeExceededExceptionDevOpsAgentService.Client.exceptions.ServiceQuotaExceededExceptionDevOpsAgentService.Client.exceptions.ConflictExceptionDevOpsAgentService.Client.exceptions.InternalServerExceptionDevOpsAgentService.Client.exceptions.AccessDeniedExceptionDevOpsAgentService.Client.exceptions.ResourceNotFoundExceptionDevOpsAgentService.Client.exceptions.ThrottlingExceptionDevOpsAgentService.Client.exceptions.InvalidParameterException