feat(api): add CloudFront distributions to the cloud explorer
CI / checks (pull_request) Successful in 26m22s
CI / checks (pull_request) Successful in 26m22s
This commit is contained in:
@@ -32,6 +32,7 @@ import type {
|
||||
UserPoolSignInTestInput,
|
||||
UserPoolSignInTestResult,
|
||||
UserPoolClientSettings,
|
||||
DistributionInvalidation,
|
||||
UpdateUserPoolClientOAuthInput,
|
||||
UserPoolUserAction,
|
||||
LogsInsightsQueryInput,
|
||||
@@ -1476,6 +1477,32 @@ export async function testUserPoolSignIn(
|
||||
return res.data;
|
||||
}
|
||||
|
||||
export async function setDistributionEnabled(
|
||||
cloud: CloudProvider,
|
||||
distributionId: string,
|
||||
enabled: boolean,
|
||||
): Promise<CloudResource> {
|
||||
const res = await apiClient.call<CloudResource, { enabled: boolean }>(
|
||||
apiEndpointKeys.clouds.cdn.enabled,
|
||||
requestOptions(cloud, "cdn", { body: { enabled } }),
|
||||
{ cloud, id: distributionId },
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
export async function createDistributionInvalidation(
|
||||
cloud: CloudProvider,
|
||||
distributionId: string,
|
||||
paths: string[],
|
||||
): Promise<DistributionInvalidation> {
|
||||
const res = await apiClient.call<DistributionInvalidation, { paths: string[] }>(
|
||||
apiEndpointKeys.clouds.cdn.invalidations,
|
||||
requestOptions(cloud, "cdn", { body: { paths } }),
|
||||
{ cloud, id: distributionId },
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
export async function describeUserPoolClient(
|
||||
cloud: CloudProvider,
|
||||
poolId: string,
|
||||
|
||||
Reference in New Issue
Block a user