Skip to content

Commit

Permalink
feat(client-internetmonitor): This release includes a new configurabl…
Browse files Browse the repository at this point in the history
…e value, TrafficPercentageToMonitor, which allows users to adjust the amount of traffic monitored by percentage
  • Loading branch information
awstools committed Apr 17, 2023
1 parent 73f7859 commit e391e56
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,15 @@ export interface CreateMonitorCommandOutput extends CreateMonitorOutput, __Metad
* Tags: { // TagMap
* "<keys>": "STRING_VALUE",
* },
* MaxCityNetworksToMonitor: Number("int"), // required
* MaxCityNetworksToMonitor: Number("int"),
* InternetMeasurementsLogDelivery: { // InternetMeasurementsLogDelivery
* S3Config: { // S3Config
* BucketName: "STRING_VALUE",
* BucketPrefix: "STRING_VALUE",
* LogDeliveryStatus: "STRING_VALUE",
* },
* },
* TrafficPercentageToMonitor: Number("int"),
* };
* const command = new CreateMonitorCommand(input);
* const response = await client.send(command);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export interface UpdateMonitorCommandOutput extends UpdateMonitorOutput, __Metad
* LogDeliveryStatus: "STRING_VALUE",
* },
* },
* TrafficPercentageToMonitor: Number("int"),
* };
* const command = new UpdateMonitorCommand(input);
* const response = await client.send(command);
Expand Down
24 changes: 19 additions & 5 deletions clients/client-internetmonitor/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ export interface S3Config {

/**
* @public
* <p>Configuration information for other locations that you choose to publish Amazon CloudWatch Internet Monitor internet measurements to, such as Amazon S3.
* The measurements are also published to Amazon CloudWatch Logs.</p>
* <p>Publish internet measurements to an Amazon S3 bucket in addition to CloudWatch Logs.</p>
*/
export interface InternetMeasurementsLogDelivery {
/**
Expand Down Expand Up @@ -187,12 +186,17 @@ export interface CreateMonitorInput {
* <p>To learn more, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/IMCityNetworksMaximum.html">Choosing a city-network maximum value
* </a> in the Amazon CloudWatch Internet Monitor section of the <i>CloudWatch User Guide</i>.</p>
*/
MaxCityNetworksToMonitor: number | undefined;
MaxCityNetworksToMonitor?: number;

/**
* <p>Publish internet measurements for Internet Monitor to another location, such as an Amazon S3 bucket. The measurements are also published to Amazon CloudWatch Logs.</p>
* <p>Publish internet measurements for Internet Monitor to an Amazon S3 bucket in addition to CloudWatch Logs.</p>
*/
InternetMeasurementsLogDelivery?: InternetMeasurementsLogDelivery;

/**
* <p>The percentage of the internet-facing traffic for your application that you want to monitor with this monitor.</p>
*/
TrafficPercentageToMonitor?: number;
}

/**
Expand Down Expand Up @@ -740,12 +744,17 @@ export interface GetMonitorOutput {
* <p>To learn more, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/IMCityNetworksMaximum.html">Choosing a city-network maximum value
* </a> in the Amazon CloudWatch Internet Monitor section of the <i>CloudWatch User Guide</i>.</p>
*/
MaxCityNetworksToMonitor: number | undefined;
MaxCityNetworksToMonitor?: number;

/**
* <p>Publish internet measurements for Internet Monitor to another location, such as an Amazon S3 bucket. The measurements are also published to Amazon CloudWatch Logs.</p>
*/
InternetMeasurementsLogDelivery?: InternetMeasurementsLogDelivery;

/**
* <p>The percentage of the internet-facing traffic for your application that you want to monitor with this monitor.</p>
*/
TrafficPercentageToMonitor?: number;
}

/**
Expand Down Expand Up @@ -1069,6 +1078,11 @@ export interface UpdateMonitorInput {
* <p>Publish internet measurements for Internet Monitor to another location, such as an Amazon S3 bucket. The measurements are also published to Amazon CloudWatch Logs.</p>
*/
InternetMeasurementsLogDelivery?: InternetMeasurementsLogDelivery;

/**
* <p>The percentage of the internet-facing traffic for your application that you want to monitor with this monitor.</p>
*/
TrafficPercentageToMonitor?: number;
}

/**
Expand Down
3 changes: 3 additions & 0 deletions clients/client-internetmonitor/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export const se_CreateMonitorCommand = async (
MonitorName: [],
Resources: (_) => _json(_),
Tags: (_) => _json(_),
TrafficPercentageToMonitor: [],
})
);
return new __HttpRequest({
Expand Down Expand Up @@ -337,6 +338,7 @@ export const se_UpdateMonitorCommand = async (
ResourcesToAdd: (_) => _json(_),
ResourcesToRemove: (_) => _json(_),
Status: [],
TrafficPercentageToMonitor: [],
})
);
return new __HttpRequest({
Expand Down Expand Up @@ -556,6 +558,7 @@ export const de_GetMonitorCommand = async (
Resources: _json,
Status: __expectString,
Tags: _json,
TrafficPercentageToMonitor: __expectInt32,
});
Object.assign(contents, doc);
return contents;
Expand Down
41 changes: 35 additions & 6 deletions codegen/sdk-codegen/aws-models/internetmonitor.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,20 @@
"target": "com.amazonaws.internetmonitor#MaxCityNetworksToMonitor",
"traits": {
"smithy.api#default": 0,
"smithy.api#documentation": "<p>The maximum number of city-networks to monitor for your resources. A city-network is the location (city) where clients access your application resources from and \n\t\t\tthe network or ASN, such as an internet service provider (ISP), that clients access the resources through. This limit helps control billing costs.</p>\n <p>To learn more, see <a href=\"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/IMCityNetworksMaximum.html\">Choosing a city-network maximum value\n\t\t</a> in the Amazon CloudWatch Internet Monitor section of the <i>CloudWatch User Guide</i>.</p>",
"smithy.api#required": {}
"smithy.api#documentation": "<p>The maximum number of city-networks to monitor for your resources. A city-network is the location (city) where clients access your application resources from and \n\t\t\tthe network or ASN, such as an internet service provider (ISP), that clients access the resources through. This limit helps control billing costs.</p>\n <p>To learn more, see <a href=\"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/IMCityNetworksMaximum.html\">Choosing a city-network maximum value\n\t\t</a> in the Amazon CloudWatch Internet Monitor section of the <i>CloudWatch User Guide</i>.</p>"
}
},
"InternetMeasurementsLogDelivery": {
"target": "com.amazonaws.internetmonitor#InternetMeasurementsLogDelivery",
"traits": {
"smithy.api#documentation": "<p>Publish internet measurements for Internet Monitor to another location, such as an Amazon S3 bucket. The measurements are also published to Amazon CloudWatch Logs.</p>"
"smithy.api#documentation": "<p>Publish internet measurements for Internet Monitor to an Amazon S3 bucket in addition to CloudWatch Logs.</p>"
}
},
"TrafficPercentageToMonitor": {
"target": "com.amazonaws.internetmonitor#TrafficPercentageToMonitor",
"traits": {
"smithy.api#default": 0,
"smithy.api#documentation": "<p>The percentage of the internet-facing traffic for your application that you want to monitor with this monitor.</p>"
}
}
}
Expand Down Expand Up @@ -467,15 +473,21 @@
"target": "com.amazonaws.internetmonitor#MaxCityNetworksToMonitor",
"traits": {
"smithy.api#default": 0,
"smithy.api#documentation": "<p>The maximum number of city-networks to monitor for your resources. A city-network is the location (city) where clients access your application resources from and \n\t\t\tthe network or ASN, such as an internet service provider (ISP), that clients access the resources through. This limit helps control billing costs.</p>\n <p>To learn more, see <a href=\"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/IMCityNetworksMaximum.html\">Choosing a city-network maximum value\n\t\t</a> in the Amazon CloudWatch Internet Monitor section of the <i>CloudWatch User Guide</i>.</p>",
"smithy.api#required": {}
"smithy.api#documentation": "<p>The maximum number of city-networks to monitor for your resources. A city-network is the location (city) where clients access your application resources from and \n\t\t\tthe network or ASN, such as an internet service provider (ISP), that clients access the resources through. This limit helps control billing costs.</p>\n <p>To learn more, see <a href=\"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/IMCityNetworksMaximum.html\">Choosing a city-network maximum value\n\t\t</a> in the Amazon CloudWatch Internet Monitor section of the <i>CloudWatch User Guide</i>.</p>"
}
},
"InternetMeasurementsLogDelivery": {
"target": "com.amazonaws.internetmonitor#InternetMeasurementsLogDelivery",
"traits": {
"smithy.api#documentation": "<p>Publish internet measurements for Internet Monitor to another location, such as an Amazon S3 bucket. The measurements are also published to Amazon CloudWatch Logs.</p>"
}
},
"TrafficPercentageToMonitor": {
"target": "com.amazonaws.internetmonitor#TrafficPercentageToMonitor",
"traits": {
"smithy.api#default": 0,
"smithy.api#documentation": "<p>The percentage of the internet-facing traffic for your application that you want to monitor with this monitor.</p>"
}
}
}
},
Expand Down Expand Up @@ -788,7 +800,7 @@
}
},
"traits": {
"smithy.api#documentation": "<p>Configuration information for other locations that you choose to publish Amazon CloudWatch Internet Monitor internet measurements to, such as Amazon S3. \n\t\t\tThe measurements are also published to Amazon CloudWatch Logs.</p>"
"smithy.api#documentation": "<p>Publish internet measurements to an Amazon S3 bucket in addition to CloudWatch Logs.</p>"
}
},
"com.amazonaws.internetmonitor#InternetMonitor20210603": {
Expand Down Expand Up @@ -2023,6 +2035,16 @@
}
}
},
"com.amazonaws.internetmonitor#TrafficPercentageToMonitor": {
"type": "integer",
"traits": {
"smithy.api#default": 0,
"smithy.api#range": {
"min": 1,
"max": 100
}
}
},
"com.amazonaws.internetmonitor#TriangulationEventType": {
"type": "string",
"traits": {
Expand Down Expand Up @@ -2195,6 +2217,13 @@
"traits": {
"smithy.api#documentation": "<p>Publish internet measurements for Internet Monitor to another location, such as an Amazon S3 bucket. The measurements are also published to Amazon CloudWatch Logs.</p>"
}
},
"TrafficPercentageToMonitor": {
"target": "com.amazonaws.internetmonitor#TrafficPercentageToMonitor",
"traits": {
"smithy.api#default": 0,
"smithy.api#documentation": "<p>The percentage of the internet-facing traffic for your application that you want to monitor with this monitor.</p>"
}
}
}
},
Expand Down

0 comments on commit e391e56

Please sign in to comment.