def METHOD_NAME(billing_account_id: Optional[pulumi.Input[str]] = None,
                                    rule_name: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetCostAllocationRuleResult]:
    """
    Get a cost allocation rule by rule name and billing account or enterprise enrollment.
    :param str billing_account_id: BillingAccount ID
    :param str rule_name: Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters other than '_' and '-'. The max length is 260 characters.
    """
    ...