1. Packages
  2. FusionAuth
  3. API Docs
  4. FusionAuthApplicationOAuthScope
FusionAuth v6.0.2 published on Sunday, Feb 9, 2025 by Theo Gravity

fusionauth.FusionAuthApplicationOAuthScope

Explore with Pulumi AI

# Application OAuth Scope Resource

The Application OAuth Scope resource allows you to define the scopes that an application can request when using OAuth.

Application OAuth Scope API

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as fusionauth from "pulumi-fusionauth";

const _this = new fusionauth.FusionAuthApplicationOAuthScope("this", {
    applicationId: fusionauth_application["this"].id,
    data: {
        addedBy: "Tom",
        addedOn: "2025-02-05",
    },
    defaultConsentDetail: "This will provide the requesting application read-only access to your data",
    defaultConsentMessage: "View your data",
    description: "Provides an application read-only access to a user's data",
    required: true,
});
Copy
import pulumi
import theogravity_pulumi_fusionauth as fusionauth

this = fusionauth.FusionAuthApplicationOAuthScope("this",
    application_id=fusionauth_application["this"]["id"],
    data={
        "addedBy": "Tom",
        "addedOn": "2025-02-05",
    },
    default_consent_detail="This will provide the requesting application read-only access to your data",
    default_consent_message="View your data",
    description="Provides an application read-only access to a user's data",
    required=True)
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/theogravity/pulumi-fusionauth/sdk/go/fusionauth"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := fusionauth.NewFusionAuthApplicationOAuthScope(ctx, "this", &fusionauth.FusionAuthApplicationOAuthScopeArgs{
			ApplicationId: pulumi.Any(fusionauth_application.This.Id),
			Data: pulumi.StringMap{
				"addedBy": pulumi.String("Tom"),
				"addedOn": pulumi.String("2025-02-05"),
			},
			DefaultConsentDetail:  pulumi.String("This will provide the requesting application read-only access to your data"),
			DefaultConsentMessage: pulumi.String("View your data"),
			Description:           pulumi.String("Provides an application read-only access to a user's data"),
			Required:              pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Fusionauth = theogravity.Fusionauth;

return await Deployment.RunAsync(() => 
{
    var @this = new Fusionauth.FusionAuthApplicationOAuthScope("this", new()
    {
        ApplicationId = fusionauth_application.This.Id,
        Data = 
        {
            { "addedBy", "Tom" },
            { "addedOn", "2025-02-05" },
        },
        DefaultConsentDetail = "This will provide the requesting application read-only access to your data",
        DefaultConsentMessage = "View your data",
        Description = "Provides an application read-only access to a user's data",
        Required = true,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fusionauth.FusionAuthApplicationOAuthScope;
import com.pulumi.fusionauth.FusionAuthApplicationOAuthScopeArgs;
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 this_ = new FusionAuthApplicationOAuthScope("this", FusionAuthApplicationOAuthScopeArgs.builder()
            .applicationId(fusionauth_application.this().id())
            .data(Map.ofEntries(
                Map.entry("addedBy", "Tom"),
                Map.entry("addedOn", "2025-02-05")
            ))
            .defaultConsentDetail("This will provide the requesting application read-only access to your data")
            .defaultConsentMessage("View your data")
            .description("Provides an application read-only access to a user's data")
            .required(true)
            .build());

    }
}
Copy
resources:
  this:
    type: fusionauth:FusionAuthApplicationOAuthScope
    properties:
      applicationId: ${fusionauth_application.this.id}
      data:
        addedBy: Tom
        addedOn: 2025-02-05
      defaultConsentDetail: This will provide the requesting application read-only access to your data
      defaultConsentMessage: View your data
      description: Provides an application read-only access to a user's data
      required: true
Copy

Create FusionAuthApplicationOAuthScope Resource

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

Constructor syntax

new FusionAuthApplicationOAuthScope(name: string, args: FusionAuthApplicationOAuthScopeArgs, opts?: CustomResourceOptions);
@overload
def FusionAuthApplicationOAuthScope(resource_name: str,
                                    args: FusionAuthApplicationOAuthScopeArgs,
                                    opts: Optional[ResourceOptions] = None)

@overload
def FusionAuthApplicationOAuthScope(resource_name: str,
                                    opts: Optional[ResourceOptions] = None,
                                    application_id: Optional[str] = None,
                                    data: Optional[Mapping[str, str]] = None,
                                    default_consent_detail: Optional[str] = None,
                                    default_consent_message: Optional[str] = None,
                                    description: Optional[str] = None,
                                    name: Optional[str] = None,
                                    required: Optional[bool] = None,
                                    scope_id: Optional[str] = None)
func NewFusionAuthApplicationOAuthScope(ctx *Context, name string, args FusionAuthApplicationOAuthScopeArgs, opts ...ResourceOption) (*FusionAuthApplicationOAuthScope, error)
public FusionAuthApplicationOAuthScope(string name, FusionAuthApplicationOAuthScopeArgs args, CustomResourceOptions? opts = null)
public FusionAuthApplicationOAuthScope(String name, FusionAuthApplicationOAuthScopeArgs args)
public FusionAuthApplicationOAuthScope(String name, FusionAuthApplicationOAuthScopeArgs args, CustomResourceOptions options)
type: fusionauth:FusionAuthApplicationOAuthScope
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. FusionAuthApplicationOAuthScopeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. FusionAuthApplicationOAuthScopeArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. FusionAuthApplicationOAuthScopeArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. FusionAuthApplicationOAuthScopeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. FusionAuthApplicationOAuthScopeArgs
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 fusionAuthApplicationOAuthScopeResource = new Fusionauth.FusionAuthApplicationOAuthScope("fusionAuthApplicationOAuthScopeResource", new()
{
    ApplicationId = "string",
    Data = 
    {
        { "string", "string" },
    },
    DefaultConsentDetail = "string",
    DefaultConsentMessage = "string",
    Description = "string",
    Name = "string",
    Required = false,
    ScopeId = "string",
});
Copy
example, err := fusionauth.NewFusionAuthApplicationOAuthScope(ctx, "fusionAuthApplicationOAuthScopeResource", &fusionauth.FusionAuthApplicationOAuthScopeArgs{
	ApplicationId: pulumi.String("string"),
	Data: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	DefaultConsentDetail:  pulumi.String("string"),
	DefaultConsentMessage: pulumi.String("string"),
	Description:           pulumi.String("string"),
	Name:                  pulumi.String("string"),
	Required:              pulumi.Bool(false),
	ScopeId:               pulumi.String("string"),
})
Copy
var fusionAuthApplicationOAuthScopeResource = new FusionAuthApplicationOAuthScope("fusionAuthApplicationOAuthScopeResource", FusionAuthApplicationOAuthScopeArgs.builder()
    .applicationId("string")
    .data(Map.of("string", "string"))
    .defaultConsentDetail("string")
    .defaultConsentMessage("string")
    .description("string")
    .name("string")
    .required(false)
    .scopeId("string")
    .build());
Copy
fusion_auth_application_o_auth_scope_resource = fusionauth.FusionAuthApplicationOAuthScope("fusionAuthApplicationOAuthScopeResource",
    application_id="string",
    data={
        "string": "string",
    },
    default_consent_detail="string",
    default_consent_message="string",
    description="string",
    name="string",
    required=False,
    scope_id="string")
Copy
const fusionAuthApplicationOAuthScopeResource = new fusionauth.FusionAuthApplicationOAuthScope("fusionAuthApplicationOAuthScopeResource", {
    applicationId: "string",
    data: {
        string: "string",
    },
    defaultConsentDetail: "string",
    defaultConsentMessage: "string",
    description: "string",
    name: "string",
    required: false,
    scopeId: "string",
});
Copy
type: fusionauth:FusionAuthApplicationOAuthScope
properties:
    applicationId: string
    data:
        string: string
    defaultConsentDetail: string
    defaultConsentMessage: string
    description: string
    name: string
    required: false
    scopeId: string
Copy

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

ApplicationId This property is required. string
ID of the application that this role is for.
Data Dictionary<string, string>
An object that can hold any information about the OAuth Scope that should be persisted.
DefaultConsentDetail string
"The default detail to display on the OAuth consent screen if one cannot be found in the theme.
DefaultConsentMessage string
The default message to display on the OAuth consent screen if one cannot be found in the theme.
Description string
A description of the OAuth Scope. This is used for display purposes only.
Name Changes to this property will trigger replacement. string
The name of the Role.
Required bool
Determines if the OAuth Scope is required when requested in an OAuth workflow.
ScopeId Changes to this property will trigger replacement. string
The Id to use for the new OAuth Scope. If not specified a secure random UUID will be generated.
ApplicationId This property is required. string
ID of the application that this role is for.
Data map[string]string
An object that can hold any information about the OAuth Scope that should be persisted.
DefaultConsentDetail string
"The default detail to display on the OAuth consent screen if one cannot be found in the theme.
DefaultConsentMessage string
The default message to display on the OAuth consent screen if one cannot be found in the theme.
Description string
A description of the OAuth Scope. This is used for display purposes only.
Name Changes to this property will trigger replacement. string
The name of the Role.
Required bool
Determines if the OAuth Scope is required when requested in an OAuth workflow.
ScopeId Changes to this property will trigger replacement. string
The Id to use for the new OAuth Scope. If not specified a secure random UUID will be generated.
applicationId This property is required. String
ID of the application that this role is for.
data Map<String,String>
An object that can hold any information about the OAuth Scope that should be persisted.
defaultConsentDetail String
"The default detail to display on the OAuth consent screen if one cannot be found in the theme.
defaultConsentMessage String
The default message to display on the OAuth consent screen if one cannot be found in the theme.
description String
A description of the OAuth Scope. This is used for display purposes only.
name Changes to this property will trigger replacement. String
The name of the Role.
required Boolean
Determines if the OAuth Scope is required when requested in an OAuth workflow.
scopeId Changes to this property will trigger replacement. String
The Id to use for the new OAuth Scope. If not specified a secure random UUID will be generated.
applicationId This property is required. string
ID of the application that this role is for.
data {[key: string]: string}
An object that can hold any information about the OAuth Scope that should be persisted.
defaultConsentDetail string
"The default detail to display on the OAuth consent screen if one cannot be found in the theme.
defaultConsentMessage string
The default message to display on the OAuth consent screen if one cannot be found in the theme.
description string
A description of the OAuth Scope. This is used for display purposes only.
name Changes to this property will trigger replacement. string
The name of the Role.
required boolean
Determines if the OAuth Scope is required when requested in an OAuth workflow.
scopeId Changes to this property will trigger replacement. string
The Id to use for the new OAuth Scope. If not specified a secure random UUID will be generated.
application_id This property is required. str
ID of the application that this role is for.
data Mapping[str, str]
An object that can hold any information about the OAuth Scope that should be persisted.
default_consent_detail str
"The default detail to display on the OAuth consent screen if one cannot be found in the theme.
default_consent_message str
The default message to display on the OAuth consent screen if one cannot be found in the theme.
description str
A description of the OAuth Scope. This is used for display purposes only.
name Changes to this property will trigger replacement. str
The name of the Role.
required bool
Determines if the OAuth Scope is required when requested in an OAuth workflow.
scope_id Changes to this property will trigger replacement. str
The Id to use for the new OAuth Scope. If not specified a secure random UUID will be generated.
applicationId This property is required. String
ID of the application that this role is for.
data Map<String>
An object that can hold any information about the OAuth Scope that should be persisted.
defaultConsentDetail String
"The default detail to display on the OAuth consent screen if one cannot be found in the theme.
defaultConsentMessage String
The default message to display on the OAuth consent screen if one cannot be found in the theme.
description String
A description of the OAuth Scope. This is used for display purposes only.
name Changes to this property will trigger replacement. String
The name of the Role.
required Boolean
Determines if the OAuth Scope is required when requested in an OAuth workflow.
scopeId Changes to this property will trigger replacement. String
The Id to use for the new OAuth Scope. If not specified a secure random UUID will be generated.

Outputs

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

Get an existing FusionAuthApplicationOAuthScope 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?: FusionAuthApplicationOAuthScopeState, opts?: CustomResourceOptions): FusionAuthApplicationOAuthScope
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        application_id: Optional[str] = None,
        data: Optional[Mapping[str, str]] = None,
        default_consent_detail: Optional[str] = None,
        default_consent_message: Optional[str] = None,
        description: Optional[str] = None,
        name: Optional[str] = None,
        required: Optional[bool] = None,
        scope_id: Optional[str] = None) -> FusionAuthApplicationOAuthScope
func GetFusionAuthApplicationOAuthScope(ctx *Context, name string, id IDInput, state *FusionAuthApplicationOAuthScopeState, opts ...ResourceOption) (*FusionAuthApplicationOAuthScope, error)
public static FusionAuthApplicationOAuthScope Get(string name, Input<string> id, FusionAuthApplicationOAuthScopeState? state, CustomResourceOptions? opts = null)
public static FusionAuthApplicationOAuthScope get(String name, Output<String> id, FusionAuthApplicationOAuthScopeState state, CustomResourceOptions options)
resources:  _:    type: fusionauth:FusionAuthApplicationOAuthScope    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
ApplicationId string
ID of the application that this role is for.
Data Dictionary<string, string>
An object that can hold any information about the OAuth Scope that should be persisted.
DefaultConsentDetail string
"The default detail to display on the OAuth consent screen if one cannot be found in the theme.
DefaultConsentMessage string
The default message to display on the OAuth consent screen if one cannot be found in the theme.
Description string
A description of the OAuth Scope. This is used for display purposes only.
Name Changes to this property will trigger replacement. string
The name of the Role.
Required bool
Determines if the OAuth Scope is required when requested in an OAuth workflow.
ScopeId Changes to this property will trigger replacement. string
The Id to use for the new OAuth Scope. If not specified a secure random UUID will be generated.
ApplicationId string
ID of the application that this role is for.
Data map[string]string
An object that can hold any information about the OAuth Scope that should be persisted.
DefaultConsentDetail string
"The default detail to display on the OAuth consent screen if one cannot be found in the theme.
DefaultConsentMessage string
The default message to display on the OAuth consent screen if one cannot be found in the theme.
Description string
A description of the OAuth Scope. This is used for display purposes only.
Name Changes to this property will trigger replacement. string
The name of the Role.
Required bool
Determines if the OAuth Scope is required when requested in an OAuth workflow.
ScopeId Changes to this property will trigger replacement. string
The Id to use for the new OAuth Scope. If not specified a secure random UUID will be generated.
applicationId String
ID of the application that this role is for.
data Map<String,String>
An object that can hold any information about the OAuth Scope that should be persisted.
defaultConsentDetail String
"The default detail to display on the OAuth consent screen if one cannot be found in the theme.
defaultConsentMessage String
The default message to display on the OAuth consent screen if one cannot be found in the theme.
description String
A description of the OAuth Scope. This is used for display purposes only.
name Changes to this property will trigger replacement. String
The name of the Role.
required Boolean
Determines if the OAuth Scope is required when requested in an OAuth workflow.
scopeId Changes to this property will trigger replacement. String
The Id to use for the new OAuth Scope. If not specified a secure random UUID will be generated.
applicationId string
ID of the application that this role is for.
data {[key: string]: string}
An object that can hold any information about the OAuth Scope that should be persisted.
defaultConsentDetail string
"The default detail to display on the OAuth consent screen if one cannot be found in the theme.
defaultConsentMessage string
The default message to display on the OAuth consent screen if one cannot be found in the theme.
description string
A description of the OAuth Scope. This is used for display purposes only.
name Changes to this property will trigger replacement. string
The name of the Role.
required boolean
Determines if the OAuth Scope is required when requested in an OAuth workflow.
scopeId Changes to this property will trigger replacement. string
The Id to use for the new OAuth Scope. If not specified a secure random UUID will be generated.
application_id str
ID of the application that this role is for.
data Mapping[str, str]
An object that can hold any information about the OAuth Scope that should be persisted.
default_consent_detail str
"The default detail to display on the OAuth consent screen if one cannot be found in the theme.
default_consent_message str
The default message to display on the OAuth consent screen if one cannot be found in the theme.
description str
A description of the OAuth Scope. This is used for display purposes only.
name Changes to this property will trigger replacement. str
The name of the Role.
required bool
Determines if the OAuth Scope is required when requested in an OAuth workflow.
scope_id Changes to this property will trigger replacement. str
The Id to use for the new OAuth Scope. If not specified a secure random UUID will be generated.
applicationId String
ID of the application that this role is for.
data Map<String>
An object that can hold any information about the OAuth Scope that should be persisted.
defaultConsentDetail String
"The default detail to display on the OAuth consent screen if one cannot be found in the theme.
defaultConsentMessage String
The default message to display on the OAuth consent screen if one cannot be found in the theme.
description String
A description of the OAuth Scope. This is used for display purposes only.
name Changes to this property will trigger replacement. String
The name of the Role.
required Boolean
Determines if the OAuth Scope is required when requested in an OAuth workflow.
scopeId Changes to this property will trigger replacement. String
The Id to use for the new OAuth Scope. If not specified a secure random UUID will be generated.

Package Details

Repository
fusionauth theogravity/pulumi-fusionauth
License
MIT
Notes
This Pulumi package is based on the fusionauth Terraform Provider.