This provider is currently in preview.
published on Thursday, May 21, 2026 by Pulumi
This provider is currently in preview.
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:allowordenytokenType:organization,team,personal, orrunnerteamName: required when tokenType isteamuserLogin: required when tokenType ispersonalrunnerID: required when tokenType isrunnerauthorizedPermissions: array of permissions (onlyadminis 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:
Outputs
All input properties are implicitly available as output properties. Additionally, the Policy resource produces the following output properties:
Package Details
- Repository
- pulumiservice pulumi/pulumi-pulumiservice
- License
- Apache-2.0
This provider is currently in preview.
published on Thursday, May 21, 2026 by Pulumi