OpenStack

v3.9.0 published on Thursday, Aug 4, 2022 by Pulumi

getAuthScope

Use this data source to get authentication information about the current auth scope in use. This can be used as self-discovery or introspection of the username or project name currently in use as well as the service catalog.

Example Usage

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
    public MyStack()
    {
        var scope = Output.Create(OpenStack.Identity.GetAuthScope.InvokeAsync(new OpenStack.Identity.GetAuthScopeArgs
        {
            Name = "my_scope",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/identity"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := identity.GetAuthScope(ctx, &identity.GetAuthScopeArgs{
			Name: "my_scope",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.identity.IdentityFunctions;
import com.pulumi.openstack.identity.inputs.GetAuthScopeArgs;
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) {
        final var scope = IdentityFunctions.getAuthScope(GetAuthScopeArgs.builder()
            .name("my_scope")
            .build());

    }
}
import pulumi
import pulumi_openstack as openstack

scope = openstack.identity.get_auth_scope(name="my_scope")
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const scope = pulumi.output(openstack.identity.getAuthScope({
    name: "my_scope",
}));
variables:
  scope:
    Fn::Invoke:
      Function: openstack:identity:getAuthScope
      Arguments:
        name: my_scope

Using getAuthScope

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getAuthScope(args: GetAuthScopeArgs, opts?: InvokeOptions): Promise<GetAuthScopeResult>
function getAuthScopeOutput(args: GetAuthScopeOutputArgs, opts?: InvokeOptions): Output<GetAuthScopeResult>
def get_auth_scope(name: Optional[str] = None,
                   region: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetAuthScopeResult
def get_auth_scope_output(name: Optional[pulumi.Input[str]] = None,
                   region: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetAuthScopeResult]
func GetAuthScope(ctx *Context, args *GetAuthScopeArgs, opts ...InvokeOption) (*GetAuthScopeResult, error)
func GetAuthScopeOutput(ctx *Context, args *GetAuthScopeOutputArgs, opts ...InvokeOption) GetAuthScopeResultOutput

> Note: This function is named GetAuthScope in the Go SDK.

public static class GetAuthScope 
{
    public static Task<GetAuthScopeResult> InvokeAsync(GetAuthScopeArgs args, InvokeOptions? opts = null)
    public static Output<GetAuthScopeResult> Invoke(GetAuthScopeInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAuthScopeResult> getAuthScope(GetAuthScopeArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: openstack:identity/getAuthScope:getAuthScope
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Name string

The name of the scope. This is an arbitrary name which is only used as a unique identifier so an actual token isn't used as the ID.

Region string

The region in which to obtain the V3 Identity client. A Identity client is needed to retrieve tokens IDs. If omitted, the region argument of the provider is used.

Name string

The name of the scope. This is an arbitrary name which is only used as a unique identifier so an actual token isn't used as the ID.

Region string

The region in which to obtain the V3 Identity client. A Identity client is needed to retrieve tokens IDs. If omitted, the region argument of the provider is used.

name String

The name of the scope. This is an arbitrary name which is only used as a unique identifier so an actual token isn't used as the ID.

region String

The region in which to obtain the V3 Identity client. A Identity client is needed to retrieve tokens IDs. If omitted, the region argument of the provider is used.

name string

The name of the scope. This is an arbitrary name which is only used as a unique identifier so an actual token isn't used as the ID.

region string

The region in which to obtain the V3 Identity client. A Identity client is needed to retrieve tokens IDs. If omitted, the region argument of the provider is used.

name str

The name of the scope. This is an arbitrary name which is only used as a unique identifier so an actual token isn't used as the ID.

region str

The region in which to obtain the V3 Identity client. A Identity client is needed to retrieve tokens IDs. If omitted, the region argument of the provider is used.

name String

The name of the scope. This is an arbitrary name which is only used as a unique identifier so an actual token isn't used as the ID.

region String

The region in which to obtain the V3 Identity client. A Identity client is needed to retrieve tokens IDs. If omitted, the region argument of the provider is used.

getAuthScope Result

The following output properties are available:

DomainId string

The domain ID of the scope.

DomainName string

The domain name of the scope.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the service.

ProjectDomainId string

The domain ID of the project.

ProjectDomainName string

The domain name of the project.

ProjectId string

The project ID of the scope.

ProjectName string

The project name of the scope.

Region string

The region of the endpoint.

Roles List<Pulumi.OpenStack.Identity.Outputs.GetAuthScopeRole>

A list of roles in the current scope. See reference below.

ServiceCatalogs List<Pulumi.OpenStack.Identity.Outputs.GetAuthScopeServiceCatalog>

A list of service catalog entries returned with the token.

UserDomainId string

The domain ID of the user.

UserDomainName string

The domain name of the user.

UserId string

The user ID the of the scope.

UserName string

The username of the scope.

DomainId string

The domain ID of the scope.

DomainName string

The domain name of the scope.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the service.

ProjectDomainId string

The domain ID of the project.

ProjectDomainName string

The domain name of the project.

ProjectId string

The project ID of the scope.

ProjectName string

The project name of the scope.

Region string

The region of the endpoint.

Roles []GetAuthScopeRole

A list of roles in the current scope. See reference below.

ServiceCatalogs []GetAuthScopeServiceCatalog

A list of service catalog entries returned with the token.

UserDomainId string

The domain ID of the user.

UserDomainName string

The domain name of the user.

UserId string

The user ID the of the scope.

UserName string

The username of the scope.

domainId String

The domain ID of the scope.

domainName String

The domain name of the scope.

id String

The provider-assigned unique ID for this managed resource.

name String

The name of the service.

projectDomainId String

The domain ID of the project.

projectDomainName String

The domain name of the project.

projectId String

The project ID of the scope.

projectName String

The project name of the scope.

region String

The region of the endpoint.

roles List<GetAuthScopeRole>

A list of roles in the current scope. See reference below.

serviceCatalogs List<GetAuthScopeServiceCatalog>

A list of service catalog entries returned with the token.

userDomainId String

The domain ID of the user.

userDomainName String

The domain name of the user.

userId String

The user ID the of the scope.

userName String

The username of the scope.

domainId string

The domain ID of the scope.

domainName string

The domain name of the scope.

id string

The provider-assigned unique ID for this managed resource.

name string

The name of the service.

projectDomainId string

The domain ID of the project.

projectDomainName string

The domain name of the project.

projectId string

The project ID of the scope.

projectName string

The project name of the scope.

region string

The region of the endpoint.

roles GetAuthScopeRole[]

A list of roles in the current scope. See reference below.

serviceCatalogs GetAuthScopeServiceCatalog[]

A list of service catalog entries returned with the token.

userDomainId string

The domain ID of the user.

userDomainName string

The domain name of the user.

userId string

The user ID the of the scope.

userName string

The username of the scope.

domain_id str

The domain ID of the scope.

domain_name str

The domain name of the scope.

id str

The provider-assigned unique ID for this managed resource.

name str

The name of the service.

project_domain_id str

The domain ID of the project.

project_domain_name str

The domain name of the project.

project_id str

The project ID of the scope.

project_name str

The project name of the scope.

region str

The region of the endpoint.

roles Sequence[GetAuthScopeRole]

A list of roles in the current scope. See reference below.

service_catalogs Sequence[GetAuthScopeServiceCatalog]

A list of service catalog entries returned with the token.

user_domain_id str

The domain ID of the user.

user_domain_name str

The domain name of the user.

user_id str

The user ID the of the scope.

user_name str

The username of the scope.

domainId String

The domain ID of the scope.

domainName String

The domain name of the scope.

id String

The provider-assigned unique ID for this managed resource.

name String

The name of the service.

projectDomainId String

The domain ID of the project.

projectDomainName String

The domain name of the project.

projectId String

The project ID of the scope.

projectName String

The project name of the scope.

region String

The region of the endpoint.

roles List<Property Map>

A list of roles in the current scope. See reference below.

serviceCatalogs List<Property Map>

A list of service catalog entries returned with the token.

userDomainId String

The domain ID of the user.

userDomainName String

The domain name of the user.

userId String

The user ID the of the scope.

userName String

The username of the scope.

Supporting Types

GetAuthScopeRole

RoleId string

The ID of the role.

RoleName string

The name of the role.

RoleId string

The ID of the role.

RoleName string

The name of the role.

roleId String

The ID of the role.

roleName String

The name of the role.

roleId string

The ID of the role.

roleName string

The name of the role.

role_id str

The ID of the role.

role_name str

The name of the role.

roleId String

The ID of the role.

roleName String

The name of the role.

GetAuthScopeServiceCatalog

Endpoints List<Pulumi.OpenStack.Identity.Inputs.GetAuthScopeServiceCatalogEndpoint>

A list of endpoints for the service.

Id string

The ID of the endpoint.

Name string

The name of the scope. This is an arbitrary name which is only used as a unique identifier so an actual token isn't used as the ID.

Type string

The type of the service.

Endpoints []GetAuthScopeServiceCatalogEndpoint

A list of endpoints for the service.

Id string

The ID of the endpoint.

Name string

The name of the scope. This is an arbitrary name which is only used as a unique identifier so an actual token isn't used as the ID.

Type string

The type of the service.

endpoints List<GetAuthScopeServiceCatalogEndpoint>

A list of endpoints for the service.

id String

The ID of the endpoint.

name String

The name of the scope. This is an arbitrary name which is only used as a unique identifier so an actual token isn't used as the ID.

type String

The type of the service.

endpoints GetAuthScopeServiceCatalogEndpoint[]

A list of endpoints for the service.

id string

The ID of the endpoint.

name string

The name of the scope. This is an arbitrary name which is only used as a unique identifier so an actual token isn't used as the ID.

type string

The type of the service.

endpoints Sequence[GetAuthScopeServiceCatalogEndpoint]

A list of endpoints for the service.

id str

The ID of the endpoint.

name str

The name of the scope. This is an arbitrary name which is only used as a unique identifier so an actual token isn't used as the ID.

type str

The type of the service.

endpoints List<Property Map>

A list of endpoints for the service.

id String

The ID of the endpoint.

name String

The name of the scope. This is an arbitrary name which is only used as a unique identifier so an actual token isn't used as the ID.

type String

The type of the service.

GetAuthScopeServiceCatalogEndpoint

Id string

The ID of the endpoint.

Interface string

The interface of the endpoint.

Region string

The region in which to obtain the V3 Identity client. A Identity client is needed to retrieve tokens IDs. If omitted, the region argument of the provider is used.

RegionId string

The region ID of the endpoint.

Url string

The URL of the endpoint.

Id string

The ID of the endpoint.

Interface string

The interface of the endpoint.

Region string

The region in which to obtain the V3 Identity client. A Identity client is needed to retrieve tokens IDs. If omitted, the region argument of the provider is used.

RegionId string

The region ID of the endpoint.

Url string

The URL of the endpoint.

id String

The ID of the endpoint.

interface_ String

The interface of the endpoint.

region String

The region in which to obtain the V3 Identity client. A Identity client is needed to retrieve tokens IDs. If omitted, the region argument of the provider is used.

regionId String

The region ID of the endpoint.

url String

The URL of the endpoint.

id string

The ID of the endpoint.

interface string

The interface of the endpoint.

region string

The region in which to obtain the V3 Identity client. A Identity client is needed to retrieve tokens IDs. If omitted, the region argument of the provider is used.

regionId string

The region ID of the endpoint.

url string

The URL of the endpoint.

id str

The ID of the endpoint.

interface str

The interface of the endpoint.

region str

The region in which to obtain the V3 Identity client. A Identity client is needed to retrieve tokens IDs. If omitted, the region argument of the provider is used.

region_id str

The region ID of the endpoint.

url str

The URL of the endpoint.

id String

The ID of the endpoint.

interface String

The interface of the endpoint.

region String

The region in which to obtain the V3 Identity client. A Identity client is needed to retrieve tokens IDs. If omitted, the region argument of the provider is used.

regionId String

The region ID of the endpoint.

url String

The URL of the endpoint.

Package Details

Repository
https://github.com/pulumi/pulumi-openstack
License
Apache-2.0
Notes

This Pulumi package is based on the openstack Terraform Provider.