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

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

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

/**
 * A Grafana data source.
 * 

* @see https://grafana.com/docs/grafana/latest/administration/provisioning/#example-data-source-config-file */ @javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-08-31T12:13:41.973Z") @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @software.amazon.jsii.Jsii(module = org.cdk8s.grafana.$Module.class, fqn = "cdk8s-grafana.DataSource") public class DataSource extends software.constructs.Construct { protected DataSource(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected DataSource(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.Stable) public DataSource(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull org.cdk8s.grafana.DataSourceProps 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") }); } /** * Name of the data source. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getName() { return software.amazon.jsii.Kernel.get(this, "name", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * A fluent builder for {@link org.cdk8s.grafana.DataSource}. */ @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 final org.cdk8s.grafana.DataSourceProps.Builder props; private Builder(final software.constructs.Construct scope, final java.lang.String id) { this.scope = scope; this.id = id; this.props = new org.cdk8s.grafana.DataSourceProps.Builder(); } /** * Access type of the data source. *

* @return {@code this} * @param access Access type of the data source. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder access(final org.cdk8s.grafana.AccessType access) { this.props.access(access); return this; } /** * Name of the data source. *

* @return {@code this} * @param name Name of the data source. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder name(final java.lang.String name) { this.props.name(name); return this; } /** * Type of the data source. *

* @return {@code this} * @param type Type of the data source. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder type(final java.lang.String type) { this.props.type(type); return this; } /** * Description of the data source. *

* Default: - no description *

* @return {@code this} * @param description Description of the data source. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder description(final java.lang.String description) { this.props.description(description); return this; } /** * Labels to apply to the kubernetes resource. *

* When adding a data source to a Grafana instance using grafana.addDataSource, * labels provided to Grafana will be automatically applied. Otherwise, * labels must be added manually. *

* Default: - no labels *

* @return {@code this} * @param labels Labels to apply to the kubernetes resource. 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 the kubernetes resource. *

* When adding a data source to a Grafana instance using grafana.addDataSource, * the namespace will be automatically inherited. *

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

* @return {@code this} * @param namespace Namespace to apply to the kubernetes resource. 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; } /** * URL of the data source. *

* Most resources besides the 'testdata' data source * type require this field in order to retrieve data. *

* Default: - default url for data source type *

* @return {@code this} * @param url URL of the data source. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder url(final java.lang.String url) { this.props.url(url); return this; } /** * @return a newly built instance of {@link org.cdk8s.grafana.DataSource}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public org.cdk8s.grafana.DataSource build() { return new org.cdk8s.grafana.DataSource( this.scope, this.id, this.props.build() ); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy