
com.pulumi.aws.iam.outputs.GetRoleResult Maven / Gradle / Ivy
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.iam.outputs;
import com.pulumi.aws.iam.outputs.GetRoleRoleLastUsed;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@CustomType
public final class GetRoleResult {
/**
* @return ARN of the role.
*
*/
private String arn;
/**
* @return Policy document associated with the role.
*
*/
private String assumeRolePolicy;
/**
* @return Creation date of the role in RFC 3339 format.
*
*/
private String createDate;
/**
* @return Description for the role.
*
*/
private String description;
/**
* @return The provider-assigned unique ID for this managed resource.
*
*/
private String id;
/**
* @return Maximum session duration.
*
*/
private Integer maxSessionDuration;
private String name;
/**
* @return Path to the role.
*
*/
private String path;
/**
* @return The ARN of the policy that is used to set the permissions boundary for the role.
*
*/
private String permissionsBoundary;
/**
* @return Contains information about the last time that an IAM role was used. See `role_last_used` for details.
*
*/
private List roleLastUseds;
/**
* @return Tags attached to the role.
*
*/
private Map tags;
/**
* @return Stable and unique string identifying the role.
*
*/
private String uniqueId;
private GetRoleResult() {}
/**
* @return ARN of the role.
*
*/
public String arn() {
return this.arn;
}
/**
* @return Policy document associated with the role.
*
*/
public String assumeRolePolicy() {
return this.assumeRolePolicy;
}
/**
* @return Creation date of the role in RFC 3339 format.
*
*/
public String createDate() {
return this.createDate;
}
/**
* @return Description for the role.
*
*/
public String description() {
return this.description;
}
/**
* @return The provider-assigned unique ID for this managed resource.
*
*/
public String id() {
return this.id;
}
/**
* @return Maximum session duration.
*
*/
public Integer maxSessionDuration() {
return this.maxSessionDuration;
}
public String name() {
return this.name;
}
/**
* @return Path to the role.
*
*/
public String path() {
return this.path;
}
/**
* @return The ARN of the policy that is used to set the permissions boundary for the role.
*
*/
public String permissionsBoundary() {
return this.permissionsBoundary;
}
/**
* @return Contains information about the last time that an IAM role was used. See `role_last_used` for details.
*
*/
public List roleLastUseds() {
return this.roleLastUseds;
}
/**
* @return Tags attached to the role.
*
*/
public Map tags() {
return this.tags;
}
/**
* @return Stable and unique string identifying the role.
*
*/
public String uniqueId() {
return this.uniqueId;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(GetRoleResult defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private String arn;
private String assumeRolePolicy;
private String createDate;
private String description;
private String id;
private Integer maxSessionDuration;
private String name;
private String path;
private String permissionsBoundary;
private List roleLastUseds;
private Map tags;
private String uniqueId;
public Builder() {}
public Builder(GetRoleResult defaults) {
Objects.requireNonNull(defaults);
this.arn = defaults.arn;
this.assumeRolePolicy = defaults.assumeRolePolicy;
this.createDate = defaults.createDate;
this.description = defaults.description;
this.id = defaults.id;
this.maxSessionDuration = defaults.maxSessionDuration;
this.name = defaults.name;
this.path = defaults.path;
this.permissionsBoundary = defaults.permissionsBoundary;
this.roleLastUseds = defaults.roleLastUseds;
this.tags = defaults.tags;
this.uniqueId = defaults.uniqueId;
}
@CustomType.Setter
public Builder arn(String arn) {
if (arn == null) {
throw new MissingRequiredPropertyException("GetRoleResult", "arn");
}
this.arn = arn;
return this;
}
@CustomType.Setter
public Builder assumeRolePolicy(String assumeRolePolicy) {
if (assumeRolePolicy == null) {
throw new MissingRequiredPropertyException("GetRoleResult", "assumeRolePolicy");
}
this.assumeRolePolicy = assumeRolePolicy;
return this;
}
@CustomType.Setter
public Builder createDate(String createDate) {
if (createDate == null) {
throw new MissingRequiredPropertyException("GetRoleResult", "createDate");
}
this.createDate = createDate;
return this;
}
@CustomType.Setter
public Builder description(String description) {
if (description == null) {
throw new MissingRequiredPropertyException("GetRoleResult", "description");
}
this.description = description;
return this;
}
@CustomType.Setter
public Builder id(String id) {
if (id == null) {
throw new MissingRequiredPropertyException("GetRoleResult", "id");
}
this.id = id;
return this;
}
@CustomType.Setter
public Builder maxSessionDuration(Integer maxSessionDuration) {
if (maxSessionDuration == null) {
throw new MissingRequiredPropertyException("GetRoleResult", "maxSessionDuration");
}
this.maxSessionDuration = maxSessionDuration;
return this;
}
@CustomType.Setter
public Builder name(String name) {
if (name == null) {
throw new MissingRequiredPropertyException("GetRoleResult", "name");
}
this.name = name;
return this;
}
@CustomType.Setter
public Builder path(String path) {
if (path == null) {
throw new MissingRequiredPropertyException("GetRoleResult", "path");
}
this.path = path;
return this;
}
@CustomType.Setter
public Builder permissionsBoundary(String permissionsBoundary) {
if (permissionsBoundary == null) {
throw new MissingRequiredPropertyException("GetRoleResult", "permissionsBoundary");
}
this.permissionsBoundary = permissionsBoundary;
return this;
}
@CustomType.Setter
public Builder roleLastUseds(List roleLastUseds) {
if (roleLastUseds == null) {
throw new MissingRequiredPropertyException("GetRoleResult", "roleLastUseds");
}
this.roleLastUseds = roleLastUseds;
return this;
}
public Builder roleLastUseds(GetRoleRoleLastUsed... roleLastUseds) {
return roleLastUseds(List.of(roleLastUseds));
}
@CustomType.Setter
public Builder tags(Map tags) {
if (tags == null) {
throw new MissingRequiredPropertyException("GetRoleResult", "tags");
}
this.tags = tags;
return this;
}
@CustomType.Setter
public Builder uniqueId(String uniqueId) {
if (uniqueId == null) {
throw new MissingRequiredPropertyException("GetRoleResult", "uniqueId");
}
this.uniqueId = uniqueId;
return this;
}
public GetRoleResult build() {
final var _resultValue = new GetRoleResult();
_resultValue.arn = arn;
_resultValue.assumeRolePolicy = assumeRolePolicy;
_resultValue.createDate = createDate;
_resultValue.description = description;
_resultValue.id = id;
_resultValue.maxSessionDuration = maxSessionDuration;
_resultValue.name = name;
_resultValue.path = path;
_resultValue.permissionsBoundary = permissionsBoundary;
_resultValue.roleLastUseds = roleLastUseds;
_resultValue.tags = tags;
_resultValue.uniqueId = uniqueId;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy