AmplifyGen3 / Client / get_branch
get_branch¶
- AmplifyGen3.Client.get_branch(**kwargs)¶
Returns information about a branch of an environment.
See also: AWS API Documentation
Request Syntax
response = client.get_branch( AppName='string', EnvironmentName='string', BranchName='string' )
- Parameters:
AppName (string) –
[REQUIRED]
The name of the app.
EnvironmentName (string) –
[REQUIRED]
The name of the environment.
BranchName (string) –
[REQUIRED]
The name of the branch.
- Return type:
dict
- Returns:
Response Syntax
{ 'AppName': 'string', 'EnvironmentName': 'string', 'BranchName': 'string', 'BranchArn': 'string', 'GitBranchName': 'string', 'CreatedAt': datetime(2015, 1, 1), 'Backend': { 'Url': 'string', 'Status': 'READY'|'CREATING'|'DELETING'|'FAILED_TO_CREATE'|'PAUSING'|'PAUSED'|'RESUMING', 'DatabaseConfig': { 'MaxBackendCapacityUnits': 123, 'BackupRetentionDays': 123 }, 'Auth': 'string', 'DatabaseUsage': { 'StorageBytes': 123, 'Connections': 123, 'LastUsedAt': datetime(2015, 1, 1), 'SampledAt': datetime(2015, 1, 1), 'MonthlyBackendCapacityUnitHours': 123.0 }, 'DatabaseConnection': { 'Host': 'string', 'Port': 123, 'Username': 'string', 'DatabaseName': 'string' } }, 'SourceBranch': { 'BranchName': 'string', 'BranchArn': 'string', 'RestoreToTime': datetime(2015, 1, 1) } }
Response Structure
(dict) –
AppName (string) –
The name of the app.
EnvironmentName (string) –
The name of the environment.
BranchName (string) –
The name of the branch.
BranchArn (string) –
The Amazon Resource Name (ARN) of the branch.
GitBranchName (string) –
The name of the Git branch that the branch was created for. Present only for a branch that was created for a Git branch.
CreatedAt (datetime) –
The time at which the branch was created. The value is in ISO-8601 format.
Backend (dict) –
The backend of the branch. If Amplify can’t read the state of the backend, the request fails.
Url (string) –
The URL of the branch’s backend.
Status (string) –
The lifecycle status of the branch. Absent only when the status isn’t one that this API recognizes.
DatabaseConfig (dict) –
The database settings that are in effect on the branch’s database cluster. These are the settings that the most recent deployment applied, or the cluster’s defaults if no deployment has set any. A deployment that changes them completes only after they are applied. They can differ from the environment’s Backend.Database settings, which take effect at the next deployment. Absent before the branch has its own database cluster.
MaxBackendCapacityUnits (integer) –
The maximum number of backend capacity units that the branch’s database can scale to.
BackupRetentionDays (integer) –
The number of days that automated backups are kept.
Auth (string) –
The authentication settings of the branch’s live deployment, as a JSON document. These can differ from the environment’s Backend.Auth settings, which take effect at the next deployment. Absent when the live deployment’s configuration has no authentication settings, or when no deployment with backend settings has gone live.
DatabaseUsage (dict) –
The latest usage sample of the branch’s database. Absent before the first sample, or for a branch that was created by RestoreBranch.
StorageBytes (integer) –
The size of the database, in bytes. The database’s storage limit applies to this size.
Connections (integer) –
The number of sessions, including idle sessions, that were connected to the database at the time of SampledAt.
LastUsedAt (datetime) –
The end of the most recent sampling window in which the database was used, either by a new connection or by load on an existing connection. The value is in ISO-8601 format.
SampledAt (datetime) –
The end of the most recent sampling window in which one of these values changed. For a branch with steady usage, this time can be old even though the values are current. The value is in ISO-8601 format.
MonthlyBackendCapacityUnitHours (float) –
The backend capacity unit hours (BCU-hours) that the branch’s database used in the current calendar month (UTC). This value is the branch’s share of the backend’s MonthlyBackendCapacityUnitHours and is counted the same way. The value is 0 when the database used none this month, resets to 0 at 00:00 UTC on the first day of each month, and lags actual use by about one hour. It is absent when the value can’t be read.
DatabaseConnection (dict) –
The connection details for the branch’s database. Absent when connections aren’t available for the branch, or before the branch has a database.
Host (string) –
The host name to connect to. Connect to this name, not to an IP address, because the TLS server name routes the session.
Port (integer) –
The port to connect to.
Username (string) –
The user name to connect as.
DatabaseName (string) –
The name of the database to connect to.
SourceBranch (dict) –
The branch that this branch was restored from, and the point in time it was restored to. Present only for a branch that was created by RestoreBranch.
BranchName (string) –
The name of the branch that the data was restored from.
BranchArn (string) –
The Amazon Resource Name (ARN) of the branch that the data was restored from.
RestoreToTime (datetime) –
The point in time that the data was restored to.
Exceptions
AmplifyGen3.Client.exceptions.ThrottlingExceptionAmplifyGen3.Client.exceptions.AccessDeniedExceptionAmplifyGen3.Client.exceptions.ResourceNotFoundExceptionAmplifyGen3.Client.exceptions.ValidationExceptionAmplifyGen3.Client.exceptions.InternalServerException