create_invoice_unit
async
¶
create_invoice_unit(
name: InvoiceUnitName,
invoice_receiver: AccountIdString,
rule: InvoiceUnitRule,
*,
config_overrides: Optional[AsyncInvoicingClientConfig] = None,
description: Optional[DescriptionString] = None,
tax_inheritance_disabled: Optional[TaxInheritanceDisabledFlag] = None,
resource_tags: Optional[ResourceTagList] = None,
client_token: Optional[BasicStringWithoutSpace] = None,
) -> CreateInvoiceUnitResponse
This creates a new invoice unit with the provided definition.
Parameters:
-
name(InvoiceUnitName) –The unique name of the invoice unit that is shown on the generated invoice. This can't be changed once it is set. To change this name, you must delete the invoice unit recreate.
-
invoice_receiver(AccountIdString) –The Amazon Web Services account ID chosen to be the receiver of an invoice unit. All invoices generated for that invoice unit will be sent to this account ID.
-
description(Optional[DescriptionString], default:None) –The invoice unit's description. This can be changed at a later time.
-
tax_inheritance_disabled(Optional[TaxInheritanceDisabledFlag], default:None) –Whether the invoice unit based tax inheritance is/ should be enabled or disabled.
-
rule(InvoiceUnitRule) –The
InvoiceUnitRuleobject used to create invoice units. -
resource_tags(Optional[ResourceTagList], default:None) –The tag structure that contains a tag key and value.
-
client_token(Optional[BasicStringWithoutSpace], default:None) –A unique, case-sensitive identifier that you provide to ensure idempotency of the request.
Raises:
-
AccessDeniedException–You don't have sufficient access to perform this action.
-
InternalServerException–The processing request failed because of an unknown error, exception, or failure.
-
ThrottlingException–The request was denied due to request throttling.
-
ValidationException–The input fails to satisfy the constraints specified by an Amazon Web Services service.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
CreateInvoiceUnit
>>> await client.create_invoice_unit(name='Example Invoice Unit', invoice_receiver='111111111111', description='Example Invoice Unit Description', tax_inheritance_disabled=False, rule={'LinkedAccounts': ['222222222222']}, resource_tags=[{'Key': 'TagKey', 'Value': 'TagValue'}], client_token='e362c68e-4e74-48d7-9228-0bc5aa447b42')
Source code in docs_src/capo_invoicing/_services/async_invoicing.py
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 | |