io.github.cdklabs.cdk.verified.permissions.IdentitySource Maven / Gradle / Ivy
Show all versions of cdk-verified-permissions Show documentation
package io.github.cdklabs.cdk.verified.permissions;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-10-11T10:47:53.512Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdk.verified.permissions.$Module.class, fqn = "@cdklabs/cdk-verified-permissions.IdentitySource")
public class IdentitySource extends software.amazon.awscdk.Resource implements io.github.cdklabs.cdk.verified.permissions.IIdentitySource {
protected IdentitySource(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected IdentitySource(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param scope This parameter is required.
* @param id This parameter is required.
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public IdentitySource(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.verified.permissions.IdentitySourceProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* (experimental) Creates Identity Source from its attributes.
*
* @param scope The parent creating construct (usually this
). This parameter is required.
* @param id The construct's name. This parameter is required.
* @param attrs An IdentitySourceAttributes
object. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.verified.permissions.IIdentitySource fromIdentitySourceAttributes(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.verified.permissions.IdentitySourceAttributes attrs) {
return software.amazon.jsii.JsiiObject.jsiiStaticCall(io.github.cdklabs.cdk.verified.permissions.IdentitySource.class, "fromIdentitySourceAttributes", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.verified.permissions.IIdentitySource.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(attrs, "attrs is required") });
}
/**
* (experimental) Create an Identity Source from its identifier.
*
* @param scope The parent creating construct (usually this
). This parameter is required.
* @param id The construct's name. This parameter is required.
* @param identitySourceId The Identity Source identifier. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.verified.permissions.IIdentitySource fromIdentitySourceId(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull java.lang.String identitySourceId) {
return software.amazon.jsii.JsiiObject.jsiiStaticCall(io.github.cdklabs.cdk.verified.permissions.IdentitySource.class, "fromIdentitySourceId", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.verified.permissions.IIdentitySource.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(identitySourceId, "identitySourceId is required") });
}
/**
* (experimental) Add an audience to the list.
*
* The method can be called only when the Identity Source is configured with OIDC auth provider and Access Token Selection mode
*
* @param audience the audience to be added. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public void addAudience(final @org.jetbrains.annotations.NotNull java.lang.String audience) {
software.amazon.jsii.Kernel.call(this, "addAudience", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(audience, "audience is required") });
}
/**
* (experimental) Add a clientId to the list The method can be called only when the Identity Source is configured with one of these configs: - Cognito auth provider - OIDC auth provider and ID Token Selection mode.
*
* @param clientId The clientId to be added. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public void addClientId(final @org.jetbrains.annotations.NotNull java.lang.String clientId) {
software.amazon.jsii.Kernel.call(this, "addClientId", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(clientId, "clientId is required") });
}
/**
* (experimental) Add a User Pool Client The method can be called only when the Identity Source is configured with Cognito auth provider.
*
* @param userPoolClient The User Pool Client Construct. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public void addUserPoolClient(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cognito.IUserPoolClient userPoolClient) {
software.amazon.jsii.Kernel.call(this, "addUserPoolClient", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(userPoolClient, "userPoolClient is required") });
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.util.List getAudiencesOIDC() {
return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "audiencesOIDC", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.util.List getClientIds() {
return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "clientIds", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))));
}
/**
* (experimental) Identity Source identifier.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.String getIdentitySourceId() {
return software.amazon.jsii.Kernel.get(this, "identitySourceId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.String getIssuer() {
return software.amazon.jsii.Kernel.get(this, "issuer", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.verified.permissions.IPolicyStore getPolicyStore() {
return software.amazon.jsii.Kernel.get(this, "policyStore", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.verified.permissions.IPolicyStore.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.Nullable java.lang.String getCognitoGroupEntityType() {
return software.amazon.jsii.Kernel.get(this, "cognitoGroupEntityType", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.Nullable java.lang.String getGroupConfigGroupClaimOIDC() {
return software.amazon.jsii.Kernel.get(this, "groupConfigGroupClaimOIDC", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.Nullable java.lang.String getGroupConfigGroupEntityTypeOIDC() {
return software.amazon.jsii.Kernel.get(this, "groupConfigGroupEntityTypeOIDC", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.Nullable java.lang.String getPrincipalIdClaimOIDC() {
return software.amazon.jsii.Kernel.get(this, "principalIdClaimOIDC", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.Nullable java.lang.String getUserPoolArn() {
return software.amazon.jsii.Kernel.get(this, "userPoolArn", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* (experimental) A fluent builder for {@link io.github.cdklabs.cdk.verified.permissions.IdentitySource}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope This parameter is required.
* @param id This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static Builder create(final software.constructs.Construct scope, final java.lang.String id) {
return new Builder(scope, id);
}
private final software.constructs.Construct scope;
private final java.lang.String id;
private final io.github.cdklabs.cdk.verified.permissions.IdentitySourceProps.Builder props;
private Builder(final software.constructs.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new io.github.cdklabs.cdk.verified.permissions.IdentitySourceProps.Builder();
}
/**
* (experimental) Identity Source configuration.
*
* @return {@code this}
* @param configuration Identity Source configuration. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder configuration(final io.github.cdklabs.cdk.verified.permissions.IdentitySourceConfiguration configuration) {
this.props.configuration(configuration);
return this;
}
/**
* (experimental) Policy Store in which you want to store this identity source.
*
* @return {@code this}
* @param policyStore Policy Store in which you want to store this identity source. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder policyStore(final io.github.cdklabs.cdk.verified.permissions.IPolicyStore policyStore) {
this.props.policyStore(policyStore);
return this;
}
/**
* (experimental) Principal entity type.
*
* Default: - No principal entity type for the identity source.
*
* @return {@code this}
* @param principalEntityType Principal entity type. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder principalEntityType(final java.lang.String principalEntityType) {
this.props.principalEntityType(principalEntityType);
return this;
}
/**
* @return a newly built instance of {@link io.github.cdklabs.cdk.verified.permissions.IdentitySource}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public io.github.cdklabs.cdk.verified.permissions.IdentitySource build() {
return new io.github.cdklabs.cdk.verified.permissions.IdentitySource(
this.scope,
this.id,
this.props.build()
);
}
}
}