**VOLATILE** This API is subject to change at any time. Apply the provided ConfigProfile options. Args: profile_name (str): The name of the profile to apply. options (:class:`~couchbase.options.ClusterOptions`): The options to apply the ConfigProfi
(self,
profile_name, # type: str
options # type: ClusterOptions
)
| 253 | self.register_profile(KnownConfigProfiles.WanDevelopment.value, WanDevelopmentProfile()) |
| 254 | |
| 255 | def apply_profile(self, |
| 256 | profile_name, # type: str |
| 257 | options # type: ClusterOptions |
| 258 | ) -> None: |
| 259 | """ |
| 260 | **VOLATILE** This API is subject to change at any time. |
| 261 | |
| 262 | Apply the provided ConfigProfile options. |
| 263 | |
| 264 | Args: |
| 265 | profile_name (str): The name of the profile to apply. |
| 266 | options (:class:`~couchbase.options.ClusterOptions`): The options to apply the ConfigProfile options |
| 267 | toward. The ConfigProfile options will override any matching option(s) previously set. |
| 268 | |
| 269 | Raises: |
| 270 | :class:`~couchbase.exceptions.InvalidArgumentException`: If the specified profile is not registered. |
| 271 | """ |
| 272 | if profile_name not in self._profiles: |
| 273 | raise InvalidArgumentException(f'{profile_name} is not a registered profile.') |
| 274 | |
| 275 | self._profiles[profile_name].apply(options) |
| 276 | |
| 277 | def register_profile(self, |
| 278 | profile_name, # type: str |
no test coverage detected