port.Scorecard
Explore with Pulumi AI
This resource allows you to manage a scorecard.
See the Port documentation for more information about scorecards.
Example Usage
This will create a blueprint with a Scorecard measuring the readiness of a microservice.
import * as pulumi from "@pulumi/pulumi";
import * as port from "@pulumi/port";
const microservice = new port.index.Port_blueprint("microservice", {
title: "microservice",
icon: "Terraform",
identifier: "microservice",
properties: {
stringProps: {
author: {
title: "Author",
},
url: {
title: "URL",
},
},
booleanProps: {
required: {
type: "boolean",
},
},
numberProps: {
sum: {
type: "number",
},
},
},
});
const readiness = new port.index.Port_scorecard("readiness", {
identifier: "Readiness",
title: "Readiness",
blueprint: microservice.identifier,
rules: [
{
identifier: "hasOwner",
title: "Has Owner",
level: "Gold",
query: {
combinator: "and",
conditions: [
JSON.stringify({
property: "$team",
operator: "isNotEmpty",
}),
JSON.stringify({
property: "author",
operator: "=",
value: "myValue",
}),
],
},
},
{
identifier: "hasUrl",
title: "Has URL",
level: "Silver",
query: {
combinator: "and",
conditions: [JSON.stringify({
property: "url",
operator: "isNotEmpty",
})],
},
},
{
identifier: "checkSumIfRequired",
title: "Check Sum If Required",
level: "Bronze",
query: {
combinator: "or",
conditions: [
JSON.stringify({
property: "required",
operator: "=",
value: false,
}),
JSON.stringify({
property: "sum",
operator: ">",
value: 2,
}),
],
},
},
],
}, {
dependsOn: [microservice],
});
import pulumi
import json
import pulumi_port as port
microservice = port.index.Port_blueprint("microservice",
title=microservice,
icon=Terraform,
identifier=microservice,
properties={
stringProps: {
author: {
title: Author,
},
url: {
title: URL,
},
},
booleanProps: {
required: {
type: boolean,
},
},
numberProps: {
sum: {
type: number,
},
},
})
readiness = port.index.Port_scorecard("readiness",
identifier=Readiness,
title=Readiness,
blueprint=microservice.identifier,
rules=[
{
identifier: hasOwner,
title: Has Owner,
level: Gold,
query: {
combinator: and,
conditions: [
json.dumps({
property: $team,
operator: isNotEmpty,
}),
json.dumps({
property: author,
operator: =,
value: myValue,
}),
],
},
},
{
identifier: hasUrl,
title: Has URL,
level: Silver,
query: {
combinator: and,
conditions: [json.dumps({
property: url,
operator: isNotEmpty,
})],
},
},
{
identifier: checkSumIfRequired,
title: Check Sum If Required,
level: Bronze,
query: {
combinator: or,
conditions: [
json.dumps({
property: required,
operator: =,
value: False,
}),
json.dumps({
property: sum,
operator: >,
value: 2,
}),
],
},
},
],
opts = pulumi.ResourceOptions(depends_on=[microservice]))
package main
import (
"encoding/json"
"github.com/port-labs/pulumi-port/sdk/v2/go/port"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
microservice, err := port.NewPort_blueprint(ctx, "microservice", &port.Port_blueprintArgs{
Title: "microservice",
Icon: "Terraform",
Identifier: "microservice",
Properties: map[string]interface{}{
"stringProps": map[string]interface{}{
"author": map[string]interface{}{
"title": "Author",
},
"url": map[string]interface{}{
"title": "URL",
},
},
"booleanProps": map[string]interface{}{
"required": map[string]interface{}{
"type": "boolean",
},
},
"numberProps": map[string]interface{}{
"sum": map[string]interface{}{
"type": "number",
},
},
},
})
if err != nil {
return err
}
_, err = port.NewPort_scorecard(ctx, "readiness", &port.Port_scorecardArgs{
Identifier: "Readiness",
Title: "Readiness",
Blueprint: microservice.Identifier,
Rules: []interface{}{
map[string]interface{}{
"identifier": "hasOwner",
"title": "Has Owner",
"level": "Gold",
"query": map[string]interface{}{
"combinator": "and",
"conditions": []string{
%!v(PANIC=Format method: fatal: An assertion has failed: unlowered function toJSON),
%!v(PANIC=Format method: fatal: An assertion has failed: unlowered function toJSON),
},
},
},
map[string]interface{}{
"identifier": "hasUrl",
"title": "Has URL",
"level": "Silver",
"query": map[string]interface{}{
"combinator": "and",
"conditions": []string{
%!v(PANIC=Format method: fatal: An assertion has failed: unlowered function toJSON),
},
},
},
map[string]interface{}{
"identifier": "checkSumIfRequired",
"title": "Check Sum If Required",
"level": "Bronze",
"query": map[string]interface{}{
"combinator": "or",
"conditions": []string{
%!v(PANIC=Format method: fatal: An assertion has failed: unlowered function toJSON),
%!v(PANIC=Format method: fatal: An assertion has failed: unlowered function toJSON),
},
},
},
},
}, pulumi.DependsOn([]pulumi.Resource{
microservice,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Port = Pulumi.Port;
return await Deployment.RunAsync(() =>
{
var microservice = new Port.Index.Port_blueprint("microservice", new()
{
Title = "microservice",
Icon = "Terraform",
Identifier = "microservice",
Properties =
{
{ "stringProps",
{
{ "author",
{
{ "title", "Author" },
} },
{ "url",
{
{ "title", "URL" },
} },
} },
{ "booleanProps",
{
{ "required",
{
{ "type", "boolean" },
} },
} },
{ "numberProps",
{
{ "sum",
{
{ "type", "number" },
} },
} },
},
});
var readiness = new Port.Index.Port_scorecard("readiness", new()
{
Identifier = "Readiness",
Title = "Readiness",
Blueprint = microservice.Identifier,
Rules = new[]
{
{
{ "identifier", "hasOwner" },
{ "title", "Has Owner" },
{ "level", "Gold" },
{ "query",
{
{ "combinator", "and" },
{ "conditions", new[]
{
JsonSerializer.Serialize(new Dictionary<string, object?>
{
["property"] = "$team",
["operator"] = "isNotEmpty",
}),
JsonSerializer.Serialize(new Dictionary<string, object?>
{
["property"] = "author",
["operator"] = "=",
["value"] = "myValue",
}),
} },
} },
},
{
{ "identifier", "hasUrl" },
{ "title", "Has URL" },
{ "level", "Silver" },
{ "query",
{
{ "combinator", "and" },
{ "conditions", new[]
{
JsonSerializer.Serialize(new Dictionary<string, object?>
{
["property"] = "url",
["operator"] = "isNotEmpty",
}),
} },
} },
},
{
{ "identifier", "checkSumIfRequired" },
{ "title", "Check Sum If Required" },
{ "level", "Bronze" },
{ "query",
{
{ "combinator", "or" },
{ "conditions", new[]
{
JsonSerializer.Serialize(new Dictionary<string, object?>
{
["property"] = "required",
["operator"] = "=",
["value"] = false,
}),
JsonSerializer.Serialize(new Dictionary<string, object?>
{
["property"] = "sum",
["operator"] = ">",
["value"] = 2,
}),
} },
} },
},
},
}, new CustomResourceOptions
{
DependsOn =
{
microservice,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.port.port_blueprint;
import com.pulumi.port.Port_blueprintArgs;
import com.pulumi.port.port_scorecard;
import com.pulumi.port.Port_scorecardArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import com.pulumi.resources.CustomResourceOptions;
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) {
var microservice = new Port_blueprint("microservice", Port_blueprintArgs.builder()
.title("microservice")
.icon("Terraform")
.identifier("microservice")
.properties(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build());
var readiness = new Port_scorecard("readiness", Port_scorecardArgs.builder()
.identifier("Readiness")
.title("Readiness")
.blueprint(microservice.identifier())
.rules(
%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build(), CustomResourceOptions.builder()
.dependsOn(microservice)
.build());
}
}
resources:
microservice:
type: port:port_blueprint
properties:
title: microservice
icon: Terraform
identifier: microservice
properties:
stringProps:
author:
title: Author
url:
title: URL
booleanProps:
required:
type: boolean
numberProps:
sum:
type: number
readiness:
type: port:port_scorecard
properties:
identifier: Readiness
title: Readiness
blueprint: ${microservice.identifier}
rules:
- identifier: hasOwner
title: Has Owner
level: Gold
query:
combinator: and
conditions:
- fn::toJSON:
property: $team
operator: isNotEmpty
- fn::toJSON:
property: author
operator: =
value: myValue
- identifier: hasUrl
title: Has URL
level: Silver
query:
combinator: and
conditions:
- fn::toJSON:
property: url
operator: isNotEmpty
- identifier: checkSumIfRequired
title: Check Sum If Required
level: Bronze
query:
combinator: or
conditions:
- fn::toJSON:
property: required
operator: =
value: false
- fn::toJSON:
property: sum
operator: '>'
value: 2
options:
dependsOn:
- ${microservice}
With Levels And Filter
This will override the default levels (Basic, Bronze, Silver, Gold) with the provided levels: Not Ready, Partially Ready, Ready.
import * as pulumi from "@pulumi/pulumi";
import * as port from "@pulumi/port";
const microservice = new port.index.Port_blueprint("microservice", {
title: "microservice",
icon: "Terraform",
identifier: "microservice",
properties: {
stringProps: {
author: {
title: "Author",
},
url: {
title: "URL",
},
},
booleanProps: {
required: {
type: "boolean",
},
},
numberProps: {
sum: {
type: "number",
},
},
},
});
const readiness = new port.index.Port_scorecard("readiness", {
identifier: "Readiness",
title: "Readiness",
blueprint: microservice.identifier,
filter: {
combinator: "and",
conditions: [JSON.stringify({
property: "sum",
operator: ">",
value: 0,
})],
},
levels: [
{
color: "red",
title: "No Ready",
},
{
color: "yellow",
title: "Partially Ready",
},
{
color: "green",
title: "Ready",
},
],
rules: [
{
identifier: "hasOwner",
title: "Has Owner",
level: "Ready",
query: {
combinator: "and",
conditions: [
JSON.stringify({
property: "$team",
operator: "isNotEmpty",
}),
JSON.stringify({
property: "author",
operator: "=",
value: "myValue",
}),
],
},
},
{
identifier: "hasUrl",
title: "Has URL",
level: "Partially Ready",
query: {
combinator: "and",
conditions: [JSON.stringify({
property: "url",
operator: "isNotEmpty",
})],
},
},
{
identifier: "checkSumIfRequired",
title: "Check Sum If Required",
level: "Partially Ready",
query: {
combinator: "or",
conditions: [
JSON.stringify({
property: "required",
operator: "=",
value: false,
}),
JSON.stringify({
property: "sum",
operator: ">",
value: 2,
}),
],
},
},
],
}, {
dependsOn: [microservice],
});
import pulumi
import json
import pulumi_port as port
microservice = port.index.Port_blueprint("microservice",
title=microservice,
icon=Terraform,
identifier=microservice,
properties={
stringProps: {
author: {
title: Author,
},
url: {
title: URL,
},
},
booleanProps: {
required: {
type: boolean,
},
},
numberProps: {
sum: {
type: number,
},
},
})
readiness = port.index.Port_scorecard("readiness",
identifier=Readiness,
title=Readiness,
blueprint=microservice.identifier,
filter={
combinator: and,
conditions: [json.dumps({
property: sum,
operator: >,
value: 0,
})],
},
levels=[
{
color: red,
title: No Ready,
},
{
color: yellow,
title: Partially Ready,
},
{
color: green,
title: Ready,
},
],
rules=[
{
identifier: hasOwner,
title: Has Owner,
level: Ready,
query: {
combinator: and,
conditions: [
json.dumps({
property: $team,
operator: isNotEmpty,
}),
json.dumps({
property: author,
operator: =,
value: myValue,
}),
],
},
},
{
identifier: hasUrl,
title: Has URL,
level: Partially Ready,
query: {
combinator: and,
conditions: [json.dumps({
property: url,
operator: isNotEmpty,
})],
},
},
{
identifier: checkSumIfRequired,
title: Check Sum If Required,
level: Partially Ready,
query: {
combinator: or,
conditions: [
json.dumps({
property: required,
operator: =,
value: False,
}),
json.dumps({
property: sum,
operator: >,
value: 2,
}),
],
},
},
],
opts = pulumi.ResourceOptions(depends_on=[microservice]))
package main
import (
"encoding/json"
"github.com/port-labs/pulumi-port/sdk/v2/go/port"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
microservice, err := port.NewPort_blueprint(ctx, "microservice", &port.Port_blueprintArgs{
Title: "microservice",
Icon: "Terraform",
Identifier: "microservice",
Properties: map[string]interface{}{
"stringProps": map[string]interface{}{
"author": map[string]interface{}{
"title": "Author",
},
"url": map[string]interface{}{
"title": "URL",
},
},
"booleanProps": map[string]interface{}{
"required": map[string]interface{}{
"type": "boolean",
},
},
"numberProps": map[string]interface{}{
"sum": map[string]interface{}{
"type": "number",
},
},
},
})
if err != nil {
return err
}
_, err = port.NewPort_scorecard(ctx, "readiness", &port.Port_scorecardArgs{
Identifier: "Readiness",
Title: "Readiness",
Blueprint: microservice.Identifier,
Filter: map[string]interface{}{
"combinator": "and",
"conditions": []string{
%!v(PANIC=Format method: fatal: An assertion has failed: unlowered function toJSON),
},
},
Levels: []map[string]interface{}{
map[string]interface{}{
"color": "red",
"title": "No Ready",
},
map[string]interface{}{
"color": "yellow",
"title": "Partially Ready",
},
map[string]interface{}{
"color": "green",
"title": "Ready",
},
},
Rules: []interface{}{
map[string]interface{}{
"identifier": "hasOwner",
"title": "Has Owner",
"level": "Ready",
"query": map[string]interface{}{
"combinator": "and",
"conditions": []string{
%!v(PANIC=Format method: fatal: An assertion has failed: unlowered function toJSON),
%!v(PANIC=Format method: fatal: An assertion has failed: unlowered function toJSON),
},
},
},
map[string]interface{}{
"identifier": "hasUrl",
"title": "Has URL",
"level": "Partially Ready",
"query": map[string]interface{}{
"combinator": "and",
"conditions": []string{
%!v(PANIC=Format method: fatal: An assertion has failed: unlowered function toJSON),
},
},
},
map[string]interface{}{
"identifier": "checkSumIfRequired",
"title": "Check Sum If Required",
"level": "Partially Ready",
"query": map[string]interface{}{
"combinator": "or",
"conditions": []string{
%!v(PANIC=Format method: fatal: An assertion has failed: unlowered function toJSON),
%!v(PANIC=Format method: fatal: An assertion has failed: unlowered function toJSON),
},
},
},
},
}, pulumi.DependsOn([]pulumi.Resource{
microservice,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Port = Pulumi.Port;
return await Deployment.RunAsync(() =>
{
var microservice = new Port.Index.Port_blueprint("microservice", new()
{
Title = "microservice",
Icon = "Terraform",
Identifier = "microservice",
Properties =
{
{ "stringProps",
{
{ "author",
{
{ "title", "Author" },
} },
{ "url",
{
{ "title", "URL" },
} },
} },
{ "booleanProps",
{
{ "required",
{
{ "type", "boolean" },
} },
} },
{ "numberProps",
{
{ "sum",
{
{ "type", "number" },
} },
} },
},
});
var readiness = new Port.Index.Port_scorecard("readiness", new()
{
Identifier = "Readiness",
Title = "Readiness",
Blueprint = microservice.Identifier,
Filter =
{
{ "combinator", "and" },
{ "conditions", new[]
{
JsonSerializer.Serialize(new Dictionary<string, object?>
{
["property"] = "sum",
["operator"] = ">",
["value"] = 0,
}),
} },
},
Levels = new[]
{
{
{ "color", "red" },
{ "title", "No Ready" },
},
{
{ "color", "yellow" },
{ "title", "Partially Ready" },
},
{
{ "color", "green" },
{ "title", "Ready" },
},
},
Rules = new[]
{
{
{ "identifier", "hasOwner" },
{ "title", "Has Owner" },
{ "level", "Ready" },
{ "query",
{
{ "combinator", "and" },
{ "conditions", new[]
{
JsonSerializer.Serialize(new Dictionary<string, object?>
{
["property"] = "$team",
["operator"] = "isNotEmpty",
}),
JsonSerializer.Serialize(new Dictionary<string, object?>
{
["property"] = "author",
["operator"] = "=",
["value"] = "myValue",
}),
} },
} },
},
{
{ "identifier", "hasUrl" },
{ "title", "Has URL" },
{ "level", "Partially Ready" },
{ "query",
{
{ "combinator", "and" },
{ "conditions", new[]
{
JsonSerializer.Serialize(new Dictionary<string, object?>
{
["property"] = "url",
["operator"] = "isNotEmpty",
}),
} },
} },
},
{
{ "identifier", "checkSumIfRequired" },
{ "title", "Check Sum If Required" },
{ "level", "Partially Ready" },
{ "query",
{
{ "combinator", "or" },
{ "conditions", new[]
{
JsonSerializer.Serialize(new Dictionary<string, object?>
{
["property"] = "required",
["operator"] = "=",
["value"] = false,
}),
JsonSerializer.Serialize(new Dictionary<string, object?>
{
["property"] = "sum",
["operator"] = ">",
["value"] = 2,
}),
} },
} },
},
},
}, new CustomResourceOptions
{
DependsOn =
{
microservice,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.port.port_blueprint;
import com.pulumi.port.Port_blueprintArgs;
import com.pulumi.port.port_scorecard;
import com.pulumi.port.Port_scorecardArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import com.pulumi.resources.CustomResourceOptions;
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) {
var microservice = new Port_blueprint("microservice", Port_blueprintArgs.builder()
.title("microservice")
.icon("Terraform")
.identifier("microservice")
.properties(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build());
var readiness = new Port_scorecard("readiness", Port_scorecardArgs.builder()
.identifier("Readiness")
.title("Readiness")
.blueprint(microservice.identifier())
.filter(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.levels(
%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.rules(
%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build(), CustomResourceOptions.builder()
.dependsOn(microservice)
.build());
}
}
resources:
microservice:
type: port:port_blueprint
properties:
title: microservice
icon: Terraform
identifier: microservice
properties:
stringProps:
author:
title: Author
url:
title: URL
booleanProps:
required:
type: boolean
numberProps:
sum:
type: number
readiness:
type: port:port_scorecard
properties:
identifier: Readiness
title: Readiness
blueprint: ${microservice.identifier}
filter:
combinator: and
conditions:
- fn::toJSON:
property: sum
operator: '>'
value: 0
levels:
- color: red
title: No Ready
- color: yellow
title: Partially Ready
- color: green
title: Ready
rules:
- identifier: hasOwner
title: Has Owner
level: Ready
query:
combinator: and
conditions:
- fn::toJSON:
property: $team
operator: isNotEmpty
- fn::toJSON:
property: author
operator: =
value: myValue
- identifier: hasUrl
title: Has URL
level: Partially Ready
query:
combinator: and
conditions:
- fn::toJSON:
property: url
operator: isNotEmpty
- identifier: checkSumIfRequired
title: Check Sum If Required
level: Partially Ready
query:
combinator: or
conditions:
- fn::toJSON:
property: required
operator: =
value: false
- fn::toJSON:
property: sum
operator: '>'
value: 2
options:
dependsOn:
- ${microservice}
Create Scorecard Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Scorecard(name: string, args: ScorecardArgs, opts?: CustomResourceOptions);
@overload
def Scorecard(resource_name: str,
args: ScorecardArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Scorecard(resource_name: str,
opts: Optional[ResourceOptions] = None,
blueprint: Optional[str] = None,
identifier: Optional[str] = None,
rules: Optional[Sequence[ScorecardRuleArgs]] = None,
title: Optional[str] = None,
filter: Optional[ScorecardFilterArgs] = None,
levels: Optional[Sequence[ScorecardLevelArgs]] = None)
func NewScorecard(ctx *Context, name string, args ScorecardArgs, opts ...ResourceOption) (*Scorecard, error)
public Scorecard(string name, ScorecardArgs args, CustomResourceOptions? opts = null)
public Scorecard(String name, ScorecardArgs args)
public Scorecard(String name, ScorecardArgs args, CustomResourceOptions options)
type: port:Scorecard
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name
This property is required. string - The unique name of the resource.
- args
This property is required. ScorecardArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. ScorecardArgs - The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. ScorecardArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. ScorecardArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. ScorecardArgs - The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var scorecardResource = new Port.Scorecard("scorecardResource", new()
{
Blueprint = "string",
Identifier = "string",
Rules = new[]
{
new Port.Inputs.ScorecardRuleArgs
{
Identifier = "string",
Level = "string",
Query = new Port.Inputs.ScorecardRuleQueryArgs
{
Combinator = "string",
Conditions = new[]
{
"string",
},
},
Title = "string",
Description = "string",
},
},
Title = "string",
Filter = new Port.Inputs.ScorecardFilterArgs
{
Combinator = "string",
Conditions = new[]
{
"string",
},
},
Levels = new[]
{
new Port.Inputs.ScorecardLevelArgs
{
Color = "string",
Title = "string",
},
},
});
example, err := port.NewScorecard(ctx, "scorecardResource", &port.ScorecardArgs{
Blueprint: pulumi.String("string"),
Identifier: pulumi.String("string"),
Rules: port.ScorecardRuleArray{
&port.ScorecardRuleArgs{
Identifier: pulumi.String("string"),
Level: pulumi.String("string"),
Query: &port.ScorecardRuleQueryArgs{
Combinator: pulumi.String("string"),
Conditions: pulumi.StringArray{
pulumi.String("string"),
},
},
Title: pulumi.String("string"),
Description: pulumi.String("string"),
},
},
Title: pulumi.String("string"),
Filter: &port.ScorecardFilterArgs{
Combinator: pulumi.String("string"),
Conditions: pulumi.StringArray{
pulumi.String("string"),
},
},
Levels: port.ScorecardLevelArray{
&port.ScorecardLevelArgs{
Color: pulumi.String("string"),
Title: pulumi.String("string"),
},
},
})
var scorecardResource = new Scorecard("scorecardResource", ScorecardArgs.builder()
.blueprint("string")
.identifier("string")
.rules(ScorecardRuleArgs.builder()
.identifier("string")
.level("string")
.query(ScorecardRuleQueryArgs.builder()
.combinator("string")
.conditions("string")
.build())
.title("string")
.description("string")
.build())
.title("string")
.filter(ScorecardFilterArgs.builder()
.combinator("string")
.conditions("string")
.build())
.levels(ScorecardLevelArgs.builder()
.color("string")
.title("string")
.build())
.build());
scorecard_resource = port.Scorecard("scorecardResource",
blueprint="string",
identifier="string",
rules=[{
"identifier": "string",
"level": "string",
"query": {
"combinator": "string",
"conditions": ["string"],
},
"title": "string",
"description": "string",
}],
title="string",
filter={
"combinator": "string",
"conditions": ["string"],
},
levels=[{
"color": "string",
"title": "string",
}])
const scorecardResource = new port.Scorecard("scorecardResource", {
blueprint: "string",
identifier: "string",
rules: [{
identifier: "string",
level: "string",
query: {
combinator: "string",
conditions: ["string"],
},
title: "string",
description: "string",
}],
title: "string",
filter: {
combinator: "string",
conditions: ["string"],
},
levels: [{
color: "string",
title: "string",
}],
});
type: port:Scorecard
properties:
blueprint: string
filter:
combinator: string
conditions:
- string
identifier: string
levels:
- color: string
title: string
rules:
- description: string
identifier: string
level: string
query:
combinator: string
conditions:
- string
title: string
title: string
Scorecard Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Scorecard resource accepts the following input properties:
- Blueprint
This property is required. string - The blueprint of the scorecard
- Identifier
This property is required. string - The identifier of the scorecard
- Rules
This property is required. List<port_labs. Port. Inputs. Scorecard Rule> - The rules of the scorecard
- Title
This property is required. string - The title of the scorecard
- Filter
port_
labs. Port. Inputs. Scorecard Filter - The filter to apply on the entities before calculating the scorecard
- Levels
List<port_
labs. Port. Inputs. Scorecard Level> - The levels of the scorecard. This overrides the default levels (Basic, Bronze, Silver, Gold) if provided
- Blueprint
This property is required. string - The blueprint of the scorecard
- Identifier
This property is required. string - The identifier of the scorecard
- Rules
This property is required. []ScorecardRule Args - The rules of the scorecard
- Title
This property is required. string - The title of the scorecard
- Filter
Scorecard
Filter Args - The filter to apply on the entities before calculating the scorecard
- Levels
[]Scorecard
Level Args - The levels of the scorecard. This overrides the default levels (Basic, Bronze, Silver, Gold) if provided
- blueprint
This property is required. String - The blueprint of the scorecard
- identifier
This property is required. String - The identifier of the scorecard
- rules
This property is required. List<ScorecardRule> - The rules of the scorecard
- title
This property is required. String - The title of the scorecard
- filter
Scorecard
Filter - The filter to apply on the entities before calculating the scorecard
- levels
List<Scorecard
Level> - The levels of the scorecard. This overrides the default levels (Basic, Bronze, Silver, Gold) if provided
- blueprint
This property is required. string - The blueprint of the scorecard
- identifier
This property is required. string - The identifier of the scorecard
- rules
This property is required. ScorecardRule[] - The rules of the scorecard
- title
This property is required. string - The title of the scorecard
- filter
Scorecard
Filter - The filter to apply on the entities before calculating the scorecard
- levels
Scorecard
Level[] - The levels of the scorecard. This overrides the default levels (Basic, Bronze, Silver, Gold) if provided
- blueprint
This property is required. str - The blueprint of the scorecard
- identifier
This property is required. str - The identifier of the scorecard
- rules
This property is required. Sequence[ScorecardRule Args] - The rules of the scorecard
- title
This property is required. str - The title of the scorecard
- filter
Scorecard
Filter Args - The filter to apply on the entities before calculating the scorecard
- levels
Sequence[Scorecard
Level Args] - The levels of the scorecard. This overrides the default levels (Basic, Bronze, Silver, Gold) if provided
- blueprint
This property is required. String - The blueprint of the scorecard
- identifier
This property is required. String - The identifier of the scorecard
- rules
This property is required. List<Property Map> - The rules of the scorecard
- title
This property is required. String - The title of the scorecard
- filter Property Map
- The filter to apply on the entities before calculating the scorecard
- levels List<Property Map>
- The levels of the scorecard. This overrides the default levels (Basic, Bronze, Silver, Gold) if provided
Outputs
All input properties are implicitly available as output properties. Additionally, the Scorecard resource produces the following output properties:
- created_
at str - The creation date of the scorecard
- created_
by str - The creator of the scorecard
- id str
- The provider-assigned unique ID for this managed resource.
- updated_
at str - The last update date of the scorecard
- updated_
by str - The last updater of the scorecard
Look up Existing Scorecard Resource
Get an existing Scorecard resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ScorecardState, opts?: CustomResourceOptions): Scorecard
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
blueprint: Optional[str] = None,
created_at: Optional[str] = None,
created_by: Optional[str] = None,
filter: Optional[ScorecardFilterArgs] = None,
identifier: Optional[str] = None,
levels: Optional[Sequence[ScorecardLevelArgs]] = None,
rules: Optional[Sequence[ScorecardRuleArgs]] = None,
title: Optional[str] = None,
updated_at: Optional[str] = None,
updated_by: Optional[str] = None) -> Scorecard
func GetScorecard(ctx *Context, name string, id IDInput, state *ScorecardState, opts ...ResourceOption) (*Scorecard, error)
public static Scorecard Get(string name, Input<string> id, ScorecardState? state, CustomResourceOptions? opts = null)
public static Scorecard get(String name, Output<String> id, ScorecardState state, CustomResourceOptions options)
resources: _: type: port:Scorecard get: id: ${id}
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Blueprint string
- The blueprint of the scorecard
- Created
At string - The creation date of the scorecard
- Created
By string - The creator of the scorecard
- Filter
port_
labs. Port. Inputs. Scorecard Filter - The filter to apply on the entities before calculating the scorecard
- Identifier string
- The identifier of the scorecard
- Levels
List<port_
labs. Port. Inputs. Scorecard Level> - The levels of the scorecard. This overrides the default levels (Basic, Bronze, Silver, Gold) if provided
- Rules
List<port_
labs. Port. Inputs. Scorecard Rule> - The rules of the scorecard
- Title string
- The title of the scorecard
- Updated
At string - The last update date of the scorecard
- Updated
By string - The last updater of the scorecard
- Blueprint string
- The blueprint of the scorecard
- Created
At string - The creation date of the scorecard
- Created
By string - The creator of the scorecard
- Filter
Scorecard
Filter Args - The filter to apply on the entities before calculating the scorecard
- Identifier string
- The identifier of the scorecard
- Levels
[]Scorecard
Level Args - The levels of the scorecard. This overrides the default levels (Basic, Bronze, Silver, Gold) if provided
- Rules
[]Scorecard
Rule Args - The rules of the scorecard
- Title string
- The title of the scorecard
- Updated
At string - The last update date of the scorecard
- Updated
By string - The last updater of the scorecard
- blueprint String
- The blueprint of the scorecard
- created
At String - The creation date of the scorecard
- created
By String - The creator of the scorecard
- filter
Scorecard
Filter - The filter to apply on the entities before calculating the scorecard
- identifier String
- The identifier of the scorecard
- levels
List<Scorecard
Level> - The levels of the scorecard. This overrides the default levels (Basic, Bronze, Silver, Gold) if provided
- rules
List<Scorecard
Rule> - The rules of the scorecard
- title String
- The title of the scorecard
- updated
At String - The last update date of the scorecard
- updated
By String - The last updater of the scorecard
- blueprint string
- The blueprint of the scorecard
- created
At string - The creation date of the scorecard
- created
By string - The creator of the scorecard
- filter
Scorecard
Filter - The filter to apply on the entities before calculating the scorecard
- identifier string
- The identifier of the scorecard
- levels
Scorecard
Level[] - The levels of the scorecard. This overrides the default levels (Basic, Bronze, Silver, Gold) if provided
- rules
Scorecard
Rule[] - The rules of the scorecard
- title string
- The title of the scorecard
- updated
At string - The last update date of the scorecard
- updated
By string - The last updater of the scorecard
- blueprint str
- The blueprint of the scorecard
- created_
at str - The creation date of the scorecard
- created_
by str - The creator of the scorecard
- filter
Scorecard
Filter Args - The filter to apply on the entities before calculating the scorecard
- identifier str
- The identifier of the scorecard
- levels
Sequence[Scorecard
Level Args] - The levels of the scorecard. This overrides the default levels (Basic, Bronze, Silver, Gold) if provided
- rules
Sequence[Scorecard
Rule Args] - The rules of the scorecard
- title str
- The title of the scorecard
- updated_
at str - The last update date of the scorecard
- updated_
by str - The last updater of the scorecard
- blueprint String
- The blueprint of the scorecard
- created
At String - The creation date of the scorecard
- created
By String - The creator of the scorecard
- filter Property Map
- The filter to apply on the entities before calculating the scorecard
- identifier String
- The identifier of the scorecard
- levels List<Property Map>
- The levels of the scorecard. This overrides the default levels (Basic, Bronze, Silver, Gold) if provided
- rules List<Property Map>
- The rules of the scorecard
- title String
- The title of the scorecard
- updated
At String - The last update date of the scorecard
- updated
By String - The last updater of the scorecard
Supporting Types
ScorecardFilter, ScorecardFilterArgs
- Combinator
This property is required. string - The combinator of the filter
- Conditions
This property is required. List<string> - The conditions of the filter. Each condition object should be encoded to a string
- Combinator
This property is required. string - The combinator of the filter
- Conditions
This property is required. []string - The conditions of the filter. Each condition object should be encoded to a string
- combinator
This property is required. String - The combinator of the filter
- conditions
This property is required. List<String> - The conditions of the filter. Each condition object should be encoded to a string
- combinator
This property is required. string - The combinator of the filter
- conditions
This property is required. string[] - The conditions of the filter. Each condition object should be encoded to a string
- combinator
This property is required. str - The combinator of the filter
- conditions
This property is required. Sequence[str] - The conditions of the filter. Each condition object should be encoded to a string
- combinator
This property is required. String - The combinator of the filter
- conditions
This property is required. List<String> - The conditions of the filter. Each condition object should be encoded to a string
ScorecardLevel, ScorecardLevelArgs
ScorecardRule, ScorecardRuleArgs
- Identifier
This property is required. string - The identifier of the rule
- Level
This property is required. string - The level of the rule
- Query
This property is required. port_labs. Port. Inputs. Scorecard Rule Query - The query of the rule
- Title
This property is required. string - The title of the rule
- Description string
- The description of the rule
- Identifier
This property is required. string - The identifier of the rule
- Level
This property is required. string - The level of the rule
- Query
This property is required. ScorecardRule Query - The query of the rule
- Title
This property is required. string - The title of the rule
- Description string
- The description of the rule
- identifier
This property is required. String - The identifier of the rule
- level
This property is required. String - The level of the rule
- query
This property is required. ScorecardRule Query - The query of the rule
- title
This property is required. String - The title of the rule
- description String
- The description of the rule
- identifier
This property is required. string - The identifier of the rule
- level
This property is required. string - The level of the rule
- query
This property is required. ScorecardRule Query - The query of the rule
- title
This property is required. string - The title of the rule
- description string
- The description of the rule
- identifier
This property is required. str - The identifier of the rule
- level
This property is required. str - The level of the rule
- query
This property is required. ScorecardRule Query - The query of the rule
- title
This property is required. str - The title of the rule
- description str
- The description of the rule
- identifier
This property is required. String - The identifier of the rule
- level
This property is required. String - The level of the rule
- query
This property is required. Property Map - The query of the rule
- title
This property is required. String - The title of the rule
- description String
- The description of the rule
ScorecardRuleQuery, ScorecardRuleQueryArgs
- Combinator
This property is required. string - The combinator of the query
- Conditions
This property is required. List<string> - The conditions of the query. Each condition object should be encoded to a string
- Combinator
This property is required. string - The combinator of the query
- Conditions
This property is required. []string - The conditions of the query. Each condition object should be encoded to a string
- combinator
This property is required. String - The combinator of the query
- conditions
This property is required. List<String> - The conditions of the query. Each condition object should be encoded to a string
- combinator
This property is required. string - The combinator of the query
- conditions
This property is required. string[] - The conditions of the query. Each condition object should be encoded to a string
- combinator
This property is required. str - The combinator of the query
- conditions
This property is required. Sequence[str] - The conditions of the query. Each condition object should be encoded to a string
- combinator
This property is required. String - The combinator of the query
- conditions
This property is required. List<String> - The conditions of the query. Each condition object should be encoded to a string
Package Details
- Repository
- port port-labs/pulumi-port
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
port-labs
Terraform Provider.