1. Packages
  2. Packages
  3. Pulumi Cloud (Pulumi Service provider)
  4. API Docs
  5. api
  6. api/auth
  7. Policy

This provider is currently in preview.

Viewing docs for Pulumi Cloud v1.1.0
published on Thursday, May 21, 2026 by Pulumi
pulumiservice logo

This provider is currently in preview.

Viewing docs for Pulumi Cloud v1.1.0
published on Thursday, May 21, 2026 by Pulumi

    Updates an authentication policy for an organization. Authentication policies define rules for how OIDC tokens are validated and what access they grant, including claim mappings, trust conditions, and role assignments. The policy definition cannot be empty.

    The request body contains a policies array where each policy object includes:

    • decision: allow or deny
    • tokenType: organization, team, personal, or runner
    • teamName: required when tokenType is team
    • userLogin: required when tokenType is personal
    • runnerID: required when tokenType is runner
    • authorizedPermissions: array of permissions (only admin is supported for organization tokens)
    • rules: object defining claim-matching rules for the token

    For more information about authorization rules, refer to the OIDC authorization policies documentation.

    Create Policy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Policy(name: string, args: PolicyArgs, opts?: CustomResourceOptions);
    @overload
    def Policy(resource_name: str,
               args: PolicyArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Policy(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               org_name: Optional[str] = None,
               policies: Optional[Sequence[Any]] = None,
               policy_id: Optional[str] = None,
               issuer_id: Optional[str] = None)
    func NewPolicy(ctx *Context, name string, args PolicyArgs, opts ...ResourceOption) (*Policy, error)
    public Policy(string name, PolicyArgs args, CustomResourceOptions? opts = null)
    public Policy(String name, PolicyArgs args)
    public Policy(String name, PolicyArgs args, CustomResourceOptions options)
    
    type: pulumiservice:api/auth:Policy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "pulumiservice_api_auth_policy" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args PolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PolicyArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var policyResource = new PulumiService.Api.Auth.Policy("policyResource", new()
    {
        OrgName = "string",
        Policies = new[]
        {
            "any",
        },
        PolicyId = "string",
        IssuerId = "string",
    });
    
    example, err := auth.NewPolicy(ctx, "policyResource", &auth.PolicyArgs{
    	OrgName: pulumi.String("string"),
    	Policies: pulumi.Array{
    		pulumi.Any("any"),
    	},
    	PolicyId: pulumi.String("string"),
    	IssuerId: pulumi.String("string"),
    })
    
    resource "pulumiservice_api_auth_policy" "policyResource" {
      org_name  = "string"
      policies  = ["any"]
      policy_id = "string"
      issuer_id = "string"
    }
    
    var policyResource = new Policy("policyResource", PolicyArgs.builder()
        .orgName("string")
        .policies("any")
        .policyId("string")
        .issuerId("string")
        .build());
    
    policy_resource = pulumiservice.api.auth.Policy("policyResource",
        org_name="string",
        policies=["any"],
        policy_id="string",
        issuer_id="string")
    
    const policyResource = new pulumiservice.api.auth.Policy("policyResource", {
        orgName: "string",
        policies: ["any"],
        policyId: "string",
        issuerId: "string",
    });
    
    type: pulumiservice:api/auth:Policy
    properties:
        issuerId: string
        orgName: string
        policies:
            - any
        policyId: string
    

    Policy Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Policy resource accepts the following input properties:

    OrgName string
    The organization name
    Policies List<object>
    List of policies
    PolicyId string
    The policy identifier
    IssuerId string
    The OIDC issuer identifier
    OrgName string
    The organization name
    Policies []interface{}
    List of policies
    PolicyId string
    The policy identifier
    IssuerId string
    The OIDC issuer identifier
    org_name string
    The organization name
    policies list(any)
    List of policies
    policy_id string
    The policy identifier
    issuer_id string
    The OIDC issuer identifier
    orgName String
    The organization name
    policies List<Object>
    List of policies
    policyId String
    The policy identifier
    issuerId String
    The OIDC issuer identifier
    orgName string
    The organization name
    policies any[]
    List of policies
    policyId string
    The policy identifier
    issuerId string
    The OIDC issuer identifier
    org_name str
    The organization name
    policies Sequence[Any]
    List of policies
    policy_id str
    The policy identifier
    issuer_id str
    The OIDC issuer identifier
    orgName String
    The organization name
    policies List<Any>
    List of policies
    policyId String
    The policy identifier
    issuerId String
    The OIDC issuer identifier

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Policy resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Version int
    The version number
    Created string
    The creation timestamp
    Modified string
    The last modification timestamp
    Id string
    The provider-assigned unique ID for this managed resource.
    Version int
    The version number
    Created string
    The creation timestamp
    Modified string
    The last modification timestamp
    id string
    The provider-assigned unique ID for this managed resource.
    version number
    The version number
    created string
    The creation timestamp
    modified string
    The last modification timestamp
    id String
    The provider-assigned unique ID for this managed resource.
    version Integer
    The version number
    created String
    The creation timestamp
    modified String
    The last modification timestamp
    id string
    The provider-assigned unique ID for this managed resource.
    version number
    The version number
    created string
    The creation timestamp
    modified string
    The last modification timestamp
    id str
    The provider-assigned unique ID for this managed resource.
    version int
    The version number
    created str
    The creation timestamp
    modified str
    The last modification timestamp
    id String
    The provider-assigned unique ID for this managed resource.
    version Number
    The version number
    created String
    The creation timestamp
    modified String
    The last modification timestamp

    Package Details

    Repository
    pulumiservice pulumi/pulumi-pulumiservice
    License
    Apache-2.0
    pulumiservice logo

    This provider is currently in preview.

    Viewing docs for Pulumi Cloud v1.1.0
    published on Thursday, May 21, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial