1. Packages
  2. Okta
  3. API Docs
  4. app
  5. AccessPolicyAssignment
Okta v4.8.1 published on Thursday, Apr 18, 2024 by Pulumi

okta.app.AccessPolicyAssignment

Explore with Pulumi AI

okta logo
Okta v4.8.1 published on Thursday, Apr 18, 2024 by Pulumi

    Assigns an access policy (colloquially known as a sign-on policy and/or an authentication policy) to an application. This resource does not perform true delete as it will not delete an application and the app’s access policy can’t be removed; it can only be changed to a different access policy. This resource is only logical within the context of an application therefore app_id is immutable once set. Use this resource to manage assigning an access policy to an application. It will assign the given policy_id to the application at creation and during update.

    Inside the product a sign-on policy is referenced as an authentication policy, in the public API the policy is of type ACCESS_POLICY.

    Create AccessPolicyAssignment Resource

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

    Constructor syntax

    new AccessPolicyAssignment(name: string, args: AccessPolicyAssignmentArgs, opts?: CustomResourceOptions);
    @overload
    def AccessPolicyAssignment(resource_name: str,
                               args: AccessPolicyAssignmentArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def AccessPolicyAssignment(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               app_id: Optional[str] = None,
                               policy_id: Optional[str] = None)
    func NewAccessPolicyAssignment(ctx *Context, name string, args AccessPolicyAssignmentArgs, opts ...ResourceOption) (*AccessPolicyAssignment, error)
    public AccessPolicyAssignment(string name, AccessPolicyAssignmentArgs args, CustomResourceOptions? opts = null)
    public AccessPolicyAssignment(String name, AccessPolicyAssignmentArgs args)
    public AccessPolicyAssignment(String name, AccessPolicyAssignmentArgs args, CustomResourceOptions options)
    
    type: okta:app:AccessPolicyAssignment
    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 AccessPolicyAssignmentArgs
    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 AccessPolicyAssignmentArgs
    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 AccessPolicyAssignmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AccessPolicyAssignmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AccessPolicyAssignmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var accessPolicyAssignmentResource = new Okta.App.AccessPolicyAssignment("accessPolicyAssignmentResource", new()
    {
        AppId = "string",
        PolicyId = "string",
    });
    
    example, err := app.NewAccessPolicyAssignment(ctx, "accessPolicyAssignmentResource", &app.AccessPolicyAssignmentArgs{
    	AppId:    pulumi.String("string"),
    	PolicyId: pulumi.String("string"),
    })
    
    var accessPolicyAssignmentResource = new AccessPolicyAssignment("accessPolicyAssignmentResource", AccessPolicyAssignmentArgs.builder()        
        .appId("string")
        .policyId("string")
        .build());
    
    access_policy_assignment_resource = okta.app.AccessPolicyAssignment("accessPolicyAssignmentResource",
        app_id="string",
        policy_id="string")
    
    const accessPolicyAssignmentResource = new okta.app.AccessPolicyAssignment("accessPolicyAssignmentResource", {
        appId: "string",
        policyId: "string",
    });
    
    type: okta:app:AccessPolicyAssignment
    properties:
        appId: string
        policyId: string
    

    AccessPolicyAssignment Resource Properties

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

    Inputs

    The AccessPolicyAssignment resource accepts the following input properties:

    AppId string
    The application ID; this value is immutable and can not be updated.
    PolicyId string
    The access policy ID.
    AppId string
    The application ID; this value is immutable and can not be updated.
    PolicyId string
    The access policy ID.
    appId String
    The application ID; this value is immutable and can not be updated.
    policyId String
    The access policy ID.
    appId string
    The application ID; this value is immutable and can not be updated.
    policyId string
    The access policy ID.
    app_id str
    The application ID; this value is immutable and can not be updated.
    policy_id str
    The access policy ID.
    appId String
    The application ID; this value is immutable and can not be updated.
    policyId String
    The access policy ID.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AccessPolicyAssignment 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 AccessPolicyAssignment Resource

    Get an existing AccessPolicyAssignment 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?: AccessPolicyAssignmentState, opts?: CustomResourceOptions): AccessPolicyAssignment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            app_id: Optional[str] = None,
            policy_id: Optional[str] = None) -> AccessPolicyAssignment
    func GetAccessPolicyAssignment(ctx *Context, name string, id IDInput, state *AccessPolicyAssignmentState, opts ...ResourceOption) (*AccessPolicyAssignment, error)
    public static AccessPolicyAssignment Get(string name, Input<string> id, AccessPolicyAssignmentState? state, CustomResourceOptions? opts = null)
    public static AccessPolicyAssignment get(String name, Output<String> id, AccessPolicyAssignmentState 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:
    AppId string
    The application ID; this value is immutable and can not be updated.
    PolicyId string
    The access policy ID.
    AppId string
    The application ID; this value is immutable and can not be updated.
    PolicyId string
    The access policy ID.
    appId String
    The application ID; this value is immutable and can not be updated.
    policyId String
    The access policy ID.
    appId string
    The application ID; this value is immutable and can not be updated.
    policyId string
    The access policy ID.
    app_id str
    The application ID; this value is immutable and can not be updated.
    policy_id str
    The access policy ID.
    appId String
    The application ID; this value is immutable and can not be updated.
    policyId String
    The access policy ID.

    Import

    An Okta App’s Access Policy Assignment can be imported via its associated Application ID.

    $ pulumi import okta:app/accessPolicyAssignment:AccessPolicyAssignment example &#60;app id&#62;
    

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

    Package Details

    Repository
    Okta pulumi/pulumi-okta
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the okta Terraform Provider.
    okta logo
    Okta v4.8.1 published on Thursday, Apr 18, 2024 by Pulumi