All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.cdk8s.grafana.Grafana Maven / Gradle / Ivy

There is a newer version: 0.1.656
Show newest version
package org.cdk8s.grafana;

/**
 * A Grafana instance.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-27T12:17:25.541Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = org.cdk8s.grafana.$Module.class, fqn = "cdk8s-grafana.Grafana")
public class Grafana extends software.constructs.Construct {

    protected Grafana(final software.amazon.jsii.JsiiObjectRef objRef) {
        super(objRef);
    }

    protected Grafana(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
        super(initializationMode);
    }

    /**
     * @param scope This parameter is required.
     * @param id This parameter is required.
     * @param props
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public Grafana(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable org.cdk8s.grafana.GrafanaProps 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"), props });
    }

    /**
     * @param scope This parameter is required.
     * @param id This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public Grafana(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id) {
        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") });
    }

    /**
     * Creates a dashboard associated with a particular data source.
     * 

* By default, * labels are automatically added so that the data source is detected by * Grafana. *

* @param id This parameter is required. * @param props This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull org.cdk8s.grafana.Dashboard addDashboard(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull org.cdk8s.grafana.DashboardProps props) { return software.amazon.jsii.Kernel.call(this, "addDashboard", software.amazon.jsii.NativeType.forClass(org.cdk8s.grafana.Dashboard.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") }); } /** * Adds a data source. *

* By default, labels are automatically added so that * the data source is detected by Grafana. *

* @param id This parameter is required. * @param props This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull org.cdk8s.grafana.DataSource addDataSource(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull org.cdk8s.grafana.DataSourceProps props) { return software.amazon.jsii.Kernel.call(this, "addDataSource", software.amazon.jsii.NativeType.forClass(org.cdk8s.grafana.DataSource.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") }); } /** * A fluent builder for {@link org.cdk8s.grafana.Grafana}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) 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.Stable) 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 org.cdk8s.grafana.GrafanaProps.Builder props; private Builder(final software.constructs.Construct scope, final java.lang.String id) { this.scope = scope; this.id = id; } /** * Default admin password. *

* Default: "secret" *

* @return {@code this} * @param adminPassword Default admin password. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder adminPassword(final java.lang.String adminPassword) { this.props().adminPassword(adminPassword); return this; } /** * Default admin username. *

* Default: "root" *

* @return {@code this} * @param adminUser Default admin username. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder adminUser(final java.lang.String adminUser) { this.props().adminUser(adminUser); return this; } /** * Default data source - equivalent to calling grafana.addDataSource. *

* Default: - no data source added *

* @return {@code this} * @param defaultDataSource Default data source - equivalent to calling grafana.addDataSource. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder defaultDataSource(final org.cdk8s.grafana.DataSourceProps defaultDataSource) { this.props().defaultDataSource(defaultDataSource); return this; } /** * Specify a custom image for Grafana. *

* Default: "public.ecr.aws/ubuntu/grafana:latest" *

* @return {@code this} * @param image Specify a custom image for Grafana. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder image(final java.lang.String image) { this.props().image(image); return this; } /** * Create an ingress to provide external access to the Grafana cluster. *

* Default: true *

* @return {@code this} * @param ingress Create an ingress to provide external access to the Grafana cluster. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder ingress(final java.lang.Boolean ingress) { this.props().ingress(ingress); return this; } /** * Labels to apply to all Grafana resources. *

* Default: - { app: "grafana" } *

* @return {@code this} * @param labels Labels to apply to all Grafana resources. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder labels(final java.util.Map labels) { this.props().labels(labels); return this; } /** * Namespace to apply to all Grafana resources. *

* The Grafana Operator must be * installed in this namespace for resources to be recognized. *

* Default: - undefined (will be assigned to the 'default' namespace) *

* @return {@code this} * @param namespace Namespace to apply to all Grafana resources. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder namespace(final java.lang.String namespace) { this.props().namespace(namespace); return this; } /** * Require login in order to view or manage dashboards. *

* Default: false *

* @return {@code this} * @param requireLogin Require login in order to view or manage dashboards. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder requireLogin(final java.lang.Boolean requireLogin) { this.props().requireLogin(requireLogin); return this; } /** * Type of service to be created (NodePort, ClusterIP or LoadBalancer). *

* Default: ClusterIP *

* @return {@code this} * @param serviceType Type of service to be created (NodePort, ClusterIP or LoadBalancer). This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder serviceType(final java.lang.String serviceType) { this.props().serviceType(serviceType); return this; } /** * @return a newly built instance of {@link org.cdk8s.grafana.Grafana}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public org.cdk8s.grafana.Grafana build() { return new org.cdk8s.grafana.Grafana( this.scope, this.id, this.props != null ? this.props.build() : null ); } private org.cdk8s.grafana.GrafanaProps.Builder props() { if (this.props == null) { this.props = new org.cdk8s.grafana.GrafanaProps.Builder(); } return this.props; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy