diff --git a/clients/client-amp/README.md b/clients/client-amp/README.md index fb19be40ec832..1b326f34c36a7 100644 --- a/clients/client-amp/README.md +++ b/clients/client-amp/README.md @@ -27,7 +27,7 @@ workspace.
## Installing -To install the this package, simply type add or install @aws-sdk/client-amp +To install this package, simply type add or install @aws-sdk/client-amp using your favorite package manager: - `npm install @aws-sdk/client-amp` @@ -419,6 +419,14 @@ UpdateLoggingConfiguration [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/amp/command/UpdateLoggingConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/UpdateLoggingConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/UpdateLoggingConfigurationCommandOutput/) + +The CreateScraper
operation creates a scraper to collect metrics. A
* scraper pulls metrics from Prometheus-compatible sources within an Amazon EKS
- * cluster, and sends them to your Amazon Managed Service for Prometheus workspace. You can configure the
- * scraper to control what metrics are collected, and what transformations are applied
- * prior to sending them to your workspace.
If needed, an IAM role will be created for you that gives Amazon Managed Service for Prometheus access to the metrics in your cluster. For more information, see - * Using roles for scraping metrics from EKS in the Amazon Managed Service for Prometheus User - * Guide.
- *You cannot update a scraper. If you want to change the configuration of the scraper, - * create a new scraper and delete the old one.
- *The scrapeConfiguration
parameter contains the base64-encoded version of
- * the YAML configuration file.
An IAM role will be created for you that Amazon Managed Service for Prometheus uses + * to access the metrics in your cluster. You must configure this role with a policy that + * allows it to scrape metrics from your cluster. For more information, see + * Configuring your Amazon EKS cluster in the Amazon Managed Service for Prometheus User Guide.
+ *The scrapeConfiguration
parameter contains the base-64 encoded YAML
+ * configuration for the scraper.
For more information about collectors, including what metrics are collected, and - * how to configure the scraper, see Amazon Web Services managed - * collectors in the Amazon Managed Service for Prometheus User + * how to configure the scraper, see Using an + * Amazon Web Services managed + * collector in the Amazon Managed Service for Prometheus User * Guide.
*The ListTagsForResource
operation returns the tags that are associated
* with an Amazon Managed Service for Prometheus resource. Currently, the only resources that can be
- * tagged are workspaces and rule groups namespaces.
The TagResource
operation associates tags with an Amazon Managed Service for Prometheus
- * resource. The only resources that can be tagged are workspaces and rule groups
- * namespaces.
If you specify a new tag key for the resource, this tag is appended to the list of * tags associated with the resource. If you specify a tag key that is already associated * with the resource, the new tag value that you specify replaces the previous value for - * that tag.
+ * that tag. To remove a tag, useUntagResource
.
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
diff --git a/clients/client-amp/src/commands/UntagResourceCommand.ts b/clients/client-amp/src/commands/UntagResourceCommand.ts
index 707201815dc90..00ecf1c6cdeb1 100644
--- a/clients/client-amp/src/commands/UntagResourceCommand.ts
+++ b/clients/client-amp/src/commands/UntagResourceCommand.ts
@@ -29,7 +29,7 @@ export interface UntagResourceCommandOutput extends UntagResourceResponse, __Met
/**
* Removes the specified tags from an Amazon Managed Service for Prometheus resource. The only resources - * that can be tagged are workspaces and rule groups namespaces.
+ * that can be tagged are rule groups namespaces, scrapers, and workspaces. * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-amp/src/commands/UpdateScraperCommand.ts b/clients/client-amp/src/commands/UpdateScraperCommand.ts new file mode 100644 index 0000000000000..86a79fabda0bc --- /dev/null +++ b/clients/client-amp/src/commands/UpdateScraperCommand.ts @@ -0,0 +1,134 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { AmpClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AmpClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { UpdateScraperRequest, UpdateScraperResponse } from "../models/models_0"; +import { de_UpdateScraperCommand, se_UpdateScraperCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link UpdateScraperCommand}. + */ +export interface UpdateScraperCommandInput extends UpdateScraperRequest {} +/** + * @public + * + * The output of {@link UpdateScraperCommand}. + */ +export interface UpdateScraperCommandOutput extends UpdateScraperResponse, __MetadataBearer {} + +/** + *Updates an existing scraper.
+ *You can't use this function to update the source from which the scraper is + * collecting metrics. To change the source, delete the scraper and create a new + * one.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AmpClient, UpdateScraperCommand } from "@aws-sdk/client-amp"; // ES Modules import + * // const { AmpClient, UpdateScraperCommand } = require("@aws-sdk/client-amp"); // CommonJS import + * const client = new AmpClient(config); + * const input = { // UpdateScraperRequest + * scraperId: "STRING_VALUE", // required + * alias: "STRING_VALUE", + * scrapeConfiguration: { // ScrapeConfiguration Union: only one key present + * configurationBlob: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") + * }, + * destination: { // Destination Union: only one key present + * ampConfiguration: { // AmpConfiguration + * workspaceArn: "STRING_VALUE", // required + * }, + * }, + * clientToken: "STRING_VALUE", + * }; + * const command = new UpdateScraperCommand(input); + * const response = await client.send(command); + * // { // UpdateScraperResponse + * // scraperId: "STRING_VALUE", // required + * // arn: "STRING_VALUE", // required + * // status: { // ScraperStatus + * // statusCode: "STRING_VALUE", // required + * // }, + * // tags: { // TagMap + * // "You do not have sufficient access to perform this action.
+ * + * @throws {@link ConflictException} (client fault) + *The request would cause an inconsistent state.
+ * + * @throws {@link InternalServerException} (server fault) + *An unexpected error occurred during the processing of the request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *The request references a resources that doesn't exist.
+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *Completing the request would cause a service quota to be exceeded.
+ * + * @throws {@link ThrottlingException} (client fault) + *The request was denied due to request throttling.
+ * + * @throws {@link ValidationException} (client fault) + *The input fails to satisfy the constraints specified by an Amazon Web Services + * service.
+ * + * @throws {@link AmpServiceException} + *Base exception class for all service exceptions from Amp service.
+ * + * @public + */ +export class UpdateScraperCommand extends $Command + .classBuilder< + UpdateScraperCommandInput, + UpdateScraperCommandOutput, + AmpClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: AmpClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonPrometheusService", "UpdateScraper", {}) + .n("AmpClient", "UpdateScraperCommand") + .f(void 0, void 0) + .ser(se_UpdateScraperCommand) + .de(de_UpdateScraperCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: UpdateScraperRequest; + output: UpdateScraperResponse; + }; + sdk: { + input: UpdateScraperCommandInput; + output: UpdateScraperCommandOutput; + }; + }; +} diff --git a/clients/client-amp/src/commands/index.ts b/clients/client-amp/src/commands/index.ts index 272d6d0f58944..f748c67e32a22 100644 --- a/clients/client-amp/src/commands/index.ts +++ b/clients/client-amp/src/commands/index.ts @@ -24,4 +24,5 @@ export * from "./PutRuleGroupsNamespaceCommand"; export * from "./TagResourceCommand"; export * from "./UntagResourceCommand"; export * from "./UpdateLoggingConfigurationCommand"; +export * from "./UpdateScraperCommand"; export * from "./UpdateWorkspaceAliasCommand"; diff --git a/clients/client-amp/src/models/models_0.ts b/clients/client-amp/src/models/models_0.ts index 2b49b50832bc5..5e27eab527559 100644 --- a/clients/client-amp/src/models/models_0.ts +++ b/clients/client-amp/src/models/models_0.ts @@ -404,7 +404,8 @@ export interface DescribeAlertManagerDefinitionRequest { } /** - *The details of an alert manager definition.
+ *The details of an alert manager definition. It is the configuration for the + * alert manager, including information about receivers for routing alerts.
* @public */ export interface AlertManagerDefinitionDescription { @@ -510,7 +511,7 @@ export interface GetDefaultScraperConfigurationResponse { */ export interface ListTagsForResourceRequest { /** - *The ARN of the resource to list tages for. Must be a workspace or rule groups + *
The ARN of the resource to list tages for. Must be a workspace, scraper, or rule groups * namespace resource.
* @public */ @@ -552,7 +553,7 @@ export type Destination = Destination.AmpConfigurationMember | Destination.$Unkn */ export namespace Destination { /** - *The Amazon Managed Service for Prometheusworkspace to send metrics to.
+ *The Amazon Managed Service for Prometheus workspace to send metrics to.
* @public */ export interface AmpConfigurationMember { @@ -580,7 +581,7 @@ export namespace Destination { } /** - *A scrape configuration for a scraper, base 64 encoded. For more information, see Scraper configuration in the Amazon Managed Service for Prometheus User + *
A scrape configuration for a scraper, base 64 encoded. For more information, see Scraper configuration in the Amazon Managed Service for Prometheus User * Guide.
* @public */ @@ -687,14 +688,14 @@ export namespace Source { */ export interface CreateScraperRequest { /** - *(optional) a name to associate with the scraper. This is for your use, and does not + *
(optional) An alias to associate with the scraper. This is for your use, and does not * need to be unique.
* @public */ alias?: string; /** - *The configuration file to use in the new scraper. For more information, see Scraper configuration in the Amazon Managed Service for Prometheus User + *
The configuration file to use in the new scraper. For more information, see Scraper configuration in the Amazon Managed Service for Prometheus User * Guide.
* @public */ @@ -751,6 +752,14 @@ export const ScraperStatusCode = { * Scraper deletion failed. */ DELETION_FAILED: "DELETION_FAILED", + /** + * Scraper update failed. + */ + UPDATE_FAILED: "UPDATE_FAILED", + /** + * Scraper is being updated. Deletion is disallowed until status is ACTIVE. + */ + UPDATING: "UPDATING", } as const; /** @@ -863,13 +872,14 @@ export interface ScraperDescription { alias?: string; /** - *The ID of the scraper.
+ *The ID of the scraper. For example, s-example1-1234-abcd-5678-ef9012abcd34
.
The Amazon Resource Name (ARN) of the scraper.
+ *The Amazon Resource Name (ARN) of the scraper. For example,
+ * arn:aws:aps:<region>:123456798012:scraper/s-example1-1234-abcd-5678-ef9012abcd34
.
The Amazon Resource Name (ARN) of the IAM role that provides * permissions for the scraper to discover and collect metrics on your behalf.
+ *For example, arn:aws:iam::123456789012:role/service-role/AmazonGrafanaServiceRole-12example
.
The configuration file in use by the scraper.
+ *The configuration in use by the scraper.
* @public */ scrapeConfiguration: ScrapeConfiguration | undefined; @@ -1078,19 +1089,89 @@ export interface ListScrapersResponse { nextToken?: string; } +/** + * @public + */ +export interface UpdateScraperRequest { + /** + *The ID of the scraper to update.
+ * @public + */ + scraperId: string | undefined; + + /** + *The new alias of the scraper.
+ * @public + */ + alias?: string; + + /** + *Contains the base-64 encoded YAML configuration for the scraper.
+ *For more information about configuring a scraper, see Using an + * Amazon Web Services managed collector in the Amazon Managed Service for Prometheus + * User Guide.
+ *The new Amazon Managed Service for Prometheus workspace to send metrics to.
+ * @public + */ + destination?: Destination; + + /** + *A unique identifier that you can provide to ensure the idempotency of the request. + * Case-sensitive.
+ * @public + */ + clientToken?: string; +} + +/** + * @public + */ +export interface UpdateScraperResponse { + /** + *The ID of the updated scraper.
+ * @public + */ + scraperId: string | undefined; + + /** + *The Amazon Resource Name (ARN) of the updated scraper.
+ * @public + */ + arn: string | undefined; + + /** + *A structure that displays the current status of the scraper.
+ * @public + */ + status: ScraperStatus | undefined; + + /** + *The list of tag keys and values that are associated with the scraper.
+ * @public + */ + tags?: RecordThe ARN of the workspace or rule groups namespace to apply tags to.
+ *The ARN of the resource to apply tags to.
* @public */ resourceArn: string | undefined; /** *The list of tag keys and values to associate with the resource.
- *Keys may not begin with aws:
.
Keys must not begin with aws:
.
The ARN of the workspace or rule groups namespace.
+ *The ARN of the resource from which to remove a tag.
* @public */ resourceArn: string | undefined; @@ -1279,20 +1360,22 @@ export interface DescribeWorkspaceRequest { */ export interface WorkspaceDescription { /** - *The unique ID for the workspace.
+ *The unique ID for the workspace. For example,
+ * ws-example1-1234-abcd-5678-ef90abcd1234
.
The alias that is assigned to this workspace to help identify it. It may not be - * unique.
+ *The alias that is assigned to this workspace to help identify it. It does not need + * to be unique.
* @public */ alias?: string; /** - *The ARN of the workspace.
+ *The ARN of the workspace. For example,
+ * arn:aws:aps:<region>:123456789012:workspace/ws-example1-1234-abcd-5678-ef90abcd1234
.
The Prometheus endpoint available for this workspace.
+ *The Prometheus endpoint available for this workspace. For example,
+ * https://aps-workspaces.<region>.amazonaws.com/workspaces/ws-example1-1234-abcd-5678-ef90abcd1234/api/v1/
.
The alias that is assigned to this workspace to help identify it. It may not be - * unique.
+ *The alias that is assigned to this workspace to help identify it. It does not + * need to be unique.
* @public */ alias?: string; @@ -1457,7 +1541,7 @@ export interface CreateLoggingConfigurationRequest { /** *The ARN of the CloudWatch log group to which the vended log data will be - * published. This log group must exist prior to calling this API.
+ * published. This log group must exist prior to calling this operation. * @public */ logGroupArn: string | undefined; @@ -1569,7 +1653,7 @@ export interface DescribeLoggingConfigurationRequest { } /** - *Contains information about the logging configuration.
+ *Contains information about the logging configuration for the workspace.
* @public */ export interface LoggingConfigurationMetadata { @@ -1829,7 +1913,8 @@ export interface DescribeRuleGroupsNamespaceRequest { */ export interface RuleGroupsNamespaceDescription { /** - *The ARN of the rule groups namespace.
+ *The ARN of the rule groups namespace. For example,
+ * arn:aws:aps:<region>:123456789012:rulegroupsnamespace/ws-example1-1234-abcd-5678-ef90abcd1234/rulesfile1
.
The details of an alert manager definition.
" + "smithy.api#documentation": "The details of an alert manager definition. It is the configuration for the\n alert manager, including information about receivers for routing alerts.
" } }, "com.amazonaws.amp#AlertManagerDefinitionStatus": { @@ -1140,7 +1140,7 @@ "logGroupArn": { "target": "com.amazonaws.amp#LogGroupArn", "traits": { - "smithy.api#documentation": "The ARN of the CloudWatch log group to which the vended log data will be\n published. This log group must exist prior to calling this API.
", + "smithy.api#documentation": "The ARN of the CloudWatch log group to which the vended log data will be\n published. This log group must exist prior to calling this operation.
", "smithy.api#required": {} } }, @@ -1322,7 +1322,7 @@ } ], "traits": { - "smithy.api#documentation": "The CreateScraper
operation creates a scraper to collect metrics. A\n scraper pulls metrics from Prometheus-compatible sources within an Amazon EKS\n cluster, and sends them to your Amazon Managed Service for Prometheus workspace. You can configure the\n scraper to control what metrics are collected, and what transformations are applied\n prior to sending them to your workspace.
If needed, an IAM role will be created for you that gives Amazon Managed Service for Prometheus access to the metrics in your cluster. For more information, see \n Using roles for scraping metrics from EKS in the Amazon Managed Service for Prometheus User \n Guide.
\nYou cannot update a scraper. If you want to change the configuration of the scraper,\n create a new scraper and delete the old one.
\nThe scrapeConfiguration
parameter contains the base64-encoded version of\n the YAML configuration file.
For more information about collectors, including what metrics are collected, and\n how to configure the scraper, see Amazon Web Services managed\n collectors in the Amazon Managed Service for Prometheus User \n Guide.
\nThe CreateScraper
operation creates a scraper to collect metrics. A\n scraper pulls metrics from Prometheus-compatible sources within an Amazon EKS\n cluster, and sends them to your Amazon Managed Service for Prometheus workspace. Scrapers are \n flexible, and can be configured to control what metrics are collected, the \n frequency of collection, what transformations are applied to the metrics, and more.
An IAM role will be created for you that Amazon Managed Service for Prometheus uses \n to access the metrics in your cluster. You must configure this role with a policy that\n allows it to scrape metrics from your cluster. For more information, see \n Configuring your Amazon EKS cluster in the Amazon Managed Service for Prometheus User Guide.
\nThe scrapeConfiguration
parameter contains the base-64 encoded YAML \n configuration for the scraper.
For more information about collectors, including what metrics are collected, and\n how to configure the scraper, see Using an \n Amazon Web Services managed\n collector in the Amazon Managed Service for Prometheus User \n Guide.
\n(optional) a name to associate with the scraper. This is for your use, and does not\n need to be unique.
" + "smithy.api#documentation": "(optional) An alias to associate with the scraper. This is for your use, and does not\n need to be unique.
" } }, "scrapeConfiguration": { "target": "com.amazonaws.amp#ScrapeConfiguration", "traits": { - "smithy.api#documentation": "The configuration file to use in the new scraper. For more information, see Scraper configuration in the Amazon Managed Service for Prometheus User \n Guide.
", + "smithy.api#documentation": "The configuration file to use in the new scraper. For more information, see Scraper configuration in the Amazon Managed Service for Prometheus User \n Guide.
", "smithy.api#required": {} } }, @@ -2407,7 +2407,7 @@ "ampConfiguration": { "target": "com.amazonaws.amp#AmpConfiguration", "traits": { - "smithy.api#documentation": "The Amazon Managed Service for Prometheusworkspace to send metrics to.
" + "smithy.api#documentation": "The Amazon Managed Service for Prometheus workspace to send metrics to.
" } } }, @@ -2925,7 +2925,7 @@ } ], "traits": { - "smithy.api#documentation": "The ListTagsForResource
operation returns the tags that are associated\n with an Amazon Managed Service for Prometheus resource. Currently, the only resources that can be\n tagged are workspaces and rule groups namespaces.
The ListTagsForResource
operation returns the tags that are associated\n with an Amazon Managed Service for Prometheus resource. Currently, the only resources that can be\n tagged are scrapers, workspaces, and rule groups namespaces.
The ARN of the resource to list tages for. Must be a workspace or rule groups\n namespace resource.
", + "smithy.api#documentation": "The ARN of the resource to list tages for. Must be a workspace, scraper, or rule groups\n namespace resource.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3124,7 +3124,7 @@ } }, "traits": { - "smithy.api#documentation": "Contains information about the logging configuration.
" + "smithy.api#documentation": "Contains information about the logging configuration for the workspace.
" } }, "com.amazonaws.amp#LoggingConfigurationStatus": { @@ -3455,7 +3455,7 @@ "aws.api#arn": { "template": "rulegroupsnamespace/{workspaceId}/{name}" }, - "smithy.api#documentation": "The definition of a rule group namespace in an Amazon Managed Service for Prometheus workspace.
" + "smithy.api#documentation": "The definition of a rule groups namespace in an Amazon Managed Service for Prometheus workspace. \n A rule groups namespace is associated with exactly one rules file. A\n workspace can have multiple rule groups namespaces. For more information about\n rules files, see Creating a rules \n file, in the Amazon Managed Service for Prometheus User Guide.
" } }, "com.amazonaws.amp#RuleGroupsNamespaceArn": { @@ -3481,7 +3481,7 @@ "arn": { "target": "com.amazonaws.amp#RuleGroupsNamespaceArn", "traits": { - "smithy.api#documentation": "The ARN of the rule groups namespace.
", + "smithy.api#documentation": "The ARN of the rule groups namespace. For example, \n arn:aws:aps:<region>:123456789012:rulegroupsnamespace/ws-example1-1234-abcd-5678-ef90abcd1234/rulesfile1
.
A scrape configuration for a scraper, base 64 encoded. For more information, see Scraper configuration in the Amazon Managed Service for Prometheus User \n Guide.
" + "smithy.api#documentation": "A scrape configuration for a scraper, base 64 encoded. For more information, see Scraper configuration in the Amazon Managed Service for Prometheus User \n Guide.
" } }, "com.amazonaws.amp#Scraper": { @@ -3686,6 +3686,9 @@ "read": { "target": "com.amazonaws.amp#DescribeScraper" }, + "update": { + "target": "com.amazonaws.amp#UpdateScraper" + }, "delete": { "target": "com.amazonaws.amp#DeleteScraper" }, @@ -3696,13 +3699,13 @@ "aws.api#arn": { "template": "scraper/{scraperId}" }, - "smithy.api#documentation": "A scraper is a logical and isolated Prometheus server dedicated to discovering and \n collecting metrics and producing them to an Amazon Managed Service for Prometheus workspace.
" + "smithy.api#documentation": "A scraper is a fully-managed agentless collector that discovers and \n pulls metrics automatically. A\n scraper pulls metrics from Prometheus-compatible sources within an Amazon EKS\n cluster, and sends them to your Amazon Managed Service for Prometheus workspace. Scrapers are \n flexible. You can configure the scraper to control what metrics are collected, the \n frequency of collection, what transformations are applied to the metrics, and more.
\nAn IAM role will be created for you that Amazon Managed Service for Prometheus uses \n to access the metrics in your cluster. You must configure this role with a policy that\n allows it to scrape metrics from your cluster. For more information, see \n Configuring your Amazon EKS cluster in the Amazon Managed Service for Prometheus User Guide.
\nThe scrapeConfiguration
parameter contains the YAML configuration for the \n scraper.
For more information about collectors, including what metrics are collected, and\n how to configure the scraper, see Using an \n Amazon Web Services managed\n collector in the Amazon Managed Service for Prometheus User \n Guide.
\nA user-assigned scraper alias.
", + "smithy.api#documentation": "An optional user-assigned scraper alias.
", "smithy.api#length": { "min": 1, "max": 100 @@ -3733,21 +3736,21 @@ "scraperId": { "target": "com.amazonaws.amp#ScraperId", "traits": { - "smithy.api#documentation": "The ID of the scraper.
", + "smithy.api#documentation": "The ID of the scraper. For example, s-example1-1234-abcd-5678-ef9012abcd34
.
The Amazon Resource Name (ARN) of the scraper.
", + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the scraper. For example, \n arn:aws:aps:<region>:123456798012:scraper/s-example1-1234-abcd-5678-ef9012abcd34
.
The Amazon Resource Name (ARN) of the IAM role that provides \n permissions for the scraper to discover and collect metrics on your behalf.
", + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the IAM role that provides \n permissions for the scraper to discover and collect metrics on your behalf.
\nFor example, arn:aws:iam::123456789012:role/service-role/AmazonGrafanaServiceRole-12example
.
The configuration file in use by the scraper.
", + "smithy.api#documentation": "The configuration in use by the scraper.
", "smithy.api#required": {} } }, @@ -3873,6 +3876,11 @@ "value": "CREATING", "documentation": "Scraper is being created. Deletion is disallowed until status is ACTIVE." }, + { + "name": "UPDATING", + "value": "UPDATING", + "documentation": "Scraper is being updated. Deletion is disallowed until status is ACTIVE." + }, { "name": "ACTIVE", "value": "ACTIVE", @@ -3888,6 +3896,11 @@ "value": "CREATION_FAILED", "documentation": "Scraper creation failed." }, + { + "name": "UPDATE_FAILED", + "value": "UPDATE_FAILED", + "documentation": "Scraper update failed." + }, { "name": "DELETION_FAILED", "value": "DELETION_FAILED", @@ -4130,7 +4143,7 @@ "key": { "target": "com.amazonaws.amp#TagKey", "traits": { - "smithy.api#documentation": "The key of the tag. May not begin with aws:
.
The key of the tag. Must not begin with aws:
.
The list of tags assigned to the resource.
", + "smithy.api#documentation": "A tag associated with a resource.
", "smithy.api#length": { "max": 50 } @@ -4172,7 +4185,7 @@ } ], "traits": { - "smithy.api#documentation": "The TagResource
operation associates tags with an Amazon Managed Service for Prometheus\n resource. The only resources that can be tagged are workspaces and rule groups\n namespaces.
If you specify a new tag key for the resource, this tag is appended to the list of\n tags associated with the resource. If you specify a tag key that is already associated\n with the resource, the new tag value that you specify replaces the previous value for\n that tag.
", + "smithy.api#documentation": "The TagResource
operation associates tags with an Amazon Managed Service for Prometheus\n resource. The only resources that can be tagged are rule groups namespaces, scrapers, \n and workspaces.
If you specify a new tag key for the resource, this tag is appended to the list of\n tags associated with the resource. If you specify a tag key that is already associated\n with the resource, the new tag value that you specify replaces the previous value for\n that tag. To remove a tag, use UntagResource
.
The ARN of the workspace or rule groups namespace to apply tags to.
", + "smithy.api#documentation": "The ARN of the resource to apply tags to.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -4193,7 +4206,7 @@ "tags": { "target": "com.amazonaws.amp#TagMap", "traits": { - "smithy.api#documentation": "The list of tag keys and values to associate with the resource.
\nKeys may not begin with aws:
.
The list of tag keys and values to associate with the resource.
\nKeys must not begin with aws:
.
Removes the specified tags from an Amazon Managed Service for Prometheus resource. The only resources\n that can be tagged are workspaces and rule groups namespaces.
", + "smithy.api#documentation": "Removes the specified tags from an Amazon Managed Service for Prometheus resource. The only resources\n that can be tagged are rule groups namespaces, scrapers, and workspaces.
", "smithy.api#http": { "method": "DELETE", "uri": "/tags/{resourceArn}" @@ -4290,7 +4303,7 @@ "resourceArn": { "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "The ARN of the workspace or rule groups namespace.
", + "smithy.api#documentation": "The ARN of the resource from which to remove a tag.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -4389,6 +4402,151 @@ "smithy.api#documentation": "Represents the output of an UpdateLoggingConfiguration
operation.
Updates an existing scraper.
\nYou can't use this function to update the source from which the scraper is \n collecting metrics. To change the source, delete the scraper and create a new\n one.
", + "smithy.api#examples": [ + { + "title": "UpdateScraper with all optional parameters", + "input": { + "scraperId": "scraper-123", + "alias": "alias-update", + "scrapeConfiguration": { + "configurationBlob": "blob-update" + }, + "destination": { + "ampConfiguration": { + "workspaceArn": "arn:aws:aps:us-west-2:123456789012:workspace/ws-ogh2u499-ce12-hg89-v6c7-123412341234-update" + } + }, + "clientToken": "token" + }, + "output": { + "scraperId": "scraper-123", + "arn": "arn:aws:aps:us-west-2:123456789012:scraper/scraper-123", + "status": { + "statusCode": "UPDATING" + }, + "tags": { + "exampleTag": "exampleValue" + } + } + } + ], + "smithy.api#http": { + "code": 202, + "method": "PUT", + "uri": "/scrapers/{scraperId}" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.amp#UpdateScraperRequest": { + "type": "structure", + "members": { + "scraperId": { + "target": "com.amazonaws.amp#ScraperId", + "traits": { + "smithy.api#documentation": "The ID of the scraper to update.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "alias": { + "target": "com.amazonaws.amp#ScraperAlias", + "traits": { + "smithy.api#documentation": "The new alias of the scraper.
" + } + }, + "scrapeConfiguration": { + "target": "com.amazonaws.amp#ScrapeConfiguration", + "traits": { + "smithy.api#documentation": "Contains the base-64 encoded YAML configuration for the scraper.
\nFor more information about configuring a scraper, see Using an \n Amazon Web Services managed collector in the Amazon Managed Service for Prometheus \n User Guide.
\nThe new Amazon Managed Service for Prometheus workspace to send metrics to.
" + } + }, + "clientToken": { + "target": "com.amazonaws.amp#IdempotencyToken", + "traits": { + "smithy.api#documentation": "A unique identifier that you can provide to ensure the idempotency of the request.\n Case-sensitive.
", + "smithy.api#idempotencyToken": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.amp#UpdateScraperResponse": { + "type": "structure", + "members": { + "scraperId": { + "target": "com.amazonaws.amp#ScraperId", + "traits": { + "smithy.api#documentation": "The ID of the updated scraper.
", + "smithy.api#required": {} + } + }, + "arn": { + "target": "com.amazonaws.amp#ScraperArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the updated scraper.
", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.amp#ScraperStatus", + "traits": { + "smithy.api#documentation": "A structure that displays the current status of the scraper.
", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.amp#TagMap", + "traits": { + "smithy.api#documentation": "The list of tag keys and values that are associated with the scraper.
" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.amp#UpdateWorkspaceAlias": { "type": "operation", "input": { @@ -4621,20 +4779,20 @@ "workspaceId": { "target": "com.amazonaws.amp#WorkspaceId", "traits": { - "smithy.api#documentation": "The unique ID for the workspace.
", + "smithy.api#documentation": "The unique ID for the workspace. For example, \n ws-example1-1234-abcd-5678-ef90abcd1234
.
The alias that is assigned to this workspace to help identify it. It may not be\n unique.
" + "smithy.api#documentation": "The alias that is assigned to this workspace to help identify it. It does not need\n to be unique.
" } }, "arn": { "target": "com.amazonaws.amp#WorkspaceArn", "traits": { - "smithy.api#documentation": "The ARN of the workspace.
", + "smithy.api#documentation": "The ARN of the workspace. For example, \n arn:aws:aps:<region>:123456789012:workspace/ws-example1-1234-abcd-5678-ef90abcd1234
.
The Prometheus endpoint available for this workspace.
" + "smithy.api#documentation": "The Prometheus endpoint available for this workspace. For example,\n https://aps-workspaces.<region>.amazonaws.com/workspaces/ws-example1-1234-abcd-5678-ef90abcd1234/api/v1/
.
The alias that is assigned to this workspace to help identify it. It may not be\n unique.
" + "smithy.api#documentation": "The alias that is assigned to this workspace to help identify it. It does not \n need to be unique.
" } }, "arn": {