ClientScope

# keycloak.openid.ClientScope

Allows for creating and managing Keycloak client scopes that can be attached to clients that use the OpenID Connect protocol.

Client Scopes can be used to share common protocol and role mappings between multiple clients within a realm. They can also be used by clients to conditionally request claims or roles for a user based on the OAuth 2.0 scope parameter.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as keycloak from "@pulumi/keycloak";

const realm = new keycloak.Realm("realm", {
    enabled: true,
    realm: "my-realm",
});
const openidClientScope = new keycloak.openid.ClientScope("openid_client_scope", {
    description: "When requested, this scope will map a user's group memberships to a claim",
    realmId: realm.id,
});
import pulumi
import pulumi_keycloak as keycloak

realm = keycloak.Realm("realm",
    enabled=True,
    realm="my-realm")
openid_client_scope = keycloak.openid.ClientScope("openidClientScope",
    description="When requested, this scope will map a user's group memberships to a claim",
    realm_id=realm.id)
using Pulumi;
using Keycloak = Pulumi.Keycloak;

class MyStack : Stack
{
    public MyStack()
    {
        var realm = new Keycloak.Realm("realm", new Keycloak.RealmArgs
        {
            Enabled = true,
            Realm = "my-realm",
        });
        var openidClientScope = new Keycloak.OpenId.ClientScope("openidClientScope", new Keycloak.OpenId.ClientScopeArgs
        {
            Description = "When requested, this scope will map a user's group memberships to a claim",
            RealmId = realm.Id,
        });
    }

}

Argument Reference

The following arguments are supported:

  • realm_id - (Required) The realm this client scope belongs to.
  • name - (Required) The display name of this client scope in the GUI.
  • description - (Optional) The description of this client scope in the GUI.
  • consent_screen_text - (Optional) When set, a consent screen will be displayed to users authenticating to clients with this scope attached. The consent screen will display the string value of this attribute.

Create a ClientScope Resource

def ClientScope(resource_name, opts=None, consent_screen_text=None, description=None, name=None, realm_id=None, __props__=None);
func NewClientScope(ctx *Context, name string, args ClientScopeArgs, opts ...ResourceOption) (*ClientScope, error)
public ClientScope(string name, ClientScopeArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ClientScopeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ClientScopeArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ClientScopeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ClientScope Resource Properties

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

Inputs

The ClientScope resource accepts the following input properties:

RealmId string
ConsentScreenText string
Description string
Name string
RealmId string
ConsentScreenText string
Description string
Name string
realmId string
consentScreenText string
description string
name string
realm_id str
consent_screen_text str
description str
name str

Outputs

All input properties are implicitly available as output properties. Additionally, the ClientScope 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing ClientScope Resource

Get an existing ClientScope 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?: ClientScopeState, opts?: CustomResourceOptions): ClientScope
static get(resource_name, id, opts=None, consent_screen_text=None, description=None, name=None, realm_id=None, __props__=None);
func GetClientScope(ctx *Context, name string, id IDInput, state *ClientScopeState, opts ...ResourceOption) (*ClientScope, error)
public static ClientScope Get(string name, Input<string> id, ClientScopeState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

ConsentScreenText string
Description string
Name string
RealmId string
ConsentScreenText string
Description string
Name string
RealmId string
consentScreenText string
description string
name string
realmId string
consent_screen_text str
description str
name str
realm_id str

Package Details

Repository
https://github.com/pulumi/pulumi-keycloak
License
Apache-2.0
Notes
This Pulumi package is based on the keycloak Terraform Provider.