from sailpoint.v3.models.sub_search_aggregation_specification import SubSearchAggregationSpecification
sub_search_aggregation_specification = SubSearchAggregationSpecification(
nested=sailpoint.v3.models.nested_aggregation.NestedAggregation(
name = 'id',
type = 'access', ),
metric=sailpoint.v3.models.metric_aggregation.MetricAggregation(
name = 'Access Name Count',
type = 'UNIQUE_COUNT',
field = '@access.name', ),
filter=sailpoint.v3.models.filter_aggregation.FilterAggregation(
name = 'Entitlements',
type = 'TERM',
field = 'access.type',
value = 'ENTITLEMENT', ),
bucket=sailpoint.v3.models.bucket_aggregation.BucketAggregation(
name = 'Identity Locations',
type = 'TERMS',
field = 'attributes.city',
size = 100,
min_doc_count = 2, ),
sub_aggregation=sailpoint.v3.models.aggregations.Aggregations(
nested = sailpoint.v3.models.nested_aggregation.NestedAggregation(
name = 'id',
type = 'access', ),
metric = sailpoint.v3.models.metric_aggregation.MetricAggregation(
name = 'Access Name Count',
type = 'UNIQUE_COUNT',
field = '@access.name', ),
filter = sailpoint.v3.models.filter_aggregation.FilterAggregation(
name = 'Entitlements',
field = 'access.type',
value = 'ENTITLEMENT', ),
bucket = sailpoint.v3.models.bucket_aggregation.BucketAggregation(
name = 'Identity Locations',
field = 'attributes.city',
size = 100,
min_doc_count = 2, ), )
)