-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathconstants.ts
More file actions
21 lines (17 loc) · 819 Bytes
/
constants.ts
File metadata and controls
21 lines (17 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { serviceEndpoint } from '../../aws/partition';
import { STATUS_COLORS } from '../../tui/theme';
export type ResourceDeploymentState = 'deployed' | 'local-only' | 'pending-removal';
export const DEPLOYMENT_STATE_COLORS: Record<ResourceDeploymentState, string> = {
deployed: STATUS_COLORS.success,
'local-only': STATUS_COLORS.warning,
'pending-removal': STATUS_COLORS.error,
};
export const DEPLOYMENT_STATE_LABELS: Record<ResourceDeploymentState, string> = {
deployed: 'Deployed',
'local-only': 'Local only',
'pending-removal': 'Removed locally',
};
export function buildRuntimeInvocationUrl(region: string, runtimeArn: string): string {
const encodedArn = encodeURIComponent(runtimeArn);
return `https://${serviceEndpoint('bedrock-agentcore', region)}/runtimes/${encodedArn}/invocations`;
}