updateComponentConfiguration method
Updates the monitoring configurations for the component. The configuration
input parameter is an escaped JSON of the configuration and should match
the schema of what is returned by
DescribeComponentConfigurationRecommendation
.
May throw ResourceNotFoundException. May throw ValidationException. May throw InternalServerException.
Parameter componentName
:
The name of the component.
Parameter resourceGroupName
:
The name of the resource group.
Parameter componentConfiguration
:
The configuration settings of the component. The value is the escaped JSON
of the configuration. For more information about the JSON format, see Working
with JSON. You can send a request to
DescribeComponentConfigurationRecommendation
to see the
recommended configuration for a component. For the complete format of the
component configuration file, see Component
Configuration.
Parameter monitor
:
Indicates whether the application component is monitored.
Parameter tier
:
The tier of the application component. Supported tiers include
DOT_NET_WORKER
, DOT_NET_WEB
,
DOT_NET_CORE
, SQL_SERVER
, and
DEFAULT
.
Implementation
Future<void> updateComponentConfiguration({
required String componentName,
required String resourceGroupName,
String? componentConfiguration,
bool? monitor,
Tier? tier,
}) async {
ArgumentError.checkNotNull(componentName, 'componentName');
_s.validateStringLength(
'componentName',
componentName,
1,
1011,
isRequired: true,
);
ArgumentError.checkNotNull(resourceGroupName, 'resourceGroupName');
_s.validateStringLength(
'resourceGroupName',
resourceGroupName,
1,
256,
isRequired: true,
);
_s.validateStringLength(
'componentConfiguration',
componentConfiguration,
1,
10000,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'EC2WindowsBarleyService.UpdateComponentConfiguration'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ComponentName': componentName,
'ResourceGroupName': resourceGroupName,
if (componentConfiguration != null)
'ComponentConfiguration': componentConfiguration,
if (monitor != null) 'Monitor': monitor,
if (tier != null) 'Tier': tier.toValue(),
},
);
}