Frodo Library - v4.0.0-10
    Preparing search index...

    Type Alias Policy

    type Policy = {
        createPolicy(
            policyId: string,
            policyData: PolicySkeleton,
        ): Promise<PolicySkeleton>;
        createPolicyExportTemplate(): PolicyExportInterface;
        deletePolicy(policyId: string): Promise<any>;
        exportPolicies(
            options?: PolicyExportOptions,
        ): Promise<PolicyExportInterface>;
        exportPoliciesByPolicySet(
            policySetName: string,
            options?: PolicyExportOptions,
        ): Promise<PolicyExportInterface>;
        exportPolicy(
            policyId: string,
            options?: PolicyExportOptions,
        ): Promise<PolicyExportInterface>;
        getPolicies(): Promise<PolicySkeleton[]>;
        getPoliciesByPolicySet(policySetId: string): Promise<PolicySkeleton[]>;
        getPolicy(policyId: string): Promise<PolicySkeleton>;
        importFirstPolicy(
            importData: PolicyExportInterface,
            options?: PolicyImportOptions,
        ): Promise<PolicySkeleton>;
        importPolicies(
            importData: PolicyExportInterface,
            options?: PolicyImportOptions,
        ): Promise<PolicySkeleton[]>;
        importPolicy(
            policyId: string,
            importData: PolicyExportInterface,
            options?: PolicyImportOptions,
        ): Promise<PolicySkeleton>;
        putPolicy(
            policyId: string,
            policyData: PolicySkeleton,
        ): Promise<PolicySkeleton>;
        readPolicies(): Promise<PolicySkeleton[]>;
        readPoliciesByPolicySet(policySetId: string): Promise<PolicySkeleton[]>;
        readPolicy(policyId: string): Promise<PolicySkeleton>;
        updatePolicy(
            policyId: string,
            policyData: PolicySkeleton,
        ): Promise<PolicySkeleton>;
    }
    Index

    Methods

    • Delete policy

      Parameters

      • policyId: string

        policy id/name

      Returns Promise<any>

      promise resolving to a policy object

    • Get policies by policy set

      Parameters

      • policySetId: string

        policy set id/name

      Returns Promise<PolicySkeleton[]>

      a promise resolving to an array of policy objects

    Deprecated

    • Get all policies

      Returns Promise<PolicySkeleton[]>

      a promise that resolves to an array of policy set objects

      since v2.0.0 use Agent.readPolicies | readPolicies instead

      readPolicies(): Promise<PolicySkeleton[]>
      
    • Get policies by policy set

      Parameters

      • policySetId: string

        policy set id/name

      Returns Promise<PolicySkeleton[]>

      a promise resolving to an array of policy objects

      since v2.0.0 use Agent.readPoliciesByPolicySet | readPoliciesByPolicySet instead

      readPoliciesByPolicySet(policySetId: string): Promise<PolicySkeleton[]>
      
    • Get policy

      Parameters

      • policyId: string

        policy id/name

      Returns Promise<PolicySkeleton>

      promise resolving to a policy object

      since v2.0.0 use Agent.readPolicy | readPolicy instead

      readPolicy(policyId: string): Promise<PolicySkeleton>
      
    • Update or create policy

      Parameters

      • policyId: string

        policy id/name

      • policyData: PolicySkeleton

        policy object

      Returns Promise<PolicySkeleton>

      promise resolving to a policy object

      since v2.0.0 use Agent.updatePolicy | updatePolicy or Agent.createPolicy | createPolicy instead

      updatePolicy(policyId: string, policyData: PolicySkeleton): Promise<PolicySkeleton>
      createPolicy(policyId: string, policyData: PolicySkeleton): Promise<PolicySkeleton>