aws.cognito.ManagedLoginBranding
Manages branding settings for a user pool style and associates it with an app client.
Example Usage
Default Branding Style
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const client = new aws.cognito.ManagedLoginBranding("client", {
clientId: example.id,
userPoolId: exampleAwsCognitoUserPool.id,
useCognitoProvidedValues: true,
});
import pulumi
import pulumi_aws as aws
client = aws.cognito.ManagedLoginBranding("client",
client_id=example["id"],
user_pool_id=example_aws_cognito_user_pool["id"],
use_cognito_provided_values=True)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/cognito"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cognito.NewManagedLoginBranding(ctx, "client", &cognito.ManagedLoginBrandingArgs{
ClientId: pulumi.Any(example.Id),
UserPoolId: pulumi.Any(exampleAwsCognitoUserPool.Id),
UseCognitoProvidedValues: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var client = new Aws.Cognito.ManagedLoginBranding("client", new()
{
ClientId = example.Id,
UserPoolId = exampleAwsCognitoUserPool.Id,
UseCognitoProvidedValues = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cognito.ManagedLoginBranding;
import com.pulumi.aws.cognito.ManagedLoginBrandingArgs;
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 client = new ManagedLoginBranding("client", ManagedLoginBrandingArgs.builder()
.clientId(example.id())
.userPoolId(exampleAwsCognitoUserPool.id())
.useCognitoProvidedValues(true)
.build());
}
}
resources:
client:
type: aws:cognito:ManagedLoginBranding
properties:
clientId: ${example.id}
userPoolId: ${exampleAwsCognitoUserPool.id}
useCognitoProvidedValues: true
Custom Branding Style
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as std from "@pulumi/std";
const client = new aws.cognito.ManagedLoginBranding("client", {
clientId: example.id,
userPoolId: exampleAwsCognitoUserPool.id,
assets: [{
bytes: std.filebase64({
input: "login_branding_asset.svg",
}).then(invoke => invoke.result),
category: "PAGE_HEADER_BACKGROUND",
colorMode: "DARK",
extension: "SVG",
}],
settings: JSON.stringify({}),
});
import pulumi
import json
import pulumi_aws as aws
import pulumi_std as std
client = aws.cognito.ManagedLoginBranding("client",
client_id=example["id"],
user_pool_id=example_aws_cognito_user_pool["id"],
assets=[{
"bytes": std.filebase64(input="login_branding_asset.svg").result,
"category": "PAGE_HEADER_BACKGROUND",
"color_mode": "DARK",
"extension": "SVG",
}],
settings=json.dumps({}))
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/cognito"
"github.com/pulumi/pulumi-std/sdk/go/std"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{
Input: "login_branding_asset.svg",
}, nil)
if err != nil {
return err
}
tmpJSON0, err := json.Marshal(map[string]interface{}{})
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = cognito.NewManagedLoginBranding(ctx, "client", &cognito.ManagedLoginBrandingArgs{
ClientId: pulumi.Any(example.Id),
UserPoolId: pulumi.Any(exampleAwsCognitoUserPool.Id),
Assets: cognito.ManagedLoginBrandingAssetArray{
&cognito.ManagedLoginBrandingAssetArgs{
Bytes: pulumi.String(invokeFilebase64.Result),
Category: pulumi.String("PAGE_HEADER_BACKGROUND"),
ColorMode: pulumi.String("DARK"),
Extension: pulumi.String("SVG"),
},
},
Settings: pulumi.String(json0),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var client = new Aws.Cognito.ManagedLoginBranding("client", new()
{
ClientId = example.Id,
UserPoolId = exampleAwsCognitoUserPool.Id,
Assets = new[]
{
new Aws.Cognito.Inputs.ManagedLoginBrandingAssetArgs
{
Bytes = Std.Filebase64.Invoke(new()
{
Input = "login_branding_asset.svg",
}).Apply(invoke => invoke.Result),
Category = "PAGE_HEADER_BACKGROUND",
ColorMode = "DARK",
Extension = "SVG",
},
},
Settings = JsonSerializer.Serialize(new Dictionary<string, object?>
{
}),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cognito.ManagedLoginBranding;
import com.pulumi.aws.cognito.ManagedLoginBrandingArgs;
import com.pulumi.aws.cognito.inputs.ManagedLoginBrandingAssetArgs;
import com.pulumi.std.StdFunctions;
import com.pulumi.std.inputs.Filebase64Args;
import static com.pulumi.codegen.internal.Serialization.*;
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 client = new ManagedLoginBranding("client", ManagedLoginBrandingArgs.builder()
.clientId(example.id())
.userPoolId(exampleAwsCognitoUserPool.id())
.assets(ManagedLoginBrandingAssetArgs.builder()
.bytes(StdFunctions.filebase64(Filebase64Args.builder()
.input("login_branding_asset.svg")
.build()).result())
.category("PAGE_HEADER_BACKGROUND")
.colorMode("DARK")
.extension("SVG")
.build())
.settings(serializeJson(
jsonObject(
)))
.build());
}
}
resources:
client:
type: aws:cognito:ManagedLoginBranding
properties:
clientId: ${example.id}
userPoolId: ${exampleAwsCognitoUserPool.id}
assets:
- bytes:
fn::invoke:
function: std:filebase64
arguments:
input: login_branding_asset.svg
return: result
category: PAGE_HEADER_BACKGROUND
colorMode: DARK
extension: SVG
settings:
fn::toJSON: {}
Create ManagedLoginBranding Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ManagedLoginBranding(name: string, args: ManagedLoginBrandingArgs, opts?: CustomResourceOptions);@overload
def ManagedLoginBranding(resource_name: str,
args: ManagedLoginBrandingArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ManagedLoginBranding(resource_name: str,
opts: Optional[ResourceOptions] = None,
client_id: Optional[str] = None,
user_pool_id: Optional[str] = None,
assets: Optional[Sequence[ManagedLoginBrandingAssetArgs]] = None,
region: Optional[str] = None,
settings: Optional[str] = None,
use_cognito_provided_values: Optional[bool] = None)func NewManagedLoginBranding(ctx *Context, name string, args ManagedLoginBrandingArgs, opts ...ResourceOption) (*ManagedLoginBranding, error)public ManagedLoginBranding(string name, ManagedLoginBrandingArgs args, CustomResourceOptions? opts = null)
public ManagedLoginBranding(String name, ManagedLoginBrandingArgs args)
public ManagedLoginBranding(String name, ManagedLoginBrandingArgs args, CustomResourceOptions options)
type: aws:cognito:ManagedLoginBranding
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 ManagedLoginBrandingArgs
- 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 ManagedLoginBrandingArgs
- 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 ManagedLoginBrandingArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ManagedLoginBrandingArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ManagedLoginBrandingArgs
- 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 managedLoginBrandingResource = new Aws.Cognito.ManagedLoginBranding("managedLoginBrandingResource", new()
{
ClientId = "string",
UserPoolId = "string",
Assets = new[]
{
new Aws.Cognito.Inputs.ManagedLoginBrandingAssetArgs
{
Category = "string",
ColorMode = "string",
Extension = "string",
Bytes = "string",
ResourceId = "string",
},
},
Region = "string",
Settings = "string",
UseCognitoProvidedValues = false,
});
example, err := cognito.NewManagedLoginBranding(ctx, "managedLoginBrandingResource", &cognito.ManagedLoginBrandingArgs{
ClientId: pulumi.String("string"),
UserPoolId: pulumi.String("string"),
Assets: cognito.ManagedLoginBrandingAssetArray{
&cognito.ManagedLoginBrandingAssetArgs{
Category: pulumi.String("string"),
ColorMode: pulumi.String("string"),
Extension: pulumi.String("string"),
Bytes: pulumi.String("string"),
ResourceId: pulumi.String("string"),
},
},
Region: pulumi.String("string"),
Settings: pulumi.String("string"),
UseCognitoProvidedValues: pulumi.Bool(false),
})
var managedLoginBrandingResource = new ManagedLoginBranding("managedLoginBrandingResource", ManagedLoginBrandingArgs.builder()
.clientId("string")
.userPoolId("string")
.assets(ManagedLoginBrandingAssetArgs.builder()
.category("string")
.colorMode("string")
.extension("string")
.bytes("string")
.resourceId("string")
.build())
.region("string")
.settings("string")
.useCognitoProvidedValues(false)
.build());
managed_login_branding_resource = aws.cognito.ManagedLoginBranding("managedLoginBrandingResource",
client_id="string",
user_pool_id="string",
assets=[{
"category": "string",
"color_mode": "string",
"extension": "string",
"bytes": "string",
"resource_id": "string",
}],
region="string",
settings="string",
use_cognito_provided_values=False)
const managedLoginBrandingResource = new aws.cognito.ManagedLoginBranding("managedLoginBrandingResource", {
clientId: "string",
userPoolId: "string",
assets: [{
category: "string",
colorMode: "string",
extension: "string",
bytes: "string",
resourceId: "string",
}],
region: "string",
settings: "string",
useCognitoProvidedValues: false,
});
type: aws:cognito:ManagedLoginBranding
properties:
assets:
- bytes: string
category: string
colorMode: string
extension: string
resourceId: string
clientId: string
region: string
settings: string
useCognitoProvidedValues: false
userPoolId: string
ManagedLoginBranding 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 ManagedLoginBranding resource accepts the following input properties:
- Client
Id string - App client that the branding style is for.
- User
Pool stringId User pool the client belongs to.
The following arguments are optional:
- Assets
List<Managed
Login Branding Asset> - Image files to apply to roles like backgrounds, logos, and icons. See details below.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Settings string
- JSON document with the the settings to apply to the style.
- Use
Cognito boolProvided Values - When
true, applies the default branding style options.
- Client
Id string - App client that the branding style is for.
- User
Pool stringId User pool the client belongs to.
The following arguments are optional:
- Assets
[]Managed
Login Branding Asset Args - Image files to apply to roles like backgrounds, logos, and icons. See details below.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Settings string
- JSON document with the the settings to apply to the style.
- Use
Cognito boolProvided Values - When
true, applies the default branding style options.
- client
Id String - App client that the branding style is for.
- user
Pool StringId User pool the client belongs to.
The following arguments are optional:
- assets
List<Managed
Login Branding Asset> - Image files to apply to roles like backgrounds, logos, and icons. See details below.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- settings String
- JSON document with the the settings to apply to the style.
- use
Cognito BooleanProvided Values - When
true, applies the default branding style options.
- client
Id string - App client that the branding style is for.
- user
Pool stringId User pool the client belongs to.
The following arguments are optional:
- assets
Managed
Login Branding Asset[] - Image files to apply to roles like backgrounds, logos, and icons. See details below.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- settings string
- JSON document with the the settings to apply to the style.
- use
Cognito booleanProvided Values - When
true, applies the default branding style options.
- client_
id str - App client that the branding style is for.
- user_
pool_ strid User pool the client belongs to.
The following arguments are optional:
- assets
Sequence[Managed
Login Branding Asset Args] - Image files to apply to roles like backgrounds, logos, and icons. See details below.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- settings str
- JSON document with the the settings to apply to the style.
- use_
cognito_ boolprovided_ values - When
true, applies the default branding style options.
- client
Id String - App client that the branding style is for.
- user
Pool StringId User pool the client belongs to.
The following arguments are optional:
- assets List<Property Map>
- Image files to apply to roles like backgrounds, logos, and icons. See details below.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- settings String
- JSON document with the the settings to apply to the style.
- use
Cognito BooleanProvided Values - When
true, applies the default branding style options.
Outputs
All input properties are implicitly available as output properties. Additionally, the ManagedLoginBranding resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Managed
Login stringBranding Id - ID of the managed login branding style.
- Settings
All string - Settings including Amazon Cognito defaults.
- Id string
- The provider-assigned unique ID for this managed resource.
- Managed
Login stringBranding Id - ID of the managed login branding style.
- Settings
All string - Settings including Amazon Cognito defaults.
- id String
- The provider-assigned unique ID for this managed resource.
- managed
Login StringBranding Id - ID of the managed login branding style.
- settings
All String - Settings including Amazon Cognito defaults.
- id string
- The provider-assigned unique ID for this managed resource.
- managed
Login stringBranding Id - ID of the managed login branding style.
- settings
All string - Settings including Amazon Cognito defaults.
- id str
- The provider-assigned unique ID for this managed resource.
- managed_
login_ strbranding_ id - ID of the managed login branding style.
- settings_
all str - Settings including Amazon Cognito defaults.
- id String
- The provider-assigned unique ID for this managed resource.
- managed
Login StringBranding Id - ID of the managed login branding style.
- settings
All String - Settings including Amazon Cognito defaults.
Look up Existing ManagedLoginBranding Resource
Get an existing ManagedLoginBranding 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?: ManagedLoginBrandingState, opts?: CustomResourceOptions): ManagedLoginBranding@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
assets: Optional[Sequence[ManagedLoginBrandingAssetArgs]] = None,
client_id: Optional[str] = None,
managed_login_branding_id: Optional[str] = None,
region: Optional[str] = None,
settings: Optional[str] = None,
settings_all: Optional[str] = None,
use_cognito_provided_values: Optional[bool] = None,
user_pool_id: Optional[str] = None) -> ManagedLoginBrandingfunc GetManagedLoginBranding(ctx *Context, name string, id IDInput, state *ManagedLoginBrandingState, opts ...ResourceOption) (*ManagedLoginBranding, error)public static ManagedLoginBranding Get(string name, Input<string> id, ManagedLoginBrandingState? state, CustomResourceOptions? opts = null)public static ManagedLoginBranding get(String name, Output<String> id, ManagedLoginBrandingState state, CustomResourceOptions options)resources: _: type: aws:cognito:ManagedLoginBranding get: id: ${id}- 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.
- Assets
List<Managed
Login Branding Asset> - Image files to apply to roles like backgrounds, logos, and icons. See details below.
- Client
Id string - App client that the branding style is for.
- Managed
Login stringBranding Id - ID of the managed login branding style.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Settings string
- JSON document with the the settings to apply to the style.
- Settings
All string - Settings including Amazon Cognito defaults.
- Use
Cognito boolProvided Values - When
true, applies the default branding style options. - User
Pool stringId User pool the client belongs to.
The following arguments are optional:
- Assets
[]Managed
Login Branding Asset Args - Image files to apply to roles like backgrounds, logos, and icons. See details below.
- Client
Id string - App client that the branding style is for.
- Managed
Login stringBranding Id - ID of the managed login branding style.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Settings string
- JSON document with the the settings to apply to the style.
- Settings
All string - Settings including Amazon Cognito defaults.
- Use
Cognito boolProvided Values - When
true, applies the default branding style options. - User
Pool stringId User pool the client belongs to.
The following arguments are optional:
- assets
List<Managed
Login Branding Asset> - Image files to apply to roles like backgrounds, logos, and icons. See details below.
- client
Id String - App client that the branding style is for.
- managed
Login StringBranding Id - ID of the managed login branding style.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- settings String
- JSON document with the the settings to apply to the style.
- settings
All String - Settings including Amazon Cognito defaults.
- use
Cognito BooleanProvided Values - When
true, applies the default branding style options. - user
Pool StringId User pool the client belongs to.
The following arguments are optional:
- assets
Managed
Login Branding Asset[] - Image files to apply to roles like backgrounds, logos, and icons. See details below.
- client
Id string - App client that the branding style is for.
- managed
Login stringBranding Id - ID of the managed login branding style.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- settings string
- JSON document with the the settings to apply to the style.
- settings
All string - Settings including Amazon Cognito defaults.
- use
Cognito booleanProvided Values - When
true, applies the default branding style options. - user
Pool stringId User pool the client belongs to.
The following arguments are optional:
- assets
Sequence[Managed
Login Branding Asset Args] - Image files to apply to roles like backgrounds, logos, and icons. See details below.
- client_
id str - App client that the branding style is for.
- managed_
login_ strbranding_ id - ID of the managed login branding style.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- settings str
- JSON document with the the settings to apply to the style.
- settings_
all str - Settings including Amazon Cognito defaults.
- use_
cognito_ boolprovided_ values - When
true, applies the default branding style options. - user_
pool_ strid User pool the client belongs to.
The following arguments are optional:
- assets List<Property Map>
- Image files to apply to roles like backgrounds, logos, and icons. See details below.
- client
Id String - App client that the branding style is for.
- managed
Login StringBranding Id - ID of the managed login branding style.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- settings String
- JSON document with the the settings to apply to the style.
- settings
All String - Settings including Amazon Cognito defaults.
- use
Cognito BooleanProvided Values - When
true, applies the default branding style options. - user
Pool StringId User pool the client belongs to.
The following arguments are optional:
Supporting Types
ManagedLoginBrandingAsset, ManagedLoginBrandingAssetArgs
- Category string
- Category that the image corresponds to. See AWS documentation for valid values.
- Color
Mode string - Display-mode target of the asset. Valid values:
LIGHT,DARK,DYNAMIC. - Extension string
- Bytes string
- Image file, in Base64-encoded binary.
- Resource
Id string - Asset ID.
- Category string
- Category that the image corresponds to. See AWS documentation for valid values.
- Color
Mode string - Display-mode target of the asset. Valid values:
LIGHT,DARK,DYNAMIC. - Extension string
- Bytes string
- Image file, in Base64-encoded binary.
- Resource
Id string - Asset ID.
- category String
- Category that the image corresponds to. See AWS documentation for valid values.
- color
Mode String - Display-mode target of the asset. Valid values:
LIGHT,DARK,DYNAMIC. - extension String
- bytes String
- Image file, in Base64-encoded binary.
- resource
Id String - Asset ID.
- category string
- Category that the image corresponds to. See AWS documentation for valid values.
- color
Mode string - Display-mode target of the asset. Valid values:
LIGHT,DARK,DYNAMIC. - extension string
- bytes string
- Image file, in Base64-encoded binary.
- resource
Id string - Asset ID.
- category str
- Category that the image corresponds to. See AWS documentation for valid values.
- color_
mode str - Display-mode target of the asset. Valid values:
LIGHT,DARK,DYNAMIC. - extension str
- bytes str
- Image file, in Base64-encoded binary.
- resource_
id str - Asset ID.
- category String
- Category that the image corresponds to. See AWS documentation for valid values.
- color
Mode String - Display-mode target of the asset. Valid values:
LIGHT,DARK,DYNAMIC. - extension String
- bytes String
- Image file, in Base64-encoded binary.
- resource
Id String - Asset ID.
Import
Using pulumi import, import Cognito branding settings using user_pool_id and managed_login_branding_id separated by ,. For example:
$ pulumi import aws:cognito/managedLoginBranding:ManagedLoginBranding example us-west-2_rSss9Zltr,06c6ae7b-1e66-46d2-87a9-1203ea3307bd
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
