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
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,
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,
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,
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,
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())
.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}
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,
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 string
- The unique name of the resource.
- args ScorecardArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args ScorecardArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ScorecardArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
},
},
Title = "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"),
},
},
Title: 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")
.build())
.title("string")
.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",
}],
title="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",
}],
title: "string",
levels: [{
color: "string",
title: "string",
}],
});
type: port:Scorecard
properties:
blueprint: string
identifier: string
levels:
- color: string
title: string
rules:
- 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 string
- The blueprint of the scorecard
- Identifier string
- The identifier of the scorecard
- Rules
List<port_
labs. Port. Inputs. Scorecard Rule> - The rules of the scorecard
- Title string
- The title 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
- Blueprint string
- The blueprint of the scorecard
- Identifier string
- The identifier of the scorecard
- Rules
[]Scorecard
Rule Args - The rules of the scorecard
- Title string
- The title of the scorecard
- Levels
[]Scorecard
Level Args - The levels of the scorecard. This overrides the default levels (Basic, Bronze, Silver, Gold) if provided
- blueprint String
- The blueprint of the scorecard
- identifier String
- The identifier of the scorecard
- rules
List<Scorecard
Rule> - The rules of the scorecard
- title String
- The title of the scorecard
- levels
List<Scorecard
Level> - The levels of the scorecard. This overrides the default levels (Basic, Bronze, Silver, Gold) if provided
- blueprint string
- The blueprint of the scorecard
- identifier string
- The identifier of the scorecard
- rules
Scorecard
Rule[] - The rules of the scorecard
- title string
- The title of the scorecard
- levels
Scorecard
Level[] - The levels of the scorecard. This overrides the default levels (Basic, Bronze, Silver, Gold) if provided
- blueprint str
- The blueprint of the scorecard
- identifier str
- The identifier of the scorecard
- rules
Sequence[Scorecard
Rule Args] - The rules of the scorecard
- title str
- The title of the scorecard
- levels
Sequence[Scorecard
Level Args] - The levels of the scorecard. This overrides the default levels (Basic, Bronze, Silver, Gold) if provided
- blueprint String
- The blueprint of the scorecard
- identifier String
- The identifier of the scorecard
- rules List<Property Map>
- The rules of the scorecard
- title String
- The title of 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,
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)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- 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
- 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
- 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
- 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
- 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
- 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
ScorecardLevel, ScorecardLevelArgs
ScorecardRule, ScorecardRuleArgs
- Identifier string
- The identifier of the rule
- Level string
- The level of the rule
- Query
port_
labs. Port. Inputs. Scorecard Rule Query - The query of the rule
- Title string
- The title of the rule
- Identifier string
- The identifier of the rule
- Level string
- The level of the rule
- Query
Scorecard
Rule Query - The query of the rule
- Title string
- The title of the rule
- identifier String
- The identifier of the rule
- level String
- The level of the rule
- query
Scorecard
Rule Query - The query of the rule
- title String
- The title of the rule
- identifier string
- The identifier of the rule
- level string
- The level of the rule
- query
Scorecard
Rule Query - The query of the rule
- title string
- The title of the rule
- identifier str
- The identifier of the rule
- level str
- The level of the rule
- query
Scorecard
Rule Query - The query of the rule
- title str
- The title of the rule
- identifier String
- The identifier of the rule
- level String
- The level of the rule
- query Property Map
- The query of the rule
- title String
- The title of the rule
ScorecardRuleQuery, ScorecardRuleQueryArgs
- Combinator string
- The combinator of the query
- Conditions List<string>
- The conditions of the query. Each condition object should be encoded to a string
- Combinator string
- The combinator of the query
- Conditions []string
- The conditions of the query. Each condition object should be encoded to a string
- combinator String
- The combinator of the query
- conditions List<String>
- The conditions of the query. Each condition object should be encoded to a string
- combinator string
- The combinator of the query
- conditions string[]
- The conditions of the query. Each condition object should be encoded to a string
- combinator str
- The combinator of the query
- conditions Sequence[str]
- The conditions of the query. Each condition object should be encoded to a string
- combinator String
- The combinator of the query
- conditions 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.