alicloud.cms.HybridMonitorFcTask
Explore with Pulumi AI
Provides a Cloud Monitor Service Hybrid Monitor Fc Task resource.
For information about Cloud Monitor Service Hybrid Monitor Fc Task and how to use it, see What is Hybrid Monitor Fc Task.
NOTE: Available since v1.179.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "tf-example";
const default = alicloud.getAccount({});
const defaultNamespace = new alicloud.cms.Namespace("default", {
description: name,
namespace: name,
specification: "cms.s1.large",
});
const defaultHybridMonitorFcTask = new alicloud.cms.HybridMonitorFcTask("default", {
namespace: defaultNamespace.id,
yarmConfig: `---
products:
- namespace: "acs_ecs_dashboard"
metric_info:
- metric_list:
- "CPUUtilization"
- "DiskReadBPS"
- "InternetOut"
- "IntranetOut"
- "cpu_idle"
- "cpu_system"
- "cpu_total"
- "diskusage_utilization"
- namespace: "acs_rds_dashboard"
metric_info:
- metric_list:
- "MySQL_QPS"
- "MySQL_TPS"
`,
targetUserId: _default.then(_default => _default.id),
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-example"
default = alicloud.get_account()
default_namespace = alicloud.cms.Namespace("default",
description=name,
namespace=name,
specification="cms.s1.large")
default_hybrid_monitor_fc_task = alicloud.cms.HybridMonitorFcTask("default",
namespace=default_namespace.id,
yarm_config="""---
products:
- namespace: "acs_ecs_dashboard"
metric_info:
- metric_list:
- "CPUUtilization"
- "DiskReadBPS"
- "InternetOut"
- "IntranetOut"
- "cpu_idle"
- "cpu_system"
- "cpu_total"
- "diskusage_utilization"
- namespace: "acs_rds_dashboard"
metric_info:
- metric_list:
- "MySQL_QPS"
- "MySQL_TPS"
""",
target_user_id=default.id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cms"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "tf-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := alicloud.GetAccount(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
defaultNamespace, err := cms.NewNamespace(ctx, "default", &cms.NamespaceArgs{
Description: pulumi.String(name),
Namespace: pulumi.String(name),
Specification: pulumi.String("cms.s1.large"),
})
if err != nil {
return err
}
_, err = cms.NewHybridMonitorFcTask(ctx, "default", &cms.HybridMonitorFcTaskArgs{
Namespace: defaultNamespace.ID(),
YarmConfig: pulumi.String(`---
products:
- namespace: "acs_ecs_dashboard"
metric_info:
- metric_list:
- "CPUUtilization"
- "DiskReadBPS"
- "InternetOut"
- "IntranetOut"
- "cpu_idle"
- "cpu_system"
- "cpu_total"
- "diskusage_utilization"
- namespace: "acs_rds_dashboard"
metric_info:
- metric_list:
- "MySQL_QPS"
- "MySQL_TPS"
`),
TargetUserId: pulumi.String(_default.Id),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tf-example";
var @default = AliCloud.GetAccount.Invoke();
var defaultNamespace = new AliCloud.Cms.Namespace("default", new()
{
Description = name,
NamespaceName = name,
Specification = "cms.s1.large",
});
var defaultHybridMonitorFcTask = new AliCloud.Cms.HybridMonitorFcTask("default", new()
{
Namespace = defaultNamespace.Id,
YarmConfig = @"---
products:
- namespace: ""acs_ecs_dashboard""
metric_info:
- metric_list:
- ""CPUUtilization""
- ""DiskReadBPS""
- ""InternetOut""
- ""IntranetOut""
- ""cpu_idle""
- ""cpu_system""
- ""cpu_total""
- ""diskusage_utilization""
- namespace: ""acs_rds_dashboard""
metric_info:
- metric_list:
- ""MySQL_QPS""
- ""MySQL_TPS""
",
TargetUserId = @default.Apply(@default => @default.Apply(getAccountResult => getAccountResult.Id)),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.cms.Namespace;
import com.pulumi.alicloud.cms.NamespaceArgs;
import com.pulumi.alicloud.cms.HybridMonitorFcTask;
import com.pulumi.alicloud.cms.HybridMonitorFcTaskArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var name = config.get("name").orElse("tf-example");
final var default = AlicloudFunctions.getAccount();
var defaultNamespace = new Namespace("defaultNamespace", NamespaceArgs.builder()
.description(name)
.namespace(name)
.specification("cms.s1.large")
.build());
var defaultHybridMonitorFcTask = new HybridMonitorFcTask("defaultHybridMonitorFcTask", HybridMonitorFcTaskArgs.builder()
.namespace(defaultNamespace.id())
.yarmConfig("""
---
products:
- namespace: "acs_ecs_dashboard"
metric_info:
- metric_list:
- "CPUUtilization"
- "DiskReadBPS"
- "InternetOut"
- "IntranetOut"
- "cpu_idle"
- "cpu_system"
- "cpu_total"
- "diskusage_utilization"
- namespace: "acs_rds_dashboard"
metric_info:
- metric_list:
- "MySQL_QPS"
- "MySQL_TPS"
""")
.targetUserId(default_.id())
.build());
}
}
configuration:
name:
type: string
default: tf-example
resources:
defaultNamespace:
type: alicloud:cms:Namespace
name: default
properties:
description: ${name}
namespace: ${name}
specification: cms.s1.large
defaultHybridMonitorFcTask:
type: alicloud:cms:HybridMonitorFcTask
name: default
properties:
namespace: ${defaultNamespace.id}
yarmConfig: |
---
products:
- namespace: "acs_ecs_dashboard"
metric_info:
- metric_list:
- "CPUUtilization"
- "DiskReadBPS"
- "InternetOut"
- "IntranetOut"
- "cpu_idle"
- "cpu_system"
- "cpu_total"
- "diskusage_utilization"
- namespace: "acs_rds_dashboard"
metric_info:
- metric_list:
- "MySQL_QPS"
- "MySQL_TPS"
targetUserId: ${default.id}
variables:
default:
fn::invoke:
Function: alicloud:getAccount
Arguments: {}
Create HybridMonitorFcTask Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new HybridMonitorFcTask(name: string, args: HybridMonitorFcTaskArgs, opts?: CustomResourceOptions);
@overload
def HybridMonitorFcTask(resource_name: str,
args: HybridMonitorFcTaskArgs,
opts: Optional[ResourceOptions] = None)
@overload
def HybridMonitorFcTask(resource_name: str,
opts: Optional[ResourceOptions] = None,
namespace: Optional[str] = None,
yarm_config: Optional[str] = None,
target_user_id: Optional[str] = None)
func NewHybridMonitorFcTask(ctx *Context, name string, args HybridMonitorFcTaskArgs, opts ...ResourceOption) (*HybridMonitorFcTask, error)
public HybridMonitorFcTask(string name, HybridMonitorFcTaskArgs args, CustomResourceOptions? opts = null)
public HybridMonitorFcTask(String name, HybridMonitorFcTaskArgs args)
public HybridMonitorFcTask(String name, HybridMonitorFcTaskArgs args, CustomResourceOptions options)
type: alicloud:cms:HybridMonitorFcTask
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args HybridMonitorFcTaskArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args HybridMonitorFcTaskArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args HybridMonitorFcTaskArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HybridMonitorFcTaskArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args HybridMonitorFcTaskArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var hybridMonitorFcTaskResource = new AliCloud.Cms.HybridMonitorFcTask("hybridMonitorFcTaskResource", new()
{
Namespace = "string",
YarmConfig = "string",
TargetUserId = "string",
});
example, err := cms.NewHybridMonitorFcTask(ctx, "hybridMonitorFcTaskResource", &cms.HybridMonitorFcTaskArgs{
Namespace: pulumi.String("string"),
YarmConfig: pulumi.String("string"),
TargetUserId: pulumi.String("string"),
})
var hybridMonitorFcTaskResource = new HybridMonitorFcTask("hybridMonitorFcTaskResource", HybridMonitorFcTaskArgs.builder()
.namespace("string")
.yarmConfig("string")
.targetUserId("string")
.build());
hybrid_monitor_fc_task_resource = alicloud.cms.HybridMonitorFcTask("hybridMonitorFcTaskResource",
namespace="string",
yarm_config="string",
target_user_id="string")
const hybridMonitorFcTaskResource = new alicloud.cms.HybridMonitorFcTask("hybridMonitorFcTaskResource", {
namespace: "string",
yarmConfig: "string",
targetUserId: "string",
});
type: alicloud:cms:HybridMonitorFcTask
properties:
namespace: string
targetUserId: string
yarmConfig: string
HybridMonitorFcTask Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The HybridMonitorFcTask resource accepts the following input properties:
- Namespace string
- The index warehouse where the host belongs.
- Yarm
Config string - The configuration file of the Alibaba Cloud service that you want to monitor by using Hybrid Cloud Monitoring.
- Target
User stringId - The ID of the member account. If you call API operations by using a management account, you can connect the Alibaba Cloud services that are activated for a member account in Resource Directory to Hybrid Cloud Monitoring. You can use Resource Directory to monitor Alibaba Cloud services across enterprise accounts.
- Namespace string
- The index warehouse where the host belongs.
- Yarm
Config string - The configuration file of the Alibaba Cloud service that you want to monitor by using Hybrid Cloud Monitoring.
- Target
User stringId - The ID of the member account. If you call API operations by using a management account, you can connect the Alibaba Cloud services that are activated for a member account in Resource Directory to Hybrid Cloud Monitoring. You can use Resource Directory to monitor Alibaba Cloud services across enterprise accounts.
- namespace String
- The index warehouse where the host belongs.
- yarm
Config String - The configuration file of the Alibaba Cloud service that you want to monitor by using Hybrid Cloud Monitoring.
- target
User StringId - The ID of the member account. If you call API operations by using a management account, you can connect the Alibaba Cloud services that are activated for a member account in Resource Directory to Hybrid Cloud Monitoring. You can use Resource Directory to monitor Alibaba Cloud services across enterprise accounts.
- namespace string
- The index warehouse where the host belongs.
- yarm
Config string - The configuration file of the Alibaba Cloud service that you want to monitor by using Hybrid Cloud Monitoring.
- target
User stringId - The ID of the member account. If you call API operations by using a management account, you can connect the Alibaba Cloud services that are activated for a member account in Resource Directory to Hybrid Cloud Monitoring. You can use Resource Directory to monitor Alibaba Cloud services across enterprise accounts.
- namespace str
- The index warehouse where the host belongs.
- yarm_
config str - The configuration file of the Alibaba Cloud service that you want to monitor by using Hybrid Cloud Monitoring.
- target_
user_ strid - The ID of the member account. If you call API operations by using a management account, you can connect the Alibaba Cloud services that are activated for a member account in Resource Directory to Hybrid Cloud Monitoring. You can use Resource Directory to monitor Alibaba Cloud services across enterprise accounts.
- namespace String
- The index warehouse where the host belongs.
- yarm
Config String - The configuration file of the Alibaba Cloud service that you want to monitor by using Hybrid Cloud Monitoring.
- target
User StringId - The ID of the member account. If you call API operations by using a management account, you can connect the Alibaba Cloud services that are activated for a member account in Resource Directory to Hybrid Cloud Monitoring. You can use Resource Directory to monitor Alibaba Cloud services across enterprise accounts.
Outputs
All input properties are implicitly available as output properties. Additionally, the HybridMonitorFcTask resource produces the following output properties:
- Hybrid
Monitor stringFc Task Id - The ID of the monitoring task.
- Id string
- The provider-assigned unique ID for this managed resource.
- Hybrid
Monitor stringFc Task Id - The ID of the monitoring task.
- Id string
- The provider-assigned unique ID for this managed resource.
- hybrid
Monitor StringFc Task Id - The ID of the monitoring task.
- id String
- The provider-assigned unique ID for this managed resource.
- hybrid
Monitor stringFc Task Id - The ID of the monitoring task.
- id string
- The provider-assigned unique ID for this managed resource.
- hybrid_
monitor_ strfc_ task_ id - The ID of the monitoring task.
- id str
- The provider-assigned unique ID for this managed resource.
- hybrid
Monitor StringFc Task Id - The ID of the monitoring task.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing HybridMonitorFcTask Resource
Get an existing HybridMonitorFcTask resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: HybridMonitorFcTaskState, opts?: CustomResourceOptions): HybridMonitorFcTask
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
hybrid_monitor_fc_task_id: Optional[str] = None,
namespace: Optional[str] = None,
target_user_id: Optional[str] = None,
yarm_config: Optional[str] = None) -> HybridMonitorFcTask
func GetHybridMonitorFcTask(ctx *Context, name string, id IDInput, state *HybridMonitorFcTaskState, opts ...ResourceOption) (*HybridMonitorFcTask, error)
public static HybridMonitorFcTask Get(string name, Input<string> id, HybridMonitorFcTaskState? state, CustomResourceOptions? opts = null)
public static HybridMonitorFcTask get(String name, Output<String> id, HybridMonitorFcTaskState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Hybrid
Monitor stringFc Task Id - The ID of the monitoring task.
- Namespace string
- The index warehouse where the host belongs.
- Target
User stringId - The ID of the member account. If you call API operations by using a management account, you can connect the Alibaba Cloud services that are activated for a member account in Resource Directory to Hybrid Cloud Monitoring. You can use Resource Directory to monitor Alibaba Cloud services across enterprise accounts.
- Yarm
Config string - The configuration file of the Alibaba Cloud service that you want to monitor by using Hybrid Cloud Monitoring.
- Hybrid
Monitor stringFc Task Id - The ID of the monitoring task.
- Namespace string
- The index warehouse where the host belongs.
- Target
User stringId - The ID of the member account. If you call API operations by using a management account, you can connect the Alibaba Cloud services that are activated for a member account in Resource Directory to Hybrid Cloud Monitoring. You can use Resource Directory to monitor Alibaba Cloud services across enterprise accounts.
- Yarm
Config string - The configuration file of the Alibaba Cloud service that you want to monitor by using Hybrid Cloud Monitoring.
- hybrid
Monitor StringFc Task Id - The ID of the monitoring task.
- namespace String
- The index warehouse where the host belongs.
- target
User StringId - The ID of the member account. If you call API operations by using a management account, you can connect the Alibaba Cloud services that are activated for a member account in Resource Directory to Hybrid Cloud Monitoring. You can use Resource Directory to monitor Alibaba Cloud services across enterprise accounts.
- yarm
Config String - The configuration file of the Alibaba Cloud service that you want to monitor by using Hybrid Cloud Monitoring.
- hybrid
Monitor stringFc Task Id - The ID of the monitoring task.
- namespace string
- The index warehouse where the host belongs.
- target
User stringId - The ID of the member account. If you call API operations by using a management account, you can connect the Alibaba Cloud services that are activated for a member account in Resource Directory to Hybrid Cloud Monitoring. You can use Resource Directory to monitor Alibaba Cloud services across enterprise accounts.
- yarm
Config string - The configuration file of the Alibaba Cloud service that you want to monitor by using Hybrid Cloud Monitoring.
- hybrid_
monitor_ strfc_ task_ id - The ID of the monitoring task.
- namespace str
- The index warehouse where the host belongs.
- target_
user_ strid - The ID of the member account. If you call API operations by using a management account, you can connect the Alibaba Cloud services that are activated for a member account in Resource Directory to Hybrid Cloud Monitoring. You can use Resource Directory to monitor Alibaba Cloud services across enterprise accounts.
- yarm_
config str - The configuration file of the Alibaba Cloud service that you want to monitor by using Hybrid Cloud Monitoring.
- hybrid
Monitor StringFc Task Id - The ID of the monitoring task.
- namespace String
- The index warehouse where the host belongs.
- target
User StringId - The ID of the member account. If you call API operations by using a management account, you can connect the Alibaba Cloud services that are activated for a member account in Resource Directory to Hybrid Cloud Monitoring. You can use Resource Directory to monitor Alibaba Cloud services across enterprise accounts.
- yarm
Config String - The configuration file of the Alibaba Cloud service that you want to monitor by using Hybrid Cloud Monitoring.
Import
Cloud Monitor Service Hybrid Monitor Fc Task can be imported using the id, e.g.
$ pulumi import alicloud:cms/hybridMonitorFcTask:HybridMonitorFcTask example <hybrid_monitor_fc_task_id>:<namespace>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.