1. Packages
  2. Azure Active Directory (Azure AD)
  3. API Docs
  4. ServicePrincipalClaimsMappingPolicyAssignment
Azure Active Directory (Azure AD) v6.0.1 published on Monday, Oct 14, 2024 by Pulumi

azuread.ServicePrincipalClaimsMappingPolicyAssignment

Explore with Pulumi AI

azuread logo
Azure Active Directory (Azure AD) v6.0.1 published on Monday, Oct 14, 2024 by Pulumi

    Manages a Claims Mapping Policy Assignment within Azure Active Directory.

    API Permissions

    The following API permissions are required in order to use this resource.

    When authenticated with a service principal, this resource requires the following application roles: Policy.ReadWrite.ApplicationConfiguration and Policy.Read.All

    When authenticated with a user principal, this resource requires one of the following directory roles: Application Administrator or Global Administrator

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azuread from "@pulumi/azuread";
    
    const app = new azuread.ServicePrincipalClaimsMappingPolicyAssignment("app", {
        claimsMappingPolicyId: myPolicy.id,
        servicePrincipalId: myPrincipal.id,
    });
    
    import pulumi
    import pulumi_azuread as azuread
    
    app = azuread.ServicePrincipalClaimsMappingPolicyAssignment("app",
        claims_mapping_policy_id=my_policy["id"],
        service_principal_id=my_principal["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azuread/sdk/v6/go/azuread"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := azuread.NewServicePrincipalClaimsMappingPolicyAssignment(ctx, "app", &azuread.ServicePrincipalClaimsMappingPolicyAssignmentArgs{
    			ClaimsMappingPolicyId: pulumi.Any(myPolicy.Id),
    			ServicePrincipalId:    pulumi.Any(myPrincipal.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureAD = Pulumi.AzureAD;
    
    return await Deployment.RunAsync(() => 
    {
        var app = new AzureAD.ServicePrincipalClaimsMappingPolicyAssignment("app", new()
        {
            ClaimsMappingPolicyId = myPolicy.Id,
            ServicePrincipalId = myPrincipal.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azuread.ServicePrincipalClaimsMappingPolicyAssignment;
    import com.pulumi.azuread.ServicePrincipalClaimsMappingPolicyAssignmentArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var app = new ServicePrincipalClaimsMappingPolicyAssignment("app", ServicePrincipalClaimsMappingPolicyAssignmentArgs.builder()
                .claimsMappingPolicyId(myPolicy.id())
                .servicePrincipalId(myPrincipal.id())
                .build());
    
        }
    }
    
    resources:
      app:
        type: azuread:ServicePrincipalClaimsMappingPolicyAssignment
        properties:
          claimsMappingPolicyId: ${myPolicy.id}
          servicePrincipalId: ${myPrincipal.id}
    

    Create ServicePrincipalClaimsMappingPolicyAssignment Resource

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

    Constructor syntax

    new ServicePrincipalClaimsMappingPolicyAssignment(name: string, args: ServicePrincipalClaimsMappingPolicyAssignmentArgs, opts?: CustomResourceOptions);
    @overload
    def ServicePrincipalClaimsMappingPolicyAssignment(resource_name: str,
                                                      args: ServicePrincipalClaimsMappingPolicyAssignmentArgs,
                                                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServicePrincipalClaimsMappingPolicyAssignment(resource_name: str,
                                                      opts: Optional[ResourceOptions] = None,
                                                      claims_mapping_policy_id: Optional[str] = None,
                                                      service_principal_id: Optional[str] = None)
    func NewServicePrincipalClaimsMappingPolicyAssignment(ctx *Context, name string, args ServicePrincipalClaimsMappingPolicyAssignmentArgs, opts ...ResourceOption) (*ServicePrincipalClaimsMappingPolicyAssignment, error)
    public ServicePrincipalClaimsMappingPolicyAssignment(string name, ServicePrincipalClaimsMappingPolicyAssignmentArgs args, CustomResourceOptions? opts = null)
    public ServicePrincipalClaimsMappingPolicyAssignment(String name, ServicePrincipalClaimsMappingPolicyAssignmentArgs args)
    public ServicePrincipalClaimsMappingPolicyAssignment(String name, ServicePrincipalClaimsMappingPolicyAssignmentArgs args, CustomResourceOptions options)
    
    type: azuread:ServicePrincipalClaimsMappingPolicyAssignment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ServicePrincipalClaimsMappingPolicyAssignmentArgs
    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 ServicePrincipalClaimsMappingPolicyAssignmentArgs
    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 ServicePrincipalClaimsMappingPolicyAssignmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServicePrincipalClaimsMappingPolicyAssignmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServicePrincipalClaimsMappingPolicyAssignmentArgs
    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 servicePrincipalClaimsMappingPolicyAssignmentResource = new AzureAD.ServicePrincipalClaimsMappingPolicyAssignment("servicePrincipalClaimsMappingPolicyAssignmentResource", new()
    {
        ClaimsMappingPolicyId = "string",
        ServicePrincipalId = "string",
    });
    
    example, err := azuread.NewServicePrincipalClaimsMappingPolicyAssignment(ctx, "servicePrincipalClaimsMappingPolicyAssignmentResource", &azuread.ServicePrincipalClaimsMappingPolicyAssignmentArgs{
    	ClaimsMappingPolicyId: pulumi.String("string"),
    	ServicePrincipalId:    pulumi.String("string"),
    })
    
    var servicePrincipalClaimsMappingPolicyAssignmentResource = new ServicePrincipalClaimsMappingPolicyAssignment("servicePrincipalClaimsMappingPolicyAssignmentResource", ServicePrincipalClaimsMappingPolicyAssignmentArgs.builder()
        .claimsMappingPolicyId("string")
        .servicePrincipalId("string")
        .build());
    
    service_principal_claims_mapping_policy_assignment_resource = azuread.ServicePrincipalClaimsMappingPolicyAssignment("servicePrincipalClaimsMappingPolicyAssignmentResource",
        claims_mapping_policy_id="string",
        service_principal_id="string")
    
    const servicePrincipalClaimsMappingPolicyAssignmentResource = new azuread.ServicePrincipalClaimsMappingPolicyAssignment("servicePrincipalClaimsMappingPolicyAssignmentResource", {
        claimsMappingPolicyId: "string",
        servicePrincipalId: "string",
    });
    
    type: azuread:ServicePrincipalClaimsMappingPolicyAssignment
    properties:
        claimsMappingPolicyId: string
        servicePrincipalId: string
    

    ServicePrincipalClaimsMappingPolicyAssignment 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 ServicePrincipalClaimsMappingPolicyAssignment resource accepts the following input properties:

    ClaimsMappingPolicyId string
    The ID of the claims mapping policy to assign.
    ServicePrincipalId string
    The ID of the service principal for the policy assignment.
    ClaimsMappingPolicyId string
    The ID of the claims mapping policy to assign.
    ServicePrincipalId string
    The ID of the service principal for the policy assignment.
    claimsMappingPolicyId String
    The ID of the claims mapping policy to assign.
    servicePrincipalId String
    The ID of the service principal for the policy assignment.
    claimsMappingPolicyId string
    The ID of the claims mapping policy to assign.
    servicePrincipalId string
    The ID of the service principal for the policy assignment.
    claims_mapping_policy_id str
    The ID of the claims mapping policy to assign.
    service_principal_id str
    The ID of the service principal for the policy assignment.
    claimsMappingPolicyId String
    The ID of the claims mapping policy to assign.
    servicePrincipalId String
    The ID of the service principal for the policy assignment.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ServicePrincipalClaimsMappingPolicyAssignment Resource

    Get an existing ServicePrincipalClaimsMappingPolicyAssignment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ServicePrincipalClaimsMappingPolicyAssignmentState, opts?: CustomResourceOptions): ServicePrincipalClaimsMappingPolicyAssignment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            claims_mapping_policy_id: Optional[str] = None,
            service_principal_id: Optional[str] = None) -> ServicePrincipalClaimsMappingPolicyAssignment
    func GetServicePrincipalClaimsMappingPolicyAssignment(ctx *Context, name string, id IDInput, state *ServicePrincipalClaimsMappingPolicyAssignmentState, opts ...ResourceOption) (*ServicePrincipalClaimsMappingPolicyAssignment, error)
    public static ServicePrincipalClaimsMappingPolicyAssignment Get(string name, Input<string> id, ServicePrincipalClaimsMappingPolicyAssignmentState? state, CustomResourceOptions? opts = null)
    public static ServicePrincipalClaimsMappingPolicyAssignment get(String name, Output<String> id, ServicePrincipalClaimsMappingPolicyAssignmentState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ClaimsMappingPolicyId string
    The ID of the claims mapping policy to assign.
    ServicePrincipalId string
    The ID of the service principal for the policy assignment.
    ClaimsMappingPolicyId string
    The ID of the claims mapping policy to assign.
    ServicePrincipalId string
    The ID of the service principal for the policy assignment.
    claimsMappingPolicyId String
    The ID of the claims mapping policy to assign.
    servicePrincipalId String
    The ID of the service principal for the policy assignment.
    claimsMappingPolicyId string
    The ID of the claims mapping policy to assign.
    servicePrincipalId string
    The ID of the service principal for the policy assignment.
    claims_mapping_policy_id str
    The ID of the claims mapping policy to assign.
    service_principal_id str
    The ID of the service principal for the policy assignment.
    claimsMappingPolicyId String
    The ID of the claims mapping policy to assign.
    servicePrincipalId String
    The ID of the service principal for the policy assignment.

    Import

    Claims Mapping Policy can be imported using the id, in the form service-principal-uuid/claimsMappingPolicy/claims-mapping-policy-uuid, e.g:

    $ pulumi import azuread:index/servicePrincipalClaimsMappingPolicyAssignment:ServicePrincipalClaimsMappingPolicyAssignment app 00000000-0000-0000-0000-000000000000/claimsMappingPolicy/11111111-0000-0000-0000-000000000000
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Active Directory (Azure AD) pulumi/pulumi-azuread
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azuread Terraform Provider.
    azuread logo
    Azure Active Directory (Azure AD) v6.0.1 published on Monday, Oct 14, 2024 by Pulumi