pulumi/tests/testdata/codegen/simplified-invokes/docs/abs/_index.md

15 KiB


title: "Abs" title_tag: "std.Abs" meta_desc: "Documentation for the std.Abs function with examples, input properties, output properties, and supporting types." layout: api no_edit_this_page: true

Returns the absolute value of a given float. Example: abs(1) returns 1, and abs(-1) would also return 1, whereas abs(-3.14) would return 3.14.

Using Abs

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 abs(args: AbsArgs, opts?: InvokeOptions): Promise<AbsResult>
function absOutput(args: AbsOutputArgs, opts?: InvokeOptions): Output<AbsResult>
def abs(a: Optional[float] = None,
        b: Optional[float] = None,
        opts: Optional[InvokeOptions] = None) -> AbsResult
def abs_output(a: Optional[pulumi.Input[float]] = None,
        b: Optional[pulumi.Input[float]] = None,
        opts: Optional[InvokeOptions] = None) -> Output[AbsResult]
func Abs(ctx *Context, args *AbsArgs, opts ...InvokeOption) (*AbsResult, error)
func AbsOutput(ctx *Context, args *AbsOutputArgs, opts ...InvokeOption) AbsResultOutput
public static class Abs 
{
    public static Task<AbsResult> InvokeAsync(AbsArgs args, InvokeOptions? opts = null)
    public static Output<AbsResult> Invoke(AbsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<AbsResult> abs(AbsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: std:Abs
  arguments:
    # arguments dictionary

The following arguments are supported:

A double
B double
A float64
B float64
a Double
b Double
a number
b number
a float
b float
a Number
b Number

Abs Result

The following output properties are available:

Result double
Result float64
result Double
result number
result float
result Number

Package Details

Repository
std pulumi/pulumi-std
License