CfnScraperProps Struct
Properties for defining a CfnScraper.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_aps as aps } from 'aws-cdk-lib';
const cfnScraperProps: aps.CfnScraperProps = {
destination: {
ampConfiguration: {
workspaceArn: 'workspaceArn',
},
cloudWatchConfiguration: {
datasetArn: 'datasetArn',
},
},
scrapeConfiguration: {
configurationBlob: 'configurationBlob',
},
source: {
eksConfiguration: {
clusterArn: 'clusterArn',
subnetIds: ['subnetIds'],
// the properties below are optional
securityGroupIds: ['securityGroupIds'],
},
vpcConfiguration: {
securityGroupIds: ['securityGroupIds'],
subnetIds: ['subnetIds'],
},
},
// the properties below are optional
alias: 'alias',
exporters: [{
openSearchConfiguration: {
domainArn: 'domainArn',
},
}],
roleConfiguration: {
sourceRoleArn: 'sourceRoleArn',
targetRoleArn: 'targetRoleArn',
},
scraperLoggingConfiguration: {
loggingDestination: {
cloudWatchLogs: {
logGroupArn: 'logGroupArn',
},
},
scraperComponents: [{
type: 'type',
// the properties below are optional
config: {
options: {
optionsKey: 'options',
},
},
}],
},
tags: [{
key: 'key',
value: 'value',
}],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_aps as aps
cfn_scraper_props = aps.CfnScraperProps(
destination=aps.CfnScraper.DestinationProperty(
amp_configuration=aps.CfnScraper.AmpConfigurationProperty(
workspace_arn="workspaceArn"
),
cloud_watch_configuration=aps.CfnScraper.CloudWatchConfigurationProperty(
dataset_arn="datasetArn"
)
),
scrape_configuration=aps.CfnScraper.ScrapeConfigurationProperty(
configuration_blob="configurationBlob"
),
source=aps.CfnScraper.SourceProperty(
eks_configuration=aps.CfnScraper.EksConfigurationProperty(
cluster_arn="clusterArn",
subnet_ids=["subnetIds"],
# the properties below are optional
security_group_ids=["securityGroupIds"]
),
vpc_configuration=aps.CfnScraper.VpcConfigurationProperty(
security_group_ids=["securityGroupIds"],
subnet_ids=["subnetIds"]
)
),
# the properties below are optional
alias="alias",
exporters=[aps.CfnScraper.ExporterConfigurationProperty(
open_search_configuration=aps.CfnScraper.OpenSearchConfigurationProperty(
domain_arn="domainArn"
)
)],
role_configuration=aps.CfnScraper.RoleConfigurationProperty(
source_role_arn="sourceRoleArn",
target_role_arn="targetRoleArn"
),
scraper_logging_configuration=aps.CfnScraper.ScraperLoggingConfigurationProperty(
logging_destination=aps.CfnScraper.ScraperLoggingDestinationProperty(
cloud_watch_logs=aps.CfnScraper.CloudWatchLogDestinationProperty(
log_group_arn="logGroupArn"
)
),
scraper_components=[aps.CfnScraper.ScraperComponentProperty(
type="type",
# the properties below are optional
config=aps.CfnScraper.ComponentConfigProperty(
options={
"options_key": "options"
}
)
)]
),
tags=[CfnTag(
key="key",
value="value"
)]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.aps.*;
CfnScraperProps cfnScraperProps = CfnScraperProps.builder()
.destination(DestinationProperty.builder()
.ampConfiguration(AmpConfigurationProperty.builder()
.workspaceArn("workspaceArn")
.build())
.cloudWatchConfiguration(CloudWatchConfigurationProperty.builder()
.datasetArn("datasetArn")
.build())
.build())
.scrapeConfiguration(ScrapeConfigurationProperty.builder()
.configurationBlob("configurationBlob")
.build())
.source(SourceProperty.builder()
.eksConfiguration(EksConfigurationProperty.builder()
.clusterArn("clusterArn")
.subnetIds(List.of("subnetIds"))
// the properties below are optional
.securityGroupIds(List.of("securityGroupIds"))
.build())
.vpcConfiguration(VpcConfigurationProperty.builder()
.securityGroupIds(List.of("securityGroupIds"))
.subnetIds(List.of("subnetIds"))
.build())
.build())
// the properties below are optional
.alias("alias")
.exporters(List.of(ExporterConfigurationProperty.builder()
.openSearchConfiguration(OpenSearchConfigurationProperty.builder()
.domainArn("domainArn")
.build())
.build()))
.roleConfiguration(RoleConfigurationProperty.builder()
.sourceRoleArn("sourceRoleArn")
.targetRoleArn("targetRoleArn")
.build())
.scraperLoggingConfiguration(ScraperLoggingConfigurationProperty.builder()
.loggingDestination(ScraperLoggingDestinationProperty.builder()
.cloudWatchLogs(CloudWatchLogDestinationProperty.builder()
.logGroupArn("logGroupArn")
.build())
.build())
.scraperComponents(List.of(ScraperComponentProperty.builder()
.type("type")
// the properties below are optional
.config(ComponentConfigProperty.builder()
.options(Map.of(
"optionsKey", "options"))
.build())
.build()))
.build())
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.APS;
var cfnScraperProps = new CfnScraperProps {
Destination = new DestinationProperty {
AmpConfiguration = new AmpConfigurationProperty {
WorkspaceArn = "workspaceArn"
},
CloudWatchConfiguration = new CloudWatchConfigurationProperty {
DatasetArn = "datasetArn"
}
},
ScrapeConfiguration = new ScrapeConfigurationProperty {
ConfigurationBlob = "configurationBlob"
},
Source = new SourceProperty {
EksConfiguration = new EksConfigurationProperty {
ClusterArn = "clusterArn",
SubnetIds = new [] { "subnetIds" },
// the properties below are optional
SecurityGroupIds = new [] { "securityGroupIds" }
},
VpcConfiguration = new VpcConfigurationProperty {
SecurityGroupIds = new [] { "securityGroupIds" },
SubnetIds = new [] { "subnetIds" }
}
},
// the properties below are optional
Alias = "alias",
Exporters = new [] { new ExporterConfigurationProperty {
OpenSearchConfiguration = new OpenSearchConfigurationProperty {
DomainArn = "domainArn"
}
} },
RoleConfiguration = new RoleConfigurationProperty {
SourceRoleArn = "sourceRoleArn",
TargetRoleArn = "targetRoleArn"
},
ScraperLoggingConfiguration = new ScraperLoggingConfigurationProperty {
LoggingDestination = new ScraperLoggingDestinationProperty {
CloudWatchLogs = new CloudWatchLogDestinationProperty {
LogGroupArn = "logGroupArn"
}
},
ScraperComponents = new [] { new ScraperComponentProperty {
Type = "type",
// the properties below are optional
Config = new ComponentConfigProperty {
Options = new Dictionary<string, string> {
{ "optionsKey", "options" }
}
}
} }
},
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnScraperProps := &CfnScraperProps{
Destination: &DestinationProperty{
AmpConfiguration: &AmpConfigurationProperty{
WorkspaceArn: jsii.String("workspaceArn"),
},
CloudWatchConfiguration: &CloudWatchConfigurationProperty{
DatasetArn: jsii.String("datasetArn"),
},
},
ScrapeConfiguration: &ScrapeConfigurationProperty{
ConfigurationBlob: jsii.String("configurationBlob"),
},
Source: &SourceProperty{
EksConfiguration: &EksConfigurationProperty{
ClusterArn: jsii.String("clusterArn"),
SubnetIds: []*string{
jsii.String("subnetIds"),
},
// the properties below are optional
SecurityGroupIds: []*string{
jsii.String("securityGroupIds"),
},
},
VpcConfiguration: &VpcConfigurationProperty{
SecurityGroupIds: []*string{
jsii.String("securityGroupIds"),
},
SubnetIds: []*string{
jsii.String("subnetIds"),
},
},
},
// the properties below are optional
Alias: jsii.String("alias"),
Exporters: []interface{}{
&ExporterConfigurationProperty{
OpenSearchConfiguration: &OpenSearchConfigurationProperty{
DomainArn: jsii.String("domainArn"),
},
},
},
RoleConfiguration: &RoleConfigurationProperty{
SourceRoleArn: jsii.String("sourceRoleArn"),
TargetRoleArn: jsii.String("targetRoleArn"),
},
ScraperLoggingConfiguration: &ScraperLoggingConfigurationProperty{
LoggingDestination: &ScraperLoggingDestinationProperty{
CloudWatchLogs: &CloudWatchLogDestinationProperty{
LogGroupArn: jsii.String("logGroupArn"),
},
},
ScraperComponents: []interface{}{
&ScraperComponentProperty{
Type: jsii.String("type"),
// the properties below are optional
Config: &ComponentConfigProperty{
Options: map[string]*string{
"optionsKey": jsii.String("options"),
},
},
},
},
},
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
An optional user-assigned scraper alias.
destinationIResolvable | CfnScraper.DestinationPropertydestinationtyping.Union[IResolvable, DestinationProperty]destinationIResolvableDestinationIResolvableDestinationinterface{} required #The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.
exportersoptionalIResolvable | IResolvable | CfnScraper.exportersoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ExporterConfigurationProperty]]]exportersoptionalIResolvableExportersoptionalIResolvableExportersoptionalinterface{} #Exporter configurations for the scraper.
roleConfigurationoptionalIResolvable | CfnScraper.role_configurationoptionaltyping.Union[IResolvable, RoleConfigurationProperty]roleConfigurationoptionalIResolvableRoleConfigurationoptionalIResolvableRoleConfigurationoptionalinterface{} #The role configuration in an Amazon Managed Service for Prometheus scraper.
scrapeConfigurationIResolvable | CfnScraper.scrape_configurationtyping.Union[IResolvable, ScrapeConfigurationProperty]scrapeConfigurationIResolvableScrapeConfigurationIResolvableScrapeConfigurationinterface{} required #The configuration in use by the scraper.
scraperLoggingConfigurationoptionalIResolvable | CfnScraper.scraper_logging_configurationoptionaltyping.Union[IResolvable, ScraperLoggingConfigurationProperty]scraperLoggingConfigurationoptionalIResolvableScraperLoggingConfigurationoptionalIResolvableScraperLoggingConfigurationoptionalinterface{} #The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.
sourceIResolvable | CfnScraper.SourcePropertysourcetyping.Union[IResolvable, SourceProperty]sourceIResolvableSourceIResolvableSourceinterface{} required #The Amazon EKS cluster from which the scraper collects metrics.