You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/react/azure/queries/query-keys.ts

48 lines
1.4 KiB

import { EnvironmentId } from '@/react/portainer/environments/types';
export const queryKeys = {
subscriptions: (environmentId: EnvironmentId) =>
['azure', environmentId, 'subscriptions'] as const,
subscription: (environmentId: EnvironmentId, subscriptionId: string) =>
[...queryKeys.subscriptions(environmentId), subscriptionId] as const,
resourceGroups: (environmentId: EnvironmentId, subscriptionId: string) =>
[
...queryKeys.subscription(environmentId, subscriptionId),
'resourceGroups',
] as const,
resourceGroup: (
environmentId: EnvironmentId,
subscriptionId: string,
resourceGroupName: string
) =>
[
...queryKeys.resourceGroups(environmentId, subscriptionId),
resourceGroupName,
] as const,
provider: (environmentId: EnvironmentId, subscriptionId: string) =>
[
...queryKeys.subscription(environmentId, subscriptionId),
'provider',
] as const,
containerGroups: (environmentId: EnvironmentId, subscriptionId: string) =>
[
...queryKeys.subscription(environmentId, subscriptionId),
'containerGroups',
] as const,
containerGroup: (
environmentId: EnvironmentId,
subscriptionId: string,
resourceGroupName: string,
containerGroupName: string
) =>
[
...queryKeys.resourceGroup(
environmentId,
subscriptionId,
resourceGroupName
),
'containerGroups',
containerGroupName,
] as const,
};