Class: Aws::BillingConductor::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb

Overview

An API client for BillingConductor. To construct a client, you need to configure a :region and :credentials.

client = Aws::BillingConductor::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

For details on configuring region and credentials see the developer guide.

See #initialize for a full list of supported configuration options.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::SharedCredentials - Used for loading static credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    • Aws::AssumeRoleWebIdentityCredentials - Used when you need to assume a role after providing credentials via the web.

    • Aws::SSOCredentials - Used for loading credentials from AWS SSO using an access token generated from aws login.

    • Aws::ProcessCredentials - Used for loading credentials from a process that outputs to stdout.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::ECSCredentials - Used for loading credentials from instances running in ECS.

    • Aws::CognitoIdentityCredentials - Used for loading credentials from the Cognito Identity service.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]
    • The :access_key_id, :secret_access_key, and :session_token options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • ~/.aws/credentials
    • ~/.aws/config
    • EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentails or Aws::ECSCredentials to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED'] to true.
  • :region (required, String)

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is searched for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in adaptive retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a RetryCapacityNotAvailableError and will not retry instead of sleeping.

  • :client_side_monitoring (Boolean) — default: false

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true

    Used only in standard and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :defaults_mode (String) — default: "legacy"

    See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :endpoint (String)

    The client endpoint is normally constructed from the :region option. You should only configure an :endpoint when connecting to test or custom endpoints. This should be a valid HTTP(S) URI.

  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false

    When set to true, endpoint discovery will be enabled for operations when available.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the :logger at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in standard and adaptive retry modes.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the legacy retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the legacy retry mode.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the legacy retry mode.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    • legacy - The pre-existing retry behavior. This is default value if no retry mode is provided.

    • standard - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • adaptive - An experimental retry mode that includes all the functionality of standard mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

  • :secret_access_key (String)
  • :session_token (String)
  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :token_provider (Aws::TokenProvider)

    A Bearer Token Provider. This can be an instance of any one of the following classes:

    • Aws::StaticTokenProvider - Used for configuring static, non-refreshing tokens.

    • Aws::SSOTokenProvider - Used for loading tokens from AWS SSO using an access token generated from aws login.

    When :token_provider is not configured directly, the Aws::TokenProviderChain will be used to search for tokens configured for your profile in shared configuration files.

  • :use_dualstack_endpoint (Boolean)

    When set to true, dualstack enabled endpoints (with .aws TLD) will be used if available.

  • :use_fips_endpoint (Boolean)

    When set to true, fips compatible endpoints will be used if available. When a fips region is used, the region is normalized and this config is set to true.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request.

  • :endpoint_provider (Aws::BillingConductor::EndpointProvider)

    The endpoint provider used to resolve endpoints. Any object that responds to #resolve_endpoint(parameters) where parameters is a Struct similar to Aws::BillingConductor::EndpointParameters

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before raising a Timeout::Error.

  • :http_read_timeout (Float) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session.

  • :ssl_timeout (Float) — default: nil

    Sets the SSL timeout in seconds.

  • :http_wire_trace (Boolean) — default: false

    When true, HTTP debug output will be sent to the :logger.

  • :ssl_verify_peer (Boolean) — default: true

    When true, SSL peer certificates are verified when establishing a connection.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.



365
366
367
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 365

def initialize(*args)
  super
end

Instance Method Details

#associate_accounts(params = {}) ⇒ Types::AssociateAccountsOutput

Connects an array of account IDs in a consolidated billing family to a predefined billing group. The account IDs must be a part of the consolidated billing family during the current month, and not already associated with another billing group. The maximum number of accounts that can be associated in one call is 30.

Examples:

Request syntax with placeholder values


resp = client.associate_accounts({
  arn: "BillingGroupArn", # required
  account_ids: ["AccountId"], # required
})

Response structure


resp.arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :arn (required, String)

    The Amazon Resource Name (ARN) of the billing group that associates the array of account IDs.

  • :account_ids (required, Array<String>)

    The associating array of account IDs.

Returns:

See Also:



403
404
405
406
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 403

def associate_accounts(params = {}, options = {})
  req = build_request(:associate_accounts, params)
  req.send_request(options)
end

#associate_pricing_rules(params = {}) ⇒ Types::AssociatePricingRulesOutput

Connects an array of PricingRuleArns to a defined PricingPlan. The maximum number PricingRuleArn that can be associated in one call is 30.

Examples:

Request syntax with placeholder values


resp = client.associate_pricing_rules({
  arn: "PricingPlanArn", # required
  pricing_rule_arns: ["PricingRuleArn"], # required
})

Response structure


resp.arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :arn (required, String)

    The PricingPlanArn that the PricingRuleArns are associated with.

  • :pricing_rule_arns (required, Array<String>)

    The PricingRuleArns that are associated with the Pricing Plan.

Returns:

See Also:



437
438
439
440
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 437

def associate_pricing_rules(params = {}, options = {})
  req = build_request(:associate_pricing_rules, params)
  req.send_request(options)
end

#batch_associate_resources_to_custom_line_item(params = {}) ⇒ Types::BatchAssociateResourcesToCustomLineItemOutput

Associates a batch of resources to a percentage custom line item.

Examples:

Request syntax with placeholder values


resp = client.batch_associate_resources_to_custom_line_item({
  target_arn: "CustomLineItemArn", # required
  resource_arns: ["CustomLineItemAssociationElement"], # required
  billing_period_range: {
    inclusive_start_billing_period: "BillingPeriod", # required
    exclusive_end_billing_period: "BillingPeriod",
  },
})

Response structure


resp.successfully_associated_resources #=> Array
resp.successfully_associated_resources[0].arn #=> String
resp.successfully_associated_resources[0].error.message #=> String
resp.successfully_associated_resources[0].error.reason #=> String, one of "INVALID_ARN", "SERVICE_LIMIT_EXCEEDED", "ILLEGAL_CUSTOMLINEITEM", "INTERNAL_SERVER_EXCEPTION", "INVALID_BILLING_PERIOD_RANGE"
resp.failed_associated_resources #=> Array
resp.failed_associated_resources[0].arn #=> String
resp.failed_associated_resources[0].error.message #=> String
resp.failed_associated_resources[0].error.reason #=> String, one of "INVALID_ARN", "SERVICE_LIMIT_EXCEEDED", "ILLEGAL_CUSTOMLINEITEM", "INTERNAL_SERVER_EXCEPTION", "INVALID_BILLING_PERIOD_RANGE"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :target_arn (required, String)

    A percentage custom line item ARN to associate the resources to.

  • :resource_arns (required, Array<String>)

    A list containing the ARNs of the resources to be associated.

  • :billing_period_range (Types::CustomLineItemBillingPeriodRange)

    The billing period range in which the custom line item request will be applied.

Returns:

See Also:



485
486
487
488
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 485

def batch_associate_resources_to_custom_line_item(params = {}, options = {})
  req = build_request(:batch_associate_resources_to_custom_line_item, params)
  req.send_request(options)
end

#batch_disassociate_resources_from_custom_line_item(params = {}) ⇒ Types::BatchDisassociateResourcesFromCustomLineItemOutput

Disassociates a batch of resources from a percentage custom line item.

Examples:

Request syntax with placeholder values


resp = client.batch_disassociate_resources_from_custom_line_item({
  target_arn: "CustomLineItemArn", # required
  resource_arns: ["CustomLineItemAssociationElement"], # required
  billing_period_range: {
    inclusive_start_billing_period: "BillingPeriod", # required
    exclusive_end_billing_period: "BillingPeriod",
  },
})

Response structure


resp.successfully_disassociated_resources #=> Array
resp.successfully_disassociated_resources[0].arn #=> String
resp.successfully_disassociated_resources[0].error.message #=> String
resp.successfully_disassociated_resources[0].error.reason #=> String, one of "INVALID_ARN", "SERVICE_LIMIT_EXCEEDED", "ILLEGAL_CUSTOMLINEITEM", "INTERNAL_SERVER_EXCEPTION", "INVALID_BILLING_PERIOD_RANGE"
resp.failed_disassociated_resources #=> Array
resp.failed_disassociated_resources[0].arn #=> String
resp.failed_disassociated_resources[0].error.message #=> String
resp.failed_disassociated_resources[0].error.reason #=> String, one of "INVALID_ARN", "SERVICE_LIMIT_EXCEEDED", "ILLEGAL_CUSTOMLINEITEM", "INTERNAL_SERVER_EXCEPTION", "INVALID_BILLING_PERIOD_RANGE"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :target_arn (required, String)

    A percentage custom line item ARN to disassociate the resources from.

  • :resource_arns (required, Array<String>)

    A list containing the ARNs of resources to be disassociated.

  • :billing_period_range (Types::CustomLineItemBillingPeriodRange)

    The billing period range in which the custom line item request will be applied.

Returns:

See Also:



533
534
535
536
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 533

def batch_disassociate_resources_from_custom_line_item(params = {}, options = {})
  req = build_request(:batch_disassociate_resources_from_custom_line_item, params)
  req.send_request(options)
end

#create_billing_group(params = {}) ⇒ Types::CreateBillingGroupOutput

Creates a billing group that resembles a consolidated billing family that Amazon Web Services charges, based off of the predefined pricing plan computation.

Examples:

Request syntax with placeholder values


resp = client.create_billing_group({
  client_token: "ClientToken",
  name: "BillingGroupName", # required
  account_grouping: { # required
    linked_account_ids: ["AccountId"], # required
  },
  computation_preference: { # required
    pricing_plan_arn: "PricingPlanFullArn", # required
  },
  primary_account_id: "AccountId",
  description: "BillingGroupDescription",
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :client_token (String)

    The token that is needed to support idempotency. Idempotency isn't currently supported, but will be implemented in a future update.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :name (required, String)

    The billing group name. The names must be unique.

  • :account_grouping (required, Types::AccountGrouping)

    The set of accounts that will be under the billing group. The set of accounts resemble the linked accounts in a consolidated family.

  • :computation_preference (required, Types::ComputationPreference)

    The preferences and settings that will be used to compute the Amazon Web Services charges for a billing group.

  • :primary_account_id (String)

    The account ID that serves as the main account in a billing group.

  • :description (String)

    The description of the billing group.

  • :tags (Hash<String,String>)

    A map that contains tag keys and tag values that are attached to a billing group. This feature isn't available during the beta.

Returns:

See Also:



600
601
602
603
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 600

def create_billing_group(params = {}, options = {})
  req = build_request(:create_billing_group, params)
  req.send_request(options)
end

#create_custom_line_item(params = {}) ⇒ Types::CreateCustomLineItemOutput

Creates a custom line item that can be used to create a one-time fixed charge that can be applied to a single billing group for the current or previous billing period. The one-time fixed charge is either a fee or discount.

Examples:

Request syntax with placeholder values


resp = client.create_custom_line_item({
  client_token: "ClientToken",
  name: "CustomLineItemName", # required
  description: "CustomLineItemDescription", # required
  billing_group_arn: "BillingGroupArn", # required
  billing_period_range: {
    inclusive_start_billing_period: "BillingPeriod", # required
    exclusive_end_billing_period: "BillingPeriod",
  },
  tags: {
    "TagKey" => "TagValue",
  },
  charge_details: { # required
    flat: {
      charge_value: 1.0, # required
    },
    percentage: {
      percentage_value: 1.0, # required
      associated_values: ["CustomLineItemAssociationElement"],
    },
    type: "CREDIT", # required, accepts CREDIT, FEE
  },
})

Response structure


resp.arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :client_token (String)

    The token that is needed to support idempotency. Idempotency isn't currently supported, but will be implemented in a future update.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :name (required, String)

    The name of the custom line item.

  • :description (required, String)

    The description of the custom line item. This is shown on the Bills page in association with the charge value.

  • :billing_group_arn (required, String)

    The Amazon Resource Name (ARN) that references the billing group where the custom line item applies to.

  • :billing_period_range (Types::CustomLineItemBillingPeriodRange)

    A time range for which the custom line item is effective.

  • :tags (Hash<String,String>)

    A map that contains tag keys and tag values that are attached to a custom line item.

  • :charge_details (required, Types::CustomLineItemChargeDetails)

    A CustomLineItemChargeDetails that describes the charge details for a custom line item.

Returns:

See Also:



677
678
679
680
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 677

def create_custom_line_item(params = {}, options = {})
  req = build_request(:create_custom_line_item, params)
  req.send_request(options)
end

#create_pricing_plan(params = {}) ⇒ Types::CreatePricingPlanOutput

Creates a pricing plan that is used for computing Amazon Web Services charges for billing groups.

Examples:

Request syntax with placeholder values


resp = client.create_pricing_plan({
  client_token: "ClientToken",
  name: "PricingPlanName", # required
  description: "PricingPlanDescription",
  pricing_rule_arns: ["PricingRuleArn"],
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :client_token (String)

    The token that is needed to support idempotency. Idempotency isn't currently supported, but will be implemented in a future update.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :name (required, String)

    The name of the pricing plan. The names must be unique to each pricing plan.

  • :description (String)

    The description of the pricing plan.

  • :pricing_rule_arns (Array<String>)

    A list of Amazon Resource Names (ARNs) that define the pricing plan parameters.

  • :tags (Hash<String,String>)

    A map that contains tag keys and tag values that are attached to a pricing plan.

Returns:

See Also:



731
732
733
734
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 731

def create_pricing_plan(params = {}, options = {})
  req = build_request(:create_pricing_plan, params)
  req.send_request(options)
end

#create_pricing_rule(params = {}) ⇒ Types::CreatePricingRuleOutput

Creates a pricing rule can be associated to a pricing plan, or a set of pricing plans.

Examples:

Request syntax with placeholder values


resp = client.create_pricing_rule({
  client_token: "ClientToken",
  name: "PricingRuleName", # required
  description: "PricingRuleDescription",
  scope: "GLOBAL", # required, accepts GLOBAL, SERVICE, BILLING_ENTITY
  type: "MARKUP", # required, accepts MARKUP, DISCOUNT
  modifier_percentage: 1.0, # required
  service: "Service",
  tags: {
    "TagKey" => "TagValue",
  },
  billing_entity: "BillingEntity",
})

Response structure


resp.arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :client_token (String)

    The token that's needed to support idempotency. Idempotency isn't currently supported, but will be implemented in a future update.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :name (required, String)

    The pricing rule name. The names must be unique to each pricing rule.

  • :description (String)

    The pricing rule description.

  • :scope (required, String)

    The scope of pricing rule that indicates if it's globally applicable, or it's service-specific.

  • :type (required, String)

    The type of pricing rule.

  • :modifier_percentage (required, Float)

    A percentage modifier that's applied on the public pricing rates.

  • :service (String)

    If the Scope attribute is set to SERVICE, the attribute indicates which service the PricingRule is applicable for.

  • :tags (Hash<String,String>)

    A map that contains tag keys and tag values that are attached to a pricing rule.

  • :billing_entity (String)

    The seller of services provided by Amazon Web Services, their affiliates, or third-party providers selling services via Amazon Web Services Marketplace.

Returns:

See Also:



803
804
805
806
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 803

def create_pricing_rule(params = {}, options = {})
  req = build_request(:create_pricing_rule, params)
  req.send_request(options)
end

#delete_billing_group(params = {}) ⇒ Types::DeleteBillingGroupOutput

Deletes a billing group.

Examples:

Request syntax with placeholder values


resp = client.delete_billing_group({
  arn: "BillingGroupArn", # required
})

Response structure


resp.arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :arn (required, String)

    The Amazon Resource Name (ARN) of the billing group that you're deleting.

Returns:

See Also:



832
833
834
835
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 832

def delete_billing_group(params = {}, options = {})
  req = build_request(:delete_billing_group, params)
  req.send_request(options)
end

#delete_custom_line_item(params = {}) ⇒ Types::DeleteCustomLineItemOutput

Deletes the custom line item identified by the given ARN in the current, or previous billing period.

Examples:

Request syntax with placeholder values


resp = client.delete_custom_line_item({
  arn: "CustomLineItemArn", # required
  billing_period_range: {
    inclusive_start_billing_period: "BillingPeriod", # required
    exclusive_end_billing_period: "BillingPeriod",
  },
})

Response structure


resp.arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :arn (required, String)

    The ARN of the custom line item to be deleted.

  • :billing_period_range (Types::CustomLineItemBillingPeriodRange)

    The billing period range in which the custom line item request will be applied.

Returns:

See Also:



869
870
871
872
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 869

def delete_custom_line_item(params = {}, options = {})
  req = build_request(:delete_custom_line_item, params)
  req.send_request(options)
end

#delete_pricing_plan(params = {}) ⇒ Types::DeletePricingPlanOutput

Deletes a pricing plan. The pricing plan must not be associated with any billing groups to delete successfully.

Examples:

Request syntax with placeholder values


resp = client.delete_pricing_plan({
  arn: "PricingPlanArn", # required
})

Response structure


resp.arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :arn (required, String)

    The Amazon Resource Name (ARN) of the pricing plan that you're deleting.

Returns:

See Also:



899
900
901
902
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 899

def delete_pricing_plan(params = {}, options = {})
  req = build_request(:delete_pricing_plan, params)
  req.send_request(options)
end

#delete_pricing_rule(params = {}) ⇒ Types::DeletePricingRuleOutput

Deletes the pricing rule that's identified by the input Amazon Resource Name (ARN).

Examples:

Request syntax with placeholder values


resp = client.delete_pricing_rule({
  arn: "PricingRuleArn", # required
})

Response structure


resp.arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :arn (required, String)

    The Amazon Resource Name (ARN) of the pricing rule that you are deleting.

Returns:

See Also:



929
930
931
932
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 929

def delete_pricing_rule(params = {}, options = {})
  req = build_request(:delete_pricing_rule, params)
  req.send_request(options)
end

#disassociate_accounts(params = {}) ⇒ Types::DisassociateAccountsOutput

Removes the specified list of account IDs from the given billing group.

Examples:

Request syntax with placeholder values


resp = client.disassociate_accounts({
  arn: "BillingGroupArn", # required
  account_ids: ["AccountId"], # required
})

Response structure


resp.arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :arn (required, String)

    The Amazon Resource Name (ARN) of the billing group that the array of account IDs will disassociate from.

  • :account_ids (required, Array<String>)

    The array of account IDs to disassociate.

Returns:

See Also:



963
964
965
966
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 963

def disassociate_accounts(params = {}, options = {})
  req = build_request(:disassociate_accounts, params)
  req.send_request(options)
end

#disassociate_pricing_rules(params = {}) ⇒ Types::DisassociatePricingRulesOutput

Disassociates a list of pricing rules from a pricing plan.

Examples:

Request syntax with placeholder values


resp = client.disassociate_pricing_rules({
  arn: "PricingPlanArn", # required
  pricing_rule_arns: ["PricingRuleArn"], # required
})

Response structure


resp.arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :arn (required, String)

    The pricing plan Amazon Resource Name (ARN) to disassociate pricing rules from.

  • :pricing_rule_arns (required, Array<String>)

    A list containing the Amazon Resource Name (ARN) of the pricing rules that will be disassociated.

Returns:

See Also:



997
998
999
1000
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 997

def disassociate_pricing_rules(params = {}, options = {})
  req = build_request(:disassociate_pricing_rules, params)
  req.send_request(options)
end

#list_account_associations(params = {}) ⇒ Types::ListAccountAssociationsOutput

This is a paginated call to list linked accounts that are linked to the payer account for the specified time period. If no information is provided, the current billing period is used. The response will optionally include the billing group that's associated with the linked account.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.({
  billing_period: "BillingPeriod",
  filters: {
    association: "Association",
    account_id: "AccountId",
  },
  next_token: "Token",
})

Response structure


resp.linked_accounts #=> Array
resp.linked_accounts[0]. #=> String
resp.linked_accounts[0].billing_group_arn #=> String
resp.linked_accounts[0]. #=> String
resp.linked_accounts[0]. #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :billing_period (String)

    The preferred billing period to get account associations.

  • :filters (Types::ListAccountAssociationsFilter)

    The filter on the account ID of the linked account, or any of the following:

    MONITORED: linked accounts that are associated to billing groups.

    UNMONITORED: linked accounts that aren't associated to billing groups.

    Billing Group Arn: linked accounts that are associated to the provided billing group Arn.

  • :next_token (String)

    The pagination token that's used on subsequent calls to retrieve accounts.

Returns:

See Also:



1058
1059
1060
1061
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 1058

def (params = {}, options = {})
  req = build_request(:list_account_associations, params)
  req.send_request(options)
end

#list_billing_group_cost_reports(params = {}) ⇒ Types::ListBillingGroupCostReportsOutput

A paginated call to retrieve a summary report of actual Amazon Web Services charges and the calculated Amazon Web Services charges based on the associated pricing plan of a billing group.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_billing_group_cost_reports({
  billing_period: "BillingPeriod",
  max_results: 1,
  next_token: "Token",
  filters: {
    billing_group_arns: ["BillingGroupArn"],
  },
})

Response structure


resp.billing_group_cost_reports #=> Array
resp.billing_group_cost_reports[0].arn #=> String
resp.billing_group_cost_reports[0].aws_cost #=> String
resp.billing_group_cost_reports[0].proforma_cost #=> String
resp.billing_group_cost_reports[0].margin #=> String
resp.billing_group_cost_reports[0].margin_percentage #=> String
resp.billing_group_cost_reports[0].currency #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :billing_period (String)

    The preferred billing period for your report.

  • :max_results (Integer)

    The maximum number of reports to retrieve.

  • :next_token (String)

    The pagination token that's used on subsequent calls to get reports.

  • :filters (Types::ListBillingGroupCostReportsFilter)

    A ListBillingGroupCostReportsFilter to specify billing groups to retrieve reports from.

Returns:

See Also:



1113
1114
1115
1116
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 1113

def list_billing_group_cost_reports(params = {}, options = {})
  req = build_request(:list_billing_group_cost_reports, params)
  req.send_request(options)
end

#list_billing_groups(params = {}) ⇒ Types::ListBillingGroupsOutput

A paginated call to retrieve a list of billing groups for the given billing period. If you don't provide a billing group, the current billing period is used.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_billing_groups({
  billing_period: "BillingPeriod",
  max_results: 1,
  next_token: "Token",
  filters: {
    arns: ["BillingGroupArn"],
    pricing_plan: "PricingPlanFullArn",
  },
})

Response structure


resp.billing_groups #=> Array
resp.billing_groups[0].name #=> String
resp.billing_groups[0].arn #=> String
resp.billing_groups[0].description #=> String
resp.billing_groups[0]. #=> String
resp.billing_groups[0].computation_preference.pricing_plan_arn #=> String
resp.billing_groups[0].size #=> Integer
resp.billing_groups[0].creation_time #=> Integer
resp.billing_groups[0].last_modified_time #=> Integer
resp.billing_groups[0].status #=> String, one of "ACTIVE", "PRIMARY_ACCOUNT_MISSING"
resp.billing_groups[0].status_reason #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :billing_period (String)

    The preferred billing period to get billing groups.

  • :max_results (Integer)

    The maximum number of billing groups to retrieve.

  • :next_token (String)

    The pagination token that's used on subsequent calls to get billing groups.

  • :filters (Types::ListBillingGroupsFilter)

    A ListBillingGroupsFilter that specifies the billing group and pricing plan to retrieve billing group information.

Returns:

See Also:



1174
1175
1176
1177
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 1174

def list_billing_groups(params = {}, options = {})
  req = build_request(:list_billing_groups, params)
  req.send_request(options)
end

#list_custom_line_item_versions(params = {}) ⇒ Types::ListCustomLineItemVersionsOutput

A paginated call to get a list of all custom line item versions.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_custom_line_item_versions({
  arn: "CustomLineItemArn", # required
  max_results: 1,
  next_token: "Token",
  filters: {
    billing_period_range: {
      start_billing_period: "BillingPeriod",
      end_billing_period: "BillingPeriod",
    },
  },
})

Response structure


resp.custom_line_item_versions #=> Array
resp.custom_line_item_versions[0].name #=> String
resp.custom_line_item_versions[0].charge_details.flat.charge_value #=> Float
resp.custom_line_item_versions[0].charge_details.percentage.percentage_value #=> Float
resp.custom_line_item_versions[0].charge_details.type #=> String, one of "CREDIT", "FEE"
resp.custom_line_item_versions[0].currency_code #=> String, one of "USD", "CNY"
resp.custom_line_item_versions[0].description #=> String
resp.custom_line_item_versions[0].product_code #=> String
resp.custom_line_item_versions[0].billing_group_arn #=> String
resp.custom_line_item_versions[0].creation_time #=> Integer
resp.custom_line_item_versions[0].last_modified_time #=> Integer
resp.custom_line_item_versions[0].association_size #=> Integer
resp.custom_line_item_versions[0].start_billing_period #=> String
resp.custom_line_item_versions[0].end_billing_period #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :arn (required, String)

    The Amazon Resource Name (ARN) for the custom line item.

  • :max_results (Integer)

    The maximum number of custom line item versions to retrieve.

  • :next_token (String)

    The pagination token that's used on subsequent calls to retrieve custom line item versions.

  • :filters (Types::ListCustomLineItemVersionsFilter)

    A ListCustomLineItemVersionsFilter that specifies the billing period range in which the custom line item versions are applied.

Returns:

See Also:



1238
1239
1240
1241
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 1238

def list_custom_line_item_versions(params = {}, options = {})
  req = build_request(:list_custom_line_item_versions, params)
  req.send_request(options)
end

#list_custom_line_items(params = {}) ⇒ Types::ListCustomLineItemsOutput

A paginated call to get a list of all custom line items (FFLIs) for the given billing period. If you don't provide a billing period, the current billing period is used.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_custom_line_items({
  billing_period: "BillingPeriod",
  max_results: 1,
  next_token: "Token",
  filters: {
    names: ["CustomLineItemName"],
    billing_groups: ["BillingGroupArn"],
    arns: ["CustomLineItemArn"],
  },
})

Response structure


resp.custom_line_items #=> Array
resp.custom_line_items[0].arn #=> String
resp.custom_line_items[0].name #=> String
resp.custom_line_items[0].charge_details.flat.charge_value #=> Float
resp.custom_line_items[0].charge_details.percentage.percentage_value #=> Float
resp.custom_line_items[0].charge_details.type #=> String, one of "CREDIT", "FEE"
resp.custom_line_items[0].currency_code #=> String, one of "USD", "CNY"
resp.custom_line_items[0].description #=> String
resp.custom_line_items[0].product_code #=> String
resp.custom_line_items[0].billing_group_arn #=> String
resp.custom_line_items[0].creation_time #=> Integer
resp.custom_line_items[0].last_modified_time #=> Integer
resp.custom_line_items[0].association_size #=> Integer
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :billing_period (String)

    The preferred billing period to get custom line items (FFLIs).

  • :max_results (Integer)

    The maximum number of billing groups to retrieve.

  • :next_token (String)

    The pagination token that's used on subsequent calls to get custom line items (FFLIs).

  • :filters (Types::ListCustomLineItemsFilter)

    A ListCustomLineItemsFilter that specifies the custom line item names and/or billing group Amazon Resource Names (ARNs) to retrieve FFLI information.

Returns:

See Also:



1303
1304
1305
1306
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 1303

def list_custom_line_items(params = {}, options = {})
  req = build_request(:list_custom_line_items, params)
  req.send_request(options)
end

#list_pricing_plans(params = {}) ⇒ Types::ListPricingPlansOutput

A paginated call to get pricing plans for the given billing period. If you don't provide a billing period, the current billing period is used.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_pricing_plans({
  billing_period: "BillingPeriod",
  filters: {
    arns: ["PricingPlanArn"],
  },
  max_results: 1,
  next_token: "Token",
})

Response structure


resp.billing_period #=> String
resp.pricing_plans #=> Array
resp.pricing_plans[0].name #=> String
resp.pricing_plans[0].arn #=> String
resp.pricing_plans[0].description #=> String
resp.pricing_plans[0].size #=> Integer
resp.pricing_plans[0].creation_time #=> Integer
resp.pricing_plans[0].last_modified_time #=> Integer
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :billing_period (String)

    The preferred billing period to get pricing plan.

  • :filters (Types::ListPricingPlansFilter)

    A ListPricingPlansFilter that specifies the Amazon Resource Name (ARNs) of pricing plans to retrieve pricing plans information.

  • :max_results (Integer)

    The maximum number of pricing plans to retrieve.

  • :next_token (String)

    The pagination token that's used on subsequent call to get pricing plans.

Returns:

See Also:



1361
1362
1363
1364
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 1361

def list_pricing_plans(params = {}, options = {})
  req = build_request(:list_pricing_plans, params)
  req.send_request(options)
end

#list_pricing_plans_associated_with_pricing_rule(params = {}) ⇒ Types::ListPricingPlansAssociatedWithPricingRuleOutput

A list of the pricing plans that are associated with a pricing rule.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_pricing_plans_associated_with_pricing_rule({
  billing_period: "BillingPeriod",
  pricing_rule_arn: "PricingRuleArn", # required
  max_results: 1,
  next_token: "Token",
})

Response structure


resp.billing_period #=> String
resp.pricing_rule_arn #=> String
resp.pricing_plan_arns #=> Array
resp.pricing_plan_arns[0] #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :billing_period (String)

    The pricing plan billing period for which associations will be listed.

  • :pricing_rule_arn (required, String)

    The pricing rule Amazon Resource Name (ARN) for which associations will be listed.

  • :max_results (Integer)

    The optional maximum number of pricing rule associations to retrieve.

  • :next_token (String)

    The optional pagination token returned by a previous call.

Returns:

See Also:



1411
1412
1413
1414
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 1411

def list_pricing_plans_associated_with_pricing_rule(params = {}, options = {})
  req = build_request(:list_pricing_plans_associated_with_pricing_rule, params)
  req.send_request(options)
end

#list_pricing_rules(params = {}) ⇒ Types::ListPricingRulesOutput

Describes a pricing rule that can be associated to a pricing plan, or set of pricing plans.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_pricing_rules({
  billing_period: "BillingPeriod",
  filters: {
    arns: ["PricingRuleArn"],
  },
  max_results: 1,
  next_token: "Token",
})

Response structure


resp.billing_period #=> String
resp.pricing_rules #=> Array
resp.pricing_rules[0].name #=> String
resp.pricing_rules[0].arn #=> String
resp.pricing_rules[0].description #=> String
resp.pricing_rules[0].scope #=> String, one of "GLOBAL", "SERVICE", "BILLING_ENTITY"
resp.pricing_rules[0].type #=> String, one of "MARKUP", "DISCOUNT"
resp.pricing_rules[0].modifier_percentage #=> Float
resp.pricing_rules[0].service #=> String
resp.pricing_rules[0].associated_pricing_plan_count #=> Integer
resp.pricing_rules[0].creation_time #=> Integer
resp.pricing_rules[0].last_modified_time #=> Integer
resp.pricing_rules[0].billing_entity #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :billing_period (String)

    The preferred billing period to get the pricing plan.

  • :filters (Types::ListPricingRulesFilter)

    A DescribePricingRuleFilter that specifies the Amazon Resource Name (ARNs) of pricing rules to retrieve pricing rules information.

  • :max_results (Integer)

    The maximum number of pricing rules to retrieve.

  • :next_token (String)

    The pagination token that's used on subsequent call to get pricing rules.

Returns:

See Also:



1473
1474
1475
1476
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 1473

def list_pricing_rules(params = {}, options = {})
  req = build_request(:list_pricing_rules, params)
  req.send_request(options)
end

#list_pricing_rules_associated_to_pricing_plan(params = {}) ⇒ Types::ListPricingRulesAssociatedToPricingPlanOutput

Lists the pricing rules that are associated with a pricing plan.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_pricing_rules_associated_to_pricing_plan({
  billing_period: "BillingPeriod",
  pricing_plan_arn: "PricingPlanArn", # required
  max_results: 1,
  next_token: "Token",
})

Response structure


resp.billing_period #=> String
resp.pricing_plan_arn #=> String
resp.pricing_rule_arns #=> Array
resp.pricing_rule_arns[0] #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :billing_period (String)

    The billing period for which the pricing rule associations are to be listed.

  • :pricing_plan_arn (required, String)

    The Amazon Resource Name (ARN) of the pricing plan for which associations are to be listed.

  • :max_results (Integer)

    The optional maximum number of pricing rule associations to retrieve.

  • :next_token (String)

    The optional pagination token returned by a previous call.

Returns:

See Also:



1524
1525
1526
1527
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 1524

def list_pricing_rules_associated_to_pricing_plan(params = {}, options = {})
  req = build_request(:list_pricing_rules_associated_to_pricing_plan, params)
  req.send_request(options)
end

#list_resources_associated_to_custom_line_item(params = {}) ⇒ Types::ListResourcesAssociatedToCustomLineItemOutput

List the resources that are associated to a custom line item.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_resources_associated_to_custom_line_item({
  billing_period: "BillingPeriod",
  arn: "CustomLineItemArn", # required
  max_results: 1,
  next_token: "Token",
  filters: {
    relationship: "PARENT", # accepts PARENT, CHILD
  },
})

Response structure


resp.arn #=> String
resp.associated_resources #=> Array
resp.associated_resources[0].arn #=> String
resp.associated_resources[0].relationship #=> String, one of "PARENT", "CHILD"
resp.associated_resources[0].end_billing_period #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :billing_period (String)

    The billing period for which the resource associations will be listed.

  • :arn (required, String)

    The ARN of the custom line item for which the resource associations will be listed.

  • :max_results (Integer) — default: Optional

    The maximum number of resource associations to be retrieved.

  • :next_token (String) — default: Optional

    The pagination token that's returned by a previous request.

  • :filters (Types::ListResourcesAssociatedToCustomLineItemFilter) — default: Optional

    A ListResourcesAssociatedToCustomLineItemFilter that can specify the types of resources that should be retrieved.

Returns:

See Also:



1583
1584
1585
1586
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 1583

def list_resources_associated_to_custom_line_item(params = {}, options = {})
  req = build_request(:list_resources_associated_to_custom_line_item, params)
  req.send_request(options)
end

#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse

A list the tags for a resource.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "Arn", # required
})

Response structure


resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) that identifies the resource to list the tags.

Returns:

See Also:



1613
1614
1615
1616
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 1613

def list_tags_for_resource(params = {}, options = {})
  req = build_request(:list_tags_for_resource, params)
  req.send_request(options)
end

#tag_resource(params = {}) ⇒ Struct

Associates the specified tags to a resource with the specified resourceArn. If existing tags on a resource are not specified in the request parameters, they are not changed.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "Arn", # required
  tags: { # required
    "TagKey" => "TagValue",
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource to which to add tags.

  • :tags (required, Hash<String,String>)

    The tags to add to the resource as a list of key-value pairs.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1643
1644
1645
1646
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 1643

def tag_resource(params = {}, options = {})
  req = build_request(:tag_resource, params)
  req.send_request(options)
end

#untag_resource(params = {}) ⇒ Struct

Deletes specified tags from a resource.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  resource_arn: "Arn", # required
  tag_keys: ["TagKey"], # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource to which to delete tags.

  • :tag_keys (required, Array<String>)

    The tags to delete from the resource as a list of key-value pairs.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1670
1671
1672
1673
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 1670

def untag_resource(params = {}, options = {})
  req = build_request(:untag_resource, params)
  req.send_request(options)
end

#update_billing_group(params = {}) ⇒ Types::UpdateBillingGroupOutput

This updates an existing billing group.

Examples:

Request syntax with placeholder values


resp = client.update_billing_group({
  arn: "BillingGroupArn", # required
  name: "BillingGroupName",
  status: "ACTIVE", # accepts ACTIVE, PRIMARY_ACCOUNT_MISSING
  computation_preference: {
    pricing_plan_arn: "PricingPlanFullArn", # required
  },
  description: "BillingGroupDescription",
})

Response structure


resp.arn #=> String
resp.name #=> String
resp.description #=> String
resp. #=> String
resp.pricing_plan_arn #=> String
resp.size #=> Integer
resp.last_modified_time #=> Integer
resp.status #=> String, one of "ACTIVE", "PRIMARY_ACCOUNT_MISSING"
resp.status_reason #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :arn (required, String)

    The Amazon Resource Name (ARN) of the billing group being updated.

  • :name (String)

    The name of the billing group. The names must be unique to each billing group.

  • :status (String)

    The status of the billing group. Only one of the valid values can be used.

  • :computation_preference (Types::ComputationPreference)

    The preferences and settings that will be used to compute the Amazon Web Services charges for a billing group.

  • :description (String)

    A description of the billing group.

Returns:

See Also:



1735
1736
1737
1738
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 1735

def update_billing_group(params = {}, options = {})
  req = build_request(:update_billing_group, params)
  req.send_request(options)
end

#update_custom_line_item(params = {}) ⇒ Types::UpdateCustomLineItemOutput

Update an existing custom line item in the current or previous billing period.

Examples:

Request syntax with placeholder values


resp = client.update_custom_line_item({
  arn: "CustomLineItemArn", # required
  name: "CustomLineItemName",
  description: "CustomLineItemDescription",
  charge_details: {
    flat: {
      charge_value: 1.0, # required
    },
    percentage: {
      percentage_value: 1.0, # required
    },
  },
  billing_period_range: {
    inclusive_start_billing_period: "BillingPeriod", # required
    exclusive_end_billing_period: "BillingPeriod",
  },
})

Response structure


resp.arn #=> String
resp.billing_group_arn #=> String
resp.name #=> String
resp.description #=> String
resp.charge_details.flat.charge_value #=> Float
resp.charge_details.percentage.percentage_value #=> Float
resp.charge_details.type #=> String, one of "CREDIT", "FEE"
resp.last_modified_time #=> Integer
resp.association_size #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :arn (required, String)

    The ARN of the custom line item to be updated.

  • :name (String)

    The new name for the custom line item.

  • :description (String)

    The new line item description of the custom line item.

  • :charge_details (Types::UpdateCustomLineItemChargeDetails)

    A ListCustomLineItemChargeDetails containing the new charge details for the custom line item.

  • :billing_period_range (Types::CustomLineItemBillingPeriodRange)

    The billing period range in which the custom line item request will be applied.

Returns:

See Also:



1806
1807
1808
1809
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 1806

def update_custom_line_item(params = {}, options = {})
  req = build_request(:update_custom_line_item, params)
  req.send_request(options)
end

#update_pricing_plan(params = {}) ⇒ Types::UpdatePricingPlanOutput

This updates an existing pricing plan.

Examples:

Request syntax with placeholder values


resp = client.update_pricing_plan({
  arn: "PricingPlanArn", # required
  name: "PricingPlanName",
  description: "PricingPlanDescription",
})

Response structure


resp.arn #=> String
resp.name #=> String
resp.description #=> String
resp.size #=> Integer
resp.last_modified_time #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :arn (required, String)

    The Amazon Resource Name (ARN) of the pricing plan that you're updating.

  • :name (String)

    The name of the pricing plan. The name must be unique to each pricing plan.

  • :description (String)

    The description of the pricing plan.

Returns:

See Also:



1852
1853
1854
1855
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 1852

def update_pricing_plan(params = {}, options = {})
  req = build_request(:update_pricing_plan, params)
  req.send_request(options)
end

#update_pricing_rule(params = {}) ⇒ Types::UpdatePricingRuleOutput

Updates an existing pricing rule.

Examples:

Request syntax with placeholder values


resp = client.update_pricing_rule({
  arn: "PricingRuleArn", # required
  name: "PricingRuleName",
  description: "PricingRuleDescription",
  type: "MARKUP", # accepts MARKUP, DISCOUNT
  modifier_percentage: 1.0,
})

Response structure


resp.arn #=> String
resp.name #=> String
resp.description #=> String
resp.scope #=> String, one of "GLOBAL", "SERVICE", "BILLING_ENTITY"
resp.type #=> String, one of "MARKUP", "DISCOUNT"
resp.modifier_percentage #=> Float
resp.service #=> String
resp.associated_pricing_plan_count #=> Integer
resp.last_modified_time #=> Integer
resp.billing_entity #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :arn (required, String)

    The Amazon Resource Name (ARN) of the pricing rule to update.

  • :name (String)

    The new name of the pricing rule. The name must be unique to each pricing rule.

  • :description (String)

    The new description for the pricing rule.

  • :type (String)

    The new pricing rule type.

  • :modifier_percentage (Float)

    The new modifier to show pricing plan rates as a percentage.

Returns:

See Also:



1915
1916
1917
1918
# File 'gems/aws-sdk-billingconductor/lib/aws-sdk-billingconductor/client.rb', line 1915

def update_pricing_rule(params = {}, options = {})
  req = build_request(:update_pricing_rule, params)
  req.send_request(options)
end