1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. logs
  5. getAccountPolicy

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi

aws-native.logs.getAccountPolicy

Explore with Pulumi AI

aws-native logo

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi

    The AWS::Logs::AccountPolicy resource specifies a CloudWatch Logs AccountPolicy.

    Using getAccountPolicy

    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 getAccountPolicy(args: GetAccountPolicyArgs, opts?: InvokeOptions): Promise<GetAccountPolicyResult>
    function getAccountPolicyOutput(args: GetAccountPolicyOutputArgs, opts?: InvokeOptions): Output<GetAccountPolicyResult>
    def get_account_policy(account_id: Optional[str] = None,
                           policy_name: Optional[str] = None,
                           policy_type: Optional[AccountPolicyPolicyType] = None,
                           opts: Optional[InvokeOptions] = None) -> GetAccountPolicyResult
    def get_account_policy_output(account_id: Optional[pulumi.Input[str]] = None,
                           policy_name: Optional[pulumi.Input[str]] = None,
                           policy_type: Optional[pulumi.Input[AccountPolicyPolicyType]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetAccountPolicyResult]
    func LookupAccountPolicy(ctx *Context, args *LookupAccountPolicyArgs, opts ...InvokeOption) (*LookupAccountPolicyResult, error)
    func LookupAccountPolicyOutput(ctx *Context, args *LookupAccountPolicyOutputArgs, opts ...InvokeOption) LookupAccountPolicyResultOutput

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

    public static class GetAccountPolicy 
    {
        public static Task<GetAccountPolicyResult> InvokeAsync(GetAccountPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetAccountPolicyResult> Invoke(GetAccountPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAccountPolicyResult> getAccountPolicy(GetAccountPolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws-native:logs:getAccountPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccountId string
    User account id
    PolicyName string
    The name of the account policy
    PolicyType Pulumi.AwsNative.Logs.AccountPolicyPolicyType
    Type of the policy.
    AccountId string
    User account id
    PolicyName string
    The name of the account policy
    PolicyType AccountPolicyPolicyType
    Type of the policy.
    accountId String
    User account id
    policyName String
    The name of the account policy
    policyType AccountPolicyPolicyType
    Type of the policy.
    accountId string
    User account id
    policyName string
    The name of the account policy
    policyType AccountPolicyPolicyType
    Type of the policy.
    account_id str
    User account id
    policy_name str
    The name of the account policy
    policy_type AccountPolicyPolicyType
    Type of the policy.
    accountId String
    User account id
    policyName String
    The name of the account policy
    policyType "DATA_PROTECTION_POLICY" | "SUBSCRIPTION_FILTER_POLICY"
    Type of the policy.

    getAccountPolicy Result

    The following output properties are available:

    AccountId string
    User account id
    PolicyDocument string

    The body of the policy document you want to use for this topic.

    You can only add one policy per PolicyType.

    The policy must be in JSON string format.

    Length Constraints: Maximum length of 30720

    Scope Pulumi.AwsNative.Logs.AccountPolicyScope
    Scope for policy application
    SelectionCriteria string
    Log group selection criteria to apply policy only to a subset of log groups. SelectionCriteria string can be up to 25KB and cloudwatchlogs determines the length of selectionCriteria by using its UTF-8 bytes
    AccountId string
    User account id
    PolicyDocument string

    The body of the policy document you want to use for this topic.

    You can only add one policy per PolicyType.

    The policy must be in JSON string format.

    Length Constraints: Maximum length of 30720

    Scope AccountPolicyScope
    Scope for policy application
    SelectionCriteria string
    Log group selection criteria to apply policy only to a subset of log groups. SelectionCriteria string can be up to 25KB and cloudwatchlogs determines the length of selectionCriteria by using its UTF-8 bytes
    accountId String
    User account id
    policyDocument String

    The body of the policy document you want to use for this topic.

    You can only add one policy per PolicyType.

    The policy must be in JSON string format.

    Length Constraints: Maximum length of 30720

    scope AccountPolicyScope
    Scope for policy application
    selectionCriteria String
    Log group selection criteria to apply policy only to a subset of log groups. SelectionCriteria string can be up to 25KB and cloudwatchlogs determines the length of selectionCriteria by using its UTF-8 bytes
    accountId string
    User account id
    policyDocument string

    The body of the policy document you want to use for this topic.

    You can only add one policy per PolicyType.

    The policy must be in JSON string format.

    Length Constraints: Maximum length of 30720

    scope AccountPolicyScope
    Scope for policy application
    selectionCriteria string
    Log group selection criteria to apply policy only to a subset of log groups. SelectionCriteria string can be up to 25KB and cloudwatchlogs determines the length of selectionCriteria by using its UTF-8 bytes
    account_id str
    User account id
    policy_document str

    The body of the policy document you want to use for this topic.

    You can only add one policy per PolicyType.

    The policy must be in JSON string format.

    Length Constraints: Maximum length of 30720

    scope AccountPolicyScope
    Scope for policy application
    selection_criteria str
    Log group selection criteria to apply policy only to a subset of log groups. SelectionCriteria string can be up to 25KB and cloudwatchlogs determines the length of selectionCriteria by using its UTF-8 bytes
    accountId String
    User account id
    policyDocument String

    The body of the policy document you want to use for this topic.

    You can only add one policy per PolicyType.

    The policy must be in JSON string format.

    Length Constraints: Maximum length of 30720

    scope "ALL"
    Scope for policy application
    selectionCriteria String
    Log group selection criteria to apply policy only to a subset of log groups. SelectionCriteria string can be up to 25KB and cloudwatchlogs determines the length of selectionCriteria by using its UTF-8 bytes

    Supporting Types

    AccountPolicyPolicyType

    AccountPolicyScope

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    We recommend new projects start with resources from the AWS provider.

    AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi