1. Packages
  2. Alicloud Provider
  3. API Docs
  4. vpc
  5. getFlowLogService
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.vpc.getFlowLogService

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    Using this data source can open Vpc Flow Log service automatically. If the service has been opened, it will return opened.

    For information about Vpc Flow Log and how to use it, see What is Vpc Flow Log.

    NOTE: Available since v1.209.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const default = alicloud.vpc.getFlowLogService({
        enable: "On",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.vpc.get_flow_log_service(enable="On")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vpc.GetFlowLogService(ctx, &vpc.GetFlowLogServiceArgs{
    			Enable: pulumi.StringRef("On"),
    		}, nil)
    		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 @default = AliCloud.Vpc.GetFlowLogService.Invoke(new()
        {
            Enable = "On",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.vpc.VpcFunctions;
    import com.pulumi.alicloud.vpc.inputs.GetFlowLogServiceArgs;
    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 default = VpcFunctions.getFlowLogService(GetFlowLogServiceArgs.builder()
                .enable("On")
                .build());
    
        }
    }
    
    variables:
      default:
        fn::invoke:
          Function: alicloud:vpc:getFlowLogService
          Arguments:
            enable: On
    

    Using getFlowLogService

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getFlowLogService(args: GetFlowLogServiceArgs, opts?: InvokeOptions): Promise<GetFlowLogServiceResult>
    function getFlowLogServiceOutput(args: GetFlowLogServiceOutputArgs, opts?: InvokeOptions): Output<GetFlowLogServiceResult>
    def get_flow_log_service(enable: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetFlowLogServiceResult
    def get_flow_log_service_output(enable: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetFlowLogServiceResult]
    func GetFlowLogService(ctx *Context, args *GetFlowLogServiceArgs, opts ...InvokeOption) (*GetFlowLogServiceResult, error)
    func GetFlowLogServiceOutput(ctx *Context, args *GetFlowLogServiceOutputArgs, opts ...InvokeOption) GetFlowLogServiceResultOutput

    > Note: This function is named GetFlowLogService in the Go SDK.

    public static class GetFlowLogService 
    {
        public static Task<GetFlowLogServiceResult> InvokeAsync(GetFlowLogServiceArgs args, InvokeOptions? opts = null)
        public static Output<GetFlowLogServiceResult> Invoke(GetFlowLogServiceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetFlowLogServiceResult> getFlowLogService(GetFlowLogServiceArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:vpc/getFlowLogService:getFlowLogService
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Enable string

    Setting the value to On to enable the service. If has been enabled, return the result. Default value: Off. Valid values: On and Off.

    NOTE: Setting enable = "On" to open the Vpc Flow Log service that means you have read and agreed the Vpc Flow Log Terms of Service. The service can not closed once it is opened.

    Enable string

    Setting the value to On to enable the service. If has been enabled, return the result. Default value: Off. Valid values: On and Off.

    NOTE: Setting enable = "On" to open the Vpc Flow Log service that means you have read and agreed the Vpc Flow Log Terms of Service. The service can not closed once it is opened.

    enable String

    Setting the value to On to enable the service. If has been enabled, return the result. Default value: Off. Valid values: On and Off.

    NOTE: Setting enable = "On" to open the Vpc Flow Log service that means you have read and agreed the Vpc Flow Log Terms of Service. The service can not closed once it is opened.

    enable string

    Setting the value to On to enable the service. If has been enabled, return the result. Default value: Off. Valid values: On and Off.

    NOTE: Setting enable = "On" to open the Vpc Flow Log service that means you have read and agreed the Vpc Flow Log Terms of Service. The service can not closed once it is opened.

    enable str

    Setting the value to On to enable the service. If has been enabled, return the result. Default value: Off. Valid values: On and Off.

    NOTE: Setting enable = "On" to open the Vpc Flow Log service that means you have read and agreed the Vpc Flow Log Terms of Service. The service can not closed once it is opened.

    enable String

    Setting the value to On to enable the service. If has been enabled, return the result. Default value: Off. Valid values: On and Off.

    NOTE: Setting enable = "On" to open the Vpc Flow Log service that means you have read and agreed the Vpc Flow Log Terms of Service. The service can not closed once it is opened.

    getFlowLogService Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The current service enable status.
    Enable string
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The current service enable status.
    Enable string
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The current service enable status.
    enable String
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The current service enable status.
    enable string
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The current service enable status.
    enable str
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The current service enable status.
    enable String

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi