We recommend new projects start with resources from the AWS provider.
aws-native.logs.getAccountPolicy
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
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)
public static Output<GetAccountPolicyResult> getAccountPolicy(GetAccountPolicyArgs args, InvokeOptions options)
fn::invoke:
  function: aws-native:logs:getAccountPolicy
  arguments:
    # arguments dictionaryThe following arguments are supported:
- AccountId string
- User account id
- PolicyName string
- The name of the account policy
- PolicyType Pulumi.Aws Native. Logs. Account Policy Policy Type 
- Type of the policy.
- AccountId string
- User account id
- PolicyName string
- The name of the account policy
- PolicyType AccountPolicy Policy Type 
- Type of the policy.
- accountId String
- User account id
- policyName String
- The name of the account policy
- policyType AccountPolicy Policy Type 
- Type of the policy.
- accountId string
- User account id
- policyName string
- The name of the account policy
- policyType AccountPolicy Policy Type 
- Type of the policy.
- account_id str
- User account id
- policy_name str
- The name of the account policy
- policy_type AccountPolicy Policy Type 
- Type of the policy.
- accountId String
- User account id
- policyName String
- The name of the account policy
- policyType "DATA_PROTECTION_POLICY" | "SUBSCRIPTION_FILTER_POLICY" | "FIELD_INDEX_POLICY" | "TRANSFORMER_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.Aws Native. Logs. Account Policy Scope 
- 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
AccountPolicy Scope 
- 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
AccountPolicy Scope 
- 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
AccountPolicy Scope 
- 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
AccountPolicy Scope 
- 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
We recommend new projects start with resources from the AWS provider.