### YamlMime:JavaType uid: "com.azure.core.util.ConfigurationPropertyBuilder" fullName: "com.azure.core.util.ConfigurationPropertyBuilder" name: "ConfigurationPropertyBuilder" nameWithType: "ConfigurationPropertyBuilder" summary: "Builds configuration property." inheritances: - "" inheritedClassMethods: - classRef: "java.lang.Object" methodsRef: - "clone" - "equals" - "finalize" - "getClass" - "hashCode" - "notify" - "notifyAll" - "toString" - "wait" - "wait" - "wait" syntax: "public final class **ConfigurationPropertyBuilder**" constructors: - uid: "com.azure.core.util.ConfigurationPropertyBuilder.ConfigurationPropertyBuilder(java.lang.String,java.util.function.Function)" fullName: "com.azure.core.util.ConfigurationPropertyBuilder.ConfigurationPropertyBuilder(String name, Function converter)" name: "ConfigurationPropertyBuilder(String name, Function converter)" nameWithType: "ConfigurationPropertyBuilder.ConfigurationPropertyBuilder(String name, Function converter)" summary: "Constructs `ConfigurationPropertyBuilder` instance." parameters: - description: "name of the property." name: "name" type: "String" - description: "Converter used to map the configuration to T." name: "converter" type: "Function<String,>" syntax: "public ConfigurationPropertyBuilder(String name, Function converter)" desc: "Constructs `ConfigurationPropertyBuilder` instance.\n\n```java\nConfigurationProperty modeProperty =\n new ConfigurationPropertyBuilder<>(\"mode\", SampleEnumProperty::fromString)\n .logValue(true)\n .defaultValue(SampleEnumProperty.MODE_1)\n .build();\n System.out.println(configuration.get(modeProperty));\n```" methods: - uid: "com.azure.core.util.ConfigurationPropertyBuilder.aliases(java.lang.String...)" fullName: "com.azure.core.util.ConfigurationPropertyBuilder.aliases(String[] aliases)" name: "aliases(String[] aliases)" nameWithType: "ConfigurationPropertyBuilder.aliases(String[] aliases)" summary: "Sets one or more alias for property." parameters: - description: "one or more alias for the property name." name: "aliases" type: "String[]" syntax: "public ConfigurationPropertyBuilder aliases(String[] aliases)" desc: "Sets one or more alias for property. get(com.azure.core.util.ConfigurationProperty)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Configuration#get(ConfigurationProperty)\"> attempts to retrieve property by name first and only then tries to retrieve properties by alias in the order aliases are provided." returns: description: "the updated ConfigurationPropertyBuilder object." type: "<>" - uid: "com.azure.core.util.ConfigurationPropertyBuilder.build()" fullName: "com.azure.core.util.ConfigurationPropertyBuilder.build()" name: "build()" nameWithType: "ConfigurationPropertyBuilder.build()" summary: "Builds configuration property instance." syntax: "public ConfigurationProperty build()" desc: "Builds configuration property instance." returns: description: " instance." type: "<>" - uid: "com.azure.core.util.ConfigurationPropertyBuilder.defaultValue(T)" fullName: "com.azure.core.util.ConfigurationPropertyBuilder.defaultValue(T defaultValue)" name: "defaultValue(T defaultValue)" nameWithType: "ConfigurationPropertyBuilder.defaultValue(T defaultValue)" summary: "Sets default property value." parameters: - description: "value to be returned by get(com.azure.core.util.ConfigurationProperty)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Configuration#get(ConfigurationProperty)\"> if the property\n isn't found." name: "defaultValue" type: "" syntax: "public ConfigurationPropertyBuilder defaultValue(T defaultValue)" desc: "Sets default property value. `null` by default." returns: description: "the updated ConfigurationPropertyBuilder object." type: "<>" - uid: "com.azure.core.util.ConfigurationPropertyBuilder.environmentVariableName(java.lang.String)" fullName: "com.azure.core.util.ConfigurationPropertyBuilder.environmentVariableName(String environmentVariableName)" name: "environmentVariableName(String environmentVariableName)" nameWithType: "ConfigurationPropertyBuilder.environmentVariableName(String environmentVariableName)" summary: "Sets environment variable name that can represent this property if explicit configuration is not set." parameters: - description: "environment variable name." name: "environmentVariableName" type: "String" syntax: "public ConfigurationPropertyBuilder environmentVariableName(String environmentVariableName)" desc: "Sets environment variable name that can represent this property if explicit configuration is not set.\n\nWhen property value is not found by `name` or `alias`, get(com.azure.core.util.ConfigurationProperty)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Configuration#get(ConfigurationProperty)\"> falls back to system properties and environment variables.\n\nWhen environment variable (or system property) is not set, get(com.azure.core.util.ConfigurationProperty)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Configuration#get(ConfigurationProperty)\"> does not attempt to read environment configuration." returns: description: "the updated ConfigurationPropertyBuilder object." type: "<>" - uid: "com.azure.core.util.ConfigurationPropertyBuilder.logValue(boolean)" fullName: "com.azure.core.util.ConfigurationPropertyBuilder.logValue(boolean logValue)" name: "logValue(boolean logValue)" nameWithType: "ConfigurationPropertyBuilder.logValue(boolean logValue)" summary: "Sets flag indicating if property value can be logged." parameters: - description: "If set to true, get(com.azure.core.util.ConfigurationProperty)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Configuration#get(ConfigurationProperty)\"> will log property value,\n Otherwise, value is redacted." name: "logValue" type: "" syntax: "public ConfigurationPropertyBuilder logValue(boolean logValue)" desc: "Sets flag indicating if property value can be logged. Default is `false`, indicating that property value should not be logged. When and if retrieving of corresponding configuration property is logged, will use \"redacted\" string instead of property value. If flag is set to `true`, value is populated on the logs as is." returns: description: "the updated ConfigurationPropertyBuilder object." type: "<>" - uid: "com.azure.core.util.ConfigurationPropertyBuilder.ofBoolean(java.lang.String)" fullName: "com.azure.core.util.ConfigurationPropertyBuilder.ofBoolean(String name)" name: "ofBoolean(String name)" nameWithType: "ConfigurationPropertyBuilder.ofBoolean(String name)" summary: "Creates configured to log property value and parse value using ." modifiers: - "static" parameters: - description: "property name." name: "name" type: "String" syntax: "public static ConfigurationPropertyBuilder ofBoolean(String name)" desc: "Creates configured to log property value and parse value using .\n\n```java\nConfigurationProperty booleanProperty = ConfigurationPropertyBuilder.ofBoolean(\"is-enabled\")\n .build();\n System.out.println(configuration.get(booleanProperty));\n```" returns: description: "instance of ." type: "<Boolean>" - uid: "com.azure.core.util.ConfigurationPropertyBuilder.ofDuration(java.lang.String)" fullName: "com.azure.core.util.ConfigurationPropertyBuilder.ofDuration(String name)" name: "ofDuration(String name)" nameWithType: "ConfigurationPropertyBuilder.ofDuration(String name)" summary: "Creates configured to log property value and parses value as long number of milliseconds, proxying exception." modifiers: - "static" parameters: - description: "property name." name: "name" type: "String" syntax: "public static ConfigurationPropertyBuilder ofDuration(String name)" desc: "Creates configured to log property value and parses value as long number of milliseconds, proxying exception.\n\n```java\nConfigurationProperty timeoutProperty = ConfigurationPropertyBuilder.ofDuration(\"timeout\")\n .build();\n System.out.println(configuration.get(timeoutProperty));\n```" returns: description: "instance of ." type: "<Duration>" - uid: "com.azure.core.util.ConfigurationPropertyBuilder.ofInteger(java.lang.String)" fullName: "com.azure.core.util.ConfigurationPropertyBuilder.ofInteger(String name)" name: "ofInteger(String name)" nameWithType: "ConfigurationPropertyBuilder.ofInteger(String name)" summary: "Creates configured to log property value and parse value using , proxying exception." modifiers: - "static" parameters: - description: "property name." name: "name" type: "String" syntax: "public static ConfigurationPropertyBuilder ofInteger(String name)" desc: "Creates configured to log property value and parse value using , proxying exception.\n\n```java\nConfigurationProperty integerProperty = ConfigurationPropertyBuilder.ofInteger(\"retry-count\")\n .build();\n System.out.println(configuration.get(integerProperty));\n```" returns: description: "instance of ." type: "<Integer>" - uid: "com.azure.core.util.ConfigurationPropertyBuilder.ofString(java.lang.String)" fullName: "com.azure.core.util.ConfigurationPropertyBuilder.ofString(String name)" name: "ofString(String name)" nameWithType: "ConfigurationPropertyBuilder.ofString(String name)" summary: "Creates default ." modifiers: - "static" parameters: - description: "property name." name: "name" type: "String" syntax: "public static ConfigurationPropertyBuilder ofString(String name)" desc: "Creates default . String property values are redacted in logs by default. If property value does not contain sensitive information, use to enable logging.\n\n```java\nConfigurationProperty property = ConfigurationPropertyBuilder.ofString(\"http.proxy.hostname\")\n .shared(true)\n .logValue(true)\n .systemPropertyName(\"http.proxyHost\")\n .build();\n\n // attempts to get local `azure.sdk..http.proxy.host` property and falls back to\n // shared azure.sdk.http.proxy.port\n System.out.println(configuration.get(property));\n```" returns: description: "instance of ." type: "<String>" - uid: "com.azure.core.util.ConfigurationPropertyBuilder.required(boolean)" fullName: "com.azure.core.util.ConfigurationPropertyBuilder.required(boolean required)" name: "required(boolean required)" nameWithType: "ConfigurationPropertyBuilder.required(boolean required)" summary: "Sets flag indicating if property is required." parameters: - description: "If set to true, get(com.azure.core.util.ConfigurationProperty)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Configuration#get(ConfigurationProperty)\"> will throw when property\n is not found." name: "required" type: "" syntax: "public ConfigurationPropertyBuilder required(boolean required)" desc: "Sets flag indicating if property is required. Default is `false`, indicating that property is optional." returns: description: "the updated ConfigurationPropertyBuilder object." type: "<>" - uid: "com.azure.core.util.ConfigurationPropertyBuilder.shared(boolean)" fullName: "com.azure.core.util.ConfigurationPropertyBuilder.shared(boolean shared)" name: "shared(boolean shared)" nameWithType: "ConfigurationPropertyBuilder.shared(boolean shared)" summary: "Sets flag indicating that property can be provided in the shared configuration section in addition to client-specific configuration section." parameters: - description: "If set to true, get(com.azure.core.util.ConfigurationProperty)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Configuration#get(ConfigurationProperty)\"> will attempt to retrieve\n property from local configuration and fall back to shared section, when local property is missing. Otherwise,\n only local configuration will be checked." name: "shared" type: "" syntax: "public ConfigurationPropertyBuilder shared(boolean shared)" desc: "Sets flag indicating that property can be provided in the shared configuration section in addition to client-specific configuration section. Default is `false`, indicating that property can only be provided in local configuration." returns: description: "the updated ConfigurationPropertyBuilder object." type: "<>" - uid: "com.azure.core.util.ConfigurationPropertyBuilder.systemPropertyName(java.lang.String)" fullName: "com.azure.core.util.ConfigurationPropertyBuilder.systemPropertyName(String systemPropertyName)" name: "systemPropertyName(String systemPropertyName)" nameWithType: "ConfigurationPropertyBuilder.systemPropertyName(String systemPropertyName)" summary: "Sets system property name that can represent this property if explicit configuration is not set." parameters: - description: "one or more environment variable (or system property)." name: "systemPropertyName" type: "String" syntax: "public ConfigurationPropertyBuilder systemPropertyName(String systemPropertyName)" desc: "Sets system property name that can represent this property if explicit configuration is not set.\n\nWhen property value is not found by `name` or `alias`, get(com.azure.core.util.ConfigurationProperty)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Configuration#get(ConfigurationProperty)\"> falls back to system properties and environment variables.\n\nWhen environment variable (or system property) is not set, get(com.azure.core.util.ConfigurationProperty)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Configuration#get(ConfigurationProperty)\"> does not attempt to read environment configuration." returns: description: "the updated ConfigurationPropertyBuilder object." type: "<>" type: "class" typeParameters: - description: "The property value type." name: "T" desc: "Builds configuration property." metadata: {} package: "com.azure.core.util" artifact: com.azure:azure-core:1.54.0