get License Grants
This resource can be used to get a set of license grant ARNs matching a filter.
Example Usage
The following shows getting all license grant ARNs granted to your account.
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.AwsFunctions;
import com.pulumi.aws.licensemanager.LicensemanagerFunctions;
import com.pulumi.aws.licensemanager.inputs.GetLicenseGrantsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var current = AwsFunctions.getCallerIdentity();
final var test = LicensemanagerFunctions.getLicenseGrants(GetLicenseGrantsArgs.builder()
.filters(GetLicenseGrantsFilterArgs.builder()
.name("GranteePrincipalARN")
.values(String.format("arn:aws:iam::%s:root", current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId())))
.build())
.build());
}
}
Content copied to clipboard
Return
A collection of values returned by getLicenseGrants.
Parameters
argument
A collection of arguments for invoking getLicenseGrants.
Return
A collection of values returned by getLicenseGrants.
Parameters
filters
Custom filter block as described below. More complex filters can be expressed using one or more filter
sub-blocks, which take the following arguments:
See also
suspend fun getLicenseGrants(argument: suspend GetLicenseGrantsPlainArgsBuilder.() -> Unit): GetLicenseGrantsResult
Return
A collection of values returned by getLicenseGrants.
Parameters
argument
Builder for com.pulumi.aws.licensemanager.kotlin.inputs.GetLicenseGrantsPlainArgs.