Skip to content

Function: updatePolicy() ​

ts
function updatePolicy(
   client, 
   parameters, 
   options?
): Promise<{
[key: string]: unknown;
  data?: {
   [key: string]: unknown;
     attributes: {
      [key: string]: unknown;
        createdAt?: string;
        id?: string;
        metadata?: unknown;
        name?: string;
        ownerId?: string;
        queryData?: unknown;
        resources?: object[];
        rule?:   | unknown[]
           | {
         [key: string]: unknown;
           in?: string[];
         };
        status?: "disabled" | string & object | "enabled";
        type:   | string & object
           | "ip-allowlist"
           | "data-residency"
           | "data-security"
           | "admin-notification-settings"
           | "generative-ai"
           | "hipaa"
           | "ugc-data-use-preferences"
           | "user-join-settings-default";
        updatedAt?: string;
     };
     id: string;
     links?: Record<string, any>;
     message?: unknown;
     type: string & object | "policy";
  };
}>;

Defined in: src/admin/api/policies.ts:70

Update a policy for an org

Parameters ​

ParameterTypeDescription
clientClient-
parameters{ data?: { attributes: { name?: string; resources?: object[]; rule?: { in?: string[]; }; status?: "disabled" | string & object | "enabled"; type: string & object | "ip-allowlist" | "data-residency"; }; id?: string; type: string & object | "policy"; }; orgId: string; policyId: string; }-
parameters.data?{ attributes: { name?: string; resources?: object[]; rule?: { in?: string[]; }; status?: "disabled" | string & object | "enabled"; type: string & object | "ip-allowlist" | "data-residency"; }; id?: string; type: string & object | "policy"; }-
parameters.data.attributes?{ name?: string; resources?: object[]; rule?: { in?: string[]; }; status?: "disabled" | string & object | "enabled"; type: string & object | "ip-allowlist" | "data-residency"; }Attributes of this object
parameters.data.attributes.name?stringName of this Policy
parameters.data.attributes.resources?object[]List of resources Policy is associated with
parameters.data.attributes.rule?{ in?: string[]; }Rule of the Policy
parameters.data.attributes.rule.in?string[]-
parameters.data.attributes.status?"disabled" | string & object | "enabled"Status of this Policy
parameters.data.attributes.type?string & object | "ip-allowlist" | "data-residency"Type of this Policy
parameters.data.id?stringUnique identifier of the Policy
parameters.data.type?string & object | "policy"Type of this object
parameters.orgId?stringYour organization has a unique ID. Find this ID in your Atlassian Administration URL or when you create your API key.
parameters.policyId?stringID of the policy to update
options?RequestOptions-

Returns ​

Promise<{ [key: string]: unknown; data?: { [key: string]: unknown; attributes: { [key: string]: unknown; createdAt?: string; id?: string; metadata?: unknown; name?: string; ownerId?: string; queryData?: unknown; resources?: object[]; rule?: | unknown[] | { [key: string]: unknown; in?: string[]; }; status?: "disabled" | string & object | "enabled"; type: | string & object | "ip-allowlist" | "data-residency" | "data-security" | "admin-notification-settings" | "generative-ai" | "hipaa" | "ugc-data-use-preferences" | "user-join-settings-default"; updatedAt?: string; }; id: string; links?: Record<string, any>; message?: unknown; type: string & object | "policy"; }; }>